{"openapi":"3.0.3","info":{"title":"Atlas API","version":"v1","description":"Atlas holds UK public register data about organisations and premises, joined into one set of entities, and returns it as JSON over HTTPS at `https://api.atlas.oromiq.com/v1`. This reference gives every operation, every field and every error code. The [guides](https://atlas.oromiq.com/developers/guides/) explain the ideas, starting with [Concepts](https://atlas.oromiq.com/developers/guides/concepts/), which defines every word used here.\n\n## Authentication\n\nSend your key as a bearer token on every call: `Authorization: Bearer <key>`. Your client key manages your account. Data is read as a consumer (a party inside your account, such as a tenant or an environment), so on every data call name one of your consumers in the `x-atlas-consumer` header. Keep keys on your servers, never in a browser or an app you ship.\n\n## Where to start\n\n1. `POST /v1/consumers` makes a consumer with a plan and the layers it may read.\n2. `GET /v1/catalogue?layers=subscribed` lists the fields you can search on and the operators each takes.\n3. `POST /v1/search/count` says how many entities match your conditions. `POST /v1/search` returns them a page at a time: send back `next` as `cursor` for the next page.\n4. `GET /v1/entities/{entityId}` returns everything the layers hold about one entity.\n5. `PUT /v1/holdings` tells Atlas which entities you keep records of. Some data, such as people, is answered only for those.\n\n## Answers\n\nEvery answer is JSON with the result in `data`. A list pages by cursor. Every answer carries the headers `x-atlas-surface` (the version of the fields and options you receive), `x-atlas-release` (the version of the data) and `x-ratelimit-limit`, `x-ratelimit-remaining` and `x-ratelimit-reset`. Every operation names the layers it reads in `layers`; a layer the consumer is not subscribed to is refused with `LAYER_NOT_SUBSCRIBED` and the list of what it may read.\n\n## Your duties\n\nEach register has a licence, and most ask that its attribution line is shown with its data. The lines travel in every answer that carries data, and each operation below ends with what you must do with what it returns.\n\n## Errors\n\nEvery error comes with an HTTP status and the same body, `{ \"error\": { \"code\", \"message\" } }`. The `code` is stable and machine-readable; the `message` is for a person and often says what to send instead. Anything a failed call charged is given back. Each operation lists the codes it can answer; the [errors guide](https://atlas.oromiq.com/developers/guides/errors/) explains every one and how to fix it.\n\n- **400** The request cannot be answered as sent: `CONDITIONS_INVALID`, `EXCLUDE_TOO_LARGE`, `INTEREST_CURSOR_INVALID`, `INTEREST_FIELD_INVALID`, `INTEREST_WINDOW_INVALID`, `INVALID_JSON`, `INVALID_REQUEST`, `LAYER_NOT_AVAILABLE`, `LICENCE_REFUSED`, `NARROWING_REQUIRED`, `PACK_NOT_FOUND`, `SCOPE_UNAVAILABLE`, `SEARCH_CURSOR_INVALID`, `STATS_INVALID`, `TENANT_LIMIT_REACHED`, `TIER_NOT_AVAILABLE`, `TIER_REQUIRED`, `TIER_RETIRED`, `TOKEN_CAP_ABOVE_ALLOWANCE`, `TOPUP_NOT_OFFERED`, `VALIDATION`, `VIA_NOT_CONNECTED`, `WATCH_ENTITY_NOT_IN_LAYERS`, `WATCH_NOT_LIVE`, `WEBHOOK_URL_NOT_ALLOWED`\n- **401** No current key: `CONSUMER_KEY_EXPIRED`, `UNAUTHENTICATED`\n- **402** Not enough tokens: `TOKENS_EXHAUSTED`\n- **403** Refused for this caller: `CLIENT_SUSPENDED`, `CONNECTION_NOT_ALLOWED`, `CONSUMER_CANNOT_MANAGE`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_REQUIRED`, `CONSUMER_SUSPENDED`, `INTEREST_LAYER_NOT_ALLOWED`, `INTEREST_PERSON_FIELD`, `LAYER_NOT_SUBSCRIBED`\n- **404** Not found: `CONNECTION_NOT_FOUND`, `CONNECTION_REQUEST_NOT_FOUND`, `CONSUMER_NOT_FOUND`, `INTEREST_NOT_FOUND`, `LINK_NOT_FOUND`, `NOT_FOUND`, `REPORT_NOT_FOUND`, `SAVED_SEARCH_NOT_FOUND`, `WATCH_ENTITY_NOT_FOUND`, `WEBHOOK_NOT_FOUND`\n- **409** In conflict with what is already recorded: `BILLING_NOT_SET_UP`, `INTEREST_LIMIT_REACHED`, `LINK_ALREADY_REVIEWED`, `WEBHOOK_PAUSED`\n- **413** The body is too large: `PAYLOAD_TOO_LARGE`\n- **422** Cannot be answered as asked: `NO_AREA`, `REPORT_TOO_LARGE`, `STATS_TIMEOUT`, `STATS_TOO_LARGE`, `TOO_BROAD`, `TOO_MANY_GROUPS`, `TOO_MANY_REPORTS`\n- **429** Over the rate: `RATE_LIMITED`\n- **500** Atlas could not answer: `CONTRACT_MISMATCH`, `INTERNAL`, `TOO_MANY_GROUPS`\n- **501** Not available: `NOT_IMPLEMENTED`\n- **503** Temporarily unavailable: `GEOGRAPHY_UNAVAILABLE`, `NOT_CONFIGURED`, `NOT_READY`, `VIA_UNAVAILABLE`"},"servers":[{"url":"https://api.atlas.oromiq.com","description":"Production"}],"components":{"examples":{"INVALID_REQUEST":{"summary":"INVALID_REQUEST","value":{"error":{"code":"INVALID_REQUEST","message":"The path, query or body does not match the contract: a field missing, of the wrong type, out of range or not allowed. The message names the part and the first field at fault."}}},"INVALID_JSON":{"summary":"INVALID_JSON","value":{"error":{"code":"INVALID_JSON","message":"The request body is not valid JSON."}}},"VALIDATION":{"summary":"VALIDATION","value":{"error":{"code":"VALIDATION","message":"A value of the right form that is still not one Atlas can read, such as a date written YYYY-MM-DD that is not a real day."}}},"UNAUTHENTICATED":{"summary":"UNAUTHENTICATED","value":{"error":{"code":"UNAUTHENTICATED","message":"No key, or a key Atlas does not recognise: mistyped, cut short, rotated or revoked."}}},"CLIENT_SUSPENDED":{"summary":"CLIENT_SUSPENDED","value":{"error":{"code":"CLIENT_SUSPENDED","message":"A consumer key of a suspended client. While a client is suspended none of its keys work: its client key is refused as not current (`UNAUTHENTICATED`)."}}},"NOT_FOUND":{"summary":"NOT_FOUND","value":{"error":{"code":"NOT_FOUND","message":"Nothing to answer at this address: no such operation, or no such entity, consumer, key or other resource for this caller."}}},"PAYLOAD_TOO_LARGE":{"summary":"PAYLOAD_TOO_LARGE","value":{"error":{"code":"PAYLOAD_TOO_LARGE","message":"The request body is over 8 MB."}}},"INTERNAL":{"summary":"INTERNAL","value":{"error":{"code":"INTERNAL","message":"Atlas could not answer. Anything the call charged is given back before the error is sent."}}},"CONTRACT_MISMATCH":{"summary":"CONTRACT_MISMATCH","value":{"error":{"code":"CONTRACT_MISMATCH","message":"Atlas could not form a valid answer, so none was sent. Anything the call charged is given back."}}},"NOT_IMPLEMENTED":{"summary":"NOT_IMPLEMENTED","value":{"error":{"code":"NOT_IMPLEMENTED","message":"The operation is not available."}}},"NOT_READY":{"summary":"NOT_READY","value":{"error":{"code":"NOT_READY","message":"Atlas has no data to answer from at the moment."}}},"NOT_CONFIGURED":{"summary":"NOT_CONFIGURED","value":{"error":{"code":"NOT_CONFIGURED","message":"This part of Atlas is not set up here: charging, where no payment provider is connected."}}},"CONSUMER_NOT_FOUND":{"summary":"CONSUMER_NOT_FOUND","value":{"error":{"code":"CONSUMER_NOT_FOUND","message":"No consumer of this client has the id named in the x-atlas-consumer header or in the path."}}},"CONSUMER_SUSPENDED":{"summary":"CONSUMER_SUSPENDED","value":{"error":{"code":"CONSUMER_SUSPENDED","message":"The consumer is suspended."}}},"CONSUMER_CANNOT_MANAGE":{"summary":"CONSUMER_CANNOT_MANAGE","value":{"error":{"code":"CONSUMER_CANNOT_MANAGE","message":"A consumer called an operation only the client itself may make."}}},"CONSUMER_REQUIRED":{"summary":"CONSUMER_REQUIRED","value":{"error":{"code":"CONSUMER_REQUIRED","message":"A client (no consumer) called an operation that reads data: data is read as a consumer."}}},"LAYER_NOT_SUBSCRIBED":{"summary":"LAYER_NOT_SUBSCRIBED","value":{"error":{"code":"LAYER_NOT_SUBSCRIBED","message":"A layer in the scope the subject is not subscribed to. The message lists what it may read."}}},"LAYER_NOT_AVAILABLE":{"summary":"LAYER_NOT_AVAILABLE","value":{"error":{"code":"LAYER_NOT_AVAILABLE","message":"A layer that is not available to this client."}}},"TIER_NOT_AVAILABLE":{"summary":"TIER_NOT_AVAILABLE","value":{"error":{"code":"TIER_NOT_AVAILABLE","message":"No such plan, or one not offered to this client."}}},"TIER_RETIRED":{"summary":"TIER_RETIRED","value":{"error":{"code":"TIER_RETIRED","message":"A plan that is retired: not given to a new consumer or a change of plan."}}},"TIER_REQUIRED":{"summary":"TIER_REQUIRED","value":{"error":{"code":"TIER_REQUIRED","message":"A consumer made without a plan: a plan is required."}}},"PACK_NOT_FOUND":{"summary":"PACK_NOT_FOUND","value":{"error":{"code":"PACK_NOT_FOUND","message":"No layer pack by that key."}}},"TENANT_LIMIT_REACHED":{"summary":"TENANT_LIMIT_REACHED","value":{"error":{"code":"TENANT_LIMIT_REACHED","message":"More consumers than the plan allows: the plan includes a number and lets none be added."}}},"RATE_LIMITED":{"summary":"RATE_LIMITED","value":{"error":{"code":"RATE_LIMITED","message":"Over the tier's rate."}}},"TOKENS_EXHAUSTED":{"summary":"TOKENS_EXHAUSTED","value":{"error":{"code":"TOKENS_EXHAUSTED","message":"Not enough tokens for what was asked. Nothing is charged or served; what was already bought stays readable."}}},"BILLING_NOT_SET_UP":{"summary":"BILLING_NOT_SET_UP","value":{"error":{"code":"BILLING_NOT_SET_UP","message":"Billing is not set up for the client: no billing email yet."}}},"TOPUP_NOT_OFFERED":{"summary":"TOPUP_NOT_OFFERED","value":{"error":{"code":"TOPUP_NOT_OFFERED","message":"The consumer's plan offers no top-ups."}}},"CONSUMER_KEYS_NOT_ALLOWED":{"summary":"CONSUMER_KEYS_NOT_ALLOWED","value":{"error":{"code":"CONSUMER_KEYS_NOT_ALLOWED","message":"The client does not allow consumer keys: none is made, and one presented is refused. Call with the client key and x-atlas-consumer."}}},"CONSUMER_KEY_EXPIRED":{"summary":"CONSUMER_KEY_EXPIRED","value":{"error":{"code":"CONSUMER_KEY_EXPIRED","message":"The consumer key has passed its expiry."}}},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"summary":"CONSUMER_KEY_ADDRESS_NOT_ALLOWED","value":{"error":{"code":"CONSUMER_KEY_ADDRESS_NOT_ALLOWED","message":"The consumer key is limited to addresses the call did not come from."}}},"TOKEN_CAP_ABOVE_ALLOWANCE":{"summary":"TOKEN_CAP_ABOVE_ALLOWANCE","value":{"error":{"code":"TOKEN_CAP_ABOVE_ALLOWANCE","message":"A consumer's token cap above its tier's monthly allowance."}}},"LINK_NOT_FOUND":{"summary":"LINK_NOT_FOUND","value":{"error":{"code":"LINK_NOT_FOUND","message":"No such link, or one that is no longer shown."}}},"LINK_ALREADY_REVIEWED":{"summary":"LINK_ALREADY_REVIEWED","value":{"error":{"code":"LINK_ALREADY_REVIEWED","message":"A \"same\" flag on a match already confirmed."}}},"CONNECTION_REQUEST_NOT_FOUND":{"summary":"CONNECTION_REQUEST_NOT_FOUND","value":{"error":{"code":"CONNECTION_REQUEST_NOT_FOUND","message":"No sign-in request with that id, or one already decided or lapsed."}}},"CONNECTION_NOT_FOUND":{"summary":"CONNECTION_NOT_FOUND","value":{"error":{"code":"CONNECTION_NOT_FOUND","message":"No connection of this client with that id."}}},"CONNECTION_NOT_ALLOWED":{"summary":"CONNECTION_NOT_ALLOWED","value":{"error":{"code":"CONNECTION_NOT_ALLOWED","message":"An assistant’s connection presented on an operation it may not make: it reads through the MCP endpoint only."}}},"INTEREST_LIMIT_REACHED":{"summary":"INTEREST_LIMIT_REACHED","value":{"error":{"code":"INTEREST_LIMIT_REACHED","message":"The consumer has 50 interests already: delete one first."}}},"INTEREST_NOT_FOUND":{"summary":"INTEREST_NOT_FOUND","value":{"error":{"code":"INTEREST_NOT_FOUND","message":"No such interest of this consumer."}}},"INTEREST_LAYER_NOT_ALLOWED":{"summary":"INTEREST_LAYER_NOT_ALLOWED","value":{"error":{"code":"INTEREST_LAYER_NOT_ALLOWED","message":"A layer whose licence allows no standing search (the ICO, HM Land Registry: enrichment only), or a reference layer."}}},"INTEREST_PERSON_FIELD":{"summary":"INTEREST_PERSON_FIELD","value":{"error":{"code":"INTEREST_PERSON_FIELD","message":"A condition or watched field about a person: never a criterion or something watched."}}},"INTEREST_FIELD_INVALID":{"summary":"INTEREST_FIELD_INVALID","value":{"error":{"code":"INTEREST_FIELD_INVALID","message":"A watched field the layers in scope do not send."}}},"WATCH_NOT_LIVE":{"summary":"WATCH_NOT_LIVE","value":{"error":{"code":"WATCH_NOT_LIVE","message":"A watch Atlas cannot answer on these layers or fields."}}},"WATCH_ENTITY_NOT_FOUND":{"summary":"WATCH_ENTITY_NOT_FOUND","value":{"error":{"code":"WATCH_ENTITY_NOT_FOUND","message":"A watched entity Atlas has never issued."}}},"WATCH_ENTITY_NOT_IN_LAYERS":{"summary":"WATCH_ENTITY_NOT_IN_LAYERS","value":{"error":{"code":"WATCH_ENTITY_NOT_IN_LAYERS","message":"A watched entity with no current record in the watch's layers."}}},"WEBHOOK_URL_NOT_ALLOWED":{"summary":"WEBHOOK_URL_NOT_ALLOWED","value":{"error":{"code":"WEBHOOK_URL_NOT_ALLOWED","message":"A webhook address that is not https, or that reaches a private, loopback or link-local address."}}},"WEBHOOK_NOT_FOUND":{"summary":"WEBHOOK_NOT_FOUND","value":{"error":{"code":"WEBHOOK_NOT_FOUND","message":"The consumer has no webhook."}}},"WEBHOOK_PAUSED":{"summary":"WEBHOOK_PAUSED","value":{"error":{"code":"WEBHOOK_PAUSED","message":"A redelivery while the webhook is paused: register it again first."}}},"INTEREST_WINDOW_INVALID":{"summary":"INTEREST_WINDOW_INVALID","value":{"error":{"code":"INTEREST_WINDOW_INVALID","message":"A window that ends before it starts."}}},"INTEREST_CURSOR_INVALID":{"summary":"INTEREST_CURSOR_INVALID","value":{"error":{"code":"INTEREST_CURSOR_INVALID","message":"A feed cursor that is not this consumer's, not one Atlas issued, or past the end of its feed."}}},"REPORT_NOT_FOUND":{"summary":"REPORT_NOT_FOUND","value":{"error":{"code":"REPORT_NOT_FOUND","message":"A report that is not this consumer's, never was, or was deleted."}}},"TOO_MANY_REPORTS":{"summary":"TOO_MANY_REPORTS","value":{"error":{"code":"TOO_MANY_REPORTS","message":"This consumer keeps 50 reports already: delete one first."}}},"REPORT_TOO_LARGE":{"summary":"REPORT_TOO_LARGE","value":{"error":{"code":"REPORT_TOO_LARGE","message":"The query's answer could be too large to keep: ask for fewer groups or fewer distributions."}}},"CONDITIONS_INVALID":{"summary":"CONDITIONS_INVALID","value":{"error":{"code":"CONDITIONS_INVALID","message":"A condition the catalogue refuses: unknown field, wrong operator or value."}}},"NARROWING_REQUIRED":{"summary":"NARROWING_REQUIRED","value":{"error":{"code":"NARROWING_REQUIRED","message":"No narrowing field with a positive operator."}}},"TOO_BROAD":{"summary":"TOO_BROAD","value":{"error":{"code":"TOO_BROAD","message":"The search covers too much of a register, or ran out of time."}}},"SAVED_SEARCH_NOT_FOUND":{"summary":"SAVED_SEARCH_NOT_FOUND","value":{"error":{"code":"SAVED_SEARCH_NOT_FOUND","message":"A saved search that is not this consumer's, never was, or has expired (kept 90 days)."}}},"EXCLUDE_TOO_LARGE":{"summary":"EXCLUDE_TOO_LARGE","value":{"error":{"code":"EXCLUDE_TOO_LARGE","message":"More to leave out than one search takes: see the limits on `exclude`."}}},"SEARCH_CURSOR_INVALID":{"summary":"SEARCH_CURSOR_INVALID","value":{"error":{"code":"SEARCH_CURSOR_INVALID","message":"A cursor that is not a saved search's page, or not this consumer's, or a filter's cursor sent with another filter or saved search: run the search again."}}},"VIA_NOT_CONNECTED":{"summary":"VIA_NOT_CONNECTED","value":{"error":{"code":"VIA_NOT_CONNECTED","message":"A condition's `via` that does not connect: the search has no level condition, its level is not the one the relation starts from (organisation for premises, premises for operator), or the field does not live where the relation leads (the catalogue's levels), or is the level itself."}}},"VIA_UNAVAILABLE":{"summary":"VIA_UNAVAILABLE","value":{"error":{"code":"VIA_UNAVAILABLE","message":"A search with `via` cannot be answered at the moment; a search without `via` is unaffected."}}},"STATS_INVALID":{"summary":"STATS_INVALID","value":{"error":{"code":"STATS_INVALID","message":"A grouping or a measure the catalogue cannot answer: unknown field, a measure its type does not take."}}},"LICENCE_REFUSED":{"summary":"LICENCE_REFUSED","value":{"error":{"code":"LICENCE_REFUSED","message":"A field its licence keeps out of stats: an enrichment-only layer's (the ICO's) as a condition, grouping or measure; a name, an address or a postcode as a grouping; a field about a person as a grouping or measure."}}},"TOO_MANY_GROUPS":{"summary":"TOO_MANY_GROUPS","value":{"error":{"code":"TOO_MANY_GROUPS","message":"The groupings would make more groups than one query may: group more coarsely, or narrow."}}},"STATS_TIMEOUT":{"summary":"STATS_TIMEOUT","value":{"error":{"code":"STATS_TIMEOUT","message":"The query ran past its time limit (10 seconds): narrow it, or ask for fewer measures."}}},"STATS_TOO_LARGE":{"summary":"STATS_TOO_LARGE","value":{"error":{"code":"STATS_TOO_LARGE","message":"The query is too large to answer: narrow it, or ask for fewer measures."}}},"SCOPE_UNAVAILABLE":{"summary":"SCOPE_UNAVAILABLE","value":{"error":{"code":"SCOPE_UNAVAILABLE","message":"A scope this operation does not take, such as a saved search in a saved report."}}},"NO_AREA":{"summary":"NO_AREA","value":{"error":{"code":"NO_AREA","message":"A scope's entity has no value for the area asked for (`near`), so it has no area to measure."}}},"GEOGRAPHY_UNAVAILABLE":{"summary":"GEOGRAPHY_UNAVAILABLE","value":{"error":{"code":"GEOGRAPHY_UNAVAILABLE","message":"This area (ward, icb or country) is not available at the moment: group or scope by region or localAuthority."}}}},"securitySchemes":{"clientKey":{"type":"http","scheme":"bearer","description":"A client key: acts for that client only."}},"schemas":{"EntityId":{"type":"string","pattern":"^(org|prm)_[A-Za-z0-9_-]{20}$","description":"An entity id: org_ for an organisation or prm_ for a premises, then 20 characters. It never changes."},"ClientId":{"type":"string","pattern":"^cl_[A-Za-z0-9_-]{12,40}$","description":"A client id. It starts cl_."},"LayerKey":{"type":"string","pattern":"^[a-z][a-z0-9_-]{1,40}$","description":"A layer key, such as companies_house, cqc or fsa. `GET /v1/layers` lists every layer with its licence."},"SourceKey":{"type":"string","pattern":"^[a-z][a-z0-9_-]{1,40}$","description":"A register within a layer, for example a layer's providers or locations."},"LayerScope":{"type":"array","items":{"$ref":"#/components/schemas/LayerKey"},"maxItems":30,"description":"The layers to read, by key, such as companies_house or cqc, or the one word subscribed for every layer the consumer is subscribed to. Nothing is read from any other layer. At most 30.","example":["cqc","companies_house"]},"IsoDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"A calendar date, YYYY-MM-DD."},"IsoDateTime":{"type":"string","format":"date-time","description":"An instant, ISO 8601 in UTC."},"Cursor":{"type":"string","minLength":1,"maxLength":200,"description":"An opaque page token: send back the `next` value of the previous page. Leave out for the first page.","example":"eyJhZnRlciI6Im9yZ183cG1YYTdVVWhxRmJHZFF3OW1FMSJ9"},"RegisterRef":{"type":"object","properties":{"layer":{"$ref":"#/components/schemas/LayerKey"},"source":{"$ref":"#/components/schemas/SourceKey"},"externalId":{"type":"string","minLength":1,"maxLength":256,"description":"The register's own id for the record. At most 256 characters."}},"required":["layer","source","externalId"],"description":"One record in one register.","example":{"layer":"cqc","source":"locations","externalId":"1-2000000001"}},"EntityLevel":{"type":"string","enum":["organisation","premises"],"description":"Which kind of entity it is: an organisation or a premises."},"EntityStatus":{"type":"string","enum":["active","closed"],"description":"Whether the entity is active or closed."},"MemberConfidence":{"type":"string","enum":["match","high"],"description":"How sure Atlas is that the record belongs to the entity. match is confirmed. high is a strong likely match, not confirmed, and comes with verified false."},"FieldType":{"type":"string","enum":["enum","string","number","boolean","array","date"],"description":"The type of a value: enum, string, number, boolean, array or date."},"FactValue":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"nullable":true}],"description":"The value of a fact: text, a number, true or false, or null when the register gives none."},"Fact":{"type":"object","properties":{"layer":{"$ref":"#/components/schemas/LayerKey"},"source":{"$ref":"#/components/schemas/SourceKey"},"key":{"type":"string","minLength":1,"description":"The field key of the fact, as the catalogue lists it, for example cqc.rating."},"label":{"type":"string","minLength":1,"description":"A short name for the fact, ready to show."},"value":{"$ref":"#/components/schemas/FactValue"},"type":{"$ref":"#/components/schemas/FieldType"},"asOf":{"type":"string","nullable":true,"pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"The date the fact is current to: the register's own date for it, or the date it was last read from the register. Null when neither is known. Show it with the fact for a layer whose licence asks for the date."}},"required":["layer","source","key","label","value","asOf"],"description":"One thing a register says about an entity."},"Attribution":{"type":"object","properties":{"layer":{"$ref":"#/components/schemas/LayerKey"},"text":{"type":"string","minLength":1,"description":"The line that must be shown wherever this layer's data is shown."},"url":{"type":"string","format":"uri","description":"A link to the licence or the register, to show with the line where you can. Present only when the licence gives one."}},"required":["layer","text"],"description":"A licence's attribution line: show `text` wherever this layer's data is shown."},"TradingPlace":{"type":"object","properties":{"outwardCode":{"type":"string","nullable":true,"description":"The first part of the postcode, for example EH12. Null when none is known."},"town":{"type":"string","nullable":true,"description":"The town. Null when none is known."},"basis":{"type":"string","enum":["premises","trading_address"],"description":"premises: a place the organisation operates, an entity of its own. trading_address: the address a register gives for the organisation itself, such as the ICO, the gender pay gap register or a regulator."},"entityId":{"type":"string","pattern":"^(org|prm)_[A-Za-z0-9_-]{20}$","description":"The premises entity. Present only when basis is premises."},"register":{"type":"object","properties":{"layer":{"$ref":"#/components/schemas/LayerKey"},"source":{"$ref":"#/components/schemas/SourceKey"},"externalId":{"type":"string","minLength":1,"maxLength":256,"description":"The register's own id for the record. At most 256 characters."}},"required":["layer","source","externalId"],"description":"The record the address comes from. Present only when basis is trading_address."}},"required":["outwardCode","town","basis"],"description":"Where an organisation trades, as far as the registers say: never its registered office."},"AttachedRecord":{"type":"object","properties":{"layer":{"$ref":"#/components/schemas/LayerKey"},"source":{"$ref":"#/components/schemas/SourceKey"},"externalId":{"type":"string","minLength":1,"maxLength":256,"description":"The register's own key for the record, up to 256 characters."},"asOf":{"type":"string","nullable":true,"pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"The date the record is ordered by, its newest date. Null when none is known."},"until":{"type":"string","nullable":true,"pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"The date the register stopped carrying the record, such as an assessment superseded or a filing withdrawn. Null while current. An ended record stays in the list."},"values":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/FactValue"},"description":"The record's fields, under the keys the catalogue lists without the list prefix."}},"required":["layer","source","externalId","asOf","values"],"description":"One record kept whole on the entity: an assessment, a filing, a certificate."},"PendingChange":{"type":"object","properties":{"layer":{"$ref":"#/components/schemas/LayerKey"},"register":{"allOf":[{"$ref":"#/components/schemas/RegisterRef"},{"description":"The record that changed."}]},"key":{"type":"string","description":"What changed: a fact under its key such as cqc.rating, status, date.<name>, gone, event.<kind>, role.<kind>, or <list> and <list>.<key> for an attached item."},"from":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"nullable":true}],"description":"The value before the change. Null when there was none."},"to":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"nullable":true}],"description":"The value after the change. Null when the value went."},"observedAt":{"allOf":[{"$ref":"#/components/schemas/IsoDateTime"},{"description":"When Atlas recorded the change."}]},"asOf":{"type":"string","nullable":true,"pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"The publisher's date for the new value, where it gives one."}},"required":["layer","register","key","from","to","observedAt","asOf"],"description":"One change that arrived after the release the answer comes from."},"EntityEvent":{"type":"object","properties":{"layer":{"$ref":"#/components/schemas/LayerKey"},"source":{"$ref":"#/components/schemas/SourceKey"},"externalId":{"type":"string","description":"The register's own id for the notice or alert."},"kind":{"type":"string","nullable":true,"description":"The register's own word for it, such as a Gazette notice's type. Null when it gives none."},"date":{"type":"string","nullable":true,"pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"The date of the notice or alert. Null when the register gives none."},"text":{"type":"string","nullable":true,"description":"The notice's or alert's title, as published."}},"required":["layer","source","externalId","kind","date","text"],"description":"A notice or an alert about the entity, such as a Gazette notice or a food alert."},"PeopleCounts":{"type":"object","properties":{"owners":{"type":"integer","minimum":0,"description":"How many individuals the register lists as having significant control today. Never a name."},"officers":{"type":"integer","minimum":0,"description":"How many officers the registers list today, such as directors, secretaries and LLP members, together with regulated roles such as a registered manager or a nominated individual. Never a name."}},"required":["owners","officers"],"description":"The people the entity's registers name today, as counts only."},"LayerCurrency":{"type":"object","properties":{"layer":{"$ref":"#/components/schemas/LayerKey"},"asAt":{"allOf":[{"$ref":"#/components/schemas/IsoDate"},{"description":"The date the layer's facts are current to. Show it wherever a fact from this layer is shown."}]},"note":{"type":"string","description":"A sentence saying how current the facts are, ready to show."}},"required":["layer","asAt","note"],"description":"A layer whose licence asks that its facts are shown with the date they are current to, such as the FSA or the Care Inspectorate."},"Place":{"type":"object","properties":{"outwardCode":{"type":"string","nullable":true,"description":"The first part of the postcode, for example EH12."},"localAuthorityCode":{"type":"string","nullable":true,"description":"The ONS code of the local authority, for example E08000035."},"localAuthority":{"type":"string","nullable":true,"description":"The local authority, by name."},"region":{"type":"string","nullable":true,"description":"The region, such as the North West. Wales, Scotland and Northern Ireland are each one region."},"country":{"type":"string","nullable":true,"description":"The country: England, Scotland, Wales or Northern Ireland."},"homeBased":{"type":"boolean","description":"True when the place is likely a private home. Its street address and full postcode are never returned."},"basis":{"type":"string","enum":["registered_office","site","unknown"],"description":"Which address the place is read from: registered_office, the registered office; site, the premises itself; unknown when no register says."},"sharedRegisteredOffice":{"type":"boolean","description":"True when the place is a registered office many companies share, such as a formation agent or an accountant, so it is not where the organisation trades. Read tradingPlaces for that."}},"required":["outwardCode","localAuthorityCode","localAuthority","region","country","homeBased","basis"],"description":"Where an entity is, in ONS Postcode Directory geography."},"Operator":{"type":"string","enum":["equals","not_equals","in","not_in","contains","not_contains","gt","gte","lt","lte","between","older_than_days","newer_than_days","before","after","starts_with","is_set","is_not_set","changed","improved","declined","was"],"description":"The comparison a condition makes. The catalogue lists the operators each field takes."},"Via":{"type":"string","enum":["premises","operator"],"description":"Read the condition on related entities rather than the entity itself. premises reads it on the premises an organisation operates, and is met when any of them meets it. operator reads it on the organisation that operates a premises. Needs a level condition naming the kind of entity the relation starts from, organisation for premises and premises for operator, and a field that lives where it leads. The catalogue lists the relations and the levels each field has."},"Condition":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":80,"description":"A field key from `GET /v1/catalogue` for the same layers: a core field such as name, postcode or region, or a layer fact such as cqc.rating."},"operator":{"allOf":[{"$ref":"#/components/schemas/Operator"},{"description":"The comparison to make, one of the operators the catalogue lists for the field. They follow its type: contains and starts_with for text, gt and between for numbers, before, after and older_than_days for dates, in for choices. In a report through `POST /v1/stats` a layer fact also takes changed, improved, declined and was, read over the history of the field, each with within. improved and declined need a field whose options are listed best first, which the catalogue marks ordered."}]},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}},{"type":"array","items":{"type":"number"},"minItems":2,"maxItems":2}],"description":"What to compare with: text, a number, true or false, a list for in and not_in, or [from, to] for between. Left out for is_set and is_not_set."},"via":{"type":"string","enum":["premises","operator"],"description":"The relation to read the condition through. A positive operator is met when any related entity meets it. A negative one, such as not_equals, not_in or not_contains, is met when at least one related entity has the field and none meets the positive form, so an organisation running no premises with the field never matches. is_set is met when any related entity has the field. is_not_set is met when none has it, which includes an entity with no related entities. Each condition through a relation stands alone, so two may be met by different related entities. Left out, the condition is on the entity itself."},"within":{"type":"object","properties":{"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"The first day of the window, YYYY-MM-DD."},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"The last day of the window, YYYY-MM-DD."}},"required":["from","to"],"description":"The window of days to look in, for changed, improved, declined and was. Required with those operators and refused with any other. The history of a field begins on a day that differs by entity, which an entity read as at a date reports, and a change before that day is not seen."}},"required":["field","operator"],"description":"One condition of a search. At least one condition must narrow the search: a positive operator on a field the catalogue marks narrowing, on the entity or through a relation.","example":{"field":"cqc.rating","operator":"equals","value":"Good"}},"EntityMember":{"type":"object","properties":{"layer":{"$ref":"#/components/schemas/LayerKey"},"source":{"$ref":"#/components/schemas/SourceKey"},"externalId":{"type":"string","description":"The register's own id for the record."},"name":{"type":"string","nullable":true,"description":"The name the register gives the record. Null when it gives none."},"confidence":{"$ref":"#/components/schemas/MemberConfidence"},"joinedBy":{"type":"string","enum":["identifier","review","match"],"description":"Why the record is part of the entity. identifier: the records share a published identifier, such as a company number. review: Atlas has confirmed it. match: a strong likely match on name and place, for you to decide."},"verified":{"type":"boolean","description":"True when the record is confirmed as part of the entity. False for a likely match, served with its confidence for you to decide."},"current":{"type":"boolean","description":"False for a record the entity no longer uses, such as a deregistered predecessor."},"status":{"$ref":"#/components/schemas/EntityStatus"},"since":{"type":"string","nullable":true,"pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"The date the record began, as the register gives it. Null when it gives none."}},"required":["layer","source","externalId","name","confidence","joinedBy","current","status","since"],"description":"One register record that belongs to the entity."},"EntityRelation":{"type":"object","properties":{"type":{"type":"string","enum":["operates","moved_to","owned_by"],"description":"What the relation is. operates: an organisation runs a premises. moved_to: the entity moved to another. owned_by: an organisation is owned by another."},"direction":{"type":"string","enum":["out","in"],"description":"out: this entity is the subject, so it operates, moved to or is owned by the other. in: the other entity is the subject."},"entityId":{"$ref":"#/components/schemas/EntityId"},"name":{"type":"string","nullable":true,"description":"The other entity's name. Null when none is known."},"since":{"type":"string","nullable":true,"pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"The date the relation began, as the register gives it. Null when it gives none."},"until":{"type":"string","nullable":true,"pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"The date the relation ended. Null while it holds."},"current":{"type":"boolean","description":"True while the relation holds."},"confidence":{"$ref":"#/components/schemas/MemberConfidence"},"verified":{"type":"boolean","description":"True when the relation is confirmed. False for a likely match, for you to decide."},"band":{"type":"string","enum":["majority","significant","other"],"description":"For owned_by: how much of the owned entity the owner holds. majority is over half of the shares or votes, significant is a quarter to a half, other is any other form of control."}},"required":["type","direction","entityId","name","since","until","current","confidence"],"description":"A link between the entity and another entity."},"Entity":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/EntityId"},"level":{"$ref":"#/components/schemas/EntityLevel"},"name":{"type":"string","nullable":true,"description":"The entity's name. Null when no register gives one."},"status":{"$ref":"#/components/schemas/EntityStatus"},"place":{"$ref":"#/components/schemas/Place"},"tradingPlaces":{"type":"array","items":{"$ref":"#/components/schemas/TradingPlace"},"description":"For an organisation: the places it trades from, in the layers in scope, one per outward code and town. Empty when no register says."},"address":{"type":"object","nullable":true,"properties":{"lines":{"type":"array","items":{"type":"string"},"description":"The street lines of the address."},"town":{"type":"string","nullable":true,"description":"The town. Null when the register gives none."},"county":{"type":"string","nullable":true,"description":"The county. Null when the register gives none."},"postcode":{"type":"string","nullable":true,"description":"The postcode. Null when the register gives none."},"country":{"type":"string","nullable":true,"description":"The country. Null when the register gives none."}},"required":["lines","town","county","postcode","country"],"description":"The full address. Present only when the entity is not a likely home, so place.homeBased is false, and the register that leads it is in scope. Never from the EPC register. Null when none may be served."},"contact":{"type":"object","properties":{"phone":{"type":"string","nullable":true,"description":"The phone number the register publishes. Null when it gives none."},"website":{"type":"string","nullable":true,"description":"The website the register publishes. Null when it gives none."}},"required":["phone","website"],"description":"The phone and website the leading record publishes, under the same conditions as address. Never from a record that names a person."},"identifiers":{"type":"object","properties":{"companyNumber":{"type":"string","description":"The company number, where a register gives one."},"uprn":{"type":"string","description":"The Unique Property Reference Number, where a register gives one."}},"description":"Published identifiers the entity carries, for keying it to your own records."},"records":{"type":"array","items":{"$ref":"#/components/schemas/EntityMember"},"description":"The register records that make up the entity, one per register."},"layers":{"type":"array","items":{"type":"string"},"description":"The layers in scope that hold something about the entity, whether records, facts, lists or events, by layer key, sorted. A layer that is read on held entities only, such as the ICO, is listed only for an entity the client holds."},"facts":{"type":"array","items":{"$ref":"#/components/schemas/Fact"},"description":"What the registers say about the entity, one fact per field, in the layers in scope."},"attached":{"type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/AttachedRecord"}},"description":"Records about the entity kept whole, by list name such as assessments or filings. Each list is newest first, in the layers in scope. Their searchable fields are in the catalogue as <layer>.<list>.<key>."},"events":{"type":"array","items":{"$ref":"#/components/schemas/EntityEvent"},"description":"Notices and alerts about the entity, such as Gazette notices and food alerts, newest first, in the layers in scope."},"relations":{"type":"array","items":{"$ref":"#/components/schemas/EntityRelation"},"description":"The entity's links to other entities: the premises it operates, the organisation that operates it, its owners and the entity it moved to."},"people":{"type":"object","properties":{"owners":{"type":"integer","minimum":0,"description":"How many individuals the register lists as having significant control today. Never a name."},"officers":{"type":"integer","minimum":0,"description":"How many officers the registers list today, such as directors, secretaries and LLP members, together with regulated roles such as a registered manager or a nominated individual. Never a name."}},"required":["owners","officers"],"description":"The people the entity's registers name today, as counts only, in the layers in scope. Never a name, an id or anything else about a person. Names are read with `POST /v1/people`, for an entity the client holds. owners counts the individuals the register lists as having significant control, including those whose details are protected. A corporate owner is an entity of its own, in relations. A count is what the register lists: 0 does not mean no individual controls the entity, as some companies are exempt and a holding under 25 percent is never listed. Absent when there is no one to count."},"group":{"type":"object","nullable":true,"properties":{"parentId":{"type":"string","nullable":true,"pattern":"^(org|prm)_[A-Za-z0-9_-]{20}$","description":"The organisation that owns this one directly. Null at the top of the group."},"ultimateParentId":{"allOf":[{"$ref":"#/components/schemas/EntityId"},{"description":"The organisation at the top of the group."}]},"ultimateParentName":{"type":"string","nullable":true,"description":"The name of the organisation at the top of the group. Null when none is known."},"depth":{"type":"integer","description":"How many owners sit between this organisation and the top of the group. 0 at the top."},"size":{"type":"integer","description":"How many organisations are in the group."},"premisesCurrent":{"type":"integer","description":"How many premises the group operates now."}},"required":["parentId","ultimateParentId","ultimateParentName","depth","size","premisesCurrent"],"description":"The ownership group the organisation belongs to. Null when it is in none."},"related":{"type":"array","items":{"type":"object","properties":{"entityId":{"$ref":"#/components/schemas/EntityId"},"name":{"type":"string","nullable":true,"description":"The other entity's name. Null when none is known."},"signals":{"type":"array","items":{"type":"string","enum":["address","website","phone"]},"description":"What the two entities share: an address, a website or a phone number."}},"required":["entityId","name","signals"]},"description":"Entities that may share an owner with this one, by what they have in common. A suggestion, never a group."},"attribution":{"type":"array","items":{"$ref":"#/components/schemas/Attribution"},"description":"One attribution line per layer, to show wherever its data is shown."},"updatedAt":{"allOf":[{"$ref":"#/components/schemas/IsoDateTime"},{"description":"When any part of the entity last changed."}]},"asAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Present when the entity was asked for as at a date. Everything above is as it stood then."},"held":{"type":"boolean","description":"True when the consumer holds this entity. A held entity is read for nothing and names its active people."},"movedFrom":{"type":"string","pattern":"^(org|prm)_[A-Za-z0-9_-]{20}$","description":"The id this answer was asked for, when the entity has since taken another because it merged into this one. An old id never stops working."},"splitInto":{"type":"array","items":{"$ref":"#/components/schemas/EntityId"},"description":"Entities that split off this one, oldest first."},"splitFrom":{"type":"string","pattern":"^(org|prm)_[A-Za-z0-9_-]{20}$","description":"The entity this one split off from."},"ended":{"type":"string","nullable":true,"pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"When the entity closed: every record gone, or the register says so. Null while open."},"tombstone":{"type":"boolean","description":"True when only the name and the closed date remain, because the entity ended longer ago than its layers keep history. No records, facts or relations, and never personal data."},"history":{"type":"object","properties":{"status":{"type":"string","enum":["complete","loading"],"description":"complete when the entity's history is all here. loading when it is still being gathered: ask again after retryAfter seconds."},"retryAfter":{"type":"integer","description":"How many seconds to wait before asking again. Present only while status is loading."},"backfilledAt":{"type":"string","nullable":true,"format":"date-time","description":"When the entity's history was last brought up to date. Null while loading."},"changes":{"type":"array","items":{"$ref":"#/components/schemas/HistoryPoint"},"description":"Changes to facts, dates and status, oldest first."},"lists":{"type":"array","items":{"type":"string"},"description":"The dated lists this entity carries under attached."},"tenures":{"type":"array","items":{"type":"object","properties":{"layer":{"$ref":"#/components/schemas/LayerKey"},"role":{"type":"string","description":"What the register calls it: Director, Secretary, Registered Manager."},"since":{"type":"string","nullable":true,"pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"When the role began. Null when the register gives no date."},"until":{"type":"string","nullable":true,"pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"When the role ended, by the register or by its record leaving the register. Null while held."},"name":{"type":"string","nullable":true,"description":"The person's name. Present only for a role that is active on an entity the client holds, null otherwise. For an entity newly held it arrives with the next build; the block's notice says so until then."}},"required":["layer","role","since","until","name"],"description":"A role held at the entity: the role and its dates, never a person's name unless active and held."},"description":"The roles held at the entity, with a name only for an active role on an entity the client holds. notice says when names are withheld until the entity is held, or awaited from the next build."},"charged":{"type":"integer","description":"Tokens this answer took."},"notice":{"type":"string","description":"A sentence, present when the changes are incomplete or none are held, when names on the tenures are withheld because the client does not hold the entity, or when names for a held entity are still being fetched and arrive with the next build."}},"required":["status","backfilledAt","changes","lists","tenures","charged"],"description":"The entity's past, served with ?historical=true, as ?at= and `GET /v1/entities/{entityId}/history` read it."},"charged":{"type":"integer","description":"Tokens this answer took in all: the record, and the history where the answer carries it. Left out when it took none."},"release":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"The release id, the same value as the x-atlas-release header."},"at":{"allOf":[{"$ref":"#/components/schemas/IsoDateTime"},{"description":"When the release went live."}]}},"required":["id","at"],"description":"The release this answer comes from."},"pendingChanges":{"type":"array","items":{"$ref":"#/components/schemas/PendingChange"},"description":"Changes recorded for this entity after its release, in the layers in scope, oldest first: a status, a fact, a date, a record that went, or a role or an attached item that arrived or ended. The values above are the release's and do not include these."},"notice":{"type":"string","description":"Something the answer could not do, in a sentence. An as-at date before history begins returns the entity as it is now, with this."}},"required":["id","level","name","status","place","identifiers","records","facts","relations","group","related","attribution","updatedAt"]},"HistoryPoint":{"type":"object","properties":{"layer":{"$ref":"#/components/schemas/LayerKey"},"key":{"type":"string","description":"The field the change is about, as <layer>.<key>: a fact key, status, or the name of a date."},"label":{"type":"string","description":"The field's label, for showing."},"from":{"allOf":[{"$ref":"#/components/schemas/FactValue"},{"description":"The value before the change. Null when there was none."}]},"to":{"allOf":[{"$ref":"#/components/schemas/FactValue"},{"description":"The value after the change. Null when the value went."}]},"observedAt":{"allOf":[{"$ref":"#/components/schemas/IsoDateTime"},{"description":"When Atlas recorded the change."}]},"asOf":{"type":"string","nullable":true,"pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"The publisher's date for the new value, where it gives one."},"jobId":{"type":"string","description":"An id shared by every change recorded together. Use it to group changes that arrived at once."}},"required":["layer","key","label","from","to","observedAt","asOf","jobId"],"description":"One change to one field of the entity."},"ResolveCandidate":{"type":"object","properties":{"entityId":{"allOf":[{"$ref":"#/components/schemas/EntityId"},{"description":"The entity this candidate is."}]},"level":{"$ref":"#/components/schemas/EntityLevel"},"name":{"type":"string","description":"The name of the entity, ready to show."},"place":{"type":"object","properties":{"outwardCode":{"type":"string","nullable":true,"description":"The first part of the postcode only. A candidate never carries a full postcode."},"localAuthority":{"type":"string","nullable":true,"description":"The local authority, by name."},"region":{"type":"string","nullable":true,"description":"The region, such as the North West or Wales."},"homeBased":{"type":"boolean","description":"True when the place is likely a private home."}},"required":["outwardCode","localAuthority","region","homeBased"],"description":"Where the candidate is, enough to tell two of one name apart. Never a full address."},"status":{"$ref":"#/components/schemas/EntityStatus"},"registers":{"type":"array","items":{"type":"object","properties":{"layer":{"$ref":"#/components/schemas/LayerKey"},"source":{"$ref":"#/components/schemas/SourceKey"},"externalId":{"type":"string","description":"The register's own id for the record."},"name":{"type":"string","nullable":true,"description":"The name the register gives the record. Null when it has none it may show."},"confidence":{"$ref":"#/components/schemas/MemberConfidence"}},"required":["layer","source","externalId","name","confidence"],"description":"One register record the candidate is made of."},"description":"The register records the candidate is made of, in the layers named."},"facts":{"type":"array","items":{"type":"object","properties":{"layer":{"$ref":"#/components/schemas/LayerKey"},"key":{"type":"string","description":"The key of the fact within its layer, such as status or rating."},"label":{"type":"string","description":"A short name for the fact, ready to show."},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}],"description":"The value of the fact: text, a number, or true or false."},"type":{"type":"string","description":"The type of the value, such as string, number or date. Present only when known."}},"required":["layer","key","label","value"],"description":"A headline fact to show beside the candidate. A register's dates arrive as facts of their own: show a rating with its date."},"description":"A few headline facts to show beside the name, such as a status or a rating."},"group":{"type":"object","nullable":true,"properties":{"ultimateParentName":{"type":"string","nullable":true,"description":"The name of the group's top parent. Null when it has none to show."},"size":{"type":"integer","description":"How many organisations are in the group."}},"required":["ultimateParentName","size"],"description":"The corporate group the candidate is in. Null when it is in none."},"operatorName":{"type":"string","nullable":true,"description":"For a premises, the name of the organisation that operates it. Null for an organisation, or when no register says."}},"required":["entityId","level","name","place","status","registers","facts","group","operatorName"],"description":"One entity that may be the one meant."},"PossibleMatch":{"type":"object","properties":{"forEntityId":{"allOf":[{"$ref":"#/components/schemas/EntityId"},{"description":"The entity the match is offered for."}]},"entityId":{"type":"string","nullable":true,"pattern":"^(org|prm)_[A-Za-z0-9_-]{20}$","description":"The entity the matching record belongs to. Null when the record is in no entity."},"register":{"$ref":"#/components/schemas/RegisterRef"},"name":{"type":"string","description":"The name on the matching record."},"sourceLabel":{"type":"string","description":"The register the record is in, in words for showing."},"relation":{"type":"string","enum":["same_business","same_premises"],"description":"same_business: the record may be the same organisation. same_premises: the record may be the same premises."},"confidence":{"type":"string","enum":["medium","high"],"description":"How likely the match is: high is a strong likely match, medium a possible one. Atlas confirms matches; a client cannot, but may flag one for review."},"reviewed":{"type":"boolean","description":"True once Atlas has confirmed the match. A flag from a client never sets it: a flag asks for a review."},"reviewedAt":{"type":"string","nullable":true,"format":"date-time","description":"When Atlas confirmed it, for showing beside the match. Null until then."},"linkId":{"type":"string","minLength":1,"description":"The match's id, to flag it for review with `POST /v1/links/{linkId}/flags`, or to show your own flags on it. A flag is a signal to review, never a decision."}},"required":["forEntityId","entityId","register","name","sourceLabel","relation","confidence","reviewed"],"description":"A record in another layer that may be the same organisation or premises: medium and high confidence only, never one the client has rejected. Atlas confirms a match (reviewed is then true); a client cannot confirm one, but may flag it for review by its linkId."},"Person":{"type":"object","properties":{"kind":{"type":"string","enum":["officer","psc_individual","psc_corporate","registered_manager","nominated_individual"],"description":"The kind of person: officer, psc_individual for an individual with significant control, psc_corporate for a corporate owner, registered_manager or nominated_individual."},"layer":{"$ref":"#/components/schemas/LayerKey"},"externalId":{"type":"string","description":"The register's own id for the person."},"name":{"type":"string","description":"The person's name as the register gives it."},"role":{"type":"string","description":"What the register calls them: Director, Secretary, Registered Manager."},"since":{"type":"string","nullable":true,"pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"When the role began. Null when the register gives no date."},"until":{"type":"string","nullable":true,"pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"When the role ended. Null while held."}},"required":["kind","layer","externalId","name","role","since","until"],"description":"A person named on the entity, with the least the register gives: never a month or year of birth, nationality, country of residence or home address."},"SearchRow":{"type":"object","properties":{"entityId":{"$ref":"#/components/schemas/EntityId"},"level":{"$ref":"#/components/schemas/EntityLevel"},"name":{"type":"string","description":"The name to show for the entity."},"values":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"nullable":true}]},"description":"The entity's value for each result column the catalogue lists, by column key; null where it has none."},"group":{"type":"object","properties":{"id":{"type":"string","description":"The group's id. Premises under one operator share it."},"label":{"type":"string","description":"The group's name to show, such as the operator's name."}},"required":["id","label"],"description":"Rows sharing a group are shown together, premises under their operator."},"primaryRecord":{"type":"object","properties":{"layer":{"$ref":"#/components/schemas/LayerKey"},"source":{"$ref":"#/components/schemas/SourceKey"},"externalId":{"type":"string","minLength":1,"maxLength":256,"description":"The register's own id for the record. At most 256 characters."}},"required":["layer","source","externalId"],"description":"The register record that leads the row: the one to store if you keep a register id for the entity."},"possibleMatches":{"type":"array","items":{"$ref":"#/components/schemas/PossibleMatch"},"description":"Records in other layers that may be the same organisation or premises. Atlas confirms a match; a client may flag one for review by its linkId."},"attached":{"type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/AttachedRecord"}},"description":"Lists carried on the row by list name, newest first and at most 25 items each, present only when the call sent expand=attached. The newest item's values are in values under the list's name whether or not the lists are carried. The entity carries every item."},"attachedCounts":{"type":"object","additionalProperties":{"type":"integer","minimum":0},"description":"How many items each list on the row has in all, where the row carries the list."},"pending":{"type":"boolean","description":"True when something has arrived for the entity since the release this page comes from. The entity's pendingChanges says what."},"layers":{"type":"array","items":{"type":"string"},"description":"The layers in scope that hold something about the entity, whether records, facts, lists or events, by layer key, sorted. A layer that is read on held entities only, such as the ICO, is listed only for an entity the client holds."},"searchFacts":{"type":"array","items":{"$ref":"#/components/schemas/SearchFact"},"description":"The search's own fields as this entity has them: on a row a search or a saved search's page returns, never on a lookup."}},"required":["entityId","level","name","values"]},"SearchFact":{"type":"object","properties":{"field":{"type":"string","description":"The condition's field key, as the search sent it, such as epc.certificates.band."},"label":{"type":"string","description":"The field's label in the catalogue."},"values":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]},"maxItems":20,"description":"The entity's values for the field that met the condition, at most 20: an entity with EPC bands A and D found by a search for A or C carries A. For a negative condition, not_equals, not_in or not_contains, every value the entity has. Through a relation, the related entities' values instead: those that met the condition, or for a negative one every value they have."},"via":{"type":"string","enum":["premises","operator"],"description":"The relation the condition was read through, as the search sent it: the values and counts are the related entities'."},"matched":{"type":"integer","minimum":0,"description":"Through a relation: how many of the related entities met the condition. The 2 in \"at 2 of 5 premises\"."},"of":{"type":"integer","minimum":0,"description":"Through a relation: how many related entities the entity has through it in the layers in scope. The 5 in \"at 2 of 5 premises\"."}},"required":["field","label","values"],"description":"What the search matched on the row: one per searched fact, postcode or date the entity has a value for, including conditions read through a relation with `via`."},"NetworkNode":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/EntityId"},"kind":{"type":"string","enum":["organisation","premises"],"description":"Which kind of entity the node is: an organisation or a premises."},"name":{"type":"string","nullable":true,"description":"The name as the layers named give it. Null where the register's name is a person's, such as a sole trader or a childminder, as on a search row and an entity."},"status":{"type":"string","enum":["active","closed"],"description":"Whether the entity is active or closed."},"place":{"type":"string","nullable":true,"description":"Where it is, as a search row shows it: the local authority, else the region, else the first part of the postcode. Never an address."},"layers":{"type":"array","items":{"type":"string"},"description":"The layers in scope that hold something about the entity, whether records, facts, lists or events, by layer key, sorted. A layer that is read on held entities only, such as the ICO, is listed only for an entity the client holds."},"people":{"allOf":[{"$ref":"#/components/schemas/PeopleCounts"},{"description":"How many people the organisation's or premises' registers name today, in the layers named, as counts only. People are never nodes. Their names are read through `POST /v1/people`, for an entity the consumer holds."}]},"group":{"type":"object","properties":{"ultimateParentId":{"$ref":"#/components/schemas/EntityId"},"parentId":{"type":"string","nullable":true,"pattern":"^(org|prm)_[A-Za-z0-9_-]{20}$","description":"The company directly above it. Null when it is the top parent."}},"required":["ultimateParentId","parentId"],"description":"The corporate group it is in: its top parent and the company directly above it. Present only when a layer that says who owns whom, such as companies_house, is among the layers named."},"held":{"type":"boolean","description":"True when the consumer holds this entity."},"depth":{"type":"integer","minimum":0,"description":"How many hops the node is from the root along the edges returned. 0 for the root."},"possible":{"type":"boolean","enum":[true],"description":"Present, and true, when the node is reached only through possible matches, so it may not be related at all. Its own neighbours are not included unless walk names it, or each possible node it rests on."},"possibleVia":{"type":"array","items":{"$ref":"#/components/schemas/EntityId"},"description":"The possible nodes its place on the map rests on, sorted: itself where a possible match reached it, and each possible node walked on to reach it. Present only with possible. Everything that rests on one match can be drawn as one branch."}},"required":["id","kind","name","status","place","layers","held","depth"],"description":"One entity on the map, without its facts, lists or address. Open it with `GET /v1/entities/{entityId}`."},"NetworkEdge":{"type":"object","properties":{"from":{"$ref":"#/components/schemas/EntityId"},"to":{"$ref":"#/components/schemas/EntityId"},"kind":{"type":"string","enum":["owns","operates","same_business","same_premises","same_brand"],"description":"What an edge says, read from `from` to `to`. owns: a corporate owner and the company it owns, from Companies House's persons with significant control. operates: an organisation and the premises it runs, such as a CQC location's provider, a food business's operator or an Ofsted establishment's operator. same_business and same_premises: possibly the same business or premises, a possible match only, always with possible true. same_brand: two CQC providers trading under one CQC brand, named in detail. It does not mean the same owner, and it is followed only when kinds names it."},"source":{"allOf":[{"$ref":"#/components/schemas/LayerKey"},{"description":"The layer whose records say so."}]},"band":{"type":"string","enum":["match","high","medium"],"description":"How sure Atlas is of the relation. match is confirmed. high is a strong likely match. medium is a possible match."},"possible":{"type":"boolean","description":"True for a possible match: suggested, not confirmed, and not part of either entity."},"since":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"The date the relation began. Present only when the register gives one."},"until":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"The date the relation ended. Present only when the register gives one."},"detail":{"type":"string","maxLength":400,"description":"What the register says of the relation, in its own words. For a corporate owner, its control, such as '75 to 100% of shares; 75 to 100% of voting rights'. For same_brand, the brand's name as the CQC gives it. Present only where the register says it plainly. At most 400 characters."}},"required":["from","to","kind","source","band","possible"],"description":"One relation between two nodes, read from `from` to `to`."},"SearchMeta":{"type":"object","properties":{"limit":{"type":"integer","minimum":1,"description":"Rows a page holds, as asked."},"returned":{"type":"integer","minimum":0,"description":"Rows in this page."},"total":{"type":"integer","minimum":0,"description":"Entities the conditions match in these layers, counted up to 100,000."},"capped":{"type":"boolean","description":"True when more than 100,000 match: total stops there."},"page":{"type":"integer","minimum":1,"description":"This page, 1 first, read from the cursor."},"pages":{"type":"integer","nullable":true,"minimum":1,"description":"Pages of the saved results at this limit; null while the total is capped."}},"required":["limit","returned","total","capped","page","pages"],"description":"What the search found and where this page sits in it."},"CatalogueField":{"type":"object","properties":{"key":{"type":"string","minLength":1,"description":"The field's key, as a condition names it."},"label":{"type":"string","minLength":1,"description":"The field's name, to show."},"type":{"$ref":"#/components/schemas/FieldType"},"layer":{"type":"string","nullable":true,"pattern":"^[a-z][a-z0-9_-]{1,40}$","description":"The layer the field comes from. Null for a field every layer shares, such as name, place or region."},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","description":"The value a condition sends."},"label":{"type":"string","description":"The option's name, to show."}},"required":["value","label"]},"description":"For a field with fixed options: each option and its label."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"For a field with no fixed options, the values to expect; not a closed list. A condition naming a deprecated value matches what it became."},"deprecatedValues":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","minLength":1,"description":"The value, still served until `until`."},"becomes":{"type":"string","minLength":1,"description":"The value it will be served as from `until`: itself where it returns to the register's own wording, and words only where `noValue` is true."},"noValue":{"type":"boolean","enum":[true],"description":"From `until` it counts as no value."},"since":{"allOf":[{"$ref":"#/components/schemas/IsoDate"},{"description":"The day the change was announced."}]},"until":{"allOf":[{"$ref":"#/components/schemas/IsoDate"},{"description":"The first day it may be served as `becomes`."}]}},"required":["value","becomes","since","until"],"description":"A value on its way out. A condition naming the whole of the old value keeps working once it has gone, read as `becomes`."},"description":"Values on their way to becoming another."},"dynamicOptions":{"type":"string","description":"A token for fetching the options separately, for a long list of them."},"optionsToken":{"type":"string","description":"Fetch this field's options from the catalogue options endpoint with this token."},"helpText":{"type":"string","description":"A sentence explaining the field."},"quick":{"type":"boolean","description":"Worth a quick-filter control of its own."},"operators":{"type":"array","items":{"$ref":"#/components/schemas/Operator"},"description":"A subset of the operators the field's type allows."},"historyOperators":{"type":"array","items":{"$ref":"#/components/schemas/Operator"},"description":"For a searchable field that keeps history: the operators a stats condition may read from its past, each with `within`. changed and was always; improved and declined where the field is `ordered`."},"narrowing":{"type":"boolean","description":"Selective enough to carry a search on its own."},"surfaces":{"type":"object","properties":{"criterion":{"type":"boolean","description":"True when the field can be a condition."},"column":{"type":"boolean","description":"True when the field can be a result column."},"enrichmentOnly":{"type":"boolean","description":"Shown on held entities only, never a criterion or a column."}},"required":["criterion","column","enrichmentOnly"],"description":"Where the field may be used."},"licence":{"type":"string","description":"The licence the field's data sits under."},"personal":{"type":"boolean","description":"True when the field is about a person, such as a registered manager. Never a grouping or a measure in a report."},"deprecated":{"type":"object","properties":{"since":{"allOf":[{"$ref":"#/components/schemas/IsoDate"},{"description":"The day the deprecation was announced."}]},"until":{"allOf":[{"$ref":"#/components/schemas/IsoDate"},{"description":"The first day the field or layer may stop being sent."}]},"note":{"type":"string","description":"Why, and what to do instead, in a sentence. Present where there is one."},"replacedBy":{"type":"string","description":"The client key to read instead, where one replaces it."}},"required":["since","until"],"description":"On its way out: still searchable until `until`."},"levels":{"type":"array","items":{"$ref":"#/components/schemas/EntityLevel"},"description":"The entity types the field lives on. A condition on a field that does not live on the type searched for needs a `via` relation whose `to` is one of these."},"ordered":{"type":"boolean","description":"True when the options are listed best first, as EPC bands A+ to G and the CQC ratings Outstanding to Inadequate are. A report can place a subject above, in line with or below a group on such a field."},"unranked":{"type":"array","items":{"type":"string"},"description":"Options outside the order, such as the CQC's Insufficient evidence to rate. An entity with one is placed as unknown."},"tones":{"type":"object","additionalProperties":{"type":"string","enum":["positive","caution","negative","neutral"],"description":"How a value reads at a glance: good, a warning, bad, or neither."},"description":"How each value reads at a glance: positive, caution, negative or neutral."},"statusGroups":{"type":"object","additionalProperties":{"type":"string","enum":["active","closed"],"description":"Whether a status word means the record is active or closed."},"description":"On a register's status field: each status word, and whether it means active or closed."}},"required":["key","label","type","layer","operators","narrowing","surfaces","licence","personal"]},"CatalogueRelation":{"type":"object","properties":{"via":{"$ref":"#/components/schemas/Via"},"from":{"allOf":[{"$ref":"#/components/schemas/EntityLevel"},{"description":"The entity type the relation starts from: the level searched for."}]},"to":{"allOf":[{"$ref":"#/components/schemas/EntityLevel"},{"description":"The entity type it leads to: where the condition is read."}]},"label":{"type":"string","description":"Words for a criterion read through it, after the field: \"at any of its premises\", \"of its operator\"."}},"required":["via","from","to","label"],"description":"A relation a condition can be read through with `via`: a search for `from` entities, by a level condition, may put a condition on a field that lives on `to` entities."},"Interest":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Its id."},"kind":{"type":"string","enum":["search","watch"],"description":"search: a standing search over conditions. watch: a watch on named entities."},"label":{"type":"string","nullable":true,"description":"The name you gave it; null when none."},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/Condition"},"description":"The standing conditions; empty for a watch."},"entityIds":{"type":"array","items":{"$ref":"#/components/schemas/EntityId"},"description":"The watched entities; empty for a search."},"signals":{"type":"array","items":{"type":"string"},"description":"The signal keys given, if any."},"layers":{"$ref":"#/components/schemas/LayerScope"},"createdAt":{"$ref":"#/components/schemas/IsoDateTime"},"level":{"type":"string","nullable":true,"enum":["organisation","premises",null],"description":"Only organisations or only premises; null for both."},"fields":{"type":"array","items":{"type":"string"},"description":"The watched fields; empty for any change."},"on":{"type":"array","items":{"$ref":"#/components/schemas/InterestOn"},"description":"What is news."},"matching":{"type":"boolean","description":"True while new data is checked against it. False when it is stopped, which `stopped` explains, or when its conditions cannot be checked as data arrives, which `notice` explains."},"notice":{"type":"string","description":"Present when something limits what is sent: why no events are sent while matching is false and it is not stopped, or why fewer are sent while it goes on, such as a paused watch or a layer no longer subscribed. Absent when nothing limits it."},"stopped":{"$ref":"#/components/schemas/InterestStop"},"heldBackLastDay":{"type":"integer","minimum":0,"description":"Events dropped past the limit in the last 24 hours. Present only on `GET /v1/interests`, and only when there were some."},"watches":{"type":"array","items":{"type":"object","properties":{"entityId":{"$ref":"#/components/schemas/EntityId"},"status":{"type":"string","enum":["active","paused"],"description":"paused: the month could not be paid; resumed when the tokens can pay."},"paidThrough":{"type":"string","nullable":true,"description":"The last month paid for, YYYY-MM."}},"required":["entityId","status","paidThrough"]},"description":"Present only for a watch: its entities and whether each is paid for."}},"required":["id","kind","label","conditions","entityIds","signals","layers","createdAt","level","fields","on","matching"]},"InterestOn":{"type":"string","enum":["entered","changed","left"],"description":"entered: a record starts meeting the conditions, such as a new incorporation or a move into the region. changed: a watched field changes on a record that meets them. left: a record stops meeting them."},"InterestStop":{"type":"object","properties":{"reason":{"type":"string","enum":["consumer_suspended","client_suspended","consumer_deleted","layers_unsubscribed","unpaid"],"description":"consumer_suspended or client_suspended: the account is suspended. consumer_deleted: the consumer was deleted. layers_unsubscribed: a layer it needs is no longer subscribed. unpaid: the standing search's month could not be paid for; it resumes once the tokens can pay."},"layers":{"type":"array","items":{"$ref":"#/components/schemas/LayerKey"},"description":"Present only for layers_unsubscribed: the layers it needs that the consumer no longer subscribes to."},"since":{"$ref":"#/components/schemas/IsoDateTime"}},"required":["reason","since"],"description":"Why no events are sent for now. Events resume by themselves when the reason ends; what happened meanwhile is not sent."},"InterestValue":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"nullable":true},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]},"maxItems":50}],"description":"A plain value, or a short list of them; null when there was none."},"InterestChange":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":80,"description":"The field that changed, by its catalogue key, such as companies_house.status or region."},"from":{"$ref":"#/components/schemas/InterestValue"},"to":{"$ref":"#/components/schemas/InterestValue"},"asOf":{"type":"string","nullable":true,"pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"The publisher's own date for the new value, when it gives one. A layer whose licence asks for the date, such as fsa, needs it shown beside the value."}},"required":["field","from","to","asOf"],"description":"One field as it was and as it is. Never about a person."},"InterestCurrency":{"type":"object","properties":{"asOf":{"type":"string","nullable":true,"pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"The date the record is current to: the newest of its values' dates, or the day it was read."},"required":{"type":"boolean","description":"True when the layer's licence asks that this date is shown beside its facts."}},"required":["asOf","required"],"description":"The date the record is current to, carried with the event so you can show it."},"ReportMovedMove":{"type":"object","properties":{"key":{"type":"object","nullable":true,"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"nullable":true}]},"description":"The group that moved, by its keys; null for the whole."},"labels":{"type":"object","additionalProperties":{"type":"string"},"description":"The label of each key value, by key. Present only when a key has one."},"measure":{"type":"integer","minimum":-1,"description":"The measure's place in the report's measures, from 0; -1 for the group's own size."},"what":{"type":"string","enum":["count","share","option","summary","appeared","withheld"],"description":"count: the group's size or a count. share: a share's percentage. option: how many have an option. summary: a summary figure. appeared: a group of 5 or more that was not one before. withheld: a group that fell under 5."},"unit":{"type":"string","enum":["count","points","value"],"description":"What from and to are: entities, percentage points, or a figure in its own unit."},"option":{"type":"string","description":"Present only for an option: the option's value, as text."},"figure":{"type":"string","description":"Present only for a summary: which figure, such as mean or median."},"from":{"type":"number","nullable":true,"description":"The value on the run before; null when the group was not there."},"to":{"type":"number","nullable":true,"description":"The value on this run; null when the group has gone."}},"required":["key","measure","what","unit","from","to"],"description":"One figure that moved between two runs of a saved report, as `GET /v1/reports/{reportId}` gives it in its runs' moves: never a register row."},"InterestEvent":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200,"description":"The event's id, which is also the feed cursor that resumes after it."},"occurredAt":{"$ref":"#/components/schemas/IsoDateTime"},"interestId":{"type":"string","minLength":1,"maxLength":80,"description":"The id of the standing search or watch the event is for."},"type":{"type":"string","enum":["interest.change"],"description":"Always interest.change."},"entityId":{"type":"string","nullable":true,"pattern":"^(org|prm)_[A-Za-z0-9_-]{20}$","description":"The entity the record belongs to. Null for a record too new to have an entity yet, such as a company incorporated today: it gets one in a later release, and `POST /v1/entities/lookup` finds it from the record's register id."},"record":{"allOf":[{"$ref":"#/components/schemas/RegisterRef"},{"description":"The register record that changed."}]},"what":{"$ref":"#/components/schemas/InterestOn"},"changes":{"type":"array","items":{"$ref":"#/components/schemas/InterestChange"},"maxItems":60,"description":"The watched fields and the conditions' fields that changed, as they were and as they are. For a record new to the register, `from` is null."},"attributions":{"type":"array","items":{"$ref":"#/components/schemas/Attribution"},"description":"The attribution line of each layer the event carries data from. The CQC's line carries its wording that it endorses no provider."},"currency":{"$ref":"#/components/schemas/InterestCurrency"},"homeBased":{"type":"boolean","description":"True when the address is likely a private home, as the entity's own read says."}},"required":["id","occurredAt","interestId","type","entityId","record","what","changes","attributions","currency","homeBased"],"description":"A record entered, changed in a watched field, or left what a standing search or watch covers."},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200,"description":"The event's id, which is also the feed cursor that resumes after it."},"occurredAt":{"$ref":"#/components/schemas/IsoDateTime"},"interestId":{"type":"string","minLength":1,"maxLength":80,"description":"The id of the standing search or watch the event is for."},"type":{"type":"string","enum":["interest.linked"],"description":"Always interest.linked."},"record":{"$ref":"#/components/schemas/RegisterRef"},"entityId":{"$ref":"#/components/schemas/EntityId"}},"required":["id","occurredAt","interestId","type","record","entityId"],"description":"Reserved and not sent. It would say that a record an earlier event named with `entityId: null` now has an entity. Until then, `POST /v1/entities/lookup` finds the entity."},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200,"description":"The event's id, which is also the feed cursor that resumes after it."},"occurredAt":{"$ref":"#/components/schemas/IsoDateTime"},"interestId":{"type":"string","minLength":1,"maxLength":80,"description":"The id of the standing search or watch the event is for."},"type":{"type":"string","enum":["interest.too_broad"],"description":"Always interest.too_broad."},"limit":{"type":"integer","description":"The most events a standing search or watch is sent in the window."},"heldBack":{"type":"integer","minimum":0,"description":"How many events were dropped as this was written: those that went past the limit. More may follow in the window; the standing search's or watch's heldBackLastDay gives the running count."},"until":{"allOf":[{"$ref":"#/components/schemas/IsoDateTime"},{"description":"When the window ends and events are sent again."}]}},"required":["id","occurredAt","interestId","type","limit","heldBack","until"],"description":"The standing search or watch matched more than the limit in its window: the rest are dropped, never sent and never fetchable, until the window ends. Narrow its conditions, or run them as a search to see what matches."},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200,"description":"The event's id, which is also the feed cursor that resumes after it."},"occurredAt":{"$ref":"#/components/schemas/IsoDateTime"},"type":{"type":"string","enum":["consumer.too_broad"],"description":"Always consumer.too_broad."},"limit":{"type":"integer","description":"The most events a consumer is sent in the hour."},"heldBack":{"type":"integer","minimum":0,"description":"How many events were dropped as this was written; more may follow in the hour. The heldBackLastDay of `GET /v1/interests` gives the running count."},"until":{"allOf":[{"$ref":"#/components/schemas/IsoDateTime"},{"description":"When the hour ends and events are sent again."}]}},"required":["id","occurredAt","type","limit","heldBack","until"],"description":"The consumer went past its limit across all its standing searches and watches: the rest are dropped, never sent and never fetchable, until the hour ends."},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200,"description":"The event's id, which is also the feed cursor that resumes after it."},"occurredAt":{"$ref":"#/components/schemas/IsoDateTime"},"type":{"type":"string","enum":["report.moved"],"description":"Always report.moved."},"reportId":{"type":"string","pattern":"^rp_[A-Za-z0-9_-]{12,40}$","description":"The saved report's id."},"label":{"type":"string","nullable":true,"description":"The report's label; null when it has none."},"release":{"$ref":"#/components/schemas/Release"},"total":{"type":"integer","minimum":0,"description":"How many entities the report found on this run."},"moves":{"type":"array","items":{"$ref":"#/components/schemas/ReportMovedMove"},"maxItems":200,"description":"What moved, the largest first, at most 200: figures only, as the report gives them."}},"required":["id","occurredAt","type","reportId","label","release","total","moves"],"description":"A saved report of the consumer's moved when it ran on a new release. The report's alert settings say how much counts as a move. `GET /v1/reports?moved=true` lists the same reports."},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200,"description":"The event's id, which is also the feed cursor that resumes after it."},"occurredAt":{"$ref":"#/components/schemas/IsoDateTime"},"type":{"type":"string","enum":["person.notice"],"description":"Always person.notice."},"noticeId":{"type":"string","pattern":"^pn_[A-Za-z0-9_-]{12,40}$","description":"The notice's id: the same in the feed, the webhook and GET /v1/people/notices, so a notice met twice is acted on once."},"kind":{"type":"string","enum":["objection","erasure"],"description":"objection: the person objected to their record being held, under UK GDPR Article 21. erasure: they asked for their name to be erased, under Article 17. Either way, act on what you kept of them, including any record you made your own."},"entityId":{"allOf":[{"$ref":"#/components/schemas/EntityId"},{"description":"The entity the person was named on when this consumer read its people."}]},"layer":{"allOf":[{"$ref":"#/components/schemas/LayerKey"},{"description":"The layer that named the person."}]},"externalId":{"type":"string","minLength":1,"maxLength":256,"description":"The person's id, the `externalId` that `POST /v1/people` served them under: match it, with the entity and the layer, to what you kept. Never their name."},"actBy":{"allOf":[{"$ref":"#/components/schemas/IsoDate"},{"description":"Act on it by this day: 30 days after the notice."}]}},"required":["id","occurredAt","type","noticeId","kind","entityId","layer","externalId","actBy"],"description":"A person this consumer was served has objected or asked for erasure: act on what you kept of them by actBy. Sent to every consumer that read people for the entity in the last 12 months, whatever its standing searches and watches; `GET /v1/people/notices` lists the same."}]},"Release":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"The release id, the same value as the x-atlas-release header."},"at":{"allOf":[{"$ref":"#/components/schemas/IsoDateTime"},{"description":"When the release went live."}]}},"required":["id","at"],"description":"The release the report ran on and moved."},"InterestWebhook":{"type":"object","properties":{"url":{"type":"string","description":"Where events are posted."},"status":{"type":"string","enum":["active","paused"],"description":"paused: deliveries failed for 24 hours; none is sent until the webhook is registered again. Events stay in the feed."},"pausedReason":{"type":"string","nullable":true,"description":"Why it was paused; null while active."},"pausedAt":{"type":"string","nullable":true,"format":"date-time","description":"When it was paused; null while active."},"createdAt":{"$ref":"#/components/schemas/IsoDateTime"},"notice":{"type":"string","description":"Why deliveries may be held just now, though the webhook is active. Events stay in the feed meanwhile."},"lastDelivery":{"type":"object","nullable":true,"properties":{"at":{"$ref":"#/components/schemas/IsoDateTime"},"ok":{"type":"boolean","description":"True when the delivery was accepted with a 2xx status."},"status":{"type":"integer","nullable":true,"description":"The HTTP status your endpoint returned; null when it returned none."}},"required":["at","ok","status"],"description":"The last delivery attempted; null before the first."}},"required":["url","status","pausedReason","pausedAt","createdAt","lastDelivery"]},"Tier":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z][a-z0-9-]{1,30}$","description":"A plan by name: sandbox, starter, growth, scale, platform or enterprise, or a bespoke plan made for the client. free and standard are retired: a consumer already on one keeps it, a new one cannot take it."},"monthlyPence":{"type":"number","minimum":0,"description":"The plan's price a month, in pence."},"annualPence":{"type":"number","nullable":true,"minimum":0,"description":"The plan's price a month when paid for the year, in pence. null where there is no annual price."},"tokensPerMonth":{"type":"integer","nullable":true,"minimum":0,"description":"The monthly token allowance, a hard limit: a call that would pass it is refused, never billed beyond. null means unlimited."},"topUps":{"type":"boolean","description":"Whether tokens may be bought beyond the allowance."},"pencePerToken":{"type":"number","minimum":0,"description":"The price of one top-up token, in pence."},"tenantsIncluded":{"type":"integer","nullable":true,"minimum":0,"description":"How many consumers the plan includes. null means any number."},"extraTenantPence":{"type":"number","nullable":true,"minimum":0,"description":"The price a month of each consumer beyond those included, in pence. null where none may be added."},"packsIncluded":{"type":"integer","nullable":true,"minimum":0,"description":"How many layer packs beyond core the plan includes. null means every pack, on whichever plan says it."},"holdingsCap":{"type":"integer","nullable":true,"minimum":0,"description":"The most entities a consumer on the plan may hold. null means no cap."},"rights":{"type":"string","description":"What the plan licenses, in a line: embedded use, resale, the service level."},"callsPerSecond":{"type":"integer","minimum":1,"description":"Calls allowed a second, once the burst is used."},"burst":{"type":"integer","minimum":1,"description":"How many calls may arrive at once before the rate applies."},"retired":{"type":"boolean","description":"Retired: a new consumer cannot take it; one already on it keeps working."}},"required":["name","monthlyPence","annualPence","tokensPerMonth","topUps","pencePerToken","tenantsIncluded","extraTenantPence","packsIncluded","holdingsCap","rights","callsPerSecond","burst"],"description":"A plan: its monthly and annual price, token allowance, top-up price, consumers and packs included, rights and rate."},"PublishedPlan":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z][a-z0-9-]{1,30}$","description":"A plan by name: sandbox, starter, growth, scale, platform or enterprise, or a bespoke plan made for the client. free and standard are retired: a consumer already on one keeps it, a new one cannot take it."},"monthlyPence":{"type":"number","minimum":0,"description":"The plan's price a month, in pence."},"annualPence":{"type":"number","nullable":true,"minimum":0,"description":"The plan's price a month when paid for the year, in pence. null where there is no annual price."},"tokensPerMonth":{"type":"integer","nullable":true,"minimum":0,"description":"The monthly token allowance, a hard limit: a call that would pass it is refused, never billed beyond. null means unlimited."},"topUps":{"type":"boolean","description":"Whether tokens may be bought beyond the allowance."},"pencePerToken":{"type":"number","minimum":0,"description":"The price of one top-up token, in pence."},"tenantsIncluded":{"type":"integer","nullable":true,"minimum":0,"description":"How many consumers the plan includes. null means any number."},"extraTenantPence":{"type":"number","nullable":true,"minimum":0,"description":"The price a month of each consumer beyond those included, in pence. null where none may be added."},"packsIncluded":{"type":"integer","nullable":true,"minimum":0,"description":"How many layer packs beyond core the plan includes. null means every pack, on whichever plan says it."},"holdingsCap":{"type":"integer","nullable":true,"minimum":0,"description":"The most entities a consumer on the plan may hold. null means no cap."},"rights":{"type":"string","description":"What the plan licenses, in a line: embedded use, resale, the service level."},"callsPerSecond":{"type":"integer","minimum":1,"description":"Calls allowed a second, once the burst is used."},"burst":{"type":"integer","minimum":1,"description":"How many calls may arrive at once before the rate applies."}},"required":["name","monthlyPence","annualPence","tokensPerMonth","topUps","pencePerToken","tenantsIncluded","extraTenantPence","packsIncluded","holdingsCap","rights","callsPerSecond","burst"],"description":"A published plan: its monthly and annual price, token allowance, top-up price, consumers and packs included, rights and rate."},"ClientPlan":{"type":"object","properties":{"tier":{"type":"string","pattern":"^[a-z][a-z0-9-]{1,30}$","description":"A plan by name: sandbox, starter, growth, scale, platform or enterprise, or a bespoke plan made for the client. free and standard are retired: a consumer already on one keeps it, a new one cannot take it."},"billing":{"type":"string","enum":["monthly","annual"],"description":"How the plan is billed: a month at a time, or a year paid up front, which pools twelve months of tokens."},"since":{"allOf":[{"$ref":"#/components/schemas/IsoDateTime"},{"description":"When the client took this plan."}]},"sandbox":{"type":"boolean","description":"True on the sandbox plan: every answer carries the x-atlas-sandbox header, and the plan licenses no production use."},"collection":{"type":"string","enum":["card","invoice"],"description":"How the client pays: a card on file charged in advance, or an invoice."},"tenants":{"type":"object","properties":{"included":{"type":"integer","nullable":true,"description":"Consumers the plan includes; null for any number."},"active":{"type":"integer","description":"Consumers that made at least one charged call this month."},"extraPence":{"type":"number","nullable":true,"description":"The price a month of each active consumer beyond those included; null where none may be added."}},"required":["included","active","extraPence"],"description":"The consumers the plan includes, and what more cost."},"packs":{"type":"object","properties":{"core":{"type":"array","items":{"type":"string"},"description":"The core layers, in every plan."},"chosen":{"type":"array","items":{"type":"string"},"description":"The packs the client has switched on, by key."},"included":{"type":"integer","nullable":true,"description":"Packs beyond core the plan includes; null for every pack."},"extraPence":{"type":"number","description":"The price a month of each pack beyond those included."}},"required":["core","chosen","included","extraPence"],"description":"The layer packs: which the client has, and what more cost."},"overage":{"type":"object","properties":{"enabled":{"type":"boolean","description":"True when calls past the allowance are charged at the top-up rate instead of refused."},"capPence":{"type":"integer","nullable":true,"description":"The most overage a month may cost, in pence; null for no cap while enabled."},"pencePerToken":{"type":"number","description":"The top-up rate a token past the allowance is charged at."}},"required":["enabled","capPence","pencePerToken"],"description":"Overage: off by default, so the allowance is a hard limit."},"tokens":{"type":"object","properties":{"month":{"$ref":"#/components/schemas/TokenPool"},"year":{"type":"object","properties":{"allowance":{"type":"integer","nullable":true,"description":"The tokens the period gives; null when unlimited."},"granted":{"type":"integer","description":"Tokens added by hand this period."},"toppedUp":{"type":"integer","description":"Tokens bought this period."},"spent":{"type":"integer","description":"Tokens every consumer of the client spent this period."},"balance":{"type":"integer","nullable":true,"description":"What is left of the allowance, with what was granted and bought; null when unlimited."},"renewsAt":{"allOf":[{"$ref":"#/components/schemas/IsoDateTime"},{"description":"When the period renews."}]}},"required":["allowance","granted","toppedUp","spent","balance","renewsAt"],"description":"On an annual plan: the year the month sits in."}},"required":["month"],"description":"The client's pool, which every consumer draws on."},"discount":{"type":"object","properties":{"percent":{"type":"number","minimum":0,"maximum":100,"description":"The percent off the whole bill."},"until":{"type":"string","nullable":true,"pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"When the discount ends; null for no end."}},"required":["percent","until"],"description":"A discount agreed with Atlas on the whole bill."}},"required":["tier","billing","since","sandbox","collection","tenants","packs","overage","tokens"],"description":"The client's plan, packs, pool and the way it pays."},"TokenPool":{"type":"object","properties":{"allowance":{"type":"integer","nullable":true,"description":"The tokens the period gives; null when unlimited."},"granted":{"type":"integer","description":"Tokens added by hand this period."},"toppedUp":{"type":"integer","description":"Tokens bought this period."},"spent":{"type":"integer","description":"Tokens every consumer of the client spent this period."},"balance":{"type":"integer","nullable":true,"description":"What is left of the allowance, with what was granted and bought; null when unlimited."},"renewsAt":{"allOf":[{"$ref":"#/components/schemas/IsoDateTime"},{"description":"When the period renews."}]}},"required":["allowance","granted","toppedUp","spent","balance","renewsAt"],"description":"A pool of tokens shared by every consumer of the client."},"TokenPrices":{"type":"object","properties":{"searchRow":{"type":"integer","minimum":0,"description":"One search row, facts only, when a page serves it. A row served to the same consumer within `rules.searchRowFreeDays` takes nothing."},"rowExpand":{"type":"integer","minimum":0,"description":"On top of a search row, when the row carries its attached lists (`expand=attached`)."},"lookup":{"type":"integer","minimum":0,"description":"A lookup that finds an entity, or a resolve that finds a candidate."},"record":{"type":"integer","minimum":0,"description":"A full read of an entity. Reading an entity the consumer holds takes nothing."},"history":{"type":"integer","minimum":0,"description":"An entity's history, wherever it is served: once per entity, free again for `rules.historyFreeDays`."},"prefill":{"type":"integer","minimum":0,"description":"A prefill that finds something."},"people":{"type":"integer","minimum":0,"description":"`POST /v1/people` when it names someone."},"position":{"type":"integer","minimum":0,"description":"A benchmark position that answers."},"baseline":{"type":"integer","minimum":0,"description":"A benchmark baseline, per cohort series returned."},"network":{"type":"integer","minimum":0,"description":"An entity network map: the base, plus `rules.networkPerNode` for each node returned."},"report":{"type":"integer","minimum":0,"description":"A report run: the base, plus `rules.reportPerThousand` for each 1,000 entities in its scope, up to `rules.reportMax`."},"reportSummary":{"type":"integer","minimum":0,"description":"A CQC report summary, per report. Reading it again takes nothing for `rules.rereadFreeDays`."},"dossier":{"type":"integer","minimum":0,"description":"An operator dossier. Reading it again takes nothing for `rules.rereadFreeDays`."},"heldEntity":{"type":"integer","minimum":0,"description":"A held entity, each month it is held, from `setHoldings`: it covers alerts, refreshes, people names and the enrichment-only layers on it."},"standingSearch":{"type":"integer","minimum":0,"description":"A standing search, each month it runs, from `createInterest`: when it is made, then at the start of each month."}},"required":["searchRow","rowExpand","lookup","record","history","prefill","people","position","baseline","network","report","reportSummary","dossier","heldEntity","standingSearch"],"description":"What each action costs in tokens, the same for every plan."},"PriceRules":{"type":"object","properties":{"reportPerThousand":{"type":"integer","minimum":0,"description":"Tokens a report adds for each 1,000 entities in its scope, on top of `tokens.report`."},"reportMax":{"type":"integer","minimum":0,"description":"The most tokens one report run takes."},"networkPerNode":{"type":"integer","minimum":0,"description":"Tokens a network map adds for each node returned, on top of `tokens.network`."},"networkMaxNodes":{"type":"integer","minimum":0,"description":"The most nodes one network map returns."},"historyFreeDays":{"type":"integer","minimum":0,"description":"Days an entity's history stays free to the consumer once paid for."},"searchRowFreeDays":{"type":"integer","minimum":0,"description":"Days a search row stays free to the consumer it was served to."},"rereadFreeDays":{"type":"integer","minimum":0,"description":"Days a report summary or a dossier stays free to read again."}},"required":["reportPerThousand","reportMax","networkPerNode","networkMaxNodes","historyFreeDays","searchRowFreeDays","rereadFreeDays"],"description":"The rules a price scales or lapses by, the same for every plan."},"LayerPack":{"type":"object","properties":{"pack":{"type":"string","pattern":"^[a-z][a-z0-9_]{1,30}$","description":"The pack by key: core, or one of the packs a plan may add."},"name":{"type":"string","description":"The pack's name, for showing."},"layers":{"type":"array","items":{"$ref":"#/components/schemas/LayerKey"},"description":"The layers in the pack."},"core":{"type":"boolean","description":"True for the core pack, which every plan includes."},"pencePerMonth":{"type":"number","minimum":0,"description":"The pack's price a month beyond a plan's allowance of packs, in pence; 0 for core."}},"required":["pack","name","layers","core","pencePerMonth"],"description":"A layer pack: the layers a plan includes together, and its price beyond the allowance."},"Consumer":{"type":"object","properties":{"consumerId":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"A consumer inside a client: a tenant the client manages. Issued by Atlas; the client keeps its own mapping."},"label":{"type":"string","maxLength":120,"description":"What the client calls it. Never the client's own id for it."},"status":{"type":"string","enum":["active","suspended"],"description":"active, or suspended: a suspended consumer is refused on every call until resumed."},"tier":{"type":"string","pattern":"^[a-z][a-z0-9-]{1,30}$","description":"A plan by name: sandbox, starter, growth, scale, platform or enterprise, or a bespoke plan made for the client. free and standard are retired: a consumer already on one keeps it, a new one cannot take it."},"createdAt":{"$ref":"#/components/schemas/IsoDateTime"},"subscriptions":{"type":"array","items":{"$ref":"#/components/schemas/LayerKey"},"description":"The layers it may read now."},"keys":{"type":"array","items":{"type":"object","properties":{"keyId":{"type":"string","pattern":"^ckey_[A-Za-z0-9_-]{8,40}$","description":"A consumer key's id. It starts ckey_."},"prefix":{"type":"string","minLength":4,"maxLength":16,"description":"The first characters of the token, to tell keys apart."},"createdAt":{"$ref":"#/components/schemas/IsoDateTime"},"createdBy":{"type":"string","maxLength":200,"description":"Who made it: the client, or Atlas."},"lastUsedAt":{"type":"string","nullable":true,"format":"date-time","description":"When it last made a call; null when never."},"revokedAt":{"type":"string","nullable":true,"format":"date-time","description":"When it was revoked; null while it works."},"expiresAt":{"type":"string","nullable":true,"format":"date-time","description":"When the key stops working; null when it does not expire."},"allowedAddresses":{"type":"array","items":{"type":"string"},"description":"The addresses the key works from: IPv4 or IPv6, single addresses or CIDR ranges. Empty or absent, any address."}},"required":["keyId","prefix","createdAt","createdBy","lastUsedAt","revokedAt"],"description":"A consumer's key: shown once when made, never again. One active per consumer."},"description":"Its keys, the active one and any revoked."},"tokenCap":{"type":"integer","nullable":true,"minimum":0,"description":"The most tokens it may spend in a month, set by the client; null when only the tier's allowance applies."},"customPrice":{"type":"boolean","description":"True when Atlas bills this consumer at a custom price agreed with the client, in place of its plan's prices. Its tokens are counted and limited as on its plan."}},"required":["consumerId","label","status","tier","createdAt","subscriptions","keys"]},"Subscription":{"type":"object","properties":{"pack":{"type":"string","description":"The layer pack the layer comes from (0.40.0): core, or one of the packs the client has. Absent on a layer subscribed on its own."},"layer":{"$ref":"#/components/schemas/LayerKey"},"since":{"$ref":"#/components/schemas/IsoDateTime"}},"required":["layer","since"]},"Tokens":{"type":"object","properties":{"allowance":{"type":"integer","nullable":true,"description":"The tier's monthly allowance; null when unlimited."},"granted":{"type":"integer","description":"Tokens added by hand this period."},"toppedUp":{"type":"integer","description":"Tokens bought this period, billed at the top-up price."},"spent":{"type":"integer","description":"Tokens spent this period."},"balance":{"type":"integer","nullable":true,"description":"What is left this period, under the lower of the allowance, with any tokens granted or bought, and the consumer's own cap; null when unlimited."},"cap":{"type":"integer","nullable":true,"description":"The consumer's own monthly cap, set by the client; null when none."},"renewsAt":{"$ref":"#/components/schemas/IsoDateTime"},"pool":{"type":"object","properties":{"allowance":{"type":"integer","nullable":true,"description":"The tokens the period gives; null when unlimited."},"granted":{"type":"integer","description":"Tokens added by hand this period."},"toppedUp":{"type":"integer","description":"Tokens bought this period."},"spent":{"type":"integer","description":"Tokens every consumer of the client spent this period."},"balance":{"type":"integer","nullable":true,"description":"What is left of the allowance, with what was granted and bought; null when unlimited."},"renewsAt":{"allOf":[{"$ref":"#/components/schemas/IsoDateTime"},{"description":"When the period renews."}]}},"required":["allowance","granted","toppedUp","spent","balance","renewsAt"],"description":"The client's pool this month (0.40.0): what every consumer of the client draws on. The consumer's own figures above are its share."},"year":{"type":"object","properties":{"allowance":{"type":"integer","nullable":true,"description":"The tokens the period gives; null when unlimited."},"granted":{"type":"integer","description":"Tokens added by hand this period."},"toppedUp":{"type":"integer","description":"Tokens bought this period."},"spent":{"type":"integer","description":"Tokens every consumer of the client spent this period."},"balance":{"type":"integer","nullable":true,"description":"What is left of the allowance, with what was granted and bought; null when unlimited."},"renewsAt":{"allOf":[{"$ref":"#/components/schemas/IsoDateTime"},{"description":"When the period renews."}]}},"required":["allowance","granted","toppedUp","spent","balance","renewsAt"],"description":"On an annual plan: the year the month sits in."}},"required":["allowance","granted","spent","balance","renewsAt"]},"SavedSearchId":{"type":"string","pattern":"^ss_[A-Za-z0-9_-]{12,40}$","description":"A saved search's id, ss_ and a random part."},"SavedSearch":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/SavedSearchId"},"label":{"type":"string","nullable":true,"description":"The name given to it, or null."},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/Condition"},"description":"The conditions it ran with."},"layers":{"type":"array","items":{"$ref":"#/components/schemas/LayerKey"},"description":"The layers it ran over."},"sort":{"type":"string","description":"The sort its results are in."},"results":{"type":"integer","minimum":0,"description":"The results it took and saved."},"matched":{"type":"integer","minimum":0,"description":"Entities the conditions matched when it ran, counted up to 100,000."},"more":{"type":"boolean","description":"True when more matched than it saved. Raise `max` to save more."},"charged":{"type":"integer","minimum":0,"description":"Tokens its pages have cost so far."},"perRow":{"type":"integer","minimum":0,"description":"Tokens one row served cost when it ran."},"createdAt":{"$ref":"#/components/schemas/IsoDateTime"},"expiresAt":{"allOf":[{"$ref":"#/components/schemas/IsoDateTime"},{"description":"When it is deleted: 90 days after it ran."}]},"release":{"type":"object","nullable":true,"properties":{"id":{"type":"string","minLength":1,"description":"The release id, the same value as the x-atlas-release header."},"at":{"allOf":[{"$ref":"#/components/schemas/IsoDateTime"},{"description":"When the release went live."}]}},"required":["id","at"],"description":"The release it ran on."}},"required":["id","label","conditions","layers","sort","results","matched","more","charged","perRow","createdAt","expiresAt","release"],"description":"A search a consumer ran, kept 90 days so its results can be paged and read again. Only Atlas entity ids, the label and the criteria are kept."},"SearchExclude":{"type":"object","properties":{"entityIds":{"type":"array","items":{"$ref":"#/components/schemas/EntityId"},"maxItems":10000,"description":"Entities to leave out, up to 10,000."},"searches":{"type":"array","items":{"$ref":"#/components/schemas/SavedSearchId"},"maxItems":20,"description":"Saved searches whose results to leave out, up to 20, this consumer's own and not expired."}},"description":"What to leave out of the search: left-out results are not counted, saved or served. At most 100,000 entities in all, counting the results of the saved searches named."},"SearchCost":{"type":"object","properties":{"results":{"type":"integer","minimum":0,"description":"The results the search would save: the total, up to `max`. 10,000 when `max` is left out."},"perRow":{"type":"integer","minimum":0,"description":"Tokens one row costs this consumer."},"perRowExpanded":{"type":"integer","minimum":0,"description":"Tokens one row costs this consumer with its attached lists (`expand=attached`)."},"atMost":{"type":"integer","minimum":0,"description":"The most reading every result could take: results times perRow."}},"required":["results","perRow","atMost"],"description":"What reading the search would cost this consumer."},"StatsMeasure":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":80,"description":"The field measured, a key from `GET /v1/catalogue` for the same layers, such as cqc.rating, epc.band or cqc.beds. Left out for count."},"count":{"type":"boolean","enum":[true],"description":"How many entities the group has."},"distribution":{"type":"boolean","enum":[true],"description":"Each option's count and percent of the entities with a value, for a choice, a yes or no, a list or text. An entity with two values of a list counts under each. Options come in the order the catalogue lists them, best first where ordered, else by count."},"share":{"$ref":"#/components/schemas/StatsShare"},"summary":{"type":"array","items":{"type":"string","enum":["mean","median","p25","p75","min","max","sum"]},"minItems":1,"maxItems":7,"description":"Figures for a number such as beds or floor area: mean, median, p25, p75, min, max, sum. For a date, the figures are in days since it, as the time since the last inspection."},"label":{"type":"string","minLength":1,"maxLength":120,"description":"A name for the measure, echoed in the answer."}},"additionalProperties":false,"description":"One thing to measure about each group: exactly one of count, distribution, share and summary."},"StatsShare":{"type":"object","properties":{"in":{"type":"array","items":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]},"minItems":1,"maxItems":50,"description":"Met by a value among these: EPC E or worse is in E, F and G; rated below Good is in Requires Improvement and Inadequate."},"exists":{"type":"boolean","description":"true: met by having a value at all, as a manager absent date gives the manager vacancy rate; false: met by having none. The percent is of the group's entities in the field's layer, at the entity types the field lives on."},"equals":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}],"description":"Met by this one value, such as true for a yes or no."}},"additionalProperties":false,"description":"The test a share counts: the percent of the entities with a value that meet it. Exactly one of in, exists and equals."},"StatsScope":{"type":"object","properties":{"area":{"type":"object","properties":{"region":{"type":"string","minLength":1,"maxLength":120,"description":"A region by name, such as West Midlands."},"localAuthority":{"type":"string","minLength":1,"maxLength":120,"description":"A local authority by name, such as Dudley."},"ward":{"anyOf":[{"type":"string","minLength":1,"maxLength":20},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"description":"The ward's name."},"localAuthority":{"type":"string","minLength":1,"maxLength":120,"description":"The local authority the ward is in, by name."}},"required":["name","localAuthority"],"additionalProperties":false}],"description":"A ward: its ONS code, such as E05009999, or its name and local authority, since ward names repeat across the country."},"icb":{"type":"string","minLength":1,"maxLength":120,"description":"An integrated care board: its ONS code, such as E54000999, or its name."},"country":{"type":"string","minLength":1,"maxLength":120,"description":"A country by name: England, Wales or Scotland."}},"additionalProperties":false,"description":"One area, exactly one of its fields: a region, a local authority or a country by name, a ward or an icb as each says."},"near":{"type":"object","properties":{"entityId":{"$ref":"#/components/schemas/EntityId"},"area":{"type":"string","enum":["region","localAuthority","ward","icb","country"],"default":"localAuthority","description":"An area, the same for every layer's entities: region, localAuthority, ward, icb or country, from the ONS Postcode Directory. A region is one of England's regions, or Wales or Scotland as a whole; an icb is an integrated care board in England. Northern Ireland postcodes have no ONS area, though a register's own region can say Northern Ireland. An entity with no known area groups under null."}},"required":["entityId"],"additionalProperties":false,"description":"The entity's own area: its local authority by default, or the area named. Pair it with subject to see where the entity stands in it."},"related":{"type":"object","properties":{"entityId":{"$ref":"#/components/schemas/EntityId"},"possible":{"type":"boolean","default":false,"description":"True to include possible matches and what they relate to, as `GET /v1/entities/{entityId}/network` does with possible=true. Left out, only confirmed relations."},"depth":{"type":"integer","minimum":1,"maximum":4,"default":2,"description":"How many steps from the entity, as `GET /v1/entities/{entityId}/network` takes them, 2 by default. 2 reaches the other premises its operator runs and its parent company."},"self":{"type":"boolean","default":true,"description":"True to count the entity itself among them. True by default."}},"required":["entityId"],"additionalProperties":false,"description":"The entity's network: who owns and runs it and what they run, its corporate group, as `GET /v1/entities/{entityId}/network` gives it in the layers in scope, at most 1,000 entities. Pair it with subject to compare the entity with its relations, such as the other homes its operator runs."},"savedSearch":{"type":"string","pattern":"^ss_[A-Za-z0-9_-]{12,40}$","description":"One of this consumer's saved searches: its results, as they match the conditions now. Its layers must still be subscribed."},"holdings":{"type":"boolean","enum":[true],"description":"The entities this consumer holds: its own portfolio."}},"additionalProperties":false,"description":"Where to measure, on top of the conditions: left out, everywhere the layers in scope cover. At most one of area, near, related, savedSearch and holdings."},"StatsOption":{"type":"object","properties":{"option":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}],"description":"The option, as the catalogue lists it: a rating, an EPC band, a yes or no."},"count":{"type":"integer","minimum":0,"description":"How many entities have this option."},"percent":{"type":"number","minimum":0,"maximum":100,"description":"The percent of entities with a value that have this option, to 2 decimal places."},"label":{"type":"string","description":"Words for an option that is a code, such as a SIC code's description, where the field has them. Show them beside the option; filter and search on the option."}},"required":["option","count","percent"],"description":"One option of a distribution: how many entities have it, and what share that is."},"StatsLegend":{"type":"object","properties":{"kind":{"type":"string","enum":["count","distribution","share","summary"],"description":"Which kind of measure it is."},"field":{"type":"string","nullable":true,"description":"The field measured; null for a count."},"label":{"type":"string","description":"The measure's label as sent, else the field's in the catalogue."},"test":{"type":"string","description":"For a share: the test in words, such as \"in E, F, G\"."},"options":{"type":"array","items":{"type":"string"},"description":"For a distribution of a field with options: every option, in the catalogue's order."},"series":{"type":"boolean","description":"With series: true when the measure carries one."}},"required":["kind","field","label"],"description":"What one measure is, for labelling it in a table or a chart."},"StatsWithheld":{"type":"object","properties":{"key":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"nullable":true}]},"description":"The group's value for each groupBy, as on a group."},"labels":{"type":"object","additionalProperties":{"type":"string"},"description":"Words for a key that is a code or an id, as on a group."},"count":{"type":"integer","minimum":1,"maximum":4,"description":"How many entities are in the group: fewer than 5."}},"required":["key","count"],"description":"A group with fewer than 5 entities: its count only. Its measures are withheld."},"StatsResult":{"type":"object","properties":{"withValue":{"type":"integer","minimum":0,"description":"How many entities in the group have a value for the field. Every percent in this measure is a percent of these. For a count measure, how many entities are in the group."},"withoutValue":{"type":"integer","minimum":0,"description":"How many entities in the group have no value for the field."},"count":{"type":"integer","minimum":0,"description":"For a count measure: how many entities are in the group."},"options":{"type":"array","items":{"$ref":"#/components/schemas/StatsOption"},"description":"For a distribution: each option present, at most the 50 most common, in the order the catalogue lists the options, best first where ordered, else by count. An entity with two values of a list counts under each, so the percents may sum past 100."},"otherOptions":{"type":"object","properties":{"options":{"type":"integer","minimum":1,"description":"How many options are not listed."},"count":{"type":"integer","minimum":0,"description":"How many entities have one of the unlisted options. An entity with two of them counts twice, as in options."}},"required":["options","count"],"description":"For a distribution with more than 50 options: the options not listed, added together."},"share":{"type":"object","properties":{"count":{"type":"integer","minimum":0,"description":"How many entities meet the test."},"percent":{"type":"number","nullable":true,"minimum":0,"maximum":100,"description":"The percent of entities with a value that meet the test; null when no entity has a value."}},"required":["count","percent"],"description":"For a share measure: how many meet the test, and what share that is."},"summary":{"type":"object","properties":{"mean":{"type":"number","nullable":true,"description":"The figure; null when no entity has a value."},"median":{"type":"number","nullable":true,"description":"The figure; null when no entity has a value."},"p25":{"type":"number","nullable":true,"description":"The figure; null when no entity has a value."},"p75":{"type":"number","nullable":true,"description":"The figure; null when no entity has a value."},"min":{"type":"number","nullable":true,"description":"The figure; null when no entity has a value."},"max":{"type":"number","nullable":true,"description":"The figure; null when no entity has a value."},"sum":{"type":"number","nullable":true,"description":"The figure; null when no entity has a value."}},"description":"For a summary measure: the figures asked for; null when no entity has a value."},"subject":{"type":"object","properties":{"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"nullable":true},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}}],"description":"The subject's own value: the field's value, or its values for a list; for a summary of a date, the days since it; for a share, whether it meets the test. Null when it has none."},"position":{"type":"string","enum":["above","inline","below","unknown"],"description":"Where the subject stands against the group: above means better than most of the group, below worse, inline in the middle, unknown where it cannot be placed."},"delta":{"type":"number","nullable":true,"description":"How far the subject is from the group. For a choice, the percent of the group on worse options less the percent on better ones; for a number, the value less the group mean; for a share, 100 or 0 less the group's percent. Null when unknown."}},"required":["value","position","delta"],"description":"With subject: where the entity stands against this group on this measure. Not on a count."},"series":{"type":"array","items":{"$ref":"#/components/schemas/StatsPoint"},"description":"With series: the measure on earlier days, oldest first."}},"required":["withValue","withoutValue"],"description":"One measure for one group, with its coverage."},"StatsPoint":{"type":"object","properties":{"at":{"allOf":[{"$ref":"#/components/schemas/IsoDate"},{"description":"The day the figures were measured."}]},"withValue":{"type":"integer","minimum":0,"description":"How many entities had a value for the field that day."},"options":{"type":"array","items":{"$ref":"#/components/schemas/StatsOption"},"description":"For a distribution: each option that day."},"share":{"type":"object","properties":{"percent":{"type":"number","nullable":true,"minimum":0,"maximum":100,"description":"The percent meeting the test that day."}},"required":["percent"],"description":"For a share: the percent that day."},"summary":{"type":"object","properties":{"mean":{"type":"number","nullable":true,"description":"The figure that day; null when no entity had a value."},"median":{"type":"number","nullable":true,"description":"The figure that day; null when no entity had a value."},"p25":{"type":"number","nullable":true,"description":"The figure that day; null when no entity had a value."},"p75":{"type":"number","nullable":true,"description":"The figure that day; null when no entity had a value."},"min":{"type":"number","nullable":true,"description":"The figure that day; null when no entity had a value."},"max":{"type":"number","nullable":true,"description":"The figure that day; null when no entity had a value."},"sum":{"type":"number","nullable":true,"description":"The figure that day; null when no entity had a value."}},"description":"For a summary: the figures that day, every one but sum."}},"required":["at","withValue"],"description":"A measure on one earlier day: every figure but sum. A day on which the group had fewer than 5 entities gives no point."},"StatsRequest":{"type":"object","properties":{"level":{"type":"string","enum":["organisation","premises"],"description":"The entity type measured: premises, such as a care home, or organisation. Left out, both. Needed for a condition read through a relation with `via`."},"asAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"A day in the past: the figures are as the entities stood then. Each fact takes the value it had that day, and an entity that had none then has none, while the entities themselves, their areas and their register statuses are as they are now. A day before an entity's history begins finds it with no facts. With too few tokens the whole query is refused."},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/Condition"},"maxItems":20,"default":[],"description":"Which entities, as a search takes them, up to 20. `GET /v1/catalogue` lists the fields, `via` included. None means every entity in the layers in scope."},"layers":{"$ref":"#/components/schemas/LayerScope"},"scope":{"$ref":"#/components/schemas/StatsScope"},"groupBy":{"type":"array","items":{"type":"string","minLength":1,"maxLength":80},"maxItems":2,"default":[],"description":"Up to 2 groupings. Each is an area: region, localAuthority, ward, icb or country; or operator, the organisation that runs each premises; or a catalogue field holding a choice, a yes or no, a list or text, such as cqc.rating or cqc.serviceType. Never a name, an address or a postcode. An entity with no value is grouped under null; an entity with two values of a list, under each."},"measures":{"type":"array","items":{"$ref":"#/components/schemas/StatsMeasure"},"minItems":1,"maxItems":20,"description":"What to measure about each group, at most 20."},"subject":{"type":"string","pattern":"^(org|prm)_[A-Za-z0-9_-]{20}$","description":"An entity to place against every group. Each measure then gives the entity's own value and its position: above means better than most of the group, below worse, inline in the middle, and unknown where the entity has no value, the field has no order or the group is under 5. With too few tokens the whole query is refused."},"series":{"type":"boolean","description":"True for each measure over earlier days too, as `GET /v1/baselines` gives them. A series is available for a measure of a field with a benchmark, over its layer's entities, with no conditions, everywhere or in one region or local authority, grouped by nothing or by one of the field's cohorts: region, localAuthority, or the field's own, such as cqc.serviceType. Where a series is not available, seriesNote says why. With too few tokens the whole query is refused."},"sort":{"type":"object","properties":{"by":{"type":"string","enum":["count","key","measure"],"default":"count","description":"count: by the number of entities in each group, the default; key: by the group keys, A to Z; measure: by one of the measures."},"measure":{"type":"integer","minimum":0,"maximum":19,"description":"For by measure: the measure's place in measures, from 0. A count sorts by the count, a share by its percent, a summary by its first figure, a distribution by `option`'s percent, or by how many entities have a value when `option` is left out."},"option":{"type":"string","maxLength":200,"description":"For a distribution: the option whose percent sorts the groups."},"desc":{"type":"boolean","description":"true: largest first, or Z to A for key; false: smallest first, or A to Z. Left out, largest first for count and a measure, A to Z for key."}},"additionalProperties":false,"description":"The order of the groups."},"limit":{"type":"integer","minimum":1,"maximum":500,"default":100,"description":"The most groups answered, in the sort's order: 100 when left out, at most 500."}},"required":["layers","measures"],"description":"Figures over the entities the conditions and the scope find, in the layers in scope: counts, distributions, shares and summaries, broken down by up to 2 groupings. Figures only, never a list of entities: a group under 5 gives its count and its measures are withheld. An enrichment-only field is never a condition, a grouping or a measure, and nothing is grouped by a name, an address, a postcode or a person. Limits: 2 groupings, 20 measures, 500 groups, 10 seconds; a query past one is refused with the reason. What it costs is on the pricing page."},"StatsResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"description":"How many entities the conditions and the scope found in all."},"overall":{"type":"object","properties":{"measures":{"type":"array","items":{"$ref":"#/components/schemas/StatsResult"},"description":"One result per measure, in the order asked for. Left out when withheld."},"withheld":{"type":"boolean","description":"True when the whole is under 5: its measures are withheld."}},"required":["withheld"],"description":"Every measure over all the entities found, before grouping."},"legend":{"type":"array","items":{"$ref":"#/components/schemas/StatsLegend"},"description":"One entry per measure asked for, in the same order: what each measure is."},"groups":{"type":"array","items":{"$ref":"#/components/schemas/StatsGroup"},"description":"The groups of 5 or more, in the sort's order, up to `limit`. Empty with no groupBy."},"withheld":{"type":"array","items":{"$ref":"#/components/schemas/StatsWithheld"},"description":"The groups under 5, largest first."},"totalGroups":{"type":"integer","minimum":0,"description":"Groups in all, the withheld among them."},"moreGroups":{"type":"boolean","description":"True when there were more groups of 5 or more than `limit` allowed."},"subject":{"type":"object","properties":{"entityId":{"allOf":[{"$ref":"#/components/schemas/EntityId"},{"description":"The subject's entity id. An id that has merged into another gives the id it became."}]},"found":{"type":"boolean","description":"True when the subject is among the entities measured."}},"required":["entityId","found"],"description":"The subject, with subject."},"scoped":{"type":"object","properties":{"kind":{"type":"string","enum":["related","savedSearch","holdings"],"description":"Which scope named them: related, savedSearch or holdings."},"entities":{"type":"integer","minimum":0,"description":"The entities the scope named, before the conditions."},"truncated":{"type":"boolean","description":"For related: true when the network ran past 1,000 entities and the rest were left out."}},"required":["kind","entities","truncated"],"description":"For a scope that names entities: how many it named."},"seriesNote":{"type":"string","description":"With series: why a measure carries none, where one does not."},"asAt":{"allOf":[{"$ref":"#/components/schemas/IsoDate"},{"description":"The day the figures are as at: the asAt sent, else the day the release went live."}]},"release":{"allOf":[{"$ref":"#/components/schemas/Release"},{"description":"The release the figures come from."}]}},"required":["total","overall","legend","groups","withheld","totalGroups","moreGroups","asAt","release"],"description":"The figures: the whole, the legend and the groups."},"attributions":{"type":"array","items":{"$ref":"#/components/schemas/Attribution"},"description":"The attribution line of every layer in scope, to show wherever the figures are shown."},"notices":{"type":"array","items":{"type":"string"},"description":"What a licence asks be said with the figures: the CQC's non-endorsement, among others."},"currency":{"type":"array","items":{"$ref":"#/components/schemas/LayerCurrency"},"description":"How current each layer with a currency duty is, for every such layer in scope."},"cost":{"type":"object","properties":{"entities":{"type":"integer","minimum":0,"description":"The entities in scope the price was worked out on."},"report":{"type":"integer","minimum":0,"description":"Tokens for the run: the report price, plus the price per 1,000 entities in scope, rounded up, up to the most a run takes."},"position":{"type":"integer","minimum":0,"description":"Tokens for the subject, where the query names one."},"baseline":{"type":"integer","minimum":0,"description":"Tokens for the series and the history parts, a baseline each."},"tokens":{"type":"integer","minimum":0,"description":"The whole: what the run takes."}},"required":["entities","report","position","baseline","tokens"],"description":"What the run costs, and what it was priced on."},"charged":{"type":"integer","minimum":0,"description":"Tokens this answer took. Left out when it took none."}},"required":["data","attributions","notices","currency"]},"StatsGroup":{"type":"object","properties":{"key":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"nullable":true}]},"description":"The group's value for each groupBy, by the grouping's key. An operator is its entity id, a ward and an icb their ONS codes, as ward names repeat. Null for no value."},"labels":{"type":"object","additionalProperties":{"type":"string"},"description":"Words for a key that is a code or an id: an operator's name, a ward's name and local authority, an integrated care board's name."},"count":{"type":"integer","minimum":0,"description":"How many entities are in the group."},"measures":{"type":"array","items":{"$ref":"#/components/schemas/StatsResult"},"description":"One result per measure asked for, in the same order."}},"required":["key","count","measures"],"description":"One group and its measures."},"ReportMove":{"type":"object","properties":{"key":{"type":"object","nullable":true,"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"nullable":true}]},"description":"The group that moved, by its keys; null for the whole."},"labels":{"type":"object","additionalProperties":{"type":"string"},"description":"Words for a key that is a code or an id, as on a group."},"measure":{"type":"integer","minimum":-1,"description":"The measure's place in measures, from 0. -1 for how many entities are in the group."},"what":{"type":"string","enum":["count","share","option","summary","appeared","withheld"],"description":"What moved. count: how many entities are in the group, or a count measure; share: a share's percent; option: how many have an option, and its percent moved too; summary: a summary figure; appeared: a group of 5 or more that was not one before, from its count under 5 or null; withheld: a group that fell under 5, to its count, 0 when gone."},"unit":{"type":"string","enum":["count","points","value"],"description":"What from and to are: entities, a percent, or a figure in its own unit."},"option":{"type":"string","description":"For an option: the option, as text."},"figure":{"type":"string","description":"For a summary: which figure moved, such as mean or median."},"from":{"type":"number","nullable":true,"description":"The value on the run before."},"to":{"type":"number","nullable":true,"description":"The value on this run."}},"required":["key","measure","what","unit","from","to"],"description":"One thing that moved between two runs of a report."},"ReportAlert":{"type":"object","properties":{"count":{"type":"integer","minimum":1,"default":1,"description":"A count that moves by at least this many is a move. 1 when left out."},"points":{"type":"number","minimum":0.01,"maximum":100,"default":5,"description":"A percent, of a share or of an option, that moves by at least this many points is a move, as is a summary figure that moves by at least this many percent. 5 when left out."}},"additionalProperties":false,"description":"What counts as the report moving between two releases."},"SavedReport":{"type":"object","properties":{"id":{"type":"string","pattern":"^rp_[A-Za-z0-9_-]{12,40}$","description":"A saved report's id, rp_ and a random part."},"label":{"type":"string","nullable":true,"description":"The name given to it, or null."},"layers":{"type":"array","items":{"$ref":"#/components/schemas/LayerKey"},"description":"The layers the query reads."},"createdAt":{"allOf":[{"$ref":"#/components/schemas/IsoDateTime"},{"description":"When it was saved."}]},"lastRun":{"type":"string","nullable":true,"format":"date-time","description":"When it last ran, on the latest release."},"moved":{"type":"boolean","description":"True when its latest run moved."},"movedAt":{"type":"string","nullable":true,"format":"date-time","description":"When a run last moved."}},"required":["id","label","layers","createdAt","lastRun","moved","movedAt"],"description":"A saved report, without its figures."},"ReportRun":{"type":"object","properties":{"release":{"allOf":[{"$ref":"#/components/schemas/Release"},{"description":"The release the run was made on."}]},"ranAt":{"allOf":[{"$ref":"#/components/schemas/IsoDateTime"},{"description":"When the run was made."}]},"total":{"type":"integer","minimum":0,"description":"How many entities the query found on this run."},"moved":{"type":"boolean","description":"True when anything moved against the run before, by the alert."},"moves":{"type":"array","items":{"$ref":"#/components/schemas/ReportMove"},"maxItems":200,"description":"What moved, at most 200, the largest first."},"error":{"type":"string","description":"Why the run gave no figures, such as a limit or a field gone from the layers. Present only when it gave none."}},"required":["release","ranAt","total","moved","moves"],"description":"One run of a report, on one release."},"FailedCalls":{"type":"object","properties":{"tokens":{"type":"integer","description":"Refused for want of tokens, with TOKENS_EXHAUSTED: the allowance or the consumer cap was reached."},"forbidden":{"type":"integer","description":"Refused by licence or scope, with 403: a layer not subscribed, or a licence rule."},"badRequest":{"type":"integer","description":"Requests refused as malformed, with 400, or as too broad a search, with 422."},"notFound":{"type":"integer","description":"Not found, with 404."},"auth":{"type":"integer","description":"This consumer's key refused: expired, from an address not listed, or consumer keys not allowed. Counted here alone, never as calls."},"server":{"type":"integer","description":"Atlas's own errors, with 5xx."}},"required":["tokens","forbidden","badRequest","notFound","auth","server"],"description":"Calls that failed, by outcome. The rate limit is counted as refused."},"TokensByKind":{"type":"object","properties":{"snapshot":{"type":"integer","description":"First reads of entities, before 0.40.0."},"record":{"type":"integer","description":"Full reads of entities (0.40.0)."},"refresh":{"type":"integer","description":"Refreshes, before 0.40.0 (always 0 since)."},"history":{"type":"integer","description":"Entities' histories unlocked."},"search":{"type":"integer","description":"Search rows served, and rows read again by id."},"lookup":{"type":"integer","description":"Lookups that found an entity, and resolves that found a candidate."},"prefill":{"type":"integer","description":"Prefills."},"people":{"type":"integer","description":"Officers and PSCs."},"benchmark":{"type":"integer","description":"Benchmark positions and baseline series."},"watch":{"type":"integer","description":"Watched entities, a month each, before 0.40.0 (free since)."},"network":{"type":"integer","description":"Entity network maps."},"count":{"type":"integer","description":"Counts: of a search, a saved search or a network map, before 0.40.0 (free since)."},"report":{"type":"integer","description":"Report runs: stats calls, reports saved and saved reports read."},"standingSearch":{"type":"integer","description":"Standing searches, a month each."},"alert":{"type":"integer","description":"Alerts delivered, before 0.40.0 (free since)."},"heldEntity":{"type":"integer","description":"Held entities, each month held (0.40.0)."},"reportSummary":{"type":"integer","description":"CQC report summaries read (0.40.0)."},"dossier":{"type":"integer","description":"Operator dossiers read (0.40.0)."}}},"UsageDay":{"type":"object","properties":{"date":{"$ref":"#/components/schemas/IsoDate"},"calls":{"type":"integer","description":"Calls that day."},"refused":{"type":"integer","description":"Calls refused by the rate limit that day."},"failed":{"$ref":"#/components/schemas/FailedCalls"},"tokensByKind":{"$ref":"#/components/schemas/TokensByKind"}},"required":["date","calls","refused","failed","tokensByKind"],"description":"One day of the period, in UTC."},"StatementRow":{"type":"object","properties":{"id":{"type":"string","description":"The row's id."},"at":{"$ref":"#/components/schemas/IsoDateTime"},"kind":{"type":"string","enum":["snapshot","record","refresh","history","search","lookup","prefill","people","benchmark","watch","network","count","report","standingSearch","alert","heldEntity","reportSummary","dossier","grant","topup","renewal","refund"],"description":"What moved the tokens. A charge: record for a full read of an entity (snapshot for a first read before 0.40.0), refresh, history for a history unlock, search for search rows, lookup for a lookup or resolve, prefill, people for officers and PSCs, benchmark, watch for a watched month, network for an entity network map, count for a count, report for a report run, standingSearch for a standing search's month, alert for alerts delivered, heldEntity for a held entity's month, reportSummary for a CQC report summary, dossier for an operator dossier. Otherwise grant for tokens added by hand, topup for tokens bought, renewal for the month renewing, or refund for a charge given back because its answer could not be sent."},"refundOf":{"type":"string","nullable":true,"enum":["snapshot","record","refresh","history","search","lookup","prefill","people","benchmark","watch","network","count","report","standingSearch","alert","heldEntity","reportSummary","dossier",null],"description":"For a refund, the kind of charge it gives back; null for every other row."},"tokens":{"type":"integer","description":"Charges negative; grants, top-ups, renewals and refunds positive. A renewal says the allowance."},"entityId":{"type":"string","nullable":true,"pattern":"^(org|prm)_[A-Za-z0-9_-]{20}$","description":"The entity a read, unlock or lookup was for; null for every other row."},"searchId":{"type":"string","nullable":true,"description":"The saved search a search charge made; null for every other row."},"results":{"type":"integer","nullable":true,"description":"Rows a search charge was for; null for every other row."},"spentToDate":{"type":"integer","description":"Tokens spent in the month up to and including this row, refunds taken off: the allowance, any grants and the cap say what was left."}},"required":["id","at","kind","tokens","entityId","searchId","results","spentToDate"],"description":"One movement of tokens. Never who granted or why."},"Usage":{"type":"object","properties":{"data":{"type":"object","properties":{"month":{"type":"string","pattern":"^\\d{4}-\\d{2}$","description":"The month, YYYY-MM."},"subject":{"type":"object","properties":{"clientId":{"$ref":"#/components/schemas/ClientId"},"consumerId":{"type":"string","nullable":true,"pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"The consumer; null when it is the client's own usage."}},"required":["clientId","consumerId"],"description":"Whose usage this is."},"tier":{"type":"string","pattern":"^[a-z][a-z0-9-]{1,30}$","description":"A plan by name: sandbox, starter, growth, scale, platform or enterprise, or a bespoke plan made for the client. free and standard are retired: a consumer already on one keeps it, a new one cannot take it."},"subscriptions":{"type":"array","items":{"$ref":"#/components/schemas/LayerKey"},"description":"The layers the subject may read now."},"calls":{"type":"integer","description":"Calls this month."},"refused":{"type":"integer","description":"Calls refused by the rate limit this month."},"failed":{"$ref":"#/components/schemas/FailedCalls"},"byEndpoint":{"type":"array","items":{"type":"object","properties":{"endpoint":{"type":"string","description":"The operation, by its operation id. interestWebhookDelivery counts the webhook deliveries made to you: they take no tokens."},"calls":{"type":"integer","description":"Calls to it this month."},"refused":{"type":"integer","description":"Calls to it refused by the rate limit."},"failed":{"$ref":"#/components/schemas/FailedCalls"}},"required":["endpoint","calls","refused"]},"description":"The same counts, by operation."},"tokens":{"$ref":"#/components/schemas/Tokens"},"tokensByKind":{"$ref":"#/components/schemas/TokensByKind"},"days":{"type":"array","items":{"$ref":"#/components/schemas/UsageDay"},"description":"Every day of the period up to today, oldest first, a day with nothing in it included."},"unusualUse":{"type":"object","properties":{"flagged":{"type":"boolean","description":"True when recent calls run far above the consumer's usual rate: its key may be in use somewhere it should not be."},"lastTwoHours":{"type":"integer","description":"Calls in the current hour and the one before."},"usualTwoHours":{"type":"integer","description":"Two hours at its usual rate: the seven days before the last day, averaged."},"lastDay":{"type":"integer","description":"Calls in the last 24 hours."},"usualDay":{"type":"integer","description":"Its usual day: the seven days before the last day, averaged."},"judged":{"type":"boolean","description":"False while it has fewer than three days of calls to compare with; never flagged then."}},"required":["flagged","lastTwoHours","usualTwoHours","lastDay","usualDay","judged"],"description":"Whether the consumer's calls are running far above its own recent normal. Current month only."}},"required":["month","subject","tier","subscriptions","calls","refused","byEndpoint","tokens","tokensByKind"],"description":"The month so far."}},"required":["data"],"description":"A subject's month so far. Counts are a minute or so behind."},"Statement":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/StatementRow"},"description":"The rows, newest first."},"next":{"type":"string","nullable":true,"minLength":1,"maxLength":200,"description":"The cursor for the next page; null on the last."},"month":{"type":"string","pattern":"^\\d{4}-\\d{2}$","description":"The month, YYYY-MM."}},"required":["data","next","month"],"description":"A consumer's token movements for a month, newest first."},"ConnectingApp":{"type":"object","properties":{"name":{"type":"string","description":"What the assistant calls itself, as it registered. Not checked by Atlas."},"clientId":{"type":"string","description":"The assistant’s OAuth client id: an https URL for an assistant that publishes its details at one, else an id Atlas issued when it registered."},"website":{"type":"string","nullable":true,"description":"The assistant’s website, where it gave one. Not checked by Atlas."}},"required":["name","clientId","website"],"description":"The assistant, as it named itself when it registered. Nothing here is checked by Atlas."},"Connection":{"type":"object","properties":{"connectionId":{"type":"string","pattern":"^cx_[A-Za-z0-9_-]{12,40}$","description":"An assistant’s connection to one of your consumers."},"consumerId":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"The consumer the assistant reads as."},"app":{"$ref":"#/components/schemas/ConnectingApp"},"scope":{"type":"string","description":"Always `atlas`."},"createdAt":{"allOf":[{"$ref":"#/components/schemas/IsoDateTime"},{"description":"When the sign-in was approved."}]},"lastUsedAt":{"type":"string","nullable":true,"format":"date-time","description":"When the assistant last read anything; null if never."},"expiresAt":{"allOf":[{"$ref":"#/components/schemas/IsoDateTime"},{"description":"When the connection ends of itself: the assistant then signs in again. Thirty days after its last use, and a year after it was made at most."}]},"revokedAt":{"type":"string","nullable":true,"format":"date-time","description":"When the client revoked it; null while it stands."}},"required":["connectionId","consumerId","app","scope","createdAt","lastUsedAt","expiresAt","revokedAt"]},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1,"description":"A stable machine-readable code, for example NOT_FOUND."},"message":{"type":"string","minLength":1,"description":"What went wrong, in a sentence for a developer."}},"required":["code","message"],"description":"The error."}},"required":["error"],"description":"Every error response has this shape."}},"parameters":{}},"paths":{"/v1/resolve":{"post":{"operationId":"resolve","summary":"Find the entities a name or identifier means","description":"Turns what a user typed, a business name or a register id such as a company number or a CQC location id, into the entities it may mean, best fit first. Each candidate carries its entity id, its records in each register, its outward postcode and its group. To look up register ids you already store, use `POST /v1/entities/lookup`.\n\nSend the name alone in `q`. A postcode goes in `postcode`: a full postcode, or an outward code such as `DY2`. It narrows the candidates to those near it: `placeNarrowed` is true when it did, and false when nothing was near and the candidates match the name alone. A town or area typed after the name is allowed: when nothing matches the whole of `q`, Atlas tries again without its last word, then its last two or three (a town such as Stoke on Trent), and `droppedWord` says which words it left out. `emailDomain` and `phone` affect the order only. `searched` lists the layers that were searched. What you send is used for this call only and never stored. A person's name is not accepted.\n\n`charged` says what the call spent.\n\n**Cost**: see [pricing](https://atlas.oromiq.com/pricing/).\n\n**Limits**: `q` 2 to 256 characters; `limit` 1 to 10 candidates, 8 by default. The EPC and ICO layers are never searched.\n\n**Called by** a consumer: the client key with `x-atlas-consumer` naming one of its consumers, or a consumer key where the account allows them. The client alone is refused with `CONSUMER_REQUIRED`.\n\n**Your duties**: What you send is used for this call only and never stored. Do not send a person's name to search by.","tags":["Entities"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","example":"cn_8fHq2LmNcV0pXyT3rW6aZe"},"required":false,"description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","name":"x-atlas-consumer","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"q":{"type":"string","minLength":2,"maxLength":256,"description":"The name alone, or a register identifier such as a company number. Never a person. A postcode goes in postcode. A town or area typed after the name is allowed: when nothing matches the whole of q, Atlas tries again without the last word, then the last two or three, and names what it dropped in droppedWord. 2 to 256 characters."},"postcode":{"type":"string","maxLength":10,"description":"A postcode to prefer candidates near: a full postcode, or an outward code such as DY2. When any are near it, only those are returned and placeNarrowed is true; when none are, the candidates match the name alone and placeNarrowed is false. At most 10 characters."},"emailDomain":{"type":"string","maxLength":253,"description":"An email domain that helps order the candidates. Used for this call only, never stored or logged. At most 253 characters."},"phone":{"type":"string","maxLength":40,"description":"A phone number that helps order the candidates. Used for this call only, never stored or logged. At most 40 characters."},"layers":{"$ref":"#/components/schemas/LayerScope"},"limit":{"type":"integer","minimum":1,"maximum":10,"default":8,"description":"How many candidates to return at most, 1 to 10. 8 by default."}},"required":["q","layers"],"additionalProperties":false,"description":"Sent as a body, never a query string. A person's name is never accepted."},"example":{"q":"Brackenfold Care","postcode":"QX1 4AB","layers":["companies_house","cqc"],"limit":8}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"candidates":{"type":"array","items":{"$ref":"#/components/schemas/ResolveCandidate"},"description":"The entities that may be the one meant, best first. At most limit."},"searched":{"type":"array","items":{"$ref":"#/components/schemas/LayerKey"},"description":"The layers that were searched. Empty when none of those named can be."},"placeNarrowed":{"type":"boolean","description":"True when the candidates are the ones near the postcode. False when nothing was near it and the candidates match the name alone. Present only when a postcode was sent."},"droppedWord":{"type":"string","description":"The words dropped from the end of q, up to three (a town such as Stoke on Trent), present when nothing matched the whole of q and the candidates match q without them."}},"required":["candidates","searched"],"description":"The candidates, and which layers were searched."},"charged":{"type":"integer","minimum":0,"description":"Tokens this call took."}},"required":["data"]},"example":{"data":{"candidates":[{"entityId":"org_7pmXa7UUhqFbGdQw9mE1","level":"organisation","name":"BRACKENFOLD CARE LTD","place":{"outwardCode":"QX1","localAuthority":"Quexley","region":"South East","homeBased":false},"status":"active","registers":[{"layer":"companies_house","source":"companies","externalId":"09876543","name":"BRACKENFOLD CARE LTD","confidence":"match"},{"layer":"cqc","source":"providers","externalId":"1-1000000001","name":"Brackenfold Care Ltd","confidence":"match"}],"facts":[{"layer":"companies_house","key":"companies_house.status","label":"Status","value":"Active"}],"group":{"ultimateParentName":"OAKFIELD TRUST LIMITED","size":3},"operatorName":null}],"searched":["companies_house","cqc"],"placeNarrowed":true},"charged":1}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`, `INVALID_JSON`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"},"INVALID_JSON":{"$ref":"#/components/examples/INVALID_JSON"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough tokens: `TOKENS_EXHAUSTED`.","content":{"application/json":{"examples":{"TOKENS_EXHAUSTED":{"$ref":"#/components/examples/TOKENS_EXHAUSTED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_REQUIRED`, `LAYER_NOT_SUBSCRIBED`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_REQUIRED":{"$ref":"#/components/examples/CONSUMER_REQUIRED"},"LAYER_NOT_SUBSCRIBED":{"$ref":"#/components/examples/LAYER_NOT_SUBSCRIBED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The body is too large: `PAYLOAD_TOO_LARGE`.","content":{"application/json":{"examples":{"PAYLOAD_TOO_LARGE":{"$ref":"#/components/examples/PAYLOAD_TOO_LARGE"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable: `NOT_READY`.","content":{"application/json":{"examples":{"NOT_READY":{"$ref":"#/components/examples/NOT_READY"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","INVALID_JSON","PAYLOAD_TOO_LARGE","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_REQUIRED","LAYER_NOT_SUBSCRIBED","TOKENS_EXHAUSTED","NOT_READY"]}},"/v1/prefill":{"post":{"operationId":"prefill","summary":"Fields a new record can be filled from, for one chosen entity","description":"The fields a new record in your system can be filled from, for one entity the user chose: its registered name, an address, phones, website, company number and UPRN, the people a register publishes as the entity's own staff, and its current register records in the layers in scope. Send the `entityId` from a resolve candidate or a search row. `sources` says which layer each field came from.\n\n`addressKind` says whether the address is the premises or a registered office: label a registered office as such. Link your record to the `records` with confidence `match`; one with confidence `high` should only be suggested. `contacts` are the staff a register publishes for the entity, such as a registered manager, never officers.\n\n`charged` says what the call spent.\n\n**Cost**: see [pricing](https://atlas.oromiq.com/pricing/).\n\n**Limits**: the address of a CQC provider who is an individual is withheld.\n\n**Called by** a consumer: the client key with `x-atlas-consumer` naming one of its consumers, or a consumer key where the account allows them. The client alone is refused with `CONSUMER_REQUIRED`.\n\n**Your duties**: Show each layer's attribution line wherever you show the values it gave you.","tags":["Entities"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","example":"cn_8fHq2LmNcV0pXyT3rW6aZe"},"required":false,"description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","name":"x-atlas-consumer","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"entityId":{"allOf":[{"$ref":"#/components/schemas/EntityId"},{"description":"The entity chosen, from a resolve candidate or a search row."}]},"layers":{"$ref":"#/components/schemas/LayerScope"}},"required":["entityId","layers"]},"example":{"entityId":"prm_pdFPkhx7RuGEeFl8Q1pP","layers":["cqc","companies_house"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"registeredName":{"type":"string","nullable":true,"description":"The name as the register gives it. Null when no layer named gives one."},"address":{"type":"object","nullable":true,"properties":{"line1":{"type":"string","description":"The first line of the address."},"line2":{"type":"string","description":"The second line of the address."},"townCity":{"type":"string","description":"The town or city."},"county":{"type":"string","description":"The county."},"postcode":{"type":"string","description":"The full postcode."},"region":{"type":"string","description":"The region, such as the North West or Wales."},"country":{"type":"string","description":"The country, such as England or Scotland."}},"description":"The postal address as the register gives it. Null when no layer named gives one."},"addressKind":{"type":"string","nullable":true,"enum":["premises","registered_office",null],"description":"Which address it is: premises, the premises itself, or registered_office, the registered office. A registered office is often an agent's address, so label it as such. Null when there is no address."},"phones":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","description":"What the number is, in a word or two."},"value":{"type":"string","description":"The phone number as published."}},"required":["label","value"]},"description":"The phone numbers the registers publish for the business, each with a label."},"website":{"type":"string","nullable":true,"description":"The website the registers give. Null when none gives one."},"companyNumber":{"type":"string","nullable":true,"description":"The company number. Null when no layer named gives one."},"contacts":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"The name as published."},"title":{"type":"string","nullable":true,"description":"The role, such as Registered Manager. Null when none is published."},"phone":{"type":"string","nullable":true,"description":"A phone number published for them. Null when none is published."},"layer":{"$ref":"#/components/schemas/LayerKey"}},"required":["name","title","phone","layer"]},"description":"People a register publishes as the business's own staff, such as a registered manager. Never officers."},"sources":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","description":"The field, such as address or website."},"layer":{"$ref":"#/components/schemas/LayerKey"}},"required":["field","layer"]},"description":"Which layer each field came from."},"uprn":{"type":"string","nullable":true,"description":"The Unique Property Reference Number of the premises. Present when a premises record publishes one."},"entity":{"type":"object","nullable":true,"properties":{"id":{"allOf":[{"$ref":"#/components/schemas/EntityId"},{"description":"The current id. An id from before a merge answers as the entity it merged into."}]},"level":{"$ref":"#/components/schemas/EntityLevel"},"companyNumber":{"type":"string","nullable":true,"description":"The entity's company number, whichever layer published it. Null when none did."}},"required":["id","level","companyNumber"],"description":"The entity chosen. Null when the id names no entity."},"records":{"type":"array","items":{"type":"object","properties":{"layer":{"$ref":"#/components/schemas/LayerKey"},"source":{"$ref":"#/components/schemas/SourceKey"},"externalId":{"type":"string","description":"The register's own id for the record."},"name":{"type":"string","nullable":true,"description":"The name the register gives the record. Null when it has none it may show."},"confidence":{"$ref":"#/components/schemas/MemberConfidence"},"level":{"allOf":[{"$ref":"#/components/schemas/EntityLevel"},{"description":"The kind of entity the record describes. A location is a premises."}]}},"required":["layer","source","externalId","name","confidence","level"]},"description":"The chosen entity's current register records in the layers named, to link your new record to. A record with confidence high is a likely match: suggest it, do not link it automatically."}},"required":["registeredName","address","addressKind","phones","website","companyNumber","contacts","sources"],"description":"The fields to seed a new record with, and where each came from."},"charged":{"type":"integer","minimum":0,"description":"Tokens this call took."}},"required":["data"]},"example":{"data":{"registeredName":"OAKFIELD HOUSE","address":{"line1":"14 Mill Lane","townCity":"Quexley","postcode":"QX1 1AA","region":"South East","country":"England"},"addressKind":"premises","phones":[{"label":"Main","value":"01632 960123"}],"website":"https://www.oakfieldhouse.example","companyNumber":null,"contacts":[],"sources":[{"field":"address","layer":"cqc"},{"field":"phones","layer":"cqc"},{"field":"website","layer":"cqc"}],"uprn":null,"entity":{"id":"prm_pdFPkhx7RuGEeFl8Q1pP","level":"premises","companyNumber":null},"records":[{"layer":"cqc","source":"locations","externalId":"1-2000000001","name":"Oakfield House","confidence":"match","level":"premises"}]},"charged":5}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`, `INVALID_JSON`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"},"INVALID_JSON":{"$ref":"#/components/examples/INVALID_JSON"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough tokens: `TOKENS_EXHAUSTED`.","content":{"application/json":{"examples":{"TOKENS_EXHAUSTED":{"$ref":"#/components/examples/TOKENS_EXHAUSTED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_REQUIRED`, `LAYER_NOT_SUBSCRIBED`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_REQUIRED":{"$ref":"#/components/examples/CONSUMER_REQUIRED"},"LAYER_NOT_SUBSCRIBED":{"$ref":"#/components/examples/LAYER_NOT_SUBSCRIBED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found: `NOT_FOUND`.","content":{"application/json":{"examples":{"NOT_FOUND":{"$ref":"#/components/examples/NOT_FOUND"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The body is too large: `PAYLOAD_TOO_LARGE`.","content":{"application/json":{"examples":{"PAYLOAD_TOO_LARGE":{"$ref":"#/components/examples/PAYLOAD_TOO_LARGE"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","INVALID_JSON","PAYLOAD_TOO_LARGE","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_REQUIRED","LAYER_NOT_SUBSCRIBED","NOT_FOUND","TOKENS_EXHAUSTED"]}},"/v1/entities/{entityId}":{"get":{"operationId":"getEntity","summary":"One entity: its records, facts, relations and attribution, in the layers in scope","description":"Everything the layers in scope hold about one entity, an organisation or a premises: its register records (`records`, each with its confidence and how it was joined), its dated facts, whole records (`attached`), notices and alerts (`events`), its relations and corporate group, counts of the people its registers name, and its address and contact details where they may be shown. An id that merged into another entity answers as that entity, with `movedFrom`. People are counts here, never names: `POST /v1/people` names them for an entity you hold. Some layers, such as the ICO's, are answered only for an entity you hold.\n\nAn entity with no history yet answers `historical=true` and `at` with a `notice`.\n\n**Cost**: see [pricing](https://atlas.oromiq.com/pricing/).\n\n**Called by** a consumer: the client key with `x-atlas-consumer` naming one of its consumers, or a consumer key where the account allows them. The client alone is refused with `CONSUMER_REQUIRED`.\n\n**Your duties**: Show each line in `attribution` wherever you show the entity's data, and show `asOf` beside a Food Standards Agency or Care Inspectorate fact. Never suggest the CQC endorses your product.","tags":["Entities"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"allOf":[{"$ref":"#/components/schemas/EntityId"},{"description":"The entity to read, by its id."}]},"required":true,"description":"The entity to read, by its id.","name":"entityId","in":"path","example":"prm_pdFPkhx7RuGEeFl8Q1pP"},{"schema":{"type":"string","maxLength":400,"description":"Comma-separated layer keys the client has switched on, or the one word subscribed for every layer the consumer is subscribed to."},"required":true,"description":"Comma-separated layer keys the client has switched on, or the one word subscribed for every layer the consumer is subscribed to.","name":"layers","in":"query","example":"cqc"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"The entity as it stood on this date, YYYY-MM-DD: the records, facts, relations and attached records whose history covers it. Before the entity has history, the answer is NO_HISTORY with status 422 and says when it starts."},"required":false,"description":"The entity as it stood on this date, YYYY-MM-DD: the records, facts, relations and attached records whose history covers it. Before the entity has history, the answer is NO_HISTORY with status 422 and says when it starts.","name":"at","in":"query"},{"schema":{"type":"string","enum":["true","false"],"description":"true: the entity with its `history` block of changes, dated lists and tenures."},"required":false,"description":"true: the entity with its `history` block of changes, dated lists and tenures.","name":"historical","in":"query"},{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","example":"cn_8fHq2LmNcV0pXyT3rW6aZe"},"required":false,"description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","name":"x-atlas-consumer","in":"header"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Entity"}},"required":["data"]},"example":{"data":{"id":"prm_pdFPkhx7RuGEeFl8Q1pP","level":"premises","name":"OAKFIELD HOUSE","status":"active","place":{"outwardCode":"QX1","localAuthorityCode":null,"localAuthority":"Quexley","region":"South East","country":"England","homeBased":false,"basis":"site","sharedRegisteredOffice":false},"address":{"lines":["14 Mill Lane"],"town":"Quexley","county":null,"postcode":"QX1 1AA","country":"England"},"contact":{"phone":"01632 960123","website":"https://www.oakfieldhouse.example"},"identifiers":{},"records":[{"layer":"cqc","source":"locations","externalId":"1-2000000001","name":"Oakfield House","confidence":"match","joinedBy":"identifier","verified":true,"current":true,"status":"active","since":"2014-03-03"}],"layers":["cqc"],"facts":[{"layer":"cqc","source":"locations","key":"cqc.rating","label":"Overall rating","value":"Good","type":"enum","asOf":"2025-06-17"},{"layer":"cqc","source":"locations","key":"cqc.beds","label":"Beds","value":42,"type":"number","asOf":"2026-10-28"}],"relations":[{"type":"operates","direction":"in","entityId":"org_7pmXa7UUhqFbGdQw9mE1","name":"BRACKENFOLD CARE LTD","since":"2014-03-03","until":null,"current":true,"confidence":"match","verified":true}],"people":{"owners":0,"officers":1},"group":null,"related":[],"attribution":[{"layer":"cqc","text":"Contains Care Quality Commission data. Not endorsed by the Care Quality Commission.","url":"https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/"}],"updatedAt":"2026-10-29T04:00:12.000Z","release":{"id":"b20261029040012c3d4","at":"2026-10-29T06:11:40.000Z"}}}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough tokens: `TOKENS_EXHAUSTED`.","content":{"application/json":{"examples":{"TOKENS_EXHAUSTED":{"$ref":"#/components/examples/TOKENS_EXHAUSTED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_REQUIRED`, `LAYER_NOT_SUBSCRIBED`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_REQUIRED":{"$ref":"#/components/examples/CONSUMER_REQUIRED"},"LAYER_NOT_SUBSCRIBED":{"$ref":"#/components/examples/LAYER_NOT_SUBSCRIBED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found: `NOT_FOUND`.","content":{"application/json":{"examples":{"NOT_FOUND":{"$ref":"#/components/examples/NOT_FOUND"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable: `NOT_READY`.","content":{"application/json":{"examples":{"NOT_READY":{"$ref":"#/components/examples/NOT_READY"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_REQUIRED","LAYER_NOT_SUBSCRIBED","NOT_FOUND","TOKENS_EXHAUSTED","NOT_READY"]}},"/v1/entities/lookup":{"post":{"operationId":"lookupEntities","summary":"The entities a client's own register records belong to","description":"The entities your stored register records belong to: send the ids you hold, such as a company number, a CQC location id or an FSA establishment id, and get back the entity each is part of. Leave out `source` to look in every register of the layer. A company number may be sent without its leading zeros: `123456` finds `00123456`.\n\nAnswers come back in the order sent, one per record. `entityId` is null when the layers in scope hold no such record. `movedFrom` lists earlier ids of the entity, so you can update any you store.\n\n**Cost**: see [pricing](https://atlas.oromiq.com/pricing/).\n\n**Limits**: 1 to 500 records a call; each id at most 256 characters.\n\n**Called by** a consumer: the client key with `x-atlas-consumer` naming one of its consumers, or a consumer key where the account allows them. The client alone is refused with `CONSUMER_REQUIRED`.\n\n**Your duties**: Show each line in `attribution` wherever you show the entity's data, and show `asOf` beside a Food Standards Agency or Care Inspectorate fact. Never suggest the CQC endorses your product.","tags":["Entities"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","example":"cn_8fHq2LmNcV0pXyT3rW6aZe"},"required":false,"description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","name":"x-atlas-consumer","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"records":{"type":"array","items":{"type":"object","properties":{"layer":{"$ref":"#/components/schemas/LayerKey"},"source":{"type":"string","pattern":"^[a-z][a-z0-9_-]{1,40}$","description":"Omit to look in every register of the layer."},"externalId":{"type":"string","minLength":1,"maxLength":256,"description":"The register's own id, up to 256 characters."}},"required":["layer","externalId"]},"minItems":1,"maxItems":500,"description":"The register records to look up, at most 500."},"layers":{"$ref":"#/components/schemas/LayerScope"}},"required":["records","layers"],"description":"The entities your register records belong to, such as a company number or a CQC location id."},"example":{"records":[{"layer":"companies_house","externalId":"09876543"},{"layer":"cqc","source":"locations","externalId":"1-2000000001"}],"layers":["companies_house","cqc"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"layer":{"$ref":"#/components/schemas/LayerKey"},"externalId":{"type":"string","description":"The register's own id, as sent."},"entityId":{"type":"string","nullable":true,"pattern":"^(org|prm)_[A-Za-z0-9_-]{20}$","description":"The entity the record belongs to. Null when Atlas holds no such record in the layers in scope."},"level":{"type":"string","nullable":true,"enum":["organisation","premises",null],"description":"Whether the entity is an organisation or a premises. Null when no entity was found."},"movedFrom":{"type":"array","items":{"$ref":"#/components/schemas/EntityId"},"description":"Ids the entity had before this one, now merged into it. Update any older id you hold."}},"required":["layer","externalId","entityId","level"]},"description":"One answer per record asked for."}},"required":["data"]},"example":{"data":[{"layer":"companies_house","externalId":"09876543","entityId":"org_7pmXa7UUhqFbGdQw9mE1","level":"organisation"},{"layer":"cqc","externalId":"1-2000000001","entityId":"prm_pdFPkhx7RuGEeFl8Q1pP","level":"premises","movedFrom":["prm_Zr8cV1nT5yUo3Ki9Lq2E"]}]}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`, `INVALID_JSON`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"},"INVALID_JSON":{"$ref":"#/components/examples/INVALID_JSON"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_REQUIRED`, `LAYER_NOT_SUBSCRIBED`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_REQUIRED":{"$ref":"#/components/examples/CONSUMER_REQUIRED"},"LAYER_NOT_SUBSCRIBED":{"$ref":"#/components/examples/LAYER_NOT_SUBSCRIBED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The body is too large: `PAYLOAD_TOO_LARGE`.","content":{"application/json":{"examples":{"PAYLOAD_TOO_LARGE":{"$ref":"#/components/examples/PAYLOAD_TOO_LARGE"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable: `NOT_READY`.","content":{"application/json":{"examples":{"NOT_READY":{"$ref":"#/components/examples/NOT_READY"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","INVALID_JSON","PAYLOAD_TOO_LARGE","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_REQUIRED","LAYER_NOT_SUBSCRIBED","NOT_READY"]}},"/v1/entities/batch":{"post":{"operationId":"getEntities","summary":"Up to 100 entities in one call","description":"Up to 100 entities in one call, each as `GET /v1/entities/{entityId}` answers it, in the order asked. An id the layers in scope cannot answer is listed in `missing`. An id that merged into another entity answers as that entity, with `movedFrom`. Some layers, such as the ICO's, are answered only for an entity you hold.\n\n`charged` is the call's total.\n\n**Cost**: see [pricing](https://atlas.oromiq.com/pricing/).\n\n**Limits**: 1 to 100 ids.\n\n**Called by** a consumer: the client key with `x-atlas-consumer` naming one of its consumers, or a consumer key where the account allows them. The client alone is refused with `CONSUMER_REQUIRED`.\n\n**Your duties**: Show each line in `attribution` wherever you show the entity's data, and show `asOf` beside a Food Standards Agency or Care Inspectorate fact. Never suggest the CQC endorses your product.","tags":["Entities"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","example":"cn_8fHq2LmNcV0pXyT3rW6aZe"},"required":false,"description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","name":"x-atlas-consumer","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","items":{"$ref":"#/components/schemas/EntityId"},"minItems":1,"maxItems":100,"description":"The entities to read, by id, at most 100."},"layers":{"$ref":"#/components/schemas/LayerScope"}},"required":["ids","layers"]},"example":{"ids":["prm_pdFPkhx7RuGEeFl8Q1pP","prm_Yq6Mb3Hs8DkTa1Rv5Nx0"],"layers":["cqc"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Entity"},"description":"The entities found."},"charged":{"type":"integer","minimum":0,"description":"Tokens the whole call took."},"missing":{"type":"array","items":{"$ref":"#/components/schemas/EntityId"},"description":"Ids Atlas does not hold, such as an entity merged into another."}},"required":["data","missing"]},"example":{"data":[{"id":"prm_pdFPkhx7RuGEeFl8Q1pP","level":"premises","name":"OAKFIELD HOUSE","status":"active","place":{"outwardCode":"QX1","localAuthorityCode":null,"localAuthority":"Quexley","region":"South East","country":"England","homeBased":false,"basis":"site","sharedRegisteredOffice":false},"address":{"lines":["14 Mill Lane"],"town":"Quexley","county":null,"postcode":"QX1 1AA","country":"England"},"contact":{"phone":"01632 960123","website":"https://www.oakfieldhouse.example"},"identifiers":{},"records":[{"layer":"cqc","source":"locations","externalId":"1-2000000001","name":"Oakfield House","confidence":"match","joinedBy":"identifier","verified":true,"current":true,"status":"active","since":"2014-03-03"}],"layers":["cqc"],"facts":[{"layer":"cqc","source":"locations","key":"cqc.rating","label":"Overall rating","value":"Good","type":"enum","asOf":"2025-06-17"},{"layer":"cqc","source":"locations","key":"cqc.beds","label":"Beds","value":42,"type":"number","asOf":"2026-10-28"}],"relations":[{"type":"operates","direction":"in","entityId":"org_7pmXa7UUhqFbGdQw9mE1","name":"BRACKENFOLD CARE LTD","since":"2014-03-03","until":null,"current":true,"confidence":"match","verified":true}],"people":{"owners":0,"officers":1},"group":null,"related":[],"attribution":[{"layer":"cqc","text":"Contains Care Quality Commission data. Not endorsed by the Care Quality Commission.","url":"https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/"}],"updatedAt":"2026-10-29T04:00:12.000Z","release":{"id":"b20261029040012c3d4","at":"2026-10-29T06:11:40.000Z"}}],"charged":0,"missing":["prm_Yq6Mb3Hs8DkTa1Rv5Nx0"]}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`, `INVALID_JSON`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"},"INVALID_JSON":{"$ref":"#/components/examples/INVALID_JSON"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough tokens: `TOKENS_EXHAUSTED`.","content":{"application/json":{"examples":{"TOKENS_EXHAUSTED":{"$ref":"#/components/examples/TOKENS_EXHAUSTED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_REQUIRED`, `LAYER_NOT_SUBSCRIBED`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_REQUIRED":{"$ref":"#/components/examples/CONSUMER_REQUIRED"},"LAYER_NOT_SUBSCRIBED":{"$ref":"#/components/examples/LAYER_NOT_SUBSCRIBED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The body is too large: `PAYLOAD_TOO_LARGE`.","content":{"application/json":{"examples":{"PAYLOAD_TOO_LARGE":{"$ref":"#/components/examples/PAYLOAD_TOO_LARGE"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable: `NOT_READY`.","content":{"application/json":{"examples":{"NOT_READY":{"$ref":"#/components/examples/NOT_READY"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","INVALID_JSON","PAYLOAD_TOO_LARGE","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_REQUIRED","LAYER_NOT_SUBSCRIBED","TOKENS_EXHAUSTED","NOT_READY"]}},"/v1/possible-matches":{"post":{"operationId":"possibleMatches","summary":"Records in other layers that may be the same business or premises","description":"Records in other layers that may be the same organisation or premises as the entities you name. A possible match is not part of the entity: show it as a suggestion for your users to accept or reject in your product. `confidence` is `high` or `medium`; `reviewed` is true once Atlas has confirmed the match; `entityId` is the entity the other record belongs to, if any. Atlas confirms matches: you cannot confirm one, but you may flag one your team doubts with `POST /v1/links/{linkId}/flags`, by its `linkId`. A flag is a signal to review, never a decision. A record whose name is a person's is never offered. ICO matches are answered only for an entity you hold.\n\n**Cost**: see [pricing](https://atlas.oromiq.com/pricing/).\n\n**Limits**: 1 to 100 entities a call; at most 200 matches per entity.\n\n**Called by** a consumer: the client key with `x-atlas-consumer` naming one of its consumers, or a consumer key where the account allows them. The client alone is refused with `CONSUMER_REQUIRED`.\n\n**Your duties**: A possible match is a suggestion: show it as one, for your users to accept or reject, never as part of the entity.","tags":["Entities"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","example":"cn_8fHq2LmNcV0pXyT3rW6aZe"},"required":false,"description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","name":"x-atlas-consumer","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"entityIds":{"type":"array","items":{"$ref":"#/components/schemas/EntityId"},"minItems":1,"maxItems":100,"description":"The entities to find possible matches for, at most 100."},"layers":{"$ref":"#/components/schemas/LayerScope"}},"required":["entityIds","layers"]},"example":{"entityIds":["prm_pdFPkhx7RuGEeFl8Q1pP"],"layers":["cqc","fsa"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PossibleMatch"},"description":"The possible matches for the entities asked for."}},"required":["data"]},"example":{"data":[{"forEntityId":"prm_pdFPkhx7RuGEeFl8Q1pP","entityId":"prm_Lc5Vn2Rq7XtGh9Bw4Ze1","register":{"layer":"fsa","source":"establishments","externalId":"1876543"},"name":"Oakfield House Care Home","sourceLabel":"Food hygiene ratings","relation":"same_premises","confidence":"high","reviewed":false,"reviewedAt":null,"linkId":"lk_Qm4tN7vX2cR9pL1sK8wY3bH6dF0"}]}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`, `INVALID_JSON`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"},"INVALID_JSON":{"$ref":"#/components/examples/INVALID_JSON"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_REQUIRED`, `LAYER_NOT_SUBSCRIBED`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_REQUIRED":{"$ref":"#/components/examples/CONSUMER_REQUIRED"},"LAYER_NOT_SUBSCRIBED":{"$ref":"#/components/examples/LAYER_NOT_SUBSCRIBED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The body is too large: `PAYLOAD_TOO_LARGE`.","content":{"application/json":{"examples":{"PAYLOAD_TOO_LARGE":{"$ref":"#/components/examples/PAYLOAD_TOO_LARGE"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable: `NOT_READY`.","content":{"application/json":{"examples":{"NOT_READY":{"$ref":"#/components/examples/NOT_READY"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","INVALID_JSON","PAYLOAD_TOO_LARGE","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_REQUIRED","LAYER_NOT_SUBSCRIBED","NOT_READY"]}},"/v1/dossier":{"post":{"operationId":"dossier","summary":"An operator dossier: the entity, who runs it, their group, every premises and its ratings","description":"The whole picture of a care provider, or of one of its homes, in one answer: the entity with its history (`entity`, as `GET /v1/entities/{entityId}?historical=true` gives it), the organisation that runs it (`operator`, null when the entity is itself an organisation), the group around that organisation as a map (`group`: owners, what they own and the premises each runs, two hops out and at most 100 nodes, with `cut` and `frontier` saying where more is left), every premises the operator runs today with how its overall rating changed (`premises`), and the records in other layers that may be the same thing (`possibleMatches`). Send a premises or an organisation; an id that merged into another entity answers as that entity.\n\nOne price for the whole, whatever it holds: the entity's own history, the map and the premises are not charged on their own. Reading the same dossier again within its free window takes nothing; `cost` says the price, whether this read was free, and until when. People are counts here; names appear only in `history.tenures` for an entity you hold.\n\n**Cost**: see [pricing](https://atlas.oromiq.com/pricing/).\n\n**Limits**: the map stops at two hops and 100 nodes; `GET /v1/entities/{entityId}/network` opens a branch from any id in `frontier`.\n\n**Called by** a consumer: the client key with `x-atlas-consumer` naming one of its consumers, or a consumer key where the account allows them. The client alone is refused with `CONSUMER_REQUIRED`.\n\n**Your duties**: Show each line in `attribution` wherever you show the entity's data, and show `asOf` beside a Food Standards Agency or Care Inspectorate fact. Never suggest the CQC endorses your product.","tags":["Entities"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","example":"cn_8fHq2LmNcV0pXyT3rW6aZe"},"required":false,"description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","name":"x-atlas-consumer","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"entityId":{"allOf":[{"$ref":"#/components/schemas/EntityId"},{"description":"The entity the dossier is about: a premises, such as a care home, or the organisation that runs premises."}]},"layers":{"$ref":"#/components/schemas/LayerScope"}},"required":["entityId","layers"],"description":"Sent as a body."},"example":{"entityId":"prm_pdFPkhx7RuGEeFl8Q1pP","layers":["cqc","companies_house"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"entity":{"allOf":[{"$ref":"#/components/schemas/Entity"},{"description":"The entity asked for, with its `history` block as `GET /v1/entities/{entityId}?historical=true` gives it. An id that merged into another entity answers as that entity."}]},"operator":{"type":"object","nullable":true,"properties":{"id":{"$ref":"#/components/schemas/EntityId"},"level":{"$ref":"#/components/schemas/EntityLevel"},"name":{"type":"string","nullable":true,"description":"The entity's name. Null when no register gives one."},"status":{"$ref":"#/components/schemas/EntityStatus"},"place":{"$ref":"#/components/schemas/Place"},"tradingPlaces":{"type":"array","items":{"$ref":"#/components/schemas/TradingPlace"},"description":"For an organisation: the places it trades from, in the layers in scope, one per outward code and town. Empty when no register says."},"address":{"type":"object","nullable":true,"properties":{"lines":{"type":"array","items":{"type":"string"},"description":"The street lines of the address."},"town":{"type":"string","nullable":true,"description":"The town. Null when the register gives none."},"county":{"type":"string","nullable":true,"description":"The county. Null when the register gives none."},"postcode":{"type":"string","nullable":true,"description":"The postcode. Null when the register gives none."},"country":{"type":"string","nullable":true,"description":"The country. Null when the register gives none."}},"required":["lines","town","county","postcode","country"],"description":"The full address. Present only when the entity is not a likely home, so place.homeBased is false, and the register that leads it is in scope. Never from the EPC register. Null when none may be served."},"contact":{"type":"object","properties":{"phone":{"type":"string","nullable":true,"description":"The phone number the register publishes. Null when it gives none."},"website":{"type":"string","nullable":true,"description":"The website the register publishes. Null when it gives none."}},"required":["phone","website"],"description":"The phone and website the leading record publishes, under the same conditions as address. Never from a record that names a person."},"identifiers":{"type":"object","properties":{"companyNumber":{"type":"string","description":"The company number, where a register gives one."},"uprn":{"type":"string","description":"The Unique Property Reference Number, where a register gives one."}},"description":"Published identifiers the entity carries, for keying it to your own records."},"records":{"type":"array","items":{"$ref":"#/components/schemas/EntityMember"},"description":"The register records that make up the entity, one per register."},"layers":{"type":"array","items":{"type":"string"},"description":"The layers in scope that hold something about the entity, whether records, facts, lists or events, by layer key, sorted. A layer that is read on held entities only, such as the ICO, is listed only for an entity the client holds."},"facts":{"type":"array","items":{"$ref":"#/components/schemas/Fact"},"description":"What the registers say about the entity, one fact per field, in the layers in scope."},"attached":{"type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/AttachedRecord"}},"description":"Records about the entity kept whole, by list name such as assessments or filings. Each list is newest first, in the layers in scope. Their searchable fields are in the catalogue as <layer>.<list>.<key>."},"events":{"type":"array","items":{"$ref":"#/components/schemas/EntityEvent"},"description":"Notices and alerts about the entity, such as Gazette notices and food alerts, newest first, in the layers in scope."},"relations":{"type":"array","items":{"$ref":"#/components/schemas/EntityRelation"},"description":"The entity's links to other entities: the premises it operates, the organisation that operates it, its owners and the entity it moved to."},"people":{"type":"object","properties":{"owners":{"type":"integer","minimum":0,"description":"How many individuals the register lists as having significant control today. Never a name."},"officers":{"type":"integer","minimum":0,"description":"How many officers the registers list today, such as directors, secretaries and LLP members, together with regulated roles such as a registered manager or a nominated individual. Never a name."}},"required":["owners","officers"],"description":"The people the entity's registers name today, as counts only, in the layers in scope. Never a name, an id or anything else about a person. Names are read with `POST /v1/people`, for an entity the client holds. owners counts the individuals the register lists as having significant control, including those whose details are protected. A corporate owner is an entity of its own, in relations. A count is what the register lists: 0 does not mean no individual controls the entity, as some companies are exempt and a holding under 25 percent is never listed. Absent when there is no one to count."},"group":{"type":"object","nullable":true,"properties":{"parentId":{"type":"string","nullable":true,"pattern":"^(org|prm)_[A-Za-z0-9_-]{20}$","description":"The organisation that owns this one directly. Null at the top of the group."},"ultimateParentId":{"allOf":[{"$ref":"#/components/schemas/EntityId"},{"description":"The organisation at the top of the group."}]},"ultimateParentName":{"type":"string","nullable":true,"description":"The name of the organisation at the top of the group. Null when none is known."},"depth":{"type":"integer","description":"How many owners sit between this organisation and the top of the group. 0 at the top."},"size":{"type":"integer","description":"How many organisations are in the group."},"premisesCurrent":{"type":"integer","description":"How many premises the group operates now."}},"required":["parentId","ultimateParentId","ultimateParentName","depth","size","premisesCurrent"],"description":"The ownership group the organisation belongs to. Null when it is in none."},"related":{"type":"array","items":{"type":"object","properties":{"entityId":{"$ref":"#/components/schemas/EntityId"},"name":{"type":"string","nullable":true,"description":"The other entity's name. Null when none is known."},"signals":{"type":"array","items":{"type":"string","enum":["address","website","phone"]},"description":"What the two entities share: an address, a website or a phone number."}},"required":["entityId","name","signals"]},"description":"Entities that may share an owner with this one, by what they have in common. A suggestion, never a group."},"attribution":{"type":"array","items":{"$ref":"#/components/schemas/Attribution"},"description":"One attribution line per layer, to show wherever its data is shown."},"updatedAt":{"allOf":[{"$ref":"#/components/schemas/IsoDateTime"},{"description":"When any part of the entity last changed."}]},"asAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Present when the entity was asked for as at a date. Everything above is as it stood then."},"held":{"type":"boolean","description":"True when the consumer holds this entity. A held entity is read for nothing and names its active people."},"movedFrom":{"type":"string","pattern":"^(org|prm)_[A-Za-z0-9_-]{20}$","description":"The id this answer was asked for, when the entity has since taken another because it merged into this one. An old id never stops working."},"splitInto":{"type":"array","items":{"$ref":"#/components/schemas/EntityId"},"description":"Entities that split off this one, oldest first."},"splitFrom":{"type":"string","pattern":"^(org|prm)_[A-Za-z0-9_-]{20}$","description":"The entity this one split off from."},"ended":{"type":"string","nullable":true,"pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"When the entity closed: every record gone, or the register says so. Null while open."},"tombstone":{"type":"boolean","description":"True when only the name and the closed date remain, because the entity ended longer ago than its layers keep history. No records, facts or relations, and never personal data."},"history":{"type":"object","properties":{"status":{"type":"string","enum":["complete","loading"],"description":"complete when the entity's history is all here. loading when it is still being gathered: ask again after retryAfter seconds."},"retryAfter":{"type":"integer","description":"How many seconds to wait before asking again. Present only while status is loading."},"backfilledAt":{"type":"string","nullable":true,"format":"date-time","description":"When the entity's history was last brought up to date. Null while loading."},"changes":{"type":"array","items":{"$ref":"#/components/schemas/HistoryPoint"},"description":"Changes to facts, dates and status, oldest first."},"lists":{"type":"array","items":{"type":"string"},"description":"The dated lists this entity carries under attached."},"tenures":{"type":"array","items":{"type":"object","properties":{"layer":{"$ref":"#/components/schemas/LayerKey"},"role":{"type":"string","description":"What the register calls it: Director, Secretary, Registered Manager."},"since":{"type":"string","nullable":true,"pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"When the role began. Null when the register gives no date."},"until":{"type":"string","nullable":true,"pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"When the role ended, by the register or by its record leaving the register. Null while held."},"name":{"type":"string","nullable":true,"description":"The person's name. Present only for a role that is active on an entity the client holds, null otherwise. For an entity newly held it arrives with the next build; the block's notice says so until then."}},"required":["layer","role","since","until","name"],"description":"A role held at the entity: the role and its dates, never a person's name unless active and held."},"description":"The roles held at the entity, with a name only for an active role on an entity the client holds. notice says when names are withheld until the entity is held, or awaited from the next build."},"charged":{"type":"integer","description":"Tokens this answer took."},"notice":{"type":"string","description":"A sentence, present when the changes are incomplete or none are held, when names on the tenures are withheld because the client does not hold the entity, or when names for a held entity are still being fetched and arrive with the next build."}},"required":["status","backfilledAt","changes","lists","tenures","charged"],"description":"The entity's past, served with ?historical=true, as ?at= and `GET /v1/entities/{entityId}/history` read it."},"charged":{"type":"integer","description":"Tokens this answer took in all: the record, and the history where the answer carries it. Left out when it took none."},"release":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"The release id, the same value as the x-atlas-release header."},"at":{"allOf":[{"$ref":"#/components/schemas/IsoDateTime"},{"description":"When the release went live."}]}},"required":["id","at"],"description":"The release this answer comes from."},"pendingChanges":{"type":"array","items":{"$ref":"#/components/schemas/PendingChange"},"description":"Changes recorded for this entity after its release, in the layers in scope, oldest first: a status, a fact, a date, a record that went, or a role or an attached item that arrived or ended. The values above are the release's and do not include these."},"notice":{"type":"string","description":"Something the answer could not do, in a sentence. An as-at date before history begins returns the entity as it is now, with this."}},"required":["id","level","name","status","place","identifiers","records","facts","relations","group","related","attribution","updatedAt"],"description":"The organisation that runs the entity today, when the entity is a premises. Null when the entity is itself an organisation, or no current operator is known in the layers in scope."},"group":{"type":"object","properties":{"root":{"allOf":[{"$ref":"#/components/schemas/EntityId"},{"description":"The entity the map is of: the id asked for, or the entity it was merged into."}]},"movedFrom":{"type":"string","pattern":"^(org|prm)_[A-Za-z0-9_-]{20}$","description":"The id asked for. Present only when it was merged into the root."},"nodes":{"type":"array","items":{"$ref":"#/components/schemas/NetworkNode"},"description":"The nodes: the root first, then by hops from it and by id. The order is stable within a release."},"edges":{"type":"array","items":{"$ref":"#/components/schemas/NetworkEdge"},"description":"The edges, in order of from, to and kind."},"truncated":{"type":"boolean","description":"True when depth or maxNodes cut something off. frontier says where, and cut says the limits applied."},"frontier":{"type":"array","items":{"$ref":"#/components/schemas/EntityId"},"description":"The nodes with neighbours left out by depth or maxNodes. Call this operation again from one of them to open that branch."},"walked":{"type":"array","items":{"$ref":"#/components/schemas/EntityId"},"description":"The ids walk named that were possible nodes of this map and were walked on, sorted. Present only when walk was sent."},"cut":{"type":"object","properties":{"depth":{"type":"integer","minimum":1,"description":"The hops walked from the root."},"maxNodes":{"type":"integer","minimum":1,"description":"The most nodes the map could return, the root included: what was asked for, or the most a map returns when that was more."},"by":{"type":"array","items":{"type":"string","enum":["depth","maxNodes","possible","brand"],"description":"A limit that cut the map: depth, maxNodes, possible (a possible match not walked on) or brand (more peers than a node shows)."},"description":"Which limits cut something off (0.40.1): depth, the last hop had more beyond it; maxNodes, the map was full; possible, a possible match was not walked on (name it in walk); brand, a brand had more peers than a node shows. Empty when nothing was cut."}},"required":["depth","maxNodes"],"description":"The limits the map was walked under, as applied. truncated says whether anything was cut off, by which limits, and frontier where."}},"required":["root","nodes","edges","truncated","frontier"],"description":"The network around the operator (or around the entity when it is an organisation): owners, the organisations they own and the premises each runs, two hops out and at most 100 nodes. `cut` says the limits applied and `frontier` where more was left; `GET /v1/entities/{entityId}/network` opens a branch."},"premises":{"type":"array","items":{"type":"object","properties":{"entity":{"allOf":[{"$ref":"#/components/schemas/Entity"},{"description":"The premises as `GET /v1/entities/{entityId}` answers it."}]},"ratings":{"type":"array","items":{"$ref":"#/components/schemas/HistoryPoint"},"description":"Every change to the premises' overall rating that Atlas has observed since it first held the premises, oldest first. Empty when it has observed none. The register's own list of assessments, each rating with its date, is on the entity under attached.assessments, and the current rating in facts."}},"required":["entity","ratings"],"description":"One premises the operator runs, with its rating history."},"description":"Every premises the operator runs today in the layers in scope, each with its rating history. Empty when it runs none, or when the entity is a premises with no known operator."},"possibleMatches":{"type":"array","items":{"$ref":"#/components/schemas/PossibleMatch"},"description":"Records in other layers that may be the same organisation or premises as the entity asked for, as `POST /v1/possible-matches` gives them."},"notice":{"type":"string","description":"Something the dossier could not include, in a sentence."}},"required":["entity","operator","group","premises","possibleMatches"],"description":"The dossier: the entity, its operator, the group, the premises and the possible matches."},"release":{"allOf":[{"$ref":"#/components/schemas/Release"},{"description":"The release an answer comes from. Answers within one release agree with each other. Changes recorded since are listed in pendingChanges."}]},"charged":{"type":"integer","minimum":0,"description":"Tokens this call took: the dossier price, or 0 within the free window."},"cost":{"type":"object","properties":{"tokens":{"type":"integer","minimum":0,"description":"What a dossier costs at your plan."},"free":{"type":"boolean","description":"True when this read took nothing because the dossier was read within its free window."},"freeUntil":{"type":"string","nullable":true,"format":"date-time","description":"When the free window ends: until this instant the same consumer reads this dossier again for nothing. Null when the price is 0."}},"required":["tokens","free","freeUntil"],"description":"What the dossier cost, and until when it is free to read again."}},"required":["data","charged","cost"],"description":"An operator dossier: the entity, who runs it, the group around them, every premises they run with its ratings, and the records that may be the same thing, in one answer. One price for the whole, whatever it holds, and free to read again for the free window; the entity's own history, the map and the premises are not charged separately."},"example":{"data":{"entity":{"id":"prm_pdFPkhx7RuGEeFl8Q1pP","level":"premises","name":"OAKFIELD HOUSE","status":"active","place":{"outwardCode":"QX1","localAuthorityCode":null,"localAuthority":"Quexley","region":"South East","country":"England","homeBased":false,"basis":"site","sharedRegisteredOffice":false},"address":{"lines":["14 Mill Lane"],"town":"Quexley","county":null,"postcode":"QX1 1AA","country":"England"},"contact":{"phone":"01632 960123","website":"https://www.oakfieldhouse.example"},"identifiers":{},"records":[{"layer":"cqc","source":"locations","externalId":"1-2000000001","name":"Oakfield House","confidence":"match","joinedBy":"identifier","verified":true,"current":true,"status":"active","since":"2014-03-03"}],"layers":["cqc"],"facts":[{"layer":"cqc","source":"locations","key":"cqc.rating","label":"Overall rating","value":"Good","type":"enum","asOf":"2025-06-17"},{"layer":"cqc","source":"locations","key":"cqc.beds","label":"Beds","value":42,"type":"number","asOf":"2026-10-28"}],"relations":[{"type":"operates","direction":"in","entityId":"org_7pmXa7UUhqFbGdQw9mE1","name":"BRACKENFOLD CARE LTD","since":"2014-03-03","until":null,"current":true,"confidence":"match","verified":true}],"people":{"owners":0,"officers":1},"group":null,"related":[],"attribution":[{"layer":"cqc","text":"Contains Care Quality Commission data. Not endorsed by the Care Quality Commission.","url":"https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/"}],"updatedAt":"2026-10-29T04:00:12.000Z","release":{"id":"b20261029040012c3d4","at":"2026-10-29T06:11:40.000Z"},"history":{"status":"complete","backfilledAt":"2026-10-29T04:00:12.000Z","changes":[{"layer":"cqc","key":"cqc.rating","label":"Overall rating","from":"Requires improvement","to":"Good","observedAt":"2025-06-18T04:00:12.000Z","asOf":"2025-06-17","jobId":"job_8Hk2Lm9Qw4Rt7Yp1"}],"lists":["reports","assessments"],"tenures":[],"charged":0}},"operator":{"id":"org_7pmXa7UUhqFbGdQw9mE1","level":"organisation","name":"BRACKENFOLD CARE LTD","status":"active","place":{"outwardCode":"QX1","localAuthorityCode":null,"localAuthority":"Quexley","region":"South East","country":"England","homeBased":false,"basis":"site","sharedRegisteredOffice":false},"address":null,"identifiers":{"companyNumber":"09876543"},"records":[{"layer":"companies_house","source":"companies","externalId":"09876543","name":"BRACKENFOLD CARE LTD","confidence":"match","joinedBy":"identifier","verified":true,"current":true,"status":"active","since":"2014-01-20"}],"layers":["companies_house","cqc"],"facts":[],"relations":[{"type":"operates","direction":"out","entityId":"prm_pdFPkhx7RuGEeFl8Q1pP","name":"OAKFIELD HOUSE","since":"2014-03-03","until":null,"current":true,"confidence":"match","verified":true}],"people":{"owners":0,"officers":3},"group":{"parentId":"org_K3vR8sLq2NwYb5TzHc0M","ultimateParentId":"org_K3vR8sLq2NwYb5TzHc0M","ultimateParentName":"OAKFIELD TRUST LIMITED","depth":1,"size":2,"premisesCurrent":2},"related":[],"attribution":[{"layer":"cqc","text":"Contains Care Quality Commission data. Not endorsed by the Care Quality Commission.","url":"https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/"},{"layer":"companies_house","text":"Contains public sector information licensed under the Open Government Licence v3.0.","url":"https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/"}],"updatedAt":"2026-10-29T04:00:12.000Z","release":{"id":"b20261029040012c3d4","at":"2026-10-29T06:11:40.000Z"}},"group":{"root":"org_7pmXa7UUhqFbGdQw9mE1","nodes":[{"id":"org_7pmXa7UUhqFbGdQw9mE1","kind":"organisation","name":"BRACKENFOLD CARE LTD","status":"active","place":"Quexley","layers":["companies_house","cqc"],"people":{"owners":0,"officers":3},"group":{"ultimateParentId":"org_K3vR8sLq2NwYb5TzHc0M","parentId":"org_K3vR8sLq2NwYb5TzHc0M"},"held":true,"depth":0},{"id":"org_K3vR8sLq2NwYb5TzHc0M","kind":"organisation","name":"OAKFIELD TRUST LIMITED","status":"active","place":"Quexley","layers":["companies_house"],"people":{"owners":1,"officers":4},"group":{"ultimateParentId":"org_K3vR8sLq2NwYb5TzHc0M","parentId":null},"held":false,"depth":1},{"id":"prm_pdFPkhx7RuGEeFl8Q1pP","kind":"premises","name":"OAKFIELD HOUSE","status":"active","place":"Quexley","layers":["cqc"],"people":{"owners":0,"officers":1},"held":false,"depth":1}],"edges":[{"from":"org_7pmXa7UUhqFbGdQw9mE1","to":"prm_pdFPkhx7RuGEeFl8Q1pP","kind":"operates","source":"cqc","band":"match","possible":false,"since":"2014-03-03"},{"from":"org_K3vR8sLq2NwYb5TzHc0M","to":"org_7pmXa7UUhqFbGdQw9mE1","kind":"owns","source":"companies_house","band":"match","possible":false,"since":"2019-04-01","detail":"75 to 100% of shares; 75 to 100% of voting rights"}],"truncated":false,"frontier":[],"cut":{"depth":2,"maxNodes":100}},"premises":[{"entity":{"id":"prm_pdFPkhx7RuGEeFl8Q1pP","level":"premises","name":"OAKFIELD HOUSE","status":"active","place":{"outwardCode":"QX1","localAuthorityCode":null,"localAuthority":"Quexley","region":"South East","country":"England","homeBased":false,"basis":"site","sharedRegisteredOffice":false},"address":{"lines":["14 Mill Lane"],"town":"Quexley","county":null,"postcode":"QX1 1AA","country":"England"},"contact":{"phone":"01632 960123","website":"https://www.oakfieldhouse.example"},"identifiers":{},"records":[{"layer":"cqc","source":"locations","externalId":"1-2000000001","name":"Oakfield House","confidence":"match","joinedBy":"identifier","verified":true,"current":true,"status":"active","since":"2014-03-03"}],"layers":["cqc"],"facts":[{"layer":"cqc","source":"locations","key":"cqc.rating","label":"Overall rating","value":"Good","type":"enum","asOf":"2025-06-17"},{"layer":"cqc","source":"locations","key":"cqc.beds","label":"Beds","value":42,"type":"number","asOf":"2026-10-28"}],"relations":[{"type":"operates","direction":"in","entityId":"org_7pmXa7UUhqFbGdQw9mE1","name":"BRACKENFOLD CARE LTD","since":"2014-03-03","until":null,"current":true,"confidence":"match","verified":true}],"people":{"owners":0,"officers":1},"group":null,"related":[],"attribution":[{"layer":"cqc","text":"Contains Care Quality Commission data. Not endorsed by the Care Quality Commission.","url":"https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/"}],"updatedAt":"2026-10-29T04:00:12.000Z","release":{"id":"b20261029040012c3d4","at":"2026-10-29T06:11:40.000Z"}},"ratings":[{"layer":"cqc","key":"cqc.rating","label":"Overall rating","from":"Requires improvement","to":"Good","observedAt":"2025-06-18T04:00:12.000Z","asOf":"2025-06-17","jobId":"job_8Hk2Lm9Qw4Rt7Yp1"}]}],"possibleMatches":[]},"release":{"id":"b20261029040012c3d4","at":"2026-10-29T06:11:40.000Z"},"charged":150,"cost":{"tokens":150,"free":false,"freeUntil":"2026-11-29T09:12:44.000Z"}}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`, `INVALID_JSON`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"},"INVALID_JSON":{"$ref":"#/components/examples/INVALID_JSON"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough tokens: `TOKENS_EXHAUSTED`.","content":{"application/json":{"examples":{"TOKENS_EXHAUSTED":{"$ref":"#/components/examples/TOKENS_EXHAUSTED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_REQUIRED`, `LAYER_NOT_SUBSCRIBED`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_REQUIRED":{"$ref":"#/components/examples/CONSUMER_REQUIRED"},"LAYER_NOT_SUBSCRIBED":{"$ref":"#/components/examples/LAYER_NOT_SUBSCRIBED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found: `NOT_FOUND`.","content":{"application/json":{"examples":{"NOT_FOUND":{"$ref":"#/components/examples/NOT_FOUND"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The body is too large: `PAYLOAD_TOO_LARGE`.","content":{"application/json":{"examples":{"PAYLOAD_TOO_LARGE":{"$ref":"#/components/examples/PAYLOAD_TOO_LARGE"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable: `NOT_READY`.","content":{"application/json":{"examples":{"NOT_READY":{"$ref":"#/components/examples/NOT_READY"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","INVALID_JSON","PAYLOAD_TOO_LARGE","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_REQUIRED","LAYER_NOT_SUBSCRIBED","NOT_FOUND","TOKENS_EXHAUSTED","NOT_READY"]}},"/v1/people":{"post":{"operationId":"people","summary":"Officers, owners and registered managers, named only for an entity the consumer holds","description":"The people an entity's registers publish: Companies House officers and persons with significant control, and CQC registered managers and nominated individuals, each with their role and its dates. Names are answered only for an entity this consumer holds (`PUT /v1/holdings`), and only while the role is active. For an entity it does not hold, only corporate owners are listed, and `notice` says how many roles' names are withheld and that holding the entity brings them with the next build. For an entity newly held, `notice` says how many names are still being fetched; they arrive with the next build. A person the register suppresses is never listed. There is no search by person.\n\nEach person carries minimised fields only: never a date of birth, nationality, country of residence or home address.\n\n`charged` says what the call spent.\n\n**Cost**: see [pricing](https://atlas.oromiq.com/pricing/).\n\n**Called by** a consumer: the client key with `x-atlas-consumer` naming one of its consumers, or a consumer key where the account allows them. The client alone is refused with `CONSUMER_REQUIRED`.\n\n**Your duties**: Names are for an entity you hold, and only while you hold it. Keep what you store to the role and its dates where you can, and act on a person notice by its `actBy` date.","tags":["People"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","example":"cn_8fHq2LmNcV0pXyT3rW6aZe"},"required":false,"description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","name":"x-atlas-consumer","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"entityId":{"$ref":"#/components/schemas/EntityId"},"layers":{"$ref":"#/components/schemas/LayerScope"}},"required":["entityId","layers"]},"example":{"entityId":"org_7pmXa7UUhqFbGdQw9mE1","layers":["companies_house","cqc"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Person"},"description":"The people named on the entity."},"charged":{"type":"integer","minimum":0,"description":"Tokens this call took."},"notice":{"type":"string","description":"A sentence, present when names are not in the list: how many roles are withheld because the client does not hold the entity, and that holding it brings the names with the next build; or how many names are still being fetched for an entity it holds, and arrive with the next build."}},"required":["data"],"description":"People are named only for an entity the client holds. For any other entity only corporate owners are listed, and notice says how many names are withheld. A name for a newly held entity arrives with the next build; notice says so until then."},"example":{"data":[{"kind":"psc_corporate","layer":"companies_house","externalId":"12345678","name":"OAKFIELD TRUST LIMITED","role":"Corporate person with significant control","since":"2019-04-01","until":null},{"kind":"officer","layer":"companies_house","externalId":"Xq7Lm2Pa9Rt4Vb8Nc1Dz5Kw3Hy6","name":"SAMPLE, A.","role":"Director","since":"2016-09-12","until":null}],"charged":5}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`, `INVALID_JSON`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"},"INVALID_JSON":{"$ref":"#/components/examples/INVALID_JSON"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough tokens: `TOKENS_EXHAUSTED`.","content":{"application/json":{"examples":{"TOKENS_EXHAUSTED":{"$ref":"#/components/examples/TOKENS_EXHAUSTED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_REQUIRED`, `LAYER_NOT_SUBSCRIBED`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_REQUIRED":{"$ref":"#/components/examples/CONSUMER_REQUIRED"},"LAYER_NOT_SUBSCRIBED":{"$ref":"#/components/examples/LAYER_NOT_SUBSCRIBED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found: `NOT_FOUND`.","content":{"application/json":{"examples":{"NOT_FOUND":{"$ref":"#/components/examples/NOT_FOUND"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The body is too large: `PAYLOAD_TOO_LARGE`.","content":{"application/json":{"examples":{"PAYLOAD_TOO_LARGE":{"$ref":"#/components/examples/PAYLOAD_TOO_LARGE"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable: `NOT_READY`.","content":{"application/json":{"examples":{"NOT_READY":{"$ref":"#/components/examples/NOT_READY"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","INVALID_JSON","PAYLOAD_TOO_LARGE","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_REQUIRED","LAYER_NOT_SUBSCRIBED","NOT_FOUND","TOKENS_EXHAUSTED","NOT_READY"]}},"/v1/people/notices":{"get":{"operationId":"personNotices","summary":"People this consumer was served who have objected or asked for erasure","description":"The people this consumer was given who have since objected to Atlas holding their record (UK GDPR Article 21) or asked for their name to be erased (Article 17), over the last 12 months, newest first. A notice goes to every consumer that read the person in the last 12 months. Each is also sent as a `person.notice` event in the consumer's feed and to its webhook, with the same `noticeId`.\n\nAct on a notice by `actBy`, 30 days after it was raised: find what you kept of the person by `entityId`, `layer` and `externalId` (the id `POST /v1/people` gave them under), including any record you made your own, and act on the request. A notice never carries the person's name.\n\n**Cost**: see [pricing](https://atlas.oromiq.com/pricing/).\n\n**Called by** a consumer: the client key with `x-atlas-consumer` naming one of its consumers, or a consumer key where the account allows them. The client alone is refused with `CONSUMER_REQUIRED`.\n\n**Your duties**: Names are for an entity you hold, and only while you hold it. Keep what you store to the role and its dates where you can, and act on a person notice by its `actBy` date.","tags":["People"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"type":"string","format":"date-time","description":"Only notices made at or after this instant. Left out, every notice of the last 12 months."},"required":false,"description":"Only notices made at or after this instant. Left out, every notice of the last 12 months.","name":"from","in":"query","example":"2026-11-01T00:00:00.000Z"},{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","example":"cn_8fHq2LmNcV0pXyT3rW6aZe"},"required":false,"description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","name":"x-atlas-consumer","in":"header"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"noticeId":{"type":"string","pattern":"^pn_[A-Za-z0-9_-]{12,40}$","description":"The notice's id: the same in the feed, the webhook and GET /v1/people/notices, so a notice met twice is acted on once."},"kind":{"type":"string","enum":["objection","erasure"],"description":"objection: the person objected to their record being held, under UK GDPR Article 21. erasure: they asked for their name to be erased, under Article 17. Either way, act on what you kept of them, including any record you made your own."},"entityId":{"allOf":[{"$ref":"#/components/schemas/EntityId"},{"description":"The entity the person was named on when this consumer read its people."}]},"layer":{"allOf":[{"$ref":"#/components/schemas/LayerKey"},{"description":"The layer that named the person."}]},"externalId":{"type":"string","minLength":1,"maxLength":256,"description":"The person's id, the `externalId` that `POST /v1/people` served them under: match it, with the entity and the layer, to what you kept. Never their name."},"actBy":{"allOf":[{"$ref":"#/components/schemas/IsoDate"},{"description":"Act on it by this day: 30 days after the notice."}]},"noticedAt":{"$ref":"#/components/schemas/IsoDateTime"}},"required":["noticeId","kind","entityId","layer","externalId","actBy","noticedAt"],"description":"One person notice, as the feed sent it."},"maxItems":1000,"description":"The notices, newest first, at most 1000."}},"required":["data"],"description":"The calling consumer's person notices of the last 12 months, newest first."},"example":{"data":[{"noticeId":"pn_Rb7Xk2Qm9Lp4Vt8N","kind":"erasure","entityId":"org_7pmXa7UUhqFbGdQw9mE1","layer":"companies_house","externalId":"Xq7Lm2Pa9Rt4Vb8Nc1Dz5Kw3Hy6","actBy":"2026-12-05","noticedAt":"2026-11-05T10:12:00.000Z"}]}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_REQUIRED`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_REQUIRED":{"$ref":"#/components/examples/CONSUMER_REQUIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_REQUIRED"]}},"/v1/entities/{entityId}/network":{"get":{"operationId":"entityNetwork","summary":"Who owns and runs an entity, and what they run, as nodes and edges","description":"A map of who owns and runs an entity, and what they run: `nodes` (organisations and premises) and `edges` (`owns`, `operates`, and `same_business` or `same_premises` for possible matches). A node carries what a search row shows; open one with `GET /v1/entities/{entityId}`. People are never nodes: an organisation carries counts of its owners and officers. Only the layers in scope are read, and a layer answered only for a held entity is listed on a node only where you hold it.\n\nPossible matches are included and marked `possible: true` on the edge and on the nodes only they reach; `possible=false` leaves them out. `walk` names possible nodes from an earlier answer to continue past: nodes beyond them keep `possible` and name what they rest on in `possibleVia`. `same_brand` edges, CQC providers trading under one brand, are included only when `kinds` names them. `cut` says the `depth` and `maxNodes` applied; when `truncated` is true, `frontier` lists the nodes to open next.\n\nThe map is charged per node returned, so a larger `depth` costs more. Call `GET /v1/entities/{entityId}/network/count` first, for nothing, to see the size and the price; start at `depth` 1 or 2 and go to 3 for the wider group.\n\n**Cost**: see [pricing](https://atlas.oromiq.com/pricing/).\n\n**Limits**: `depth` 1 to 4, 2 by default; `maxNodes` 1 to 1000, 200 by default; `walk` at most 20 ids, and not with `possible=false`.\n\n**Called by** a consumer: the client key with `x-atlas-consumer` naming one of its consumers, or a consumer key where the account allows them. The client alone is refused with `CONSUMER_REQUIRED`.\n\n**Your duties**: Show each layer's attribution line wherever you show the map. Nodes carry no addresses or people.","tags":["Entities"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"allOf":[{"$ref":"#/components/schemas/EntityId"},{"description":"The entity to read, by its id."}]},"required":true,"description":"The entity to read, by its id.","name":"entityId","in":"path","example":"org_7pmXa7UUhqFbGdQw9mE1"},{"schema":{"type":"string","maxLength":400,"description":"Comma-separated layer keys, or the one word subscribed for every layer the consumer is subscribed to. A node is shown only where one of these layers holds a record of it, and nothing is reached through a node that is not shown."},"required":true,"description":"Comma-separated layer keys, or the one word subscribed for every layer the consumer is subscribed to. A node is shown only where one of these layers holds a record of it, and nothing is reached through a node that is not shown.","name":"layers","in":"query","example":"cqc,companies_house"},{"schema":{"type":"integer","minimum":1,"maximum":4,"default":2,"description":"How many hops to walk from the root, 1 to 4. 2 by default. The map is charged per node returned, so a larger depth costs more; cut says the depth applied."},"required":false,"description":"How many hops to walk from the root, 1 to 4. 2 by default. The map is charged per node returned, so a larger depth costs more; cut says the depth applied.","name":"depth","in":"query","example":1},{"schema":{"type":"integer","minimum":1,"maximum":1000,"default":200,"description":"The most nodes to return, the root included, 1 to 1000. 200 by default. The map is charged per node returned, so this caps the cost; cut says the most applied."},"required":false,"description":"The most nodes to return, the root included, 1 to 1000. 200 by default. The map is charged per node returned, so this caps the cost; cut says the most applied.","name":"maxNodes","in":"query","example":200},{"schema":{"type":"string","maxLength":200,"pattern":"^[a-z_]+(,[a-z_]+)*$","description":"Comma-separated edge kinds to follow: owns, operates, same_business, same_premises, same_brand. Left out, every kind but same_brand is followed: owns, operates, same_business, same_premises."},"required":false,"description":"Comma-separated edge kinds to follow: owns, operates, same_business, same_premises, same_brand. Left out, every kind but same_brand is followed: owns, operates, same_business, same_premises.","name":"kinds","in":"query"},{"schema":{"type":"string","enum":["true","false"],"description":"Send false to leave out possible matches: the edges with possible true, and the nodes only they reach. They are included by default, flagged with possible true."},"required":false,"description":"Send false to leave out possible matches: the edges with possible true, and the nodes only they reach. They are included by default, flagged with possible true.","name":"possible","in":"query"},{"schema":{"type":"string","maxLength":500,"pattern":"^(org|prm)_[A-Za-z0-9_-]{20}(,(org|prm)_[A-Za-z0-9_-]{20})*$","description":"Comma-separated ids of nodes flagged possible true on a map of this entity, at most 20. Each is walked on like any node, and everything reached through it keeps possible true and names it in possibleVia. An id that is not a possible node of this map is ignored, and walked says which were. Refused with possible=false."},"required":false,"description":"Comma-separated ids of nodes flagged possible true on a map of this entity, at most 20. Each is walked on like any node, and everything reached through it keeps possible true and names it in possibleVia. An id that is not a possible node of this map is ignored, and walked says which were. Refused with possible=false.","name":"walk","in":"query"},{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","example":"cn_8fHq2LmNcV0pXyT3rW6aZe"},"required":false,"description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","name":"x-atlas-consumer","in":"header"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"root":{"allOf":[{"$ref":"#/components/schemas/EntityId"},{"description":"The entity the map is of: the id asked for, or the entity it was merged into."}]},"movedFrom":{"type":"string","pattern":"^(org|prm)_[A-Za-z0-9_-]{20}$","description":"The id asked for. Present only when it was merged into the root."},"nodes":{"type":"array","items":{"$ref":"#/components/schemas/NetworkNode"},"description":"The nodes: the root first, then by hops from it and by id. The order is stable within a release."},"edges":{"type":"array","items":{"$ref":"#/components/schemas/NetworkEdge"},"description":"The edges, in order of from, to and kind."},"truncated":{"type":"boolean","description":"True when depth or maxNodes cut something off. frontier says where, and cut says the limits applied."},"frontier":{"type":"array","items":{"$ref":"#/components/schemas/EntityId"},"description":"The nodes with neighbours left out by depth or maxNodes. Call this operation again from one of them to open that branch."},"walked":{"type":"array","items":{"$ref":"#/components/schemas/EntityId"},"description":"The ids walk named that were possible nodes of this map and were walked on, sorted. Present only when walk was sent."},"cut":{"type":"object","properties":{"depth":{"type":"integer","minimum":1,"description":"The hops walked from the root."},"maxNodes":{"type":"integer","minimum":1,"description":"The most nodes the map could return, the root included: what was asked for, or the most a map returns when that was more."},"by":{"type":"array","items":{"type":"string","enum":["depth","maxNodes","possible","brand"],"description":"A limit that cut the map: depth, maxNodes, possible (a possible match not walked on) or brand (more peers than a node shows)."},"description":"Which limits cut something off (0.40.1): depth, the last hop had more beyond it; maxNodes, the map was full; possible, a possible match was not walked on (name it in walk); brand, a brand had more peers than a node shows. Empty when nothing was cut."}},"required":["depth","maxNodes"],"description":"The limits the map was walked under, as applied. truncated says whether anything was cut off, by which limits, and frontier where."}},"required":["root","nodes","edges","truncated","frontier"],"description":"The map: its root, its nodes and its edges."},"release":{"allOf":[{"$ref":"#/components/schemas/Release"},{"description":"The release an answer comes from. Answers within one release agree with each other. Changes recorded since are listed in pendingChanges."}]},"charged":{"type":"integer","minimum":0,"description":"Tokens this map took: the base, plus the price per node for each node returned."}},"required":["data","charged"],"description":"An entity's network as plain graph data, nodes and edges, for any graph library to lay out. What it costs is on the pricing page: a base, plus a price per node returned, so a smaller maxNodes costs less. The count operation says the price first, for nothing. A refusal with 402 TOKENS_EXHAUSTED returns nothing."},"example":{"data":{"root":"org_7pmXa7UUhqFbGdQw9mE1","nodes":[{"id":"org_7pmXa7UUhqFbGdQw9mE1","kind":"organisation","name":"BRACKENFOLD CARE LTD","status":"active","place":"Quexley","layers":["companies_house","cqc"],"people":{"owners":0,"officers":3},"group":{"ultimateParentId":"org_K3vR8sLq2NwYb5TzHc0M","parentId":"org_K3vR8sLq2NwYb5TzHc0M"},"held":true,"depth":0},{"id":"org_K3vR8sLq2NwYb5TzHc0M","kind":"organisation","name":"OAKFIELD TRUST LIMITED","status":"active","place":"Quexley","layers":["companies_house"],"people":{"owners":1,"officers":4},"group":{"ultimateParentId":"org_K3vR8sLq2NwYb5TzHc0M","parentId":null},"held":false,"depth":1},{"id":"prm_Wd4Jf9Gx1BnQe6Ap2Ys7","kind":"premises","name":"BRACKENFOLD LODGE","status":"active","place":"Quexley","layers":["cqc"],"held":false,"depth":1},{"id":"prm_pdFPkhx7RuGEeFl8Q1pP","kind":"premises","name":"OAKFIELD HOUSE","status":"active","place":"Quexley","layers":["cqc"],"people":{"owners":0,"officers":1},"held":false,"depth":1}],"edges":[{"from":"org_7pmXa7UUhqFbGdQw9mE1","to":"prm_Wd4Jf9Gx1BnQe6Ap2Ys7","kind":"operates","source":"cqc","band":"match","possible":false,"since":"2018-02-05"},{"from":"org_7pmXa7UUhqFbGdQw9mE1","to":"prm_pdFPkhx7RuGEeFl8Q1pP","kind":"operates","source":"cqc","band":"match","possible":false,"since":"2014-03-03"},{"from":"org_K3vR8sLq2NwYb5TzHc0M","to":"org_7pmXa7UUhqFbGdQw9mE1","kind":"owns","source":"companies_house","band":"match","possible":false,"since":"2019-04-01","detail":"75 to 100% of shares; 75 to 100% of voting rights"}],"truncated":true,"frontier":["org_K3vR8sLq2NwYb5TzHc0M"]},"release":{"id":"b20261029040012c3d4","at":"2026-10-29T06:11:40.000Z"},"charged":75}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough tokens: `TOKENS_EXHAUSTED`.","content":{"application/json":{"examples":{"TOKENS_EXHAUSTED":{"$ref":"#/components/examples/TOKENS_EXHAUSTED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_REQUIRED`, `LAYER_NOT_SUBSCRIBED`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_REQUIRED":{"$ref":"#/components/examples/CONSUMER_REQUIRED"},"LAYER_NOT_SUBSCRIBED":{"$ref":"#/components/examples/LAYER_NOT_SUBSCRIBED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found: `NOT_FOUND`.","content":{"application/json":{"examples":{"NOT_FOUND":{"$ref":"#/components/examples/NOT_FOUND"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable: `NOT_READY`.","content":{"application/json":{"examples":{"NOT_READY":{"$ref":"#/components/examples/NOT_READY"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_REQUIRED","LAYER_NOT_SUBSCRIBED","NOT_FOUND","TOKENS_EXHAUSTED","NOT_READY"]}},"/v1/entities/{entityId}/network/count":{"get":{"operationId":"entityNetworkCount","summary":"Count what an entity's network map would answer, and the tokens it would take","description":"What `GET /v1/entities/{entityId}/network` would answer for the same query, counted: how many nodes and edges, whether `depth` or `maxNodes` would cut something off (`cut` says the limits applied), and its `price` in tokens on this consumer's plan. Takes the same query. Call it first: it is free, and the map is charged per node returned, so it says what a larger `depth` would cost before you pay for it.\n\n**Cost**: see [pricing](https://atlas.oromiq.com/pricing/).\n\n**Limits**: as for the map: `depth` 1 to 4, `maxNodes` 1 to 1000.\n\n**Called by** a consumer: the client key with `x-atlas-consumer` naming one of its consumers, or a consumer key where the account allows them. The client alone is refused with `CONSUMER_REQUIRED`.\n\n**Your duties**: Show each layer's attribution line wherever you show the map. Nodes carry no addresses or people.","tags":["Entities"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"allOf":[{"$ref":"#/components/schemas/EntityId"},{"description":"The entity to read, by its id."}]},"required":true,"description":"The entity to read, by its id.","name":"entityId","in":"path","example":"org_7pmXa7UUhqFbGdQw9mE1"},{"schema":{"type":"string","maxLength":400,"description":"Comma-separated layer keys, or the one word subscribed for every layer the consumer is subscribed to. A node is shown only where one of these layers holds a record of it, and nothing is reached through a node that is not shown."},"required":true,"description":"Comma-separated layer keys, or the one word subscribed for every layer the consumer is subscribed to. A node is shown only where one of these layers holds a record of it, and nothing is reached through a node that is not shown.","name":"layers","in":"query","example":"cqc,companies_house"},{"schema":{"type":"integer","minimum":1,"maximum":4,"default":2,"description":"How many hops to walk from the root, 1 to 4. 2 by default. The map is charged per node returned, so a larger depth costs more; cut says the depth applied."},"required":false,"description":"How many hops to walk from the root, 1 to 4. 2 by default. The map is charged per node returned, so a larger depth costs more; cut says the depth applied.","name":"depth","in":"query","example":1},{"schema":{"type":"integer","minimum":1,"maximum":1000,"default":200,"description":"The most nodes to return, the root included, 1 to 1000. 200 by default. The map is charged per node returned, so this caps the cost; cut says the most applied."},"required":false,"description":"The most nodes to return, the root included, 1 to 1000. 200 by default. The map is charged per node returned, so this caps the cost; cut says the most applied.","name":"maxNodes","in":"query","example":200},{"schema":{"type":"string","maxLength":200,"pattern":"^[a-z_]+(,[a-z_]+)*$","description":"Comma-separated edge kinds to follow: owns, operates, same_business, same_premises, same_brand. Left out, every kind but same_brand is followed: owns, operates, same_business, same_premises."},"required":false,"description":"Comma-separated edge kinds to follow: owns, operates, same_business, same_premises, same_brand. Left out, every kind but same_brand is followed: owns, operates, same_business, same_premises.","name":"kinds","in":"query"},{"schema":{"type":"string","enum":["true","false"],"description":"Send false to leave out possible matches: the edges with possible true, and the nodes only they reach. They are included by default, flagged with possible true."},"required":false,"description":"Send false to leave out possible matches: the edges with possible true, and the nodes only they reach. They are included by default, flagged with possible true.","name":"possible","in":"query"},{"schema":{"type":"string","maxLength":500,"pattern":"^(org|prm)_[A-Za-z0-9_-]{20}(,(org|prm)_[A-Za-z0-9_-]{20})*$","description":"Comma-separated ids of nodes flagged possible true on a map of this entity, at most 20. Each is walked on like any node, and everything reached through it keeps possible true and names it in possibleVia. An id that is not a possible node of this map is ignored, and walked says which were. Refused with possible=false."},"required":false,"description":"Comma-separated ids of nodes flagged possible true on a map of this entity, at most 20. Each is walked on like any node, and everything reached through it keeps possible true and names it in possibleVia. An id that is not a possible node of this map is ignored, and walked says which were. Refused with possible=false.","name":"walk","in":"query"},{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","example":"cn_8fHq2LmNcV0pXyT3rW6aZe"},"required":false,"description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","name":"x-atlas-consumer","in":"header"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"nodes":{"type":"integer","minimum":0,"description":"How many nodes the same query would return."},"edges":{"type":"integer","minimum":0,"description":"How many edges the same query would return."},"truncated":{"type":"boolean","description":"True when depth or maxNodes would cut something off."},"price":{"type":"integer","minimum":0,"description":"The tokens the map would take this consumer: the base, plus the price per node for each node counted."},"cost":{"type":"object","properties":{"base":{"type":"integer","minimum":0,"description":"The network price: what every map takes."},"perNode":{"type":"integer","minimum":0,"description":"What each node returned adds."},"nodes":{"type":"integer","minimum":0,"description":"The nodes the map would return."},"tokens":{"type":"integer","minimum":0,"description":"The whole: base plus perNode times nodes."}},"required":["base","perNode","nodes","tokens"],"description":"How the price is made up."},"cut":{"type":"object","properties":{"depth":{"type":"integer","minimum":1,"description":"The hops walked from the root."},"maxNodes":{"type":"integer","minimum":1,"description":"The most nodes the map could return, the root included: what was asked for, or the most a map returns when that was more."},"by":{"type":"array","items":{"type":"string","enum":["depth","maxNodes","possible","brand"],"description":"A limit that cut the map: depth, maxNodes, possible (a possible match not walked on) or brand (more peers than a node shows)."},"description":"Which limits cut something off (0.40.1): depth, the last hop had more beyond it; maxNodes, the map was full; possible, a possible match was not walked on (name it in walk); brand, a brand had more peers than a node shows. Empty when nothing was cut."}},"required":["depth","maxNodes"],"description":"The limits the map was walked under, as applied. truncated says whether anything was cut off, by which limits, and frontier where."}},"required":["nodes","edges","truncated","price"],"description":"The counts, and the tokens the map would take."},"release":{"allOf":[{"$ref":"#/components/schemas/Release"},{"description":"The release an answer comes from. Answers within one release agree with each other. Changes recorded since are listed in pendingChanges."}]},"charged":{"type":"integer","minimum":0,"description":"Tokens this count took."}},"required":["data"],"description":"What a network map would return, counted, and the tokens it would take, without drawing it."},"example":{"data":{"nodes":4,"edges":3,"truncated":true,"price":75},"release":{"id":"b20261029040012c3d4","at":"2026-10-29T06:11:40.000Z"}}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_REQUIRED`, `LAYER_NOT_SUBSCRIBED`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_REQUIRED":{"$ref":"#/components/examples/CONSUMER_REQUIRED"},"LAYER_NOT_SUBSCRIBED":{"$ref":"#/components/examples/LAYER_NOT_SUBSCRIBED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found: `NOT_FOUND`.","content":{"application/json":{"examples":{"NOT_FOUND":{"$ref":"#/components/examples/NOT_FOUND"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable: `NOT_READY`.","content":{"application/json":{"examples":{"NOT_READY":{"$ref":"#/components/examples/NOT_READY"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_REQUIRED","LAYER_NOT_SUBSCRIBED","NOT_FOUND","NOT_READY"]}},"/v1/entities/{entityId}/history":{"get":{"operationId":"history","summary":"An entity's tracked facts over time","description":"An entity's tracked facts over time: each change to a fact, a status or a date, with the value before and after, the date it changed, and the publisher's own date where it gives one. Filter with `facts` (catalogue keys such as `cqc.rating`) and `from` and `to` dates. The roles held at the entity, with their dates, are in the `history` block of `GET /v1/entities/{entityId}?historical=true` as tenures, named only for an active role on an entity you hold; the block's `notice` says when names are withheld until you hold the entity, or are still being fetched and arrive with the next build.\n\nAn entity with no history yet answers an empty list with a `notice`.\n\n**Cost**: see [pricing](https://atlas.oromiq.com/pricing/).\n\n**Limits**: at most 1,000 changes an answer.\n\n**Called by** a consumer: the client key with `x-atlas-consumer` naming one of its consumers, or a consumer key where the account allows them. The client alone is refused with `CONSUMER_REQUIRED`.\n\n**Your duties**: Show each layer's attribution line wherever you show the figures.","tags":["History"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"allOf":[{"$ref":"#/components/schemas/EntityId"},{"description":"The entity whose history to read, by its id."}]},"required":true,"description":"The entity whose history to read, by its id.","name":"entityId","in":"path","example":"prm_pdFPkhx7RuGEeFl8Q1pP"},{"schema":{"type":"string","maxLength":400,"description":"Comma-separated layer keys, or the one word subscribed for every layer the consumer is subscribed to."},"required":true,"description":"Comma-separated layer keys, or the one word subscribed for every layer the consumer is subscribed to.","name":"layers","in":"query","example":"cqc"},{"schema":{"type":"string","maxLength":400,"description":"Comma-separated fact keys. Omit for every fact whose past is kept."},"required":false,"description":"Comma-separated fact keys. Omit for every fact whose past is kept.","name":"facts","in":"query","example":"cqc.rating"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Only changes on or after this date."},"required":false,"description":"Only changes on or after this date.","name":"from","in":"query","example":"2024-01-01"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Only changes on or before this date."},"required":false,"description":"Only changes on or before this date.","name":"to","in":"query"},{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","example":"cn_8fHq2LmNcV0pXyT3rW6aZe"},"required":false,"description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","name":"x-atlas-consumer","in":"header"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/HistoryPoint"},"description":"The changes to the entity in the period."},"charged":{"type":"integer","description":"Tokens this answer took."},"notice":{"type":"string","description":"A sentence, present when the history is incomplete or none is held."}},"required":["data"]},"example":{"data":[],"charged":0,"notice":"No history is held for this entity."}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough tokens: `TOKENS_EXHAUSTED`.","content":{"application/json":{"examples":{"TOKENS_EXHAUSTED":{"$ref":"#/components/examples/TOKENS_EXHAUSTED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_REQUIRED`, `LAYER_NOT_SUBSCRIBED`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_REQUIRED":{"$ref":"#/components/examples/CONSUMER_REQUIRED"},"LAYER_NOT_SUBSCRIBED":{"$ref":"#/components/examples/LAYER_NOT_SUBSCRIBED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found: `NOT_FOUND`.","content":{"application/json":{"examples":{"NOT_FOUND":{"$ref":"#/components/examples/NOT_FOUND"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable: `NOT_READY`.","content":{"application/json":{"examples":{"NOT_READY":{"$ref":"#/components/examples/NOT_READY"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_REQUIRED","LAYER_NOT_SUBSCRIBED","NOT_FOUND","TOKENS_EXHAUSTED","NOT_READY"]}},"/v1/entities/{entityId}/reports/{linkId}":{"get":{"operationId":"reportSummary","summary":"What one CQC inspection report found: summary, breaches, enforcement and key questions","description":"What one CQC inspection report found, for a report the premises' `cqc.reports` list names by its `linkId`: the report's own summary paragraph, the regulations it found breached with the report's words on each, whether it speaks of enforcement (an enforcement action, a warning notice, urgent action), and what it says under each key question with the rating it gives. `url` is the report itself, as a whole address. The `cqc` layer must be in `layers`.\n\nA report whose text has not been read yet answers `summary` null with a `notice`, and is charged nothing; ask again after a later release. A report the list does not name, or of a premises that may be someone's home, answers `NOT_FOUND`.\n\n**Cost**: see [pricing](https://atlas.oromiq.com/pricing/). Charged per report; free to read again for the free window `cost.freeUntil` gives.\n\n**Duties**: show `attribution.text` wherever the findings are shown.\n\n**Called by** a consumer: the client key with `x-atlas-consumer` naming one of its consumers, or a consumer key where the account allows them. The client alone is refused with `CONSUMER_REQUIRED`.\n\n**Your duties**: Show each line in `attribution` wherever you show the entity's data, and show `asOf` beside a Food Standards Agency or Care Inspectorate fact. Never suggest the CQC endorses your product.","tags":["Entities"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"allOf":[{"$ref":"#/components/schemas/EntityId"},{"description":"The premises the report is about, by its id."}]},"required":true,"description":"The premises the report is about, by its id.","name":"entityId","in":"path","example":"prm_pdFPkhx7RuGEeFl8Q1pP"},{"schema":{"type":"string","minLength":1,"maxLength":120,"description":"The report's id, as the premises' `cqc.reports` list gives it under `linkId`."},"required":true,"description":"The report's id, as the premises' `cqc.reports` list gives it under `linkId`.","name":"linkId","in":"path","example":"f3c9a8d2-4b1e-4c7a-9d2f-6e8b1a0c5d44"},{"schema":{"type":"string","maxLength":400,"description":"Comma-separated layer keys, or the one word subscribed for every layer the consumer is subscribed to. The cqc layer must be among them."},"required":true,"description":"Comma-separated layer keys, or the one word subscribed for every layer the consumer is subscribed to. The cqc layer must be among them.","name":"layers","in":"query","example":"cqc"},{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","example":"cn_8fHq2LmNcV0pXyT3rW6aZe"},"required":false,"description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","name":"x-atlas-consumer","in":"header"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"entityId":{"allOf":[{"$ref":"#/components/schemas/EntityId"},{"description":"The premises the report is about."}]},"linkId":{"type":"string","description":"The report's id."},"publishedDate":{"type":"string","nullable":true,"pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"The day the report was published, from the report itself, else from the `cqc.reports` list. Null when neither says."},"url":{"type":"string","format":"uri","description":"Where the report is, as a whole address."},"summary":{"type":"string","nullable":true,"description":"The report's own summary paragraph, else its first words. Null when the report's text has not been read yet: `notice` says so."},"breaches":{"type":"array","items":{"type":"object","properties":{"regulation":{"type":"string","description":"The regulation the report found breached: its number and title, such as Regulation 12: Safe care and treatment."},"summary":{"type":"string","description":"How the regulation was not met, in the report's own words, cut to a paragraph."}},"required":["regulation"],"description":"One regulation the report found breached."},"description":"The regulations the report found breached. Empty when it found none, or when the text has not been read yet."},"enforcement":{"type":"boolean","nullable":true,"description":"True when the report speaks of enforcement: an enforcement action, a warning notice, urgent action. Null when the text has not been read yet."},"keyQuestions":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","enum":["Safe","Effective","Caring","Responsive","Well-led"],"description":"The key question."},"rating":{"type":"string","description":"The rating the report gives it (Outstanding, Good, Requires Improvement, Inadequate), where the report says."},"text":{"type":"string","description":"The report's first paragraph under the question, cut to 600 characters."}},"required":["name"],"description":"One of the report's key questions, with what it says of it."},"description":"What the report says under each key question it has. Empty when the text has not been read yet."},"attribution":{"$ref":"#/components/schemas/Attribution"},"notice":{"type":"string","description":"A sentence, present when the report's text has not been read yet."}},"required":["entityId","linkId","publishedDate","url","summary","breaches","enforcement","keyQuestions","attribution"],"description":"What the report found."},"release":{"allOf":[{"$ref":"#/components/schemas/Release"},{"description":"The release an answer comes from. Answers within one release agree with each other. Changes recorded since are listed in pendingChanges."}]},"charged":{"type":"integer","minimum":0,"description":"Tokens this call took: the report summary price, or 0 within the free window or for a notice."},"cost":{"type":"object","properties":{"tokens":{"type":"integer","minimum":0,"description":"What a report summary costs at your plan; 0 when nothing was served."},"free":{"type":"boolean","description":"True when this read took nothing: the report was read within its free window, or its findings are not held yet."},"freeUntil":{"type":"string","nullable":true,"format":"date-time","description":"When the free window ends: until this instant the same consumer reads this report again for nothing. Null when nothing was charged."}},"required":["tokens","free","freeUntil"],"description":"What the report summary cost, and until when it is free to read again."}},"required":["data","charged","cost"],"description":"What one CQC inspection report found: its summary, the regulations breached, whether enforcement is mentioned, and each key question's rating and words. Read it for a report the premises' `cqc.reports` list names. Show the attribution line with it."},"example":{"data":{"entityId":"prm_pdFPkhx7RuGEeFl8Q1pP","linkId":"f3c9a8d2-4b1e-4c7a-9d2f-6e8b1a0c5d44","publishedDate":"2025-02-11","url":"https://api.service.cqc.org.uk/public/v1/reports/f3c9a8d2-4b1e-4c7a-9d2f-6e8b1a0c5d44","summary":"Oakfield House is a care home providing personal and nursing care to up to 42 people. At the time of our inspection 38 people were living at the service.","breaches":[{"regulation":"Regulation 12: Safe care and treatment","summary":"The provider had failed to ensure medicines were managed safely."}],"enforcement":false,"keyQuestions":[{"name":"Safe","rating":"Requires Improvement","text":"Medicines were not always managed safely. We found gaps in medicines administration records."},{"name":"Well-led","rating":"Good"}],"attribution":{"layer":"cqc","text":"Contains Care Quality Commission data. Not endorsed by the Care Quality Commission.","url":"https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/"}},"release":{"id":"b20261029040012c3d4","at":"2026-10-29T06:11:40.000Z"},"charged":15,"cost":{"tokens":15,"free":false,"freeUntil":"2026-11-28T06:11:40.000Z"}}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough tokens: `TOKENS_EXHAUSTED`.","content":{"application/json":{"examples":{"TOKENS_EXHAUSTED":{"$ref":"#/components/examples/TOKENS_EXHAUSTED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_REQUIRED`, `LAYER_NOT_SUBSCRIBED`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_REQUIRED":{"$ref":"#/components/examples/CONSUMER_REQUIRED"},"LAYER_NOT_SUBSCRIBED":{"$ref":"#/components/examples/LAYER_NOT_SUBSCRIBED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found: `NOT_FOUND`.","content":{"application/json":{"examples":{"NOT_FOUND":{"$ref":"#/components/examples/NOT_FOUND"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable: `NOT_READY`.","content":{"application/json":{"examples":{"NOT_READY":{"$ref":"#/components/examples/NOT_READY"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_REQUIRED","LAYER_NOT_SUBSCRIBED","NOT_FOUND","TOKENS_EXHAUSTED","NOT_READY"]}},"/v1/search":{"post":{"operationId":"search","summary":"Search entities by criteria over the field catalogue","description":"Finds the organisations and premises that meet every condition, in the layers you name, and returns the first page of rows. Take the fields, operators and options from `GET /v1/catalogue` for the same layers. At least one condition must be on a narrowing field (the catalogue's `narrowingFields`) with a positive operator; `level` alone does not narrow. Count first with `POST /v1/search/count`; find one entity by an identifier with `POST /v1/search/lookup`.\n\nEach row carries the entity's id and `name`, its value for each result column in `values`, its `primaryRecord` (the register record to store if you keep a register id for it), its `layers` and, in `searchFacts`, the values that met each condition. A row gives a place, a local authority or an outward code, never a street address. Show each page's `attributions`, `notices` and `currency` with its rows.\n\nEach search is saved for 90 days with its first `max` results (10,000 by default, at most 100,000). Send the previous page's `next` as `cursor` for the next page; the rest of the body is then ignored. Read the pages again with `GET /v1/searches/{searchId}`. A search that finds nothing is not saved and carries no `search`.\n\n`region` and `localAuthority` take the names the catalogue lists; an earlier name of the same area is also accepted. `is_not_set` matches an entity with no value.\n\n`charged` says what the page spent. Without enough tokens nothing is returned or saved.\n\n**Cost**: see [pricing](https://atlas.oromiq.com/pricing/).\n\n**Limits**: 1 to 20 conditions; up to 100 rows a page, 50 by default; `meta.total` counts up to 100,000 and `capped` says when more match. `exclude` leaves out up to 10,000 entity ids and 20 saved searches, 100,000 entities in all, never counted or charged. A condition with `via` needs a positive `level` condition naming the entity type the relation starts from. An enrichment-only layer cannot be searched or filtered on.\n\n**Called by** a consumer: the client key with `x-atlas-consumer` naming one of its consumers, or a consumer key where the account allows them. The client alone is refused with `CONSUMER_REQUIRED`.\n\n**Your duties**: Show each page's `attributions`, `notices` and `currency` wherever you show its rows.","tags":["Search"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","example":"cn_8fHq2LmNcV0pXyT3rW6aZe"},"required":false,"description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","name":"x-atlas-consumer","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"conditions":{"type":"array","items":{"$ref":"#/components/schemas/Condition"},"minItems":1,"maxItems":20,"description":"The conditions an entity must meet, 1 to 20. At least one must be on a narrowing field with a positive operator."},"layers":{"$ref":"#/components/schemas/LayerScope"},"expand":{"type":"string","enum":["attached"],"description":"Send attached for each row to carry its attached lists (filings, assessments, contracts and the like, up to 25 of each). Left out, a row carries facts alone. A row with its lists costs more: `rowExpand` on top of the row, each time it is served."},"sort":{"type":"string","maxLength":80,"description":"A sort key from the catalogue's sortOptions for the same layers, such as name or cqc.rating. The first listed is the default."},"limit":{"type":"integer","minimum":1,"maximum":100,"default":50,"description":"Rows per page, at most 100."},"cursor":{"$ref":"#/components/schemas/Cursor"},"label":{"type":"string","minLength":1,"maxLength":120,"description":"A name for the saved search this run makes, to find it again."},"max":{"type":"integer","minimum":1,"maximum":100000,"description":"The most results to save, the first ones in the sort's order: 10,000 when left out, at most 100,000."},"exclude":{"$ref":"#/components/schemas/SearchExclude"}},"required":["conditions","layers"],"description":"A search over the layers in scope. `GET /v1/catalogue` lists the fields, their operators and the sort keys. At least one condition must be on a narrowing field with a positive operator. `POST /v1/search/count` says how many it would find without reading a row. What it costs is on the pricing page. Each run is saved for 90 days, up to `max` results; read further pages with the previous page's `next` as `cursor`, or through `GET /v1/searches/{searchId}`."},"example":{"conditions":[{"field":"region","operator":"equals","value":"South East"},{"field":"cqc.rating","operator":"in","value":["Requires Improvement","Inadequate"]}],"layers":["cqc","companies_house"],"sort":"name","limit":2,"label":"South East homes to visit"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"attributions":{"type":"array","items":{"$ref":"#/components/schemas/Attribution"},"description":"The attribution line of each layer this page's rows carry data from, to show wherever they are shown, with the ONS's when an ONS area found or shows a row. Empty on an empty page."},"notices":{"type":"array","items":{"type":"string"},"description":"What a licence asks be said with these rows: the CQC's non-endorsement where the CQC is among them."},"currency":{"type":"array","items":{"$ref":"#/components/schemas/LayerCurrency"},"description":"How current each layer with a currency duty is, of the layers this page's rows carry data from. A fact's own date is on the entity. Empty when none is among them."},"data":{"type":"array","items":{"$ref":"#/components/schemas/SearchRow"},"description":"The rows of this page."},"next":{"type":"string","nullable":true,"minLength":1,"maxLength":200,"description":"The cursor for the next page, or null on the last."},"meta":{"$ref":"#/components/schemas/SearchMeta"},"release":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"The release id, the same value as the x-atlas-release header."},"at":{"allOf":[{"$ref":"#/components/schemas/IsoDateTime"},{"description":"When the release went live."}]}},"required":["id","at"],"description":"The release the page comes from; every page of one search should carry the same."},"search":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/SavedSearchId"},"label":{"type":"string","nullable":true,"description":"The name given to it, or null."},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/Condition"},"description":"The conditions it ran with."},"layers":{"type":"array","items":{"$ref":"#/components/schemas/LayerKey"},"description":"The layers it ran over."},"sort":{"type":"string","description":"The sort its results are in."},"results":{"type":"integer","minimum":0,"description":"The results it took and saved."},"matched":{"type":"integer","minimum":0,"description":"Entities the conditions matched when it ran, counted up to 100,000."},"more":{"type":"boolean","description":"True when more matched than it saved. Raise `max` to save more."},"charged":{"type":"integer","minimum":0,"description":"Tokens its pages have cost so far."},"perRow":{"type":"integer","minimum":0,"description":"Tokens one row served cost when it ran."},"createdAt":{"$ref":"#/components/schemas/IsoDateTime"},"expiresAt":{"allOf":[{"$ref":"#/components/schemas/IsoDateTime"},{"description":"When it is deleted: 90 days after it ran."}]},"release":{"type":"object","nullable":true,"properties":{"id":{"type":"string","minLength":1,"description":"The release id, the same value as the x-atlas-release header."},"at":{"allOf":[{"$ref":"#/components/schemas/IsoDateTime"},{"description":"When the release went live."}]}},"required":["id","at"],"description":"The release it ran on."}},"required":["id","label","conditions","layers","sort","results","matched","more","charged","perRow","createdAt","expiresAt","release"],"description":"The saved search this run made, on the first page, or is reading, on later pages. Absent when nothing was found."},"charged":{"type":"integer","minimum":0,"description":"Tokens this page took."}},"required":["data","next"]},"example":{"data":[{"entityId":"prm_pdFPkhx7RuGEeFl8Q1pP","level":"premises","name":"BRACKENFOLD HOUSE","values":{"kind":"premises","place":"Kent","operator":"BRACKENFOLD CARE LTD","sources":"Care Quality Commission","facts":"Overall rating: Requires Improvement; Beds: 32","group":null,"status":"active","cqc.rating":"Requires Improvement","cqc.beds":32},"primaryRecord":{"layer":"cqc","source":"locations","externalId":"1-2000000001"},"layers":["cqc"],"searchFacts":[{"field":"cqc.rating","label":"Overall rating","values":["Requires Improvement"]}]},{"entityId":"prm_Tq3vN8bLw2YcKd5HsR0e","level":"premises","name":"OAKFIELD LODGE","values":{"kind":"premises","place":"Kent","operator":"OAKFIELD TRUST LIMITED","sources":"Care Quality Commission","facts":"Overall rating: Inadequate; Beds: 48","group":null,"status":"active","cqc.rating":"Inadequate","cqc.beds":48},"primaryRecord":{"layer":"cqc","source":"locations","externalId":"1-2000000002"},"layers":["cqc"],"searchFacts":[{"field":"cqc.rating","label":"Overall rating","values":["Inadequate"]}]}],"next":"ss1.ss_Q7cWm2Rk9TzLp4Xv.2","meta":{"limit":2,"returned":2,"total":214,"capped":false,"page":1,"pages":107},"release":{"id":"b20261030040011a7c3","at":"2026-10-30T06:12:40.000Z"},"search":{"id":"ss_Q7cWm2Rk9TzLp4Xv","label":"South East homes to visit","conditions":[{"field":"region","operator":"equals","value":"South East"},{"field":"cqc.rating","operator":"in","value":["Requires Improvement","Inadequate"]}],"layers":["cqc","companies_house"],"sort":"name","results":214,"matched":214,"more":false,"charged":2,"perRow":1,"createdAt":"2026-10-30T09:12:44.118Z","expiresAt":"2027-01-28T09:12:44.118Z","release":{"id":"b20261030040011a7c3","at":"2026-10-30T06:12:40.000Z"}},"charged":2,"attributions":[{"layer":"cqc","text":"Contains Care Quality Commission data. Not endorsed by the Care Quality Commission."}],"notices":["Not endorsed by the Care Quality Commission."],"currency":[]}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`, `INVALID_JSON`, `CONDITIONS_INVALID`, `NARROWING_REQUIRED`, `VIA_NOT_CONNECTED`, `EXCLUDE_TOO_LARGE`, `SEARCH_CURSOR_INVALID`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"},"INVALID_JSON":{"$ref":"#/components/examples/INVALID_JSON"},"CONDITIONS_INVALID":{"$ref":"#/components/examples/CONDITIONS_INVALID"},"NARROWING_REQUIRED":{"$ref":"#/components/examples/NARROWING_REQUIRED"},"VIA_NOT_CONNECTED":{"$ref":"#/components/examples/VIA_NOT_CONNECTED"},"EXCLUDE_TOO_LARGE":{"$ref":"#/components/examples/EXCLUDE_TOO_LARGE"},"SEARCH_CURSOR_INVALID":{"$ref":"#/components/examples/SEARCH_CURSOR_INVALID"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough tokens: `TOKENS_EXHAUSTED`.","content":{"application/json":{"examples":{"TOKENS_EXHAUSTED":{"$ref":"#/components/examples/TOKENS_EXHAUSTED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_REQUIRED`, `LAYER_NOT_SUBSCRIBED`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_REQUIRED":{"$ref":"#/components/examples/CONSUMER_REQUIRED"},"LAYER_NOT_SUBSCRIBED":{"$ref":"#/components/examples/LAYER_NOT_SUBSCRIBED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found: `SAVED_SEARCH_NOT_FOUND`.","content":{"application/json":{"examples":{"SAVED_SEARCH_NOT_FOUND":{"$ref":"#/components/examples/SAVED_SEARCH_NOT_FOUND"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The body is too large: `PAYLOAD_TOO_LARGE`.","content":{"application/json":{"examples":{"PAYLOAD_TOO_LARGE":{"$ref":"#/components/examples/PAYLOAD_TOO_LARGE"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable: `VIA_UNAVAILABLE`, `NOT_READY`.","content":{"application/json":{"examples":{"VIA_UNAVAILABLE":{"$ref":"#/components/examples/VIA_UNAVAILABLE"},"NOT_READY":{"$ref":"#/components/examples/NOT_READY"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","INVALID_JSON","PAYLOAD_TOO_LARGE","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_REQUIRED","LAYER_NOT_SUBSCRIBED","CONDITIONS_INVALID","NARROWING_REQUIRED","VIA_NOT_CONNECTED","VIA_UNAVAILABLE","EXCLUDE_TOO_LARGE","SAVED_SEARCH_NOT_FOUND","SEARCH_CURSOR_INVALID","TOKENS_EXHAUSTED","NOT_READY"]}},"/v1/catalogue":{"get":{"operationId":"catalogue","summary":"The fields, operators, options and sort keys a search over these layers can use","description":"Lists what a search over the layers you name can use: each searchable field with its type, operators, options (or an `optionsToken` where the list is long), help text, licence, whether it is about a person (`personal`) and the entity types it applies to (`levels`); the sort keys; the result columns a row's `values` hold; the fields that narrow a search (`narrowingFields`); and the relations a condition can be read through (`via`). Call it with the same layers the search will name, and read it again when `surface` or `release` changes. An enrichment-only layer is not listed.\n\nCore fields (`name`, `postcode`, `region`, `localAuthority`, `country`, `level`, `status`, `source`, `homeBased`) come first, then each layer's fields under its key, such as `cqc.rating`.\n\n**Cost**: see [pricing](https://atlas.oromiq.com/pricing/).\n\n**Limits**: `layers` is comma-separated layer keys, or `subscribed` for every layer the consumer is subscribed to.\n\n**Called by** a consumer: the client key with `x-atlas-consumer` naming one of its consumers, or a consumer key where the account allows them. The client alone is refused with `CONSUMER_REQUIRED`.","tags":["Search"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"type":"string","maxLength":400,"description":"Comma-separated layer keys, or the one word subscribed for every layer the consumer is subscribed to."},"required":true,"description":"Comma-separated layer keys, or the one word subscribed for every layer the consumer is subscribed to.","name":"layers","in":"query","example":"cqc,companies_house"},{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","example":"cn_8fHq2LmNcV0pXyT3rW6aZe"},"required":false,"description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","name":"x-atlas-consumer","in":"header"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"fields":{"type":"array","items":{"$ref":"#/components/schemas/CatalogueField"},"description":"The fields a condition can be on."},"sortOptions":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"The value to send as sort."},"label":{"type":"string","description":"The sort's name, to show."}},"required":["key","label"]},"description":"The sort keys a search may name, the default first."},"resultColumns":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"The column's key, as a row's values names it."},"label":{"type":"string","description":"The column's name, to show."},"type":{"$ref":"#/components/schemas/FieldType"},"kind":{"type":"string","enum":["text","number","date","badge"],"description":"How to show the column, where it differs from plain text."},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","description":"The value as a row carries it."},"label":{"type":"string","description":"The name to show for it."}},"required":["value","label"]},"description":"Labels for coded values; a value not listed shows as it is."}},"required":["key","label","type"]},"description":"The columns a row carries in values, in order."},"label":{"type":"string","description":"What the list is called."},"description":{"type":"string","description":"A sentence describing the list."},"narrowingFields":{"type":"array","items":{"type":"string"},"description":"Field keys that can carry a search on their own; a search needs one."},"identifierLabel":{"type":"string","nullable":true,"description":"What the lookup accepts, in words."},"surface":{"type":"object","properties":{"version":{"type":"string","minLength":1,"description":"A short hash of what clients receive, the same value as the x-atlas-surface header."},"mapVersion":{"type":"integer","minimum":0,"description":"The version number of the data the surface comes from."},"at":{"allOf":[{"$ref":"#/components/schemas/IsoDateTime"},{"description":"When this surface went live."}]}},"required":["version","mapVersion","at"],"description":"The version of the client surface this catalogue describes."},"release":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"The release id, the same value as the x-atlas-release header."},"at":{"allOf":[{"$ref":"#/components/schemas/IsoDateTime"},{"description":"When the release went live."}]}},"required":["id","at"],"description":"The release the options in this catalogue come from."},"relations":{"type":"array","items":{"$ref":"#/components/schemas/CatalogueRelation"},"description":"The relations a condition can be read through in these layers with `via`."}},"required":["fields","sortOptions","resultColumns"],"description":"The catalogue for the layers named."}},"required":["data"]},"example":{"data":{"fields":[{"key":"region","label":"Region","type":"enum","layer":null,"optionsToken":"region","operators":["equals","not_equals","in","not_in","is_set","is_not_set"],"narrowing":true,"surfaces":{"criterion":true,"column":false,"enrichmentOnly":false},"licence":"Derived from the registers in scope","personal":false,"levels":["organisation","premises"]},{"key":"cqc.rating","label":"Overall rating","type":"enum","layer":"cqc","options":[{"value":"Outstanding","label":"Outstanding"},{"value":"Good","label":"Good"},{"value":"Requires Improvement","label":"Requires Improvement"},{"value":"Inadequate","label":"Inadequate"},{"value":"Insufficient evidence to rate","label":"Insufficient evidence to rate"}],"operators":["equals","not_equals","in","not_in","is_set","is_not_set"],"narrowing":true,"surfaces":{"criterion":true,"column":false,"enrichmentOnly":false},"licence":"Open Government Licence v3.0","personal":false,"levels":["organisation","premises"]},{"key":"cqc.beds","label":"Beds","type":"number","layer":"cqc","operators":["equals","not_equals","gt","gte","lt","lte","between","is_set","is_not_set"],"narrowing":true,"surfaces":{"criterion":true,"column":false,"enrichmentOnly":false},"licence":"Open Government Licence v3.0","personal":false,"levels":["premises"]}],"sortOptions":[{"key":"name","label":"Name"},{"key":"cqc.beds","label":"Beds"}],"resultColumns":[{"key":"kind","label":"Type","type":"string","kind":"badge"},{"key":"place","label":"Local authority","type":"string"},{"key":"operator","label":"Operated by","type":"string"}],"label":"Matches","description":"Organisations and premises in cqc, companies_house.","narrowingFields":["name","localAuthority","region","postcode","cqc.rating","cqc.beds"],"identifierLabel":"A company number, uprn, cqc location id, cqc provider id or another register id","surface":{"version":"3f9c2a71","mapVersion":10,"at":"2026-10-29T18:10:00.000Z"},"release":{"id":"b20261030040011a7c3","at":"2026-10-30T06:12:40.000Z"},"relations":[{"via":"premises","from":"organisation","to":"premises","label":"at any of its premises"},{"via":"operator","from":"premises","to":"organisation","label":"of its operator"}]}}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_REQUIRED`, `LAYER_NOT_SUBSCRIBED`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_REQUIRED":{"$ref":"#/components/examples/CONSUMER_REQUIRED"},"LAYER_NOT_SUBSCRIBED":{"$ref":"#/components/examples/LAYER_NOT_SUBSCRIBED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable: `NOT_READY`.","content":{"application/json":{"examples":{"NOT_READY":{"$ref":"#/components/examples/NOT_READY"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_REQUIRED","LAYER_NOT_SUBSCRIBED","NOT_READY"]}},"/v1/search/count":{"post":{"operationId":"searchCount","summary":"Count what a search would find, without reading a row","description":"Counts what a search with the same `conditions`, `layers`, `max` and `exclude` would find, and says in `cost` what reading them would cost this consumer. The same narrowing condition is required. A count carries no `attributions`, `notices` or `currency`.\n\n`cost.results` is how many results the search would save, up to `max` (10,000 by default); `cost.perRow` and `cost.atMost` say what reading them would cost this consumer.\n\n**Cost**: see [pricing](https://atlas.oromiq.com/pricing/).\n\n**Limits**: counting stops at `cap`, 100,000 by default, and `capped` says when it did. `exclude` takes the same limits as a search's.\n\n**Called by** a consumer: the client key with `x-atlas-consumer` naming one of its consumers, or a consumer key where the account allows them. The client alone is refused with `CONSUMER_REQUIRED`.\n\n**Your duties**: Show each page's `attributions`, `notices` and `currency` wherever you show its rows.","tags":["Search"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","example":"cn_8fHq2LmNcV0pXyT3rW6aZe"},"required":false,"description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","name":"x-atlas-consumer","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"conditions":{"type":"array","items":{"$ref":"#/components/schemas/Condition"},"minItems":1,"maxItems":20,"description":"The conditions, as a search takes them, 1 to 20."},"layers":{"$ref":"#/components/schemas/LayerScope"},"cap":{"type":"integer","minimum":1,"maximum":100000,"description":"Stop counting here; capped says so. 100,000 when left out."},"max":{"type":"integer","minimum":1,"maximum":100000,"description":"The `max` the search would run with."},"exclude":{"$ref":"#/components/schemas/SearchExclude"}},"required":["conditions","layers"],"description":"A count only: what a search would find and the most reading it could take, without a row. Takes the same conditions, layers, max and exclusions as a search."},"example":{"conditions":[{"field":"region","operator":"equals","value":"South East"},{"field":"cqc.rating","operator":"in","value":["Requires Improvement","Inadequate"]}],"layers":["cqc","companies_house"],"max":1000}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"description":"How many entities the conditions match, counted up to the cap."},"capped":{"type":"boolean","description":"True when more match than the cap: total stops there."},"cost":{"$ref":"#/components/schemas/SearchCost"}},"required":["total","capped"],"description":"The count and what reading it would cost."},"charged":{"type":"integer","minimum":0,"description":"Tokens this count took."}},"required":["data"]},"example":{"data":{"total":214,"capped":false,"cost":{"results":214,"perRow":1,"atMost":214}}}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`, `INVALID_JSON`, `CONDITIONS_INVALID`, `NARROWING_REQUIRED`, `VIA_NOT_CONNECTED`, `EXCLUDE_TOO_LARGE`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"},"INVALID_JSON":{"$ref":"#/components/examples/INVALID_JSON"},"CONDITIONS_INVALID":{"$ref":"#/components/examples/CONDITIONS_INVALID"},"NARROWING_REQUIRED":{"$ref":"#/components/examples/NARROWING_REQUIRED"},"VIA_NOT_CONNECTED":{"$ref":"#/components/examples/VIA_NOT_CONNECTED"},"EXCLUDE_TOO_LARGE":{"$ref":"#/components/examples/EXCLUDE_TOO_LARGE"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_REQUIRED`, `LAYER_NOT_SUBSCRIBED`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_REQUIRED":{"$ref":"#/components/examples/CONSUMER_REQUIRED"},"LAYER_NOT_SUBSCRIBED":{"$ref":"#/components/examples/LAYER_NOT_SUBSCRIBED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found: `SAVED_SEARCH_NOT_FOUND`.","content":{"application/json":{"examples":{"SAVED_SEARCH_NOT_FOUND":{"$ref":"#/components/examples/SAVED_SEARCH_NOT_FOUND"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The body is too large: `PAYLOAD_TOO_LARGE`.","content":{"application/json":{"examples":{"PAYLOAD_TOO_LARGE":{"$ref":"#/components/examples/PAYLOAD_TOO_LARGE"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable: `VIA_UNAVAILABLE`, `NOT_READY`.","content":{"application/json":{"examples":{"VIA_UNAVAILABLE":{"$ref":"#/components/examples/VIA_UNAVAILABLE"},"NOT_READY":{"$ref":"#/components/examples/NOT_READY"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","INVALID_JSON","PAYLOAD_TOO_LARGE","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_REQUIRED","LAYER_NOT_SUBSCRIBED","CONDITIONS_INVALID","NARROWING_REQUIRED","VIA_NOT_CONNECTED","VIA_UNAVAILABLE","EXCLUDE_TOO_LARGE","SAVED_SEARCH_NOT_FOUND","NOT_READY"]}},"/v1/search/rows":{"post":{"operationId":"searchRows","summary":"Rows for the entities you name, in their current state","description":"Returns a search row for each entity id you send, as the entity is now, in the layers you name: use it to refresh entities you already hold, or to read rows for ids you got from `POST /v1/entities/lookup`. Send the conditions of the search the ids came from, or none, and each entry says whether its row still meets them (`matches`). An id no longer held comes back in `missing`. To read a saved search's results again, use `GET /v1/searches/{searchId}` instead. Show each answer's `attributions`, `notices` and `currency` with its rows.\n\n`charged` says what the call spent.\n\n**Cost**: see [pricing](https://atlas.oromiq.com/pricing/).\n\n**Limits**: 1 to 100 entity ids; up to 20 conditions, none of which has to narrow.\n\n**Called by** a consumer: the client key with `x-atlas-consumer` naming one of its consumers, or a consumer key where the account allows them. The client alone is refused with `CONSUMER_REQUIRED`.\n\n**Your duties**: Show each page's `attributions`, `notices` and `currency` wherever you show its rows.","tags":["Search"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","example":"cn_8fHq2LmNcV0pXyT3rW6aZe"},"required":false,"description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","name":"x-atlas-consumer","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"entityIds":{"type":"array","items":{"$ref":"#/components/schemas/EntityId"},"minItems":1,"maxItems":100,"description":"Entity ids, 1 to 100."},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/Condition"},"maxItems":20,"description":"The search the rows came from, to say whether each still matches."},"layers":{"$ref":"#/components/schemas/LayerScope"},"expand":{"type":"string","enum":["attached"],"description":"Send attached for each row to carry its attached lists (filings, assessments, contracts and the like, up to 25 of each). Left out, a row carries facts alone. A row with its lists costs more: `rowExpand` on top of the row, each time it is served."}},"required":["entityIds","conditions","layers"],"description":"Rows for the entities you name, in their current state. What it costs is on the pricing page."},"example":{"entityIds":["prm_pdFPkhx7RuGEeFl8Q1pP","prm_Tq3vN8bLw2YcKd5HsR0e","prm_Wd8kP1sQz6RtLm4NcV7x"],"conditions":[{"field":"region","operator":"equals","value":"South East"},{"field":"cqc.rating","operator":"in","value":["Requires Improvement","Inadequate"]}],"layers":["cqc","companies_house"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"attributions":{"type":"array","items":{"$ref":"#/components/schemas/Attribution"},"description":"The attribution line of each layer this page's rows carry data from, to show wherever they are shown, with the ONS's when an ONS area found or shows a row. Empty on an empty page."},"notices":{"type":"array","items":{"type":"string"},"description":"What a licence asks be said with these rows: the CQC's non-endorsement where the CQC is among them."},"currency":{"type":"array","items":{"$ref":"#/components/schemas/LayerCurrency"},"description":"How current each layer with a currency duty is, of the layers this page's rows carry data from. A fact's own date is on the entity. Empty when none is among them."},"data":{"type":"array","items":{"type":"object","properties":{"row":{"$ref":"#/components/schemas/SearchRow"},"matches":{"type":"boolean","description":"True when the row still meets the conditions."}},"required":["row","matches"]},"description":"One entry per entity found, with whether it still matches."},"missing":{"type":"array","items":{"$ref":"#/components/schemas/EntityId"},"description":"Entities no longer held, for example gone from every register."},"charged":{"type":"integer","minimum":0,"description":"Tokens this call took."}},"required":["data","missing"]},"example":{"data":[{"row":{"entityId":"prm_pdFPkhx7RuGEeFl8Q1pP","level":"premises","name":"BRACKENFOLD HOUSE","values":{"kind":"premises","place":"Kent","operator":"BRACKENFOLD CARE LTD","sources":"Care Quality Commission","facts":"Overall rating: Requires Improvement; Beds: 32","group":null,"status":"active","cqc.rating":"Requires Improvement","cqc.beds":32},"primaryRecord":{"layer":"cqc","source":"locations","externalId":"1-2000000001"},"layers":["cqc"],"searchFacts":[{"field":"cqc.rating","label":"Overall rating","values":["Requires Improvement"]}]},"matches":true},{"row":{"entityId":"prm_Tq3vN8bLw2YcKd5HsR0e","level":"premises","name":"OAKFIELD LODGE","values":{"kind":"premises","place":"Kent","operator":"OAKFIELD TRUST LIMITED","sources":"Care Quality Commission","facts":"Overall rating: Inadequate; Beds: 48","group":null,"status":"active","cqc.rating":"Inadequate","cqc.beds":48},"primaryRecord":{"layer":"cqc","source":"locations","externalId":"1-2000000002"},"layers":["cqc"],"searchFacts":[{"field":"cqc.rating","label":"Overall rating","values":["Inadequate"]}]},"matches":true}],"missing":["prm_Wd8kP1sQz6RtLm4NcV7x"],"charged":0,"attributions":[{"layer":"cqc","text":"Contains Care Quality Commission data. Not endorsed by the Care Quality Commission."}],"notices":["Not endorsed by the Care Quality Commission."],"currency":[]}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`, `INVALID_JSON`, `CONDITIONS_INVALID`, `VIA_NOT_CONNECTED`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"},"INVALID_JSON":{"$ref":"#/components/examples/INVALID_JSON"},"CONDITIONS_INVALID":{"$ref":"#/components/examples/CONDITIONS_INVALID"},"VIA_NOT_CONNECTED":{"$ref":"#/components/examples/VIA_NOT_CONNECTED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough tokens: `TOKENS_EXHAUSTED`.","content":{"application/json":{"examples":{"TOKENS_EXHAUSTED":{"$ref":"#/components/examples/TOKENS_EXHAUSTED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_REQUIRED`, `LAYER_NOT_SUBSCRIBED`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_REQUIRED":{"$ref":"#/components/examples/CONSUMER_REQUIRED"},"LAYER_NOT_SUBSCRIBED":{"$ref":"#/components/examples/LAYER_NOT_SUBSCRIBED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The body is too large: `PAYLOAD_TOO_LARGE`.","content":{"application/json":{"examples":{"PAYLOAD_TOO_LARGE":{"$ref":"#/components/examples/PAYLOAD_TOO_LARGE"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable: `VIA_UNAVAILABLE`, `NOT_READY`.","content":{"application/json":{"examples":{"VIA_UNAVAILABLE":{"$ref":"#/components/examples/VIA_UNAVAILABLE"},"NOT_READY":{"$ref":"#/components/examples/NOT_READY"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","INVALID_JSON","PAYLOAD_TOO_LARGE","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_REQUIRED","LAYER_NOT_SUBSCRIBED","CONDITIONS_INVALID","VIA_NOT_CONNECTED","VIA_UNAVAILABLE","TOKENS_EXHAUSTED","NOT_READY"]}},"/v1/search/lookup":{"post":{"operationId":"searchLookup","summary":"Find the one entity a company number, UPRN or register id names","description":"Finds the one entity an identifier names: a company number, a UPRN, a CQC location or provider id, or another register's own id; the catalogue's `identifierLabel` says which the layers in scope take. Returns the entity as a search row, without `searchFacts`, or `null` when nothing in those layers has the identifier. A personal identifier, such as an officer's id or a phone number, is never looked up, and nor is an enrichment-only layer. To turn a name into entities, use `POST /v1/resolve`; to map many register records at once, use `POST /v1/entities/lookup`.\n\n`charged` says what the call spent.\n\n**Cost**: see [pricing](https://atlas.oromiq.com/pricing/).\n\n**Limits**: one identifier, 2 to 256 characters.\n\n**Called by** a consumer: the client key with `x-atlas-consumer` naming one of its consumers, or a consumer key where the account allows them. The client alone is refused with `CONSUMER_REQUIRED`.\n\n**Your duties**: Show each page's `attributions`, `notices` and `currency` wherever you show its rows.","tags":["Search"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","example":"cn_8fHq2LmNcV0pXyT3rW6aZe"},"required":false,"description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","name":"x-atlas-consumer","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"identifier":{"type":"string","minLength":2,"maxLength":256,"description":"A company number, a UPRN or a register id, up to 256 characters."},"layers":{"$ref":"#/components/schemas/LayerScope"}},"required":["identifier","layers"],"description":"Find one entity by an identifier pasted in."},"example":{"identifier":"1-2000000001","layers":["cqc","companies_house"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"attributions":{"type":"array","items":{"$ref":"#/components/schemas/Attribution"},"description":"The attribution line of each layer this page's rows carry data from, to show wherever they are shown, with the ONS's when an ONS area found or shows a row. Empty on an empty page."},"notices":{"type":"array","items":{"type":"string"},"description":"What a licence asks be said with these rows: the CQC's non-endorsement where the CQC is among them."},"currency":{"type":"array","items":{"$ref":"#/components/schemas/LayerCurrency"},"description":"How current each layer with a currency duty is, of the layers this page's rows carry data from. A fact's own date is on the entity. Empty when none is among them."},"data":{"type":"object","nullable":true,"properties":{"entityId":{"$ref":"#/components/schemas/EntityId"},"level":{"$ref":"#/components/schemas/EntityLevel"},"name":{"type":"string","description":"The name to show for the entity."},"values":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"nullable":true}]},"description":"The entity's value for each result column the catalogue lists, by column key; null where it has none."},"group":{"type":"object","properties":{"id":{"type":"string","description":"The group's id. Premises under one operator share it."},"label":{"type":"string","description":"The group's name to show, such as the operator's name."}},"required":["id","label"],"description":"Rows sharing a group are shown together, premises under their operator."},"primaryRecord":{"type":"object","properties":{"layer":{"$ref":"#/components/schemas/LayerKey"},"source":{"$ref":"#/components/schemas/SourceKey"},"externalId":{"type":"string","minLength":1,"maxLength":256,"description":"The register's own id for the record. At most 256 characters."}},"required":["layer","source","externalId"],"description":"The register record that leads the row: the one to store if you keep a register id for the entity."},"possibleMatches":{"type":"array","items":{"$ref":"#/components/schemas/PossibleMatch"},"description":"Records in other layers that may be the same organisation or premises. Atlas confirms a match; a client may flag one for review by its linkId."},"attached":{"type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/AttachedRecord"}},"description":"Lists carried on the row by list name, newest first and at most 25 items each, present only when the call sent expand=attached. The newest item's values are in values under the list's name whether or not the lists are carried. The entity carries every item."},"attachedCounts":{"type":"object","additionalProperties":{"type":"integer","minimum":0},"description":"How many items each list on the row has in all, where the row carries the list."},"pending":{"type":"boolean","description":"True when something has arrived for the entity since the release this page comes from. The entity's pendingChanges says what."},"layers":{"type":"array","items":{"type":"string"},"description":"The layers in scope that hold something about the entity, whether records, facts, lists or events, by layer key, sorted. A layer that is read on held entities only, such as the ICO, is listed only for an entity the client holds."},"searchFacts":{"type":"array","items":{"$ref":"#/components/schemas/SearchFact"},"description":"The search's own fields as this entity has them: on a row a search or a saved search's page returns, never on a lookup."}},"required":["entityId","level","name","values"],"description":"The entity found, or null when none has the identifier."},"charged":{"type":"integer","minimum":0,"description":"Tokens this call took."}},"required":["data"]},"example":{"data":{"entityId":"prm_pdFPkhx7RuGEeFl8Q1pP","level":"premises","name":"BRACKENFOLD HOUSE","values":{"kind":"premises","place":"Kent","operator":"BRACKENFOLD CARE LTD","sources":"Care Quality Commission","facts":"Overall rating: Requires Improvement; Beds: 32","group":null,"status":"active","cqc.rating":"Requires Improvement","cqc.beds":32},"primaryRecord":{"layer":"cqc","source":"locations","externalId":"1-2000000001"},"layers":["cqc"]},"charged":1}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`, `INVALID_JSON`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"},"INVALID_JSON":{"$ref":"#/components/examples/INVALID_JSON"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough tokens: `TOKENS_EXHAUSTED`.","content":{"application/json":{"examples":{"TOKENS_EXHAUSTED":{"$ref":"#/components/examples/TOKENS_EXHAUSTED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_REQUIRED`, `LAYER_NOT_SUBSCRIBED`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_REQUIRED":{"$ref":"#/components/examples/CONSUMER_REQUIRED"},"LAYER_NOT_SUBSCRIBED":{"$ref":"#/components/examples/LAYER_NOT_SUBSCRIBED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The body is too large: `PAYLOAD_TOO_LARGE`.","content":{"application/json":{"examples":{"PAYLOAD_TOO_LARGE":{"$ref":"#/components/examples/PAYLOAD_TOO_LARGE"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable: `NOT_READY`.","content":{"application/json":{"examples":{"NOT_READY":{"$ref":"#/components/examples/NOT_READY"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","INVALID_JSON","PAYLOAD_TOO_LARGE","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_REQUIRED","LAYER_NOT_SUBSCRIBED","TOKENS_EXHAUSTED","NOT_READY"]}},"/v1/searches":{"get":{"operationId":"listSavedSearches","summary":"This consumer's saved searches, newest first","description":"Lists this consumer's saved searches, newest first: every search that found something in the last 90 days, with its label, conditions, layers, sort, how many results it saved and matched, and what its pages have cost. Read one's results with `GET /v1/searches/{searchId}`. Each consumer sees only its own.\n\n**Cost**: see [pricing](https://atlas.oromiq.com/pricing/).\n\n**Limits**: up to 100 a page, 50 by default; follow `next` as `cursor`. A saved search is deleted 90 days after it ran (`expiresAt`).\n\n**Called by** a consumer: the client key with `x-atlas-consumer` naming one of its consumers, or a consumer key where the account allows them. The client alone is refused with `CONSUMER_REQUIRED`.\n\n**Your duties**: Show each page's `attributions`, `notices` and `currency` wherever you show its rows.","tags":["Saved searches"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"$ref":"#/components/schemas/Cursor"},"required":false,"description":"An opaque page token: send back the `next` value of the previous page. Leave out for the first page.","name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":50,"description":"Saved searches per page."},"required":false,"description":"Saved searches per page.","name":"limit","in":"query","example":20},{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","example":"cn_8fHq2LmNcV0pXyT3rW6aZe"},"required":false,"description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","name":"x-atlas-consumer","in":"header"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SavedSearch"},"description":"A page of saved searches."},"next":{"type":"string","nullable":true,"minLength":1,"maxLength":200,"description":"The cursor for the next page, or null on the last."}},"required":["data","next"],"description":"This consumer's saved searches, newest first."},"example":{"data":[{"id":"ss_Q7cWm2Rk9TzLp4Xv","label":"South East homes to visit","conditions":[{"field":"region","operator":"equals","value":"South East"},{"field":"cqc.rating","operator":"in","value":["Requires Improvement","Inadequate"]}],"layers":["cqc","companies_house"],"sort":"name","results":214,"matched":214,"more":false,"charged":2,"perRow":1,"createdAt":"2026-10-30T09:12:44.118Z","expiresAt":"2027-01-28T09:12:44.118Z","release":{"id":"b20261030040011a7c3","at":"2026-10-30T06:12:40.000Z"}}],"next":"MjAyNi0xMC0yOVQwOToxMjo0NC4xMThafHNzX1E3Y1dtMlJrOVR6THA0WHY"}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_REQUIRED`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_REQUIRED":{"$ref":"#/components/examples/CONSUMER_REQUIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_REQUIRED"]}},"/v1/searches/{searchId}":{"get":{"operationId":"getSavedSearch","summary":"A saved search's results, a page at a time, in their current state","description":"Returns a saved search's results again, a page at a time, as the entities are now: each row says whether it still meets the search's conditions (`matches`), and results no longer in the data come back in `missing`. The search's layers must all still be subscribed, and each row carries those layers only.\n\n`charged` says what the page spent, and the saved search's `charged` what all its pages have.\n\n**Cost**: see [pricing](https://atlas.oromiq.com/pricing/).\n\n**Limits**: up to 100 rows a page, 50 by default; follow `next` as `cursor`. A cursor from `POST /v1/search` for the same saved search works here; one from another saved search or from a filter does not. Kept for 90 days after it ran.\n\n**Called by** a consumer: the client key with `x-atlas-consumer` naming one of its consumers, or a consumer key where the account allows them. The client alone is refused with `CONSUMER_REQUIRED`.\n\n**Your duties**: Show each page's `attributions`, `notices` and `currency` wherever you show its rows.","tags":["Saved searches"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"$ref":"#/components/schemas/SavedSearchId"},"required":true,"description":"A saved search's id, ss_ and a random part.","name":"searchId","in":"path","example":"ss_Q7cWm2Rk9TzLp4Xv"},{"schema":{"$ref":"#/components/schemas/Cursor"},"required":false,"description":"An opaque page token: send back the `next` value of the previous page. Leave out for the first page.","name":"cursor","in":"query","example":"ss1.ss_Q7cWm2Rk9TzLp4Xv.2"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":50,"description":"Rows per page, at most 100."},"required":false,"description":"Rows per page, at most 100.","name":"limit","in":"query","example":2},{"schema":{"type":"string","enum":["attached"],"description":"Send attached for each row to carry its attached lists (filings, assessments, contracts and the like, up to 25 of each). Left out, a row carries facts alone. A row with its lists costs more: `rowExpand` on top of the row, each time it is served."},"required":false,"description":"Send attached for each row to carry its attached lists (filings, assessments, contracts and the like, up to 25 of each). Left out, a row carries facts alone. A row with its lists costs more: `rowExpand` on top of the row, each time it is served.","name":"expand","in":"query"},{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","example":"cn_8fHq2LmNcV0pXyT3rW6aZe"},"required":false,"description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","name":"x-atlas-consumer","in":"header"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"attributions":{"type":"array","items":{"$ref":"#/components/schemas/Attribution"},"description":"The attribution line of each layer this page's rows carry data from, to show wherever they are shown, with the ONS's when an ONS area found or shows a row. Empty on an empty page."},"notices":{"type":"array","items":{"type":"string"},"description":"What a licence asks be said with these rows: the CQC's non-endorsement where the CQC is among them."},"currency":{"type":"array","items":{"$ref":"#/components/schemas/LayerCurrency"},"description":"How current each layer with a currency duty is, of the layers this page's rows carry data from. A fact's own date is on the entity. Empty when none is among them."},"data":{"type":"array","items":{"type":"object","properties":{"row":{"$ref":"#/components/schemas/SearchRow"},"matches":{"type":"boolean","description":"True when the row still meets the saved search's conditions."}},"required":["row","matches"]},"description":"The rows of this page, each with whether it still matches."},"missing":{"type":"array","items":{"$ref":"#/components/schemas/EntityId"},"description":"Results no longer held, for example gone from every register."},"next":{"type":"string","nullable":true,"minLength":1,"maxLength":200,"description":"The cursor for the next page, or null on the last."},"search":{"$ref":"#/components/schemas/SavedSearch"},"release":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"The release id, the same value as the x-atlas-release header."},"at":{"allOf":[{"$ref":"#/components/schemas/IsoDateTime"},{"description":"When the release went live."}]}},"required":["id","at"],"description":"The release the rows are read from now."},"charged":{"type":"integer","minimum":0,"description":"Tokens this page took."}},"required":["data","missing","next","search"],"description":"A saved search's results, a page at a time, in their current state, each saying whether it still matches."},"example":{"data":[{"row":{"entityId":"prm_Wd8kP1sQz6RtLm4NcV7x","level":"premises","name":"OAKFIELD COURT","values":{"kind":"premises","place":"Kent","operator":"OAKFIELD TRUST LIMITED","sources":"Care Quality Commission","facts":"Overall rating: Inadequate; Beds: 48","group":null,"status":"active","cqc.rating":"Inadequate","cqc.beds":48},"primaryRecord":{"layer":"cqc","source":"locations","externalId":"1-2000000003"},"layers":["cqc"],"searchFacts":[{"field":"cqc.rating","label":"Overall rating","values":["Inadequate"]}]},"matches":true}],"missing":["prm_Jb5nH2tXr9QvEk3MpL8w"],"next":"ss1.ss_Q7cWm2Rk9TzLp4Xv.4","search":{"id":"ss_Q7cWm2Rk9TzLp4Xv","label":"South East homes to visit","conditions":[{"field":"region","operator":"equals","value":"South East"},{"field":"cqc.rating","operator":"in","value":["Requires Improvement","Inadequate"]}],"layers":["cqc","companies_house"],"sort":"name","results":214,"matched":214,"more":false,"charged":3,"perRow":1,"createdAt":"2026-10-30T09:12:44.118Z","expiresAt":"2027-01-28T09:12:44.118Z","release":{"id":"b20261030040011a7c3","at":"2026-10-30T06:12:40.000Z"}},"release":{"id":"b20261030040011a7c3","at":"2026-10-30T06:12:40.000Z"},"charged":1}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`, `SEARCH_CURSOR_INVALID`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"},"SEARCH_CURSOR_INVALID":{"$ref":"#/components/examples/SEARCH_CURSOR_INVALID"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough tokens: `TOKENS_EXHAUSTED`.","content":{"application/json":{"examples":{"TOKENS_EXHAUSTED":{"$ref":"#/components/examples/TOKENS_EXHAUSTED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_REQUIRED`, `LAYER_NOT_SUBSCRIBED`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_REQUIRED":{"$ref":"#/components/examples/CONSUMER_REQUIRED"},"LAYER_NOT_SUBSCRIBED":{"$ref":"#/components/examples/LAYER_NOT_SUBSCRIBED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found: `SAVED_SEARCH_NOT_FOUND`.","content":{"application/json":{"examples":{"SAVED_SEARCH_NOT_FOUND":{"$ref":"#/components/examples/SAVED_SEARCH_NOT_FOUND"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable: `NOT_READY`.","content":{"application/json":{"examples":{"NOT_READY":{"$ref":"#/components/examples/NOT_READY"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_REQUIRED","SAVED_SEARCH_NOT_FOUND","SEARCH_CURSOR_INVALID","LAYER_NOT_SUBSCRIBED","TOKENS_EXHAUSTED","NOT_READY"]},"put":{"operationId":"renameSavedSearch","summary":"Rename a saved search","description":"Sets a saved search's `label`, or clears it with `null`. Nothing else changes.\n\n**Cost**: see [pricing](https://atlas.oromiq.com/pricing/).\n\n**Limits**: a label is 1 to 120 characters. Only this consumer's own saved searches, while they are kept.\n\n**Called by** a consumer: the client key with `x-atlas-consumer` naming one of its consumers, or a consumer key where the account allows them. The client alone is refused with `CONSUMER_REQUIRED`.\n\n**Your duties**: Show each page's `attributions`, `notices` and `currency` wherever you show its rows.","tags":["Saved searches"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"$ref":"#/components/schemas/SavedSearchId"},"required":true,"description":"A saved search's id, ss_ and a random part.","name":"searchId","in":"path","example":"ss_Q7cWm2Rk9TzLp4Xv"},{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","example":"cn_8fHq2LmNcV0pXyT3rW6aZe"},"required":false,"description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","name":"x-atlas-consumer","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string","nullable":true,"minLength":1,"maxLength":120,"description":"The new name, or null for none."}},"required":["label"]},"example":{"label":"Kent homes, rated below Good"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/SavedSearch"}},"required":["data"]},"example":{"data":{"id":"ss_Q7cWm2Rk9TzLp4Xv","label":"Kent homes, rated below Good","conditions":[{"field":"region","operator":"equals","value":"South East"},{"field":"cqc.rating","operator":"in","value":["Requires Improvement","Inadequate"]}],"layers":["cqc","companies_house"],"sort":"name","results":214,"matched":214,"more":false,"charged":2,"perRow":1,"createdAt":"2026-10-30T09:12:44.118Z","expiresAt":"2027-01-28T09:12:44.118Z","release":{"id":"b20261030040011a7c3","at":"2026-10-30T06:12:40.000Z"}}}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`, `INVALID_JSON`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"},"INVALID_JSON":{"$ref":"#/components/examples/INVALID_JSON"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_REQUIRED`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_REQUIRED":{"$ref":"#/components/examples/CONSUMER_REQUIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found: `SAVED_SEARCH_NOT_FOUND`.","content":{"application/json":{"examples":{"SAVED_SEARCH_NOT_FOUND":{"$ref":"#/components/examples/SAVED_SEARCH_NOT_FOUND"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The body is too large: `PAYLOAD_TOO_LARGE`.","content":{"application/json":{"examples":{"PAYLOAD_TOO_LARGE":{"$ref":"#/components/examples/PAYLOAD_TOO_LARGE"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","INVALID_JSON","PAYLOAD_TOO_LARGE","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_REQUIRED","SAVED_SEARCH_NOT_FOUND"]},"delete":{"operationId":"deleteSavedSearch","summary":"Delete a saved search","description":"Deletes one of this consumer's saved searches: its results, label and conditions go at once, and its cursors stop working. Nothing charged is given back.\n\n**Cost**: see [pricing](https://atlas.oromiq.com/pricing/).\n\n**Called by** a consumer: the client key with `x-atlas-consumer` naming one of its consumers, or a consumer key where the account allows them. The client alone is refused with `CONSUMER_REQUIRED`.\n\n**Your duties**: Show each page's `attributions`, `notices` and `currency` wherever you show its rows.","tags":["Saved searches"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"$ref":"#/components/schemas/SavedSearchId"},"required":true,"description":"A saved search's id, ss_ and a random part.","name":"searchId","in":"path","example":"ss_Q7cWm2Rk9TzLp4Xv"},{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","example":"cn_8fHq2LmNcV0pXyT3rW6aZe"},"required":false,"description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","name":"x-atlas-consumer","in":"header"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true],"description":"Always true: the operation succeeded."}},"required":["ok"],"description":"The result."}},"required":["data"],"description":"Nothing to return beyond success."},"example":{"data":{"ok":true}}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_REQUIRED`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_REQUIRED":{"$ref":"#/components/examples/CONSUMER_REQUIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found: `SAVED_SEARCH_NOT_FOUND`.","content":{"application/json":{"examples":{"SAVED_SEARCH_NOT_FOUND":{"$ref":"#/components/examples/SAVED_SEARCH_NOT_FOUND"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_REQUIRED","SAVED_SEARCH_NOT_FOUND"]}},"/v1/searches/{searchId}/filter":{"post":{"operationId":"filterSavedSearch","summary":"A saved search's results that meet more conditions, a page at a time","description":"Narrows a saved search with more conditions and returns only the results that also meet them, as the entities are now, a page at a time. Each row says whether it still meets the saved search's own conditions (`matches`); `meta.total` is how many of the saved results the filter matches. Conditions are checked against the catalogue for the saved search's layers; none has to narrow. Count first with `POST /v1/searches/{searchId}/filter/count`.\n\n**Cost**: see [pricing](https://atlas.oromiq.com/pricing/).\n\n**Limits**: 1 to 20 conditions; up to 100 rows a page, 50 by default; `sort` is the saved search's when left out. A cursor works only with the same conditions and sort on the same saved search.\n\n**Called by** a consumer: the client key with `x-atlas-consumer` naming one of its consumers, or a consumer key where the account allows them. The client alone is refused with `CONSUMER_REQUIRED`.\n\n**Your duties**: Show each page's `attributions`, `notices` and `currency` wherever you show its rows.","tags":["Saved searches"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"$ref":"#/components/schemas/SavedSearchId"},"required":true,"description":"A saved search's id, ss_ and a random part.","name":"searchId","in":"path","example":"ss_Q7cWm2Rk9TzLp4Xv"},{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","example":"cn_8fHq2LmNcV0pXyT3rW6aZe"},"required":false,"description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","name":"x-atlas-consumer","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"conditions":{"type":"array","items":{"$ref":"#/components/schemas/Condition"},"minItems":1,"maxItems":20,"description":"The filter's conditions, 1 to 20, over the saved search's layers: the fields, operators and licence rules of a search, as `GET /v1/catalogue` lists them. None has to be on a narrowing field, as the saved search already narrowed."},"sort":{"type":"string","maxLength":80,"description":"A sort key from the catalogue's sortOptions for the saved search's layers; the saved search's own sort when left out."},"limit":{"type":"integer","minimum":1,"maximum":100,"default":50,"description":"Rows per page, at most 100."},"cursor":{"$ref":"#/components/schemas/Cursor"},"expand":{"type":"string","enum":["attached"],"description":"Send attached for each row to carry its attached lists (filings, assessments, contracts and the like, up to 25 of each). Left out, a row carries facts alone. A row with its lists costs more: `rowExpand` on top of the row, each time it is served."}},"required":["conditions"],"description":"Narrow a saved search to its results that also meet these conditions, a page at a time, in their current state. A cursor works only with the filter and the saved search that gave it."},"example":{"conditions":[{"field":"cqc.beds","operator":"gte","value":40}],"sort":"cqc.beds","limit":1}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"attributions":{"type":"array","items":{"$ref":"#/components/schemas/Attribution"},"description":"The attribution line of each layer this page's rows carry data from, to show wherever they are shown, with the ONS's when an ONS area found or shows a row. Empty on an empty page."},"notices":{"type":"array","items":{"type":"string"},"description":"What a licence asks be said with these rows: the CQC's non-endorsement where the CQC is among them."},"currency":{"type":"array","items":{"$ref":"#/components/schemas/LayerCurrency"},"description":"How current each layer with a currency duty is, of the layers this page's rows carry data from. A fact's own date is on the entity. Empty when none is among them."},"data":{"type":"array","items":{"type":"object","properties":{"row":{"$ref":"#/components/schemas/SearchRow"},"matches":{"type":"boolean","description":"True when the row meets the saved search's own conditions now, as well as the filter's."}},"required":["row","matches"]},"description":"The rows of this page that meet the filter."},"missing":{"type":"array","items":{"$ref":"#/components/schemas/EntityId"},"description":"Results the filter found that are no longer held by the time the page was read."},"next":{"type":"string","nullable":true,"minLength":1,"maxLength":200,"description":"The cursor for the next page, or null on the last."},"meta":{"$ref":"#/components/schemas/SearchMeta"},"search":{"$ref":"#/components/schemas/SavedSearch"},"release":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"The release id, the same value as the x-atlas-release header."},"at":{"allOf":[{"$ref":"#/components/schemas/IsoDateTime"},{"description":"When the release went live."}]}},"required":["id","at"],"description":"The release the rows are read from now."},"charged":{"type":"integer","minimum":0,"description":"Tokens this page took."}},"required":["data","missing","next","meta","search","charged"],"description":"The saved search's results that meet the filter, a page at a time, each saying whether it still meets the saved search's own conditions. In meta, total is the saved search's results the filter matches, never more than it saved, and pages are at this limit."},"example":{"data":[{"row":{"entityId":"prm_Tq3vN8bLw2YcKd5HsR0e","level":"premises","name":"OAKFIELD LODGE","values":{"kind":"premises","place":"Kent","operator":"OAKFIELD TRUST LIMITED","sources":"Care Quality Commission","facts":"Overall rating: Inadequate; Beds: 48","group":null,"status":"active","cqc.rating":"Inadequate","cqc.beds":48},"primaryRecord":{"layer":"cqc","source":"locations","externalId":"1-2000000002"},"layers":["cqc"],"searchFacts":[{"field":"cqc.rating","label":"Overall rating","values":["Inadequate"]}]},"matches":true}],"missing":[],"next":"sf1.ss_Q7cWm2Rk9TzLp4Xv.Hk2pQ9xV3mLw7RtZ.1","meta":{"limit":1,"returned":1,"total":37,"capped":false,"page":1,"pages":37},"search":{"id":"ss_Q7cWm2Rk9TzLp4Xv","label":"South East homes to visit","conditions":[{"field":"region","operator":"equals","value":"South East"},{"field":"cqc.rating","operator":"in","value":["Requires Improvement","Inadequate"]}],"layers":["cqc","companies_house"],"sort":"name","results":214,"matched":214,"more":false,"charged":2,"perRow":1,"createdAt":"2026-10-30T09:12:44.118Z","expiresAt":"2027-01-28T09:12:44.118Z","release":{"id":"b20261030040011a7c3","at":"2026-10-30T06:12:40.000Z"}},"release":{"id":"b20261030040011a7c3","at":"2026-10-30T06:12:40.000Z"},"charged":0}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`, `INVALID_JSON`, `SEARCH_CURSOR_INVALID`, `CONDITIONS_INVALID`, `VIA_NOT_CONNECTED`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"},"INVALID_JSON":{"$ref":"#/components/examples/INVALID_JSON"},"SEARCH_CURSOR_INVALID":{"$ref":"#/components/examples/SEARCH_CURSOR_INVALID"},"CONDITIONS_INVALID":{"$ref":"#/components/examples/CONDITIONS_INVALID"},"VIA_NOT_CONNECTED":{"$ref":"#/components/examples/VIA_NOT_CONNECTED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough tokens: `TOKENS_EXHAUSTED`.","content":{"application/json":{"examples":{"TOKENS_EXHAUSTED":{"$ref":"#/components/examples/TOKENS_EXHAUSTED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_REQUIRED`, `LAYER_NOT_SUBSCRIBED`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_REQUIRED":{"$ref":"#/components/examples/CONSUMER_REQUIRED"},"LAYER_NOT_SUBSCRIBED":{"$ref":"#/components/examples/LAYER_NOT_SUBSCRIBED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found: `SAVED_SEARCH_NOT_FOUND`.","content":{"application/json":{"examples":{"SAVED_SEARCH_NOT_FOUND":{"$ref":"#/components/examples/SAVED_SEARCH_NOT_FOUND"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The body is too large: `PAYLOAD_TOO_LARGE`.","content":{"application/json":{"examples":{"PAYLOAD_TOO_LARGE":{"$ref":"#/components/examples/PAYLOAD_TOO_LARGE"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable: `VIA_UNAVAILABLE`, `NOT_READY`.","content":{"application/json":{"examples":{"VIA_UNAVAILABLE":{"$ref":"#/components/examples/VIA_UNAVAILABLE"},"NOT_READY":{"$ref":"#/components/examples/NOT_READY"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","INVALID_JSON","PAYLOAD_TOO_LARGE","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_REQUIRED","SAVED_SEARCH_NOT_FOUND","SEARCH_CURSOR_INVALID","CONDITIONS_INVALID","VIA_NOT_CONNECTED","VIA_UNAVAILABLE","LAYER_NOT_SUBSCRIBED","TOKENS_EXHAUSTED","NOT_READY"]}},"/v1/searches/{searchId}/filter/count":{"post":{"operationId":"filterSavedSearchCount","summary":"Count a saved search's results that meet more conditions, and the tokens reading them could take","description":"Counts the results of a saved search that meet more conditions, and says in `cost` what reading them would cost, without returning any. A filter's body may be sent as it is: its sort, limit and cursor are ignored.\n\n`cost.unserved` is how many of the matching results would be charged and `cost.atMost` what they would cost this consumer.\n\n**Cost**: see [pricing](https://atlas.oromiq.com/pricing/).\n\n**Limits**: 1 to 20 conditions.\n\n**Called by** a consumer: the client key with `x-atlas-consumer` naming one of its consumers, or a consumer key where the account allows them. The client alone is refused with `CONSUMER_REQUIRED`.\n\n**Your duties**: Show each page's `attributions`, `notices` and `currency` wherever you show its rows.","tags":["Saved searches"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"$ref":"#/components/schemas/SavedSearchId"},"required":true,"description":"A saved search's id, ss_ and a random part.","name":"searchId","in":"path","example":"ss_Q7cWm2Rk9TzLp4Xv"},{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","example":"cn_8fHq2LmNcV0pXyT3rW6aZe"},"required":false,"description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","name":"x-atlas-consumer","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"conditions":{"type":"array","items":{"$ref":"#/components/schemas/Condition"},"minItems":1,"maxItems":20,"description":"The filter's conditions, 1 to 20, over the saved search's layers: the fields, operators and licence rules of a search, as `GET /v1/catalogue` lists them. None has to be on a narrowing field, as the saved search already narrowed."}},"required":["conditions"],"description":"A count only: how many of the saved search's results meet these conditions, and the most reading them could take, without a row. A filter's own body may be sent as it is. Its sort, limit and cursor are not used."},"example":{"conditions":[{"field":"cqc.beds","operator":"gte","value":40}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"description":"The saved search's results the conditions match now."},"results":{"type":"integer","minimum":0,"description":"The results the saved search holds."},"cost":{"type":"object","properties":{"perRow":{"type":"integer","minimum":0,"description":"Tokens one row costs this consumer."},"unserved":{"type":"integer","minimum":0,"description":"The matching results not served to this consumer in the last 90 days."},"atMost":{"type":"integer","minimum":0,"description":"The most reading every matching result could take: unserved times perRow."}},"required":["perRow","unserved","atMost"],"description":"What reading the filtered results would cost this consumer."}},"required":["total","results","cost"],"description":"The count and what reading it would cost."},"charged":{"type":"integer","minimum":0,"description":"Tokens this count took."}},"required":["data"]},"example":{"data":{"total":37,"results":214,"cost":{"perRow":1,"unserved":35,"atMost":35}}}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`, `INVALID_JSON`, `CONDITIONS_INVALID`, `VIA_NOT_CONNECTED`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"},"INVALID_JSON":{"$ref":"#/components/examples/INVALID_JSON"},"CONDITIONS_INVALID":{"$ref":"#/components/examples/CONDITIONS_INVALID"},"VIA_NOT_CONNECTED":{"$ref":"#/components/examples/VIA_NOT_CONNECTED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_REQUIRED`, `LAYER_NOT_SUBSCRIBED`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_REQUIRED":{"$ref":"#/components/examples/CONSUMER_REQUIRED"},"LAYER_NOT_SUBSCRIBED":{"$ref":"#/components/examples/LAYER_NOT_SUBSCRIBED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found: `SAVED_SEARCH_NOT_FOUND`.","content":{"application/json":{"examples":{"SAVED_SEARCH_NOT_FOUND":{"$ref":"#/components/examples/SAVED_SEARCH_NOT_FOUND"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The body is too large: `PAYLOAD_TOO_LARGE`.","content":{"application/json":{"examples":{"PAYLOAD_TOO_LARGE":{"$ref":"#/components/examples/PAYLOAD_TOO_LARGE"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable: `VIA_UNAVAILABLE`, `NOT_READY`.","content":{"application/json":{"examples":{"VIA_UNAVAILABLE":{"$ref":"#/components/examples/VIA_UNAVAILABLE"},"NOT_READY":{"$ref":"#/components/examples/NOT_READY"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","INVALID_JSON","PAYLOAD_TOO_LARGE","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_REQUIRED","SAVED_SEARCH_NOT_FOUND","CONDITIONS_INVALID","VIA_NOT_CONNECTED","VIA_UNAVAILABLE","LAYER_NOT_SUBSCRIBED","NOT_READY"]}},"/v1/layers":{"get":{"operationId":"listLayers","summary":"Every live layer a consumer may subscribe to, with its licence","description":"Lists every layer a consumer may subscribe to: its key, name, publisher, summary, licence, the attribution line to show wherever its data is shown, whether it is enrichment-only (read on held entities only, never searched) and any deprecation. Show the attribution line with the layer's data; the CQC's includes its non-endorsement. Read one layer's fields with `GET /v1/layers/{layer}/schema`. `surface` is the same value as the `x-atlas-surface` header.\n\n**Cost**: see [pricing](https://atlas.oromiq.com/pricing/).\n\n**Called by** the client or any of its consumers.","tags":["Reference"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"One of your consumers, to call as that consumer; left out, the call is the client's own. Not sent with a consumer key.","example":"cn_8fHq2LmNcV0pXyT3rW6aZe"},"required":false,"description":"One of your consumers, to call as that consumer; left out, the call is the client's own. Not sent with a consumer key.","name":"x-atlas-consumer","in":"header"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"layer":{"$ref":"#/components/schemas/LayerKey"},"name":{"type":"string","description":"The layer's name, for showing."},"publisher":{"type":"string","description":"Who publishes the register the layer comes from."},"summary":{"type":"string","nullable":true,"description":"What the layer adds, in a sentence or two. Null where there is none."},"licence":{"type":"object","properties":{"name":{"type":"string","description":"The licence's name."},"url":{"type":"string","description":"Where the licence is published. Present where it has a page."}},"required":["name"],"description":"The licence the layer's data is under."},"attribution":{"type":"string","nullable":true,"description":"The line to show wherever the layer's data is shown. Null when the licence asks for none."},"enrichmentOnly":{"type":"boolean","description":"True when the layer is read on held entities only and never searched."},"pack":{"type":"string","description":"The layer pack the layer is in (0.40.0): core, or a pack a plan may add. See `GET /v1/pricing`."},"deprecated":{"type":"object","properties":{"since":{"allOf":[{"$ref":"#/components/schemas/IsoDate"},{"description":"The day the deprecation was announced."}]},"until":{"allOf":[{"$ref":"#/components/schemas/IsoDate"},{"description":"The first day the field or layer may stop being sent."}]},"note":{"type":"string","description":"Why, and what to do instead, in a sentence. Present where there is one."},"replacedBy":{"type":"string","description":"The client key to read instead, where one replaces it."}},"required":["since","until"],"description":"Present when the whole layer is on its way out."}},"required":["layer","name","licence","attribution","enrichmentOnly"],"description":"One layer, with its licence."},"description":"Every live layer, with its licence."},"surface":{"type":"object","properties":{"version":{"type":"string","minLength":1,"description":"A short hash of what clients receive, the same value as the x-atlas-surface header."},"mapVersion":{"type":"integer","minimum":0,"description":"The version number of the data the surface comes from."},"at":{"allOf":[{"$ref":"#/components/schemas/IsoDateTime"},{"description":"When this surface went live."}]}},"required":["version","mapVersion","at"],"description":"The version of what clients receive."}},"required":["data","surface"],"description":"Every live layer a consumer may be subscribed to, with its licence. The schema of each is at `GET /v1/layers/{layer}/schema`."},"example":{"data":[{"layer":"cqc","name":"Care Quality Commission","publisher":"Care Quality Commission","summary":"Every care service and provider the Care Quality Commission regulates in England: current ratings with their dates, inspection reports and assessments, and registered managers for providers a client holds.","licence":{"name":"Open Government Licence v3.0","url":"https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/"},"attribution":"Contains Care Quality Commission data. Not endorsed by the Care Quality Commission.","enrichmentOnly":false},{"layer":"ico","name":"ICO register of fee payers","publisher":"Information Commissioner's Office","summary":"Whether an organisation is registered with the ICO as a data controller, with its registration, shown on organisations a client already holds.","licence":{"name":"Open Government Licence v3.0, except personal data","url":"https://ico.org.uk/about-the-ico/what-we-do/register-of-fee-payers/"},"attribution":"Contains Information Commissioner's Office data","enrichmentOnly":true}],"surface":{"version":"3f9c2a71","mapVersion":10,"at":"2026-10-29T18:10:00.000Z"}}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable: `NOT_READY`.","content":{"application/json":{"examples":{"NOT_READY":{"$ref":"#/components/examples/NOT_READY"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","NOT_READY"]}},"/v1/layers/{layer}/schema":{"get":{"operationId":"layerSchema","summary":"What one layer sends: its fields, a JSON Schema and an example per field","description":"Describes what one layer sends: each fact, status and date on an entity (`fields`) and each attached list with its item fields (`lists`), each with its client key, label, type, options, help, licence, whether it can be about a person, whether it is searchable and narrows, whether its history is kept, any benchmark, any deprecation and an example value. `schema` is a JSON Schema (draft 2020-12) for the layer's part of an entity. Read it again when `surface`, or the `x-atlas-surface` header, changes. An enrichment-only layer shows no example values and no searchable field.\n\n**Cost**: see [pricing](https://atlas.oromiq.com/pricing/).\n\n**Called by** the client or any of its consumers.","tags":["Reference"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"$ref":"#/components/schemas/LayerKey"},"required":true,"description":"A layer key, such as companies_house, cqc or fsa. `GET /v1/layers` lists every layer with its licence.","name":"layer","in":"path","example":"cqc"},{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"One of your consumers, to call as that consumer; left out, the call is the client's own. Not sent with a consumer key.","example":"cn_8fHq2LmNcV0pXyT3rW6aZe"},"required":false,"description":"One of your consumers, to call as that consumer; left out, the call is the client's own. Not sent with a consumer key.","name":"x-atlas-consumer","in":"header"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"layer":{"$ref":"#/components/schemas/LayerKey"},"name":{"type":"string","description":"The layer's name, for showing."},"publisher":{"type":"string","description":"Who publishes the register the layer comes from."},"summary":{"type":"string","nullable":true,"description":"What the layer adds, in a sentence or two. Null where there is none."},"licence":{"type":"object","properties":{"name":{"type":"string","description":"The licence's name."},"url":{"type":"string","description":"Where the licence is published. Present where it has a page."}},"required":["name"],"description":"The licence the layer's data is under."},"attribution":{"type":"string","nullable":true,"description":"The line to show wherever the layer's data is shown. Null when the licence asks for none."},"enrichmentOnly":{"type":"boolean","description":"True when the layer is read on held entities only and never searched."},"historySince":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"The earliest day of this layer's past that Atlas holds. A history read, an as-at read or a stats query for an earlier day finds no value. Absent where no past is held yet."},"surface":{"type":"object","properties":{"version":{"type":"string","minLength":1,"description":"A short hash of what clients receive, the same value as the x-atlas-surface header."},"mapVersion":{"type":"integer","minimum":0,"description":"The version number of the data the surface comes from."},"at":{"allOf":[{"$ref":"#/components/schemas/IsoDateTime"},{"description":"When this surface went live."}]}},"required":["version","mapVersion","at"],"description":"The version of what clients receive."},"deprecated":{"type":"object","properties":{"since":{"allOf":[{"$ref":"#/components/schemas/IsoDate"},{"description":"The day the deprecation was announced."}]},"until":{"allOf":[{"$ref":"#/components/schemas/IsoDate"},{"description":"The first day the field or layer may stop being sent."}]},"note":{"type":"string","description":"Why, and what to do instead, in a sentence. Present where there is one."},"replacedBy":{"type":"string","description":"The client key to read instead, where one replaces it."}},"required":["since","until"],"description":"Present when the whole layer is on its way out."},"fields":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"description":"The client key, as it appears in `facts` or on each list item."},"label":{"type":"string","minLength":1,"description":"The field's label, for showing."},"type":{"$ref":"#/components/schemas/FieldType"},"what":{"type":"string","enum":["fact","status","date"],"description":"A fact, the register's own status word, or a dated event."},"list":{"type":"string","description":"The attached list the field is an item value of, such as `assessments`. Absent for a fact on the entity."},"options":{"type":"array","items":{"type":"string"},"description":"The values a choice can take, where they are fixed."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"The values seen so far for a field with no fixed options: the values to expect, not a closed list."},"deprecatedValues":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","minLength":1,"description":"The value, still served until `until`."},"becomes":{"type":"string","minLength":1,"description":"The value it will be served as from `until`: itself where it returns to the register's own wording, and words only where `noValue` is true."},"noValue":{"type":"boolean","enum":[true],"description":"From `until` it counts as no value."},"since":{"allOf":[{"$ref":"#/components/schemas/IsoDate"},{"description":"The day the change was announced."}]},"until":{"allOf":[{"$ref":"#/components/schemas/IsoDate"},{"description":"The first day it may be served as `becomes`."}]}},"required":["value","becomes","since","until"],"description":"A value on its way out. A condition naming the whole of the old value keeps working once it has gone, read as `becomes`."},"description":"Values on their way to becoming another."},"help":{"type":"string","description":"What the value is and how to read it."},"licence":{"type":"string","description":"The licence the value sits under."},"personal":{"type":"boolean","description":"True when the value can be about a person. Such a value is served for held entities only."},"searchable":{"type":"boolean","description":"True when a condition may be put on the field."},"narrows":{"type":"boolean","description":"True when a condition on the field can carry a search alone."},"history":{"type":"boolean","description":"True when the value's past is kept, for history and `?at=`."},"benchmark":{"type":"object","properties":{"kind":{"type":"string","enum":["distribution","mean","share"],"description":"How the field is measured: distribution for a choice, mean for a number, share for a yes or no."},"by":{"type":"array","items":{"type":"string"},"description":"The cohorts offered: all, region, localAuthority, or another fact key of the layer."}},"required":["kind","by"],"description":"Present when the field is measured across cohorts, for baselines and positions."},"deprecated":{"type":"object","properties":{"since":{"allOf":[{"$ref":"#/components/schemas/IsoDate"},{"description":"The day the deprecation was announced."}]},"until":{"allOf":[{"$ref":"#/components/schemas/IsoDate"},{"description":"The first day the field or layer may stop being sent."}]},"note":{"type":"string","description":"Why, and what to do instead, in a sentence. Present where there is one."},"replacedBy":{"type":"string","description":"The client key to read instead, where one replaces it."}},"required":["since","until"],"description":"Present when the field is on its way out."},"example":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"nullable":true},{"type":"array","items":{"type":"string"}}],"description":"A value from current data, where one exists."},"operators":{"type":"array","items":{"$ref":"#/components/schemas/Operator"},"description":"For a searchable field: the operators a condition on it may use, as the catalogue gives them."},"historyOperators":{"type":"array","items":{"$ref":"#/components/schemas/Operator"},"description":"For a searchable field that keeps history: the operators a stats condition may read from its past, each with `within`. changed and was always; improved and declined where the options are listed best first (`ordered`)."},"historySince":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Where the past held of this field begins, given only where it differs from the layer's `historySince`. A change before it is not known, and an as-at read or a stats query for an earlier day finds no value."},"levels":{"type":"array","items":{"$ref":"#/components/schemas/EntityLevel"},"description":"The entity types the field lives on, as the catalogue gives them: an organisation, a premises, or both."},"ordered":{"type":"boolean","description":"True when the options are listed best first: EPC A+ to G, the CQC ratings Outstanding to Inadequate."},"unranked":{"type":"array","items":{"type":"string"},"description":"Options outside the order, such as the CQC's Insufficient evidence to rate: never better or worse than another."},"tones":{"type":"object","additionalProperties":{"type":"string","enum":["positive","caution","negative","neutral"],"description":"How a value reads at a glance: good, a warning, bad, or neither."},"description":"How each value reads at a glance: positive, caution, negative or neutral."},"statusGroups":{"type":"object","additionalProperties":{"type":"string","enum":["active","closed"],"description":"Whether a status word means the record is active or closed."},"description":"On the register's status field: each status word, and whether it means active or closed."}},"required":["key","label","type","what","licence","personal","searchable","narrows","history"]},"description":"The layer's facts, status and dates on the entity."},"lists":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"The list's name, as it appears under `attached`."},"fields":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"description":"The client key, as it appears in `facts` or on each list item."},"label":{"type":"string","minLength":1,"description":"The field's label, for showing."},"type":{"$ref":"#/components/schemas/FieldType"},"what":{"type":"string","enum":["fact","status","date"],"description":"A fact, the register's own status word, or a dated event."},"list":{"type":"string","description":"The attached list the field is an item value of, such as `assessments`. Absent for a fact on the entity."},"options":{"type":"array","items":{"type":"string"},"description":"The values a choice can take, where they are fixed."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"The values seen so far for a field with no fixed options: the values to expect, not a closed list."},"deprecatedValues":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","minLength":1,"description":"The value, still served until `until`."},"becomes":{"type":"string","minLength":1,"description":"The value it will be served as from `until`: itself where it returns to the register's own wording, and words only where `noValue` is true."},"noValue":{"type":"boolean","enum":[true],"description":"From `until` it counts as no value."},"since":{"allOf":[{"$ref":"#/components/schemas/IsoDate"},{"description":"The day the change was announced."}]},"until":{"allOf":[{"$ref":"#/components/schemas/IsoDate"},{"description":"The first day it may be served as `becomes`."}]}},"required":["value","becomes","since","until"],"description":"A value on its way out. A condition naming the whole of the old value keeps working once it has gone, read as `becomes`."},"description":"Values on their way to becoming another."},"help":{"type":"string","description":"What the value is and how to read it."},"licence":{"type":"string","description":"The licence the value sits under."},"personal":{"type":"boolean","description":"True when the value can be about a person. Such a value is served for held entities only."},"searchable":{"type":"boolean","description":"True when a condition may be put on the field."},"narrows":{"type":"boolean","description":"True when a condition on the field can carry a search alone."},"history":{"type":"boolean","description":"True when the value's past is kept, for history and `?at=`."},"benchmark":{"type":"object","properties":{"kind":{"type":"string","enum":["distribution","mean","share"],"description":"How the field is measured: distribution for a choice, mean for a number, share for a yes or no."},"by":{"type":"array","items":{"type":"string"},"description":"The cohorts offered: all, region, localAuthority, or another fact key of the layer."}},"required":["kind","by"],"description":"Present when the field is measured across cohorts, for baselines and positions."},"deprecated":{"type":"object","properties":{"since":{"allOf":[{"$ref":"#/components/schemas/IsoDate"},{"description":"The day the deprecation was announced."}]},"until":{"allOf":[{"$ref":"#/components/schemas/IsoDate"},{"description":"The first day the field or layer may stop being sent."}]},"note":{"type":"string","description":"Why, and what to do instead, in a sentence. Present where there is one."},"replacedBy":{"type":"string","description":"The client key to read instead, where one replaces it."}},"required":["since","until"],"description":"Present when the field is on its way out."},"example":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"nullable":true},{"type":"array","items":{"type":"string"}}],"description":"A value from current data, where one exists."},"operators":{"type":"array","items":{"$ref":"#/components/schemas/Operator"},"description":"For a searchable field: the operators a condition on it may use, as the catalogue gives them."},"historyOperators":{"type":"array","items":{"$ref":"#/components/schemas/Operator"},"description":"For a searchable field that keeps history: the operators a stats condition may read from its past, each with `within`. changed and was always; improved and declined where the options are listed best first (`ordered`)."},"historySince":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Where the past held of this field begins, given only where it differs from the layer's `historySince`. A change before it is not known, and an as-at read or a stats query for an earlier day finds no value."},"levels":{"type":"array","items":{"$ref":"#/components/schemas/EntityLevel"},"description":"The entity types the field lives on, as the catalogue gives them: an organisation, a premises, or both."},"ordered":{"type":"boolean","description":"True when the options are listed best first: EPC A+ to G, the CQC ratings Outstanding to Inadequate."},"unranked":{"type":"array","items":{"type":"string"},"description":"Options outside the order, such as the CQC's Insufficient evidence to rate: never better or worse than another."},"tones":{"type":"object","additionalProperties":{"type":"string","enum":["positive","caution","negative","neutral"],"description":"How a value reads at a glance: good, a warning, bad, or neither."},"description":"How each value reads at a glance: positive, caution, negative or neutral."},"statusGroups":{"type":"object","additionalProperties":{"type":"string","enum":["active","closed"],"description":"Whether a status word means the record is active or closed."},"description":"On the register's status field: each status word, and whether it means active or closed."}},"required":["key","label","type","what","licence","personal","searchable","narrows","history"]},"description":"The fields of an item in the list."}},"required":["name","fields"]},"description":"Each attached list the layer sends, with the fields of an item."},"schema":{"type":"object","additionalProperties":{"nullable":true},"description":"A JSON Schema, draft 2020-12, for this layer's part of an entity: `facts` keyed by client key, and `attached` lists. Generate types from it and check answers against it."}},"required":["layer","name","licence","attribution","enrichmentOnly","surface","fields","lists","schema"],"description":"The reference for the layer."}},"required":["data"],"description":"The reference for one layer."},"example":{"data":{"layer":"cqc","name":"Care Quality Commission","publisher":"Care Quality Commission","summary":"Every care service and provider the Care Quality Commission regulates in England: current ratings with their dates, inspection reports and assessments, and registered managers for providers a client holds.","licence":{"name":"Open Government Licence v3.0","url":"https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/"},"attribution":"Contains Care Quality Commission data. Not endorsed by the Care Quality Commission.","enrichmentOnly":false,"surface":{"version":"3f9c2a71","mapVersion":10,"at":"2026-10-29T18:10:00.000Z"},"fields":[{"key":"cqc.rating","label":"Overall rating","type":"enum","what":"fact","options":["Outstanding","Good","Requires Improvement","Inadequate","Insufficient evidence to rate"],"licence":"Open Government Licence v3.0","personal":false,"searchable":true,"narrows":true,"history":true,"benchmark":{"kind":"distribution","by":["region","localAuthority"]},"example":"Good"}],"lists":[],"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"facts":{"type":"array","items":{"type":"object","required":["key","value"],"properties":{"key":{"type":"string","enum":["cqc.rating"]}}}}}}}}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found: `NOT_FOUND`.","content":{"application/json":{"examples":{"NOT_FOUND":{"$ref":"#/components/examples/NOT_FOUND"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable: `NOT_READY`.","content":{"application/json":{"examples":{"NOT_READY":{"$ref":"#/components/examples/NOT_READY"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","NOT_FOUND","NOT_READY"]}},"/v1/changelog":{"get":{"operationId":"changelog","summary":"What changed for clients, per layer and key, since a date","description":"Lists what changed in the data for clients, per layer and client key, oldest first: a field added, removed, retyped, given new options, made searchable or not, deprecated or relabelled, and a layer added, removed or deprecated. Each change says when it took effect, whether it breaks a client reading the field as it was (only ever after a deprecation notice, with `until` the first day it may go) and, in a sentence, what changed. Poll with `since` set to the day you last read it, or when the `x-atlas-surface` header changes. Changes to the API's operations and shapes are in the contract changelog.\n\n**Cost**: see [pricing](https://atlas.oromiq.com/pricing/).\n\n**Limits**: `since` is a date (YYYY-MM-DD); `layers` keeps only those layer keys, comma-separated.\n\n**Called by** the client or any of its consumers.","tags":["Reference"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Only changes that reached clients on or after this day. Omit for every change."},"required":false,"description":"Only changes that reached clients on or after this day. Omit for every change.","name":"since","in":"query","example":"2026-10-01"},{"schema":{"type":"string","maxLength":400,"description":"Comma-separated layer keys to keep. Omit for every layer."},"required":false,"description":"Comma-separated layer keys to keep. Omit for every layer.","name":"layers","in":"query","example":"cqc"},{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"One of your consumers, to call as that consumer; left out, the call is the client's own. Not sent with a consumer key.","example":"cn_8fHq2LmNcV0pXyT3rW6aZe"},"required":false,"description":"One of your consumers, to call as that consumer; left out, the call is the client's own. Not sent with a consumer key.","name":"x-atlas-consumer","in":"header"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"version":{"type":"integer","minimum":1,"description":"The data version that made the change."},"at":{"allOf":[{"$ref":"#/components/schemas/IsoDateTime"},{"description":"When the change reached clients."}]},"layer":{"$ref":"#/components/schemas/LayerKey"},"key":{"type":"string","minLength":1,"description":"The client key, or the layer key for a layer-level change."},"change":{"type":"string","enum":["added","removed","type","options","moved","unsearchable","searchable","deprecated","undeprecated","label","layer_added","layer_removed","layer_deprecated"],"description":"What kind of change: added, removed, type, options, moved, unsearchable, searchable, deprecated, undeprecated, label, layer_added, layer_removed or layer_deprecated."},"breaking":{"type":"boolean","description":"True when the change would break a client reading the field as it was. Only ever after a deprecation notice."},"detail":{"type":"string","description":"What changed, in a sentence."},"until":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"For a deprecation: the first day it may go."},"value":{"type":"string","description":"The value the change is about, where it is about one value of the field and not the field itself. A value on notice leaves the field where it is."},"before":{"type":"string","description":"The value before the change, where there was one."},"after":{"type":"string","description":"The value after the change, where there is one."},"part":{"type":"string","enum":["help","levels","ordered","unranked","tones"],"description":"Which part of the field the change is about, where its kind does not say. For a `label` change, its help text or its entity types. For an `options` change, its order, its unranked options or a tone."},"beforeValues":{"type":"array","items":{"type":"string"},"description":"Where `before` is a list joined with commas, such as options or entity types: the list itself, so a value holding a comma reads whole."},"afterValues":{"type":"array","items":{"type":"string"},"description":"The same for `after`."}},"required":["version","at","layer","key","change","breaking","detail"]},"description":"Every change, oldest first."},"surface":{"type":"object","properties":{"version":{"type":"string","minLength":1,"description":"A short hash of what clients receive, the same value as the x-atlas-surface header."},"mapVersion":{"type":"integer","minimum":0,"description":"The version number of the data the surface comes from."},"at":{"allOf":[{"$ref":"#/components/schemas/IsoDateTime"},{"description":"When this surface went live."}]}},"required":["version","mapVersion","at"],"description":"The version of what clients receive."}},"required":["data","surface"],"description":"What changed for clients, per layer and key."},"example":{"data":[{"version":9,"at":"2026-10-29T18:10:00.000Z","layer":"cqc","key":"cqc.ratingInherited","change":"added","breaking":false,"detail":"Added: whether the current rating was inherited from an earlier registration."}],"surface":{"version":"3f9c2a71","mapVersion":10,"at":"2026-10-29T18:10:00.000Z"}}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `LAYER_NOT_SUBSCRIBED`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"LAYER_NOT_SUBSCRIBED":{"$ref":"#/components/examples/LAYER_NOT_SUBSCRIBED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable: `NOT_READY`.","content":{"application/json":{"examples":{"NOT_READY":{"$ref":"#/components/examples/NOT_READY"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","LAYER_NOT_SUBSCRIBED","NOT_READY"]}},"/v1/catalogue/options/{token}":{"get":{"operationId":"catalogueOptions","summary":"The options behind a catalogue field's options token","description":"The options of a catalogue field whose list is too long to send inline: the catalogue gives such a field an `optionsToken` in place of `options`. Use the values in an `equals` or `in` condition on that field. Send the same layers as the catalogue call that gave the token.\n\n**Cost**: see [pricing](https://atlas.oromiq.com/pricing/).\n\n**Limits**: at most 500 options. A token the catalogue did not give for these layers returns `404 NOT_FOUND`.\n\n**Called by** a consumer: the client key with `x-atlas-consumer` naming one of its consumers, or a consumer key where the account allows them. The client alone is refused with `CONSUMER_REQUIRED`.","tags":["Search"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":80,"description":"A field's optionsToken from the catalogue."},"required":true,"description":"A field's optionsToken from the catalogue.","name":"token","in":"path","example":"region"},{"schema":{"type":"string","maxLength":400,"description":"Comma-separated layer keys, or the one word subscribed for every layer the consumer is subscribed to."},"required":true,"description":"Comma-separated layer keys, or the one word subscribed for every layer the consumer is subscribed to.","name":"layers","in":"query","example":"cqc,companies_house"},{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","example":"cn_8fHq2LmNcV0pXyT3rW6aZe"},"required":false,"description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","name":"x-atlas-consumer","in":"header"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","description":"The value a condition sends."},"label":{"type":"string","description":"The option's name, to show."}},"required":["value","label"]},"description":"The field's options."}},"required":["data"],"description":"The options behind a field's optionsToken."},"example":{"data":[{"value":"East of England","label":"East of England"},{"value":"London","label":"London"},{"value":"South East","label":"South East"}]}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_REQUIRED`, `LAYER_NOT_SUBSCRIBED`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_REQUIRED":{"$ref":"#/components/examples/CONSUMER_REQUIRED"},"LAYER_NOT_SUBSCRIBED":{"$ref":"#/components/examples/LAYER_NOT_SUBSCRIBED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found: `NOT_FOUND`.","content":{"application/json":{"examples":{"NOT_FOUND":{"$ref":"#/components/examples/NOT_FOUND"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable: `NOT_READY`.","content":{"application/json":{"examples":{"NOT_READY":{"$ref":"#/components/examples/NOT_READY"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_REQUIRED","LAYER_NOT_SUBSCRIBED","NOT_FOUND","NOT_READY"]}},"/v1/stats":{"post":{"operationId":"stats","summary":"Counts, distributions, shares and summaries over the entities a search finds, by area or field","description":"Figures over many entities at once, as totals and percentages only: never a list of entities, addresses or people. For example, how many care homes in each region hold each rating, or how one home compares with the rest of its local authority. See the [reports guide](https://atlas.oromiq.com/developers/guides/reports/).\n\n**Which entities**: `conditions` as a search takes them (none required), an optional `level` and at most one `scope`: `area`, `near`, `related`, `savedSearch` or `holdings`. **What to measure**: up to 20 `measures`, each a `count`, a `distribution`, a `share` or a `summary`, broken down by up to 2 `groupBy`: an area, `operator` or a catalogue field. Wards and integrated care boards are keyed by ONS code, with names in `labels`.\n\n**What comes back**: `total` is how many entities were found; `overall` holds every measure over all of them, and `groups` each group's `count` and measures; `legend` says what each measure is, for a table or a chart. In each measure, `withValue` is how many entities in the group have a value for the field and `withoutValue` how many do not. A distribution lists each option with its `count`, how many entities have that option, and its `percent`, that count as a percentage of `withValue`; a share gives the `count` meeting the test and the same `percent`. Show `withValue` beside every percentage. A group with fewer than 5 entities gives its count in `withheld` and no measures, and so does the whole. Show `attributions`, `notices` and `currency` with the figures.\n\nAn enrichment-only field cannot be a condition, a grouping or a measure, and nothing is grouped or measured by a name, an address, a postcode or a person (`LICENCE_REFUSED`).\n\n`cost` says how the price was made up, and `charged` what the call spent. With too few tokens the query is refused with `TOKENS_EXHAUSTED`, saying what it would have cost.\n\n**Cost**: a report run, plus a price per 1,000 entities in scope, rounded up, up to the most one run takes; a subject adds a position, and each series or history part a baseline. `POST /v1/stats/cost` says the figure first, for nothing. See [pricing](https://atlas.oromiq.com/pricing/).\n\n**Limits**: 2 groupings, 20 measures, 20 conditions, 500 groups and 10 seconds; past any of them the query is refused, never cut short. A distribution lists at most its 50 most common options, with the rest added together in `otherOptions`. `related` measures at most 1,000 entities. `limit` caps the groups returned, 100 by default and at most 500; `moreGroups` says when there were more.\n\n**Called by** a consumer: the client key with `x-atlas-consumer` naming one of its consumers, or a consumer key where the account allows them. The client alone is refused with `CONSUMER_REQUIRED`.\n\n**Your duties**: Show `attributions`, `notices` and `currency` wherever you show the figures, and show `withValue` beside every percentage so a figure is never read as covering more entities than it does.","tags":["Reports"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","example":"cn_8fHq2LmNcV0pXyT3rW6aZe"},"required":false,"description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","name":"x-atlas-consumer","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatsRequest"},"example":{"level":"premises","layers":["cqc"],"conditions":[{"field":"cqc.careHome","operator":"equals","value":"Y"}],"scope":{"near":{"entityId":"prm_Q7c2LmVx9TbR4nWk0pZa","area":"localAuthority"}},"subject":"prm_Q7c2LmVx9TbR4nWk0pZa","measures":[{"field":"cqc.rating","distribution":true},{"field":"cqc.managerAbsent","share":{"exists":true},"label":"Manager vacancy"}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatsResponse"},"example":{"data":{"total":78,"overall":{"withheld":false,"measures":[{"withValue":75,"withoutValue":3,"options":[{"option":"Outstanding","count":4,"percent":5.33},{"option":"Good","count":51,"percent":68},{"option":"Requires Improvement","count":17,"percent":22.67},{"option":"Inadequate","count":3,"percent":4}],"subject":{"value":"Requires Improvement","position":"below","delta":-69.33}},{"withValue":78,"withoutValue":0,"share":{"count":9,"percent":11.54},"subject":{"value":true,"position":"below","delta":88.46}}]},"legend":[{"kind":"distribution","field":"cqc.rating","label":"Overall rating","options":["Outstanding","Good","Requires Improvement","Inadequate","Insufficient evidence to rate"]},{"kind":"share","field":"cqc.managerAbsent","label":"Manager vacancy","test":"has a value"}],"groups":[],"withheld":[],"totalGroups":0,"moreGroups":false,"subject":{"entityId":"prm_Q7c2LmVx9TbR4nWk0pZa","found":true},"asAt":"2026-10-30","release":{"id":"b2026103004001a7f3e","at":"2026-10-30T06:12:08.000Z"}},"attributions":[{"layer":"cqc","text":"Contains Care Quality Commission data. Not endorsed by the Care Quality Commission.","url":"https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/"}],"notices":["Not endorsed by the Care Quality Commission."],"currency":[],"charged":5}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`, `INVALID_JSON`, `CONDITIONS_INVALID`, `VIA_NOT_CONNECTED`, `STATS_INVALID`, `LICENCE_REFUSED`, `SCOPE_UNAVAILABLE`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"},"INVALID_JSON":{"$ref":"#/components/examples/INVALID_JSON"},"CONDITIONS_INVALID":{"$ref":"#/components/examples/CONDITIONS_INVALID"},"VIA_NOT_CONNECTED":{"$ref":"#/components/examples/VIA_NOT_CONNECTED"},"STATS_INVALID":{"$ref":"#/components/examples/STATS_INVALID"},"LICENCE_REFUSED":{"$ref":"#/components/examples/LICENCE_REFUSED"},"SCOPE_UNAVAILABLE":{"$ref":"#/components/examples/SCOPE_UNAVAILABLE"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough tokens: `TOKENS_EXHAUSTED`.","content":{"application/json":{"examples":{"TOKENS_EXHAUSTED":{"$ref":"#/components/examples/TOKENS_EXHAUSTED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_REQUIRED`, `LAYER_NOT_SUBSCRIBED`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_REQUIRED":{"$ref":"#/components/examples/CONSUMER_REQUIRED"},"LAYER_NOT_SUBSCRIBED":{"$ref":"#/components/examples/LAYER_NOT_SUBSCRIBED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found: `NOT_FOUND`, `SAVED_SEARCH_NOT_FOUND`.","content":{"application/json":{"examples":{"NOT_FOUND":{"$ref":"#/components/examples/NOT_FOUND"},"SAVED_SEARCH_NOT_FOUND":{"$ref":"#/components/examples/SAVED_SEARCH_NOT_FOUND"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The body is too large: `PAYLOAD_TOO_LARGE`.","content":{"application/json":{"examples":{"PAYLOAD_TOO_LARGE":{"$ref":"#/components/examples/PAYLOAD_TOO_LARGE"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Cannot be answered as asked: `STATS_TIMEOUT`, `STATS_TOO_LARGE`, `NO_AREA`.","content":{"application/json":{"examples":{"STATS_TIMEOUT":{"$ref":"#/components/examples/STATS_TIMEOUT"},"STATS_TOO_LARGE":{"$ref":"#/components/examples/STATS_TOO_LARGE"},"NO_AREA":{"$ref":"#/components/examples/NO_AREA"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`, `TOO_MANY_GROUPS`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"},"TOO_MANY_GROUPS":{"$ref":"#/components/examples/TOO_MANY_GROUPS"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable: `GEOGRAPHY_UNAVAILABLE`, `NOT_READY`.","content":{"application/json":{"examples":{"GEOGRAPHY_UNAVAILABLE":{"$ref":"#/components/examples/GEOGRAPHY_UNAVAILABLE"},"NOT_READY":{"$ref":"#/components/examples/NOT_READY"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","INVALID_JSON","PAYLOAD_TOO_LARGE","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_REQUIRED","LAYER_NOT_SUBSCRIBED","CONDITIONS_INVALID","VIA_NOT_CONNECTED","STATS_INVALID","LICENCE_REFUSED","SCOPE_UNAVAILABLE","NOT_FOUND","TOO_MANY_GROUPS","STATS_TIMEOUT","STATS_TOO_LARGE","NO_AREA","TOKENS_EXHAUSTED","GEOGRAPHY_UNAVAILABLE","NOT_READY","SAVED_SEARCH_NOT_FOUND"]}},"/v1/stats/cost":{"post":{"operationId":"statsCost","summary":"What a stats query would take, without running it","description":"What a stats query would take, without running it. Send the same body as `POST /v1/stats`: it is checked exactly as a run is (fields, licence rules, the subject in scope), priced on the entities in scope, and not run. The run then takes exactly `cost.tokens`.\n\n**What comes back**: `cost.entities` is how many entities the conditions and the scope find; `report` the run's price for them, `position` the subject's where the query names one, `baseline` the series and history parts, and `tokens` the whole.\n\n**Cost**: nothing.\n\n**Limits**: as `POST /v1/stats`.\n\n**Called by** a consumer: the client key with `x-atlas-consumer` naming one of its consumers, or a consumer key where the account allows them. The client alone is refused with `CONSUMER_REQUIRED`.\n\n**Your duties**: Show `attributions`, `notices` and `currency` wherever you show the figures, and show `withValue` beside every percentage so a figure is never read as covering more entities than it does.","tags":["Reports"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","example":"cn_8fHq2LmNcV0pXyT3rW6aZe"},"required":false,"description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","name":"x-atlas-consumer","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatsRequest"},"example":{"level":"premises","layers":["cqc"],"conditions":[{"field":"cqc.careHome","operator":"equals","value":"Y"}],"scope":{"near":{"entityId":"prm_Q7c2LmVx9TbR4nWk0pZa","area":"localAuthority"}},"subject":"prm_Q7c2LmVx9TbR4nWk0pZa","measures":[{"field":"cqc.rating","distribution":true},{"field":"cqc.managerAbsent","share":{"exists":true},"label":"Manager vacancy"}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"cost":{"type":"object","properties":{"entities":{"type":"integer","minimum":0,"description":"The entities in scope the price was worked out on."},"report":{"type":"integer","minimum":0,"description":"Tokens for the run: the report price, plus the price per 1,000 entities in scope, rounded up, up to the most a run takes."},"position":{"type":"integer","minimum":0,"description":"Tokens for the subject, where the query names one."},"baseline":{"type":"integer","minimum":0,"description":"Tokens for the series and the history parts, a baseline each."},"tokens":{"type":"integer","minimum":0,"description":"The whole: what the run takes."}},"required":["entities","report","position","baseline","tokens"],"description":"What the run costs, and what it was priced on."}},"required":["cost"],"description":"The cost alone: the query is checked and priced, not run."}},"required":["data"],"description":"What a stats query would take, for nothing: the same body as `POST /v1/stats`, checked as it would be, priced on the entities in scope, and not run. The run then takes exactly this."},"example":{"data":{"cost":{"entities":212,"report":11,"position":15,"baseline":0,"tokens":26}}}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`, `INVALID_JSON`, `CONDITIONS_INVALID`, `VIA_NOT_CONNECTED`, `STATS_INVALID`, `LICENCE_REFUSED`, `SCOPE_UNAVAILABLE`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"},"INVALID_JSON":{"$ref":"#/components/examples/INVALID_JSON"},"CONDITIONS_INVALID":{"$ref":"#/components/examples/CONDITIONS_INVALID"},"VIA_NOT_CONNECTED":{"$ref":"#/components/examples/VIA_NOT_CONNECTED"},"STATS_INVALID":{"$ref":"#/components/examples/STATS_INVALID"},"LICENCE_REFUSED":{"$ref":"#/components/examples/LICENCE_REFUSED"},"SCOPE_UNAVAILABLE":{"$ref":"#/components/examples/SCOPE_UNAVAILABLE"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough tokens: `TOKENS_EXHAUSTED`.","content":{"application/json":{"examples":{"TOKENS_EXHAUSTED":{"$ref":"#/components/examples/TOKENS_EXHAUSTED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_REQUIRED`, `LAYER_NOT_SUBSCRIBED`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_REQUIRED":{"$ref":"#/components/examples/CONSUMER_REQUIRED"},"LAYER_NOT_SUBSCRIBED":{"$ref":"#/components/examples/LAYER_NOT_SUBSCRIBED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found: `NOT_FOUND`, `SAVED_SEARCH_NOT_FOUND`.","content":{"application/json":{"examples":{"NOT_FOUND":{"$ref":"#/components/examples/NOT_FOUND"},"SAVED_SEARCH_NOT_FOUND":{"$ref":"#/components/examples/SAVED_SEARCH_NOT_FOUND"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The body is too large: `PAYLOAD_TOO_LARGE`.","content":{"application/json":{"examples":{"PAYLOAD_TOO_LARGE":{"$ref":"#/components/examples/PAYLOAD_TOO_LARGE"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Cannot be answered as asked: `STATS_TIMEOUT`, `STATS_TOO_LARGE`, `NO_AREA`.","content":{"application/json":{"examples":{"STATS_TIMEOUT":{"$ref":"#/components/examples/STATS_TIMEOUT"},"STATS_TOO_LARGE":{"$ref":"#/components/examples/STATS_TOO_LARGE"},"NO_AREA":{"$ref":"#/components/examples/NO_AREA"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`, `TOO_MANY_GROUPS`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"},"TOO_MANY_GROUPS":{"$ref":"#/components/examples/TOO_MANY_GROUPS"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable: `GEOGRAPHY_UNAVAILABLE`, `NOT_READY`.","content":{"application/json":{"examples":{"GEOGRAPHY_UNAVAILABLE":{"$ref":"#/components/examples/GEOGRAPHY_UNAVAILABLE"},"NOT_READY":{"$ref":"#/components/examples/NOT_READY"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","INVALID_JSON","PAYLOAD_TOO_LARGE","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_REQUIRED","LAYER_NOT_SUBSCRIBED","CONDITIONS_INVALID","VIA_NOT_CONNECTED","STATS_INVALID","LICENCE_REFUSED","SCOPE_UNAVAILABLE","NOT_FOUND","TOO_MANY_GROUPS","STATS_TIMEOUT","STATS_TOO_LARGE","NO_AREA","TOKENS_EXHAUSTED","GEOGRAPHY_UNAVAILABLE","NOT_READY","SAVED_SEARCH_NOT_FOUND"]}},"/v1/reports":{"post":{"operationId":"saveReport","summary":"Keep a stats query, re-run on every release with what moved","description":"Saves a stats query with a `label` and an `alert`, which says how far a figure must move between two runs to count as a move. Takes the same fields as `POST /v1/stats`, runs at once (a query that would be refused is refused now) and runs again on every release, each run compared with the one before. Read what moved with `GET /v1/reports/{reportId}`, or list the reports that moved with `GET /v1/reports?moved=true`. Only the query, its label and its figures are kept. The small-group rule and the refusals of `POST /v1/stats` apply.\n\n**Cost**: see [pricing](https://atlas.oromiq.com/pricing/).\n\n**Limits**: at most 50 reports a consumer, and the last 60 runs a report. A report cannot keep a `savedSearch` scope: save the conditions instead. A report whose answer could be too large is refused with `REPORT_TOO_LARGE`.\n\n**Called by** a consumer: the client key with `x-atlas-consumer` naming one of its consumers, or a consumer key where the account allows them. The client alone is refused with `CONSUMER_REQUIRED`.\n\n**Your duties**: Show `attributions`, `notices` and `currency` wherever you show the figures, and show `withValue` beside every percentage so a figure is never read as covering more entities than it does.","tags":["Reports"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","example":"cn_8fHq2LmNcV0pXyT3rW6aZe"},"required":false,"description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","name":"x-atlas-consumer","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"level":{"type":"string","enum":["organisation","premises"],"description":"The entity type measured: premises, such as a care home, or organisation. Left out, both. Needed for a condition read through a relation with `via`."},"asAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"A day in the past: the figures are as the entities stood then. Each fact takes the value it had that day, and an entity that had none then has none, while the entities themselves, their areas and their register statuses are as they are now. A day before an entity's history begins finds it with no facts. With too few tokens the whole query is refused."},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/Condition"},"maxItems":20,"default":[],"description":"Which entities, as a search takes them, up to 20. `GET /v1/catalogue` lists the fields, `via` included. None means every entity in the layers in scope."},"layers":{"$ref":"#/components/schemas/LayerScope"},"scope":{"$ref":"#/components/schemas/StatsScope"},"groupBy":{"type":"array","items":{"type":"string","minLength":1,"maxLength":80},"maxItems":2,"default":[],"description":"Up to 2 groupings. Each is an area: region, localAuthority, ward, icb or country; or operator, the organisation that runs each premises; or a catalogue field holding a choice, a yes or no, a list or text, such as cqc.rating or cqc.serviceType. Never a name, an address or a postcode. An entity with no value is grouped under null; an entity with two values of a list, under each."},"measures":{"type":"array","items":{"$ref":"#/components/schemas/StatsMeasure"},"minItems":1,"maxItems":20,"description":"What to measure about each group, at most 20."},"subject":{"type":"string","pattern":"^(org|prm)_[A-Za-z0-9_-]{20}$","description":"An entity to place against every group. Each measure then gives the entity's own value and its position: above means better than most of the group, below worse, inline in the middle, and unknown where the entity has no value, the field has no order or the group is under 5. With too few tokens the whole query is refused."},"series":{"type":"boolean","description":"True for each measure over earlier days too, as `GET /v1/baselines` gives them. A series is available for a measure of a field with a benchmark, over its layer's entities, with no conditions, everywhere or in one region or local authority, grouped by nothing or by one of the field's cohorts: region, localAuthority, or the field's own, such as cqc.serviceType. Where a series is not available, seriesNote says why. With too few tokens the whole query is refused."},"sort":{"type":"object","properties":{"by":{"type":"string","enum":["count","key","measure"],"default":"count","description":"count: by the number of entities in each group, the default; key: by the group keys, A to Z; measure: by one of the measures."},"measure":{"type":"integer","minimum":0,"maximum":19,"description":"For by measure: the measure's place in measures, from 0. A count sorts by the count, a share by its percent, a summary by its first figure, a distribution by `option`'s percent, or by how many entities have a value when `option` is left out."},"option":{"type":"string","maxLength":200,"description":"For a distribution: the option whose percent sorts the groups."},"desc":{"type":"boolean","description":"true: largest first, or Z to A for key; false: smallest first, or A to Z. Left out, largest first for count and a measure, A to Z for key."}},"additionalProperties":false,"description":"The order of the groups."},"limit":{"type":"integer","minimum":1,"maximum":500,"default":100,"description":"The most groups answered, in the sort's order: 100 when left out, at most 500."},"label":{"type":"string","minLength":1,"maxLength":120,"description":"A name for the report, to find it again."},"alert":{"$ref":"#/components/schemas/ReportAlert"}},"required":["layers","measures"],"description":"A query to keep and run again on every release, with the same fields as `POST /v1/stats` and what counts as it moving. It runs once on saving, under the same licence rules and limits. A savedSearch scope cannot be saved; holdings and related can. What saving it costs is on the pricing page. Refused with REPORT_TOO_LARGE when its answer could be too large to keep."},"example":{"label":"Care homes in Kent","alert":{"count":3,"points":5},"level":"premises","layers":["cqc"],"conditions":[{"field":"cqc.careHome","operator":"equals","value":"Y"}],"scope":{"area":{"localAuthority":"Kent"}},"groupBy":["cqc.rating"],"measures":[{"count":true}]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","pattern":"^rp_[A-Za-z0-9_-]{12,40}$","description":"A saved report's id, rp_ and a random part."},"label":{"type":"string","nullable":true,"description":"The name given to it, or null."},"layers":{"type":"array","items":{"$ref":"#/components/schemas/LayerKey"},"description":"The layers the query reads."},"createdAt":{"allOf":[{"$ref":"#/components/schemas/IsoDateTime"},{"description":"When it was saved."}]},"lastRun":{"type":"string","nullable":true,"format":"date-time","description":"When it last ran, on the latest release."},"moved":{"type":"boolean","description":"True when its latest run moved."},"movedAt":{"type":"string","nullable":true,"format":"date-time","description":"When a run last moved."},"request":{"allOf":[{"$ref":"#/components/schemas/StatsRequest"},{"description":"The query as it was saved."}]},"alert":{"$ref":"#/components/schemas/ReportAlert"},"latest":{"type":"object","nullable":true,"properties":{"data":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"description":"How many entities the conditions and the scope found in all."},"overall":{"type":"object","properties":{"measures":{"type":"array","items":{"$ref":"#/components/schemas/StatsResult"},"description":"One result per measure, in the order asked for. Left out when withheld."},"withheld":{"type":"boolean","description":"True when the whole is under 5: its measures are withheld."}},"required":["withheld"],"description":"Every measure over all the entities found, before grouping."},"legend":{"type":"array","items":{"$ref":"#/components/schemas/StatsLegend"},"description":"One entry per measure asked for, in the same order: what each measure is."},"groups":{"type":"array","items":{"$ref":"#/components/schemas/StatsGroup"},"description":"The groups of 5 or more, in the sort's order, up to `limit`. Empty with no groupBy."},"withheld":{"type":"array","items":{"$ref":"#/components/schemas/StatsWithheld"},"description":"The groups under 5, largest first."},"totalGroups":{"type":"integer","minimum":0,"description":"Groups in all, the withheld among them."},"moreGroups":{"type":"boolean","description":"True when there were more groups of 5 or more than `limit` allowed."},"subject":{"type":"object","properties":{"entityId":{"allOf":[{"$ref":"#/components/schemas/EntityId"},{"description":"The subject's entity id. An id that has merged into another gives the id it became."}]},"found":{"type":"boolean","description":"True when the subject is among the entities measured."}},"required":["entityId","found"],"description":"The subject, with subject."},"scoped":{"type":"object","properties":{"kind":{"type":"string","enum":["related","savedSearch","holdings"],"description":"Which scope named them: related, savedSearch or holdings."},"entities":{"type":"integer","minimum":0,"description":"The entities the scope named, before the conditions."},"truncated":{"type":"boolean","description":"For related: true when the network ran past 1,000 entities and the rest were left out."}},"required":["kind","entities","truncated"],"description":"For a scope that names entities: how many it named."},"seriesNote":{"type":"string","description":"With series: why a measure carries none, where one does not."},"asAt":{"allOf":[{"$ref":"#/components/schemas/IsoDate"},{"description":"The day the figures are as at: the asAt sent, else the day the release went live."}]},"release":{"allOf":[{"$ref":"#/components/schemas/Release"},{"description":"The release the figures come from."}]}},"required":["total","overall","legend","groups","withheld","totalGroups","moreGroups","asAt","release"],"description":"The figures: the whole, the legend and the groups."},"attributions":{"type":"array","items":{"$ref":"#/components/schemas/Attribution"},"description":"The attribution line of every layer in scope, to show wherever the figures are shown."},"notices":{"type":"array","items":{"type":"string"},"description":"What a licence asks be said with the figures: the CQC's non-endorsement, among others."},"currency":{"type":"array","items":{"$ref":"#/components/schemas/LayerCurrency"},"description":"How current each layer with a currency duty is, for every such layer in scope."},"cost":{"type":"object","properties":{"entities":{"type":"integer","minimum":0,"description":"The entities in scope the price was worked out on."},"report":{"type":"integer","minimum":0,"description":"Tokens for the run: the report price, plus the price per 1,000 entities in scope, rounded up, up to the most a run takes."},"position":{"type":"integer","minimum":0,"description":"Tokens for the subject, where the query names one."},"baseline":{"type":"integer","minimum":0,"description":"Tokens for the series and the history parts, a baseline each."},"tokens":{"type":"integer","minimum":0,"description":"The whole: what the run takes."}},"required":["entities","report","position","baseline","tokens"],"description":"What the run costs, and what it was priced on."},"charged":{"type":"integer","minimum":0,"description":"Tokens this answer took. Left out when it took none."}},"required":["data","attributions","notices","currency"],"description":"The latest run's figures, as `POST /v1/stats` returns them. Null before any run."},"runs":{"type":"array","items":{"$ref":"#/components/schemas/ReportRun"},"description":"Its runs, newest first, at most 60."}},"required":["id","label","layers","createdAt","lastRun","moved","movedAt","request","alert","latest","runs"],"description":"A saved report, without its figures."},"cost":{"type":"object","properties":{"entities":{"type":"integer","minimum":0,"description":"The entities in scope the price was worked out on."},"report":{"type":"integer","minimum":0,"description":"Tokens for the run: the report price, plus the price per 1,000 entities in scope, rounded up, up to the most a run takes."},"position":{"type":"integer","minimum":0,"description":"Tokens for the subject, where the query names one."},"baseline":{"type":"integer","minimum":0,"description":"Tokens for the series and the history parts, a baseline each."},"tokens":{"type":"integer","minimum":0,"description":"The whole: what the run takes."}},"required":["entities","report","position","baseline","tokens"],"description":"What the run costs, and what it was priced on."},"charged":{"type":"integer","minimum":0,"description":"Tokens saving it took. Left out when it took none."}},"required":["data"],"description":"A saved report: its query, its latest answer and its runs, each saying what moved."},"example":{"data":{"id":"rp_4kXv9TbQ2mLc7HsR","label":"Care homes in Kent","layers":["cqc"],"createdAt":"2026-10-30T09:15:00.000Z","lastRun":"2026-10-30T09:15:00.000Z","moved":false,"movedAt":null,"request":{"level":"premises","layers":["cqc"],"conditions":[{"field":"cqc.careHome","operator":"equals","value":"Y"}],"scope":{"area":{"localAuthority":"Kent"}},"groupBy":["cqc.rating"],"measures":[{"count":true}],"limit":100},"alert":{"count":3,"points":5},"latest":{"data":{"total":192,"overall":{"withheld":false,"measures":[{"withValue":192,"withoutValue":0,"count":192}]},"legend":[{"kind":"count","field":null,"label":"Count"}],"groups":[{"key":{"cqc.rating":"Good"},"count":141,"measures":[{"withValue":141,"withoutValue":0,"count":141}]},{"key":{"cqc.rating":"Requires Improvement"},"count":47,"measures":[{"withValue":47,"withoutValue":0,"count":47}]}],"withheld":[{"key":{"cqc.rating":"Inadequate"},"count":4}],"totalGroups":3,"moreGroups":false,"asAt":"2026-10-30","release":{"id":"b2026103004001a7f3e","at":"2026-10-30T06:12:08.000Z"}},"attributions":[{"layer":"cqc","text":"Contains Care Quality Commission data. Not endorsed by the Care Quality Commission.","url":"https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/"}],"notices":["Not endorsed by the Care Quality Commission."],"currency":[]},"runs":[{"release":{"id":"b2026103004001a7f3e","at":"2026-10-30T06:12:08.000Z"},"ranAt":"2026-10-30T09:15:00.000Z","total":192,"moved":false,"moves":[]}]}}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`, `INVALID_JSON`, `CONDITIONS_INVALID`, `VIA_NOT_CONNECTED`, `STATS_INVALID`, `LICENCE_REFUSED`, `SCOPE_UNAVAILABLE`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"},"INVALID_JSON":{"$ref":"#/components/examples/INVALID_JSON"},"CONDITIONS_INVALID":{"$ref":"#/components/examples/CONDITIONS_INVALID"},"VIA_NOT_CONNECTED":{"$ref":"#/components/examples/VIA_NOT_CONNECTED"},"STATS_INVALID":{"$ref":"#/components/examples/STATS_INVALID"},"LICENCE_REFUSED":{"$ref":"#/components/examples/LICENCE_REFUSED"},"SCOPE_UNAVAILABLE":{"$ref":"#/components/examples/SCOPE_UNAVAILABLE"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough tokens: `TOKENS_EXHAUSTED`.","content":{"application/json":{"examples":{"TOKENS_EXHAUSTED":{"$ref":"#/components/examples/TOKENS_EXHAUSTED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_REQUIRED`, `LAYER_NOT_SUBSCRIBED`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_REQUIRED":{"$ref":"#/components/examples/CONSUMER_REQUIRED"},"LAYER_NOT_SUBSCRIBED":{"$ref":"#/components/examples/LAYER_NOT_SUBSCRIBED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found: `NOT_FOUND`.","content":{"application/json":{"examples":{"NOT_FOUND":{"$ref":"#/components/examples/NOT_FOUND"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The body is too large: `PAYLOAD_TOO_LARGE`.","content":{"application/json":{"examples":{"PAYLOAD_TOO_LARGE":{"$ref":"#/components/examples/PAYLOAD_TOO_LARGE"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Cannot be answered as asked: `STATS_TIMEOUT`, `STATS_TOO_LARGE`, `NO_AREA`, `TOO_MANY_REPORTS`, `REPORT_TOO_LARGE`.","content":{"application/json":{"examples":{"STATS_TIMEOUT":{"$ref":"#/components/examples/STATS_TIMEOUT"},"STATS_TOO_LARGE":{"$ref":"#/components/examples/STATS_TOO_LARGE"},"NO_AREA":{"$ref":"#/components/examples/NO_AREA"},"TOO_MANY_REPORTS":{"$ref":"#/components/examples/TOO_MANY_REPORTS"},"REPORT_TOO_LARGE":{"$ref":"#/components/examples/REPORT_TOO_LARGE"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`, `TOO_MANY_GROUPS`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"},"TOO_MANY_GROUPS":{"$ref":"#/components/examples/TOO_MANY_GROUPS"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable: `GEOGRAPHY_UNAVAILABLE`, `NOT_READY`.","content":{"application/json":{"examples":{"GEOGRAPHY_UNAVAILABLE":{"$ref":"#/components/examples/GEOGRAPHY_UNAVAILABLE"},"NOT_READY":{"$ref":"#/components/examples/NOT_READY"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","INVALID_JSON","PAYLOAD_TOO_LARGE","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_REQUIRED","LAYER_NOT_SUBSCRIBED","CONDITIONS_INVALID","VIA_NOT_CONNECTED","STATS_INVALID","LICENCE_REFUSED","SCOPE_UNAVAILABLE","NOT_FOUND","TOO_MANY_GROUPS","STATS_TIMEOUT","STATS_TOO_LARGE","NO_AREA","TOKENS_EXHAUSTED","GEOGRAPHY_UNAVAILABLE","NOT_READY","TOO_MANY_REPORTS","REPORT_TOO_LARGE"]},"get":{"operationId":"listReports","summary":"This consumer's saved reports, the most recently moved first","description":"This consumer's saved reports, the most recently moved first, without their figures. `moved=true` lists only those whose latest run moved. Read one with `GET /v1/reports/{reportId}`.\n\n**Cost**: see [pricing](https://atlas.oromiq.com/pricing/).\n\n**Limits**: 50 a page by default, at most 100. Follow `next` with `cursor`.\n\n**Called by** a consumer: the client key with `x-atlas-consumer` naming one of its consumers, or a consumer key where the account allows them. The client alone is refused with `CONSUMER_REQUIRED`.\n\n**Your duties**: Show `attributions`, `notices` and `currency` wherever you show the figures, and show `withValue` beside every percentage so a figure is never read as covering more entities than it does.","tags":["Reports"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"type":"string","enum":["true","false"],"description":"true: only the reports whose latest run moved."},"required":false,"description":"true: only the reports whose latest run moved.","name":"moved","in":"query","example":"true"},{"schema":{"$ref":"#/components/schemas/Cursor"},"required":false,"description":"An opaque page token: send back the `next` value of the previous page. Leave out for the first page.","name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":50,"description":"Reports per page, at most 100. 50 when left out."},"required":false,"description":"Reports per page, at most 100. 50 when left out.","name":"limit","in":"query","example":2},{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","example":"cn_8fHq2LmNcV0pXyT3rW6aZe"},"required":false,"description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","name":"x-atlas-consumer","in":"header"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SavedReport"},"description":"A page of saved reports."},"next":{"type":"string","nullable":true,"minLength":1,"maxLength":200,"description":"The cursor for the next page, or null on the last."}},"required":["data","next"],"description":"This consumer's saved reports, the most recently moved first."},"example":{"data":[{"id":"rp_4kXv9TbQ2mLc7HsR","label":"Care homes in Kent","layers":["cqc"],"createdAt":"2026-10-12T09:15:00.000Z","lastRun":"2026-10-30T06:13:02.000Z","moved":true,"movedAt":"2026-10-30T06:13:02.000Z"}],"next":null}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_REQUIRED`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_REQUIRED":{"$ref":"#/components/examples/CONSUMER_REQUIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_REQUIRED"]}},"/v1/reports/{reportId}":{"get":{"operationId":"getReport","summary":"A saved report: its latest answer and its runs, each saying what moved","description":"One saved report: its query, its `alert`, its `latest` answer (as `POST /v1/stats` returns one, with attribution lines, notices and currency) and its `runs`, newest first. Each run says how many entities it found (`total`), whether anything moved, and lists its `moves`, largest first: the group (`key`, null for the whole), the measure (its index in `measures`, -1 for the group's size), `what` moved, its `unit` and the values `from` and `to`. A group reaching 5 entities or falling under 5 is always a move. A run that could not give figures says why in `error`. Readable only while the report's layers are all still subscribed; otherwise `LAYER_NOT_SUBSCRIBED`.\n\n**Cost**: see [pricing](https://atlas.oromiq.com/pricing/).\n\n**Limits**: the last 60 runs, and at most 200 moves a run.\n\n**Called by** a consumer: the client key with `x-atlas-consumer` naming one of its consumers, or a consumer key where the account allows them. The client alone is refused with `CONSUMER_REQUIRED`.\n\n**Your duties**: Show `attributions`, `notices` and `currency` wherever you show the figures, and show `withValue` beside every percentage so a figure is never read as covering more entities than it does.","tags":["Reports"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"type":"string","pattern":"^rp_[A-Za-z0-9_-]{12,40}$","description":"A saved report's id, rp_ and a random part."},"required":true,"description":"A saved report's id, rp_ and a random part.","name":"reportId","in":"path","example":"rp_4kXv9TbQ2mLc7HsR"},{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","example":"cn_8fHq2LmNcV0pXyT3rW6aZe"},"required":false,"description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","name":"x-atlas-consumer","in":"header"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","pattern":"^rp_[A-Za-z0-9_-]{12,40}$","description":"A saved report's id, rp_ and a random part."},"label":{"type":"string","nullable":true,"description":"The name given to it, or null."},"layers":{"type":"array","items":{"$ref":"#/components/schemas/LayerKey"},"description":"The layers the query reads."},"createdAt":{"allOf":[{"$ref":"#/components/schemas/IsoDateTime"},{"description":"When it was saved."}]},"lastRun":{"type":"string","nullable":true,"format":"date-time","description":"When it last ran, on the latest release."},"moved":{"type":"boolean","description":"True when its latest run moved."},"movedAt":{"type":"string","nullable":true,"format":"date-time","description":"When a run last moved."},"request":{"allOf":[{"$ref":"#/components/schemas/StatsRequest"},{"description":"The query as it was saved."}]},"alert":{"$ref":"#/components/schemas/ReportAlert"},"latest":{"type":"object","nullable":true,"properties":{"data":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"description":"How many entities the conditions and the scope found in all."},"overall":{"type":"object","properties":{"measures":{"type":"array","items":{"$ref":"#/components/schemas/StatsResult"},"description":"One result per measure, in the order asked for. Left out when withheld."},"withheld":{"type":"boolean","description":"True when the whole is under 5: its measures are withheld."}},"required":["withheld"],"description":"Every measure over all the entities found, before grouping."},"legend":{"type":"array","items":{"$ref":"#/components/schemas/StatsLegend"},"description":"One entry per measure asked for, in the same order: what each measure is."},"groups":{"type":"array","items":{"$ref":"#/components/schemas/StatsGroup"},"description":"The groups of 5 or more, in the sort's order, up to `limit`. Empty with no groupBy."},"withheld":{"type":"array","items":{"$ref":"#/components/schemas/StatsWithheld"},"description":"The groups under 5, largest first."},"totalGroups":{"type":"integer","minimum":0,"description":"Groups in all, the withheld among them."},"moreGroups":{"type":"boolean","description":"True when there were more groups of 5 or more than `limit` allowed."},"subject":{"type":"object","properties":{"entityId":{"allOf":[{"$ref":"#/components/schemas/EntityId"},{"description":"The subject's entity id. An id that has merged into another gives the id it became."}]},"found":{"type":"boolean","description":"True when the subject is among the entities measured."}},"required":["entityId","found"],"description":"The subject, with subject."},"scoped":{"type":"object","properties":{"kind":{"type":"string","enum":["related","savedSearch","holdings"],"description":"Which scope named them: related, savedSearch or holdings."},"entities":{"type":"integer","minimum":0,"description":"The entities the scope named, before the conditions."},"truncated":{"type":"boolean","description":"For related: true when the network ran past 1,000 entities and the rest were left out."}},"required":["kind","entities","truncated"],"description":"For a scope that names entities: how many it named."},"seriesNote":{"type":"string","description":"With series: why a measure carries none, where one does not."},"asAt":{"allOf":[{"$ref":"#/components/schemas/IsoDate"},{"description":"The day the figures are as at: the asAt sent, else the day the release went live."}]},"release":{"allOf":[{"$ref":"#/components/schemas/Release"},{"description":"The release the figures come from."}]}},"required":["total","overall","legend","groups","withheld","totalGroups","moreGroups","asAt","release"],"description":"The figures: the whole, the legend and the groups."},"attributions":{"type":"array","items":{"$ref":"#/components/schemas/Attribution"},"description":"The attribution line of every layer in scope, to show wherever the figures are shown."},"notices":{"type":"array","items":{"type":"string"},"description":"What a licence asks be said with the figures: the CQC's non-endorsement, among others."},"currency":{"type":"array","items":{"$ref":"#/components/schemas/LayerCurrency"},"description":"How current each layer with a currency duty is, for every such layer in scope."},"cost":{"type":"object","properties":{"entities":{"type":"integer","minimum":0,"description":"The entities in scope the price was worked out on."},"report":{"type":"integer","minimum":0,"description":"Tokens for the run: the report price, plus the price per 1,000 entities in scope, rounded up, up to the most a run takes."},"position":{"type":"integer","minimum":0,"description":"Tokens for the subject, where the query names one."},"baseline":{"type":"integer","minimum":0,"description":"Tokens for the series and the history parts, a baseline each."},"tokens":{"type":"integer","minimum":0,"description":"The whole: what the run takes."}},"required":["entities","report","position","baseline","tokens"],"description":"What the run costs, and what it was priced on."},"charged":{"type":"integer","minimum":0,"description":"Tokens this answer took. Left out when it took none."}},"required":["data","attributions","notices","currency"],"description":"The latest run's figures, as `POST /v1/stats` returns them. Null before any run."},"runs":{"type":"array","items":{"$ref":"#/components/schemas/ReportRun"},"description":"Its runs, newest first, at most 60."}},"required":["id","label","layers","createdAt","lastRun","moved","movedAt","request","alert","latest","runs"],"description":"A saved report, without its figures."},"cost":{"type":"object","properties":{"entities":{"type":"integer","minimum":0,"description":"The entities in scope the price was worked out on."},"report":{"type":"integer","minimum":0,"description":"Tokens for the run: the report price, plus the price per 1,000 entities in scope, rounded up, up to the most a run takes."},"position":{"type":"integer","minimum":0,"description":"Tokens for the subject, where the query names one."},"baseline":{"type":"integer","minimum":0,"description":"Tokens for the series and the history parts, a baseline each."},"tokens":{"type":"integer","minimum":0,"description":"The whole: what the run takes."}},"required":["entities","report","position","baseline","tokens"],"description":"What the run costs, and what it was priced on."},"charged":{"type":"integer","minimum":0,"description":"Tokens saving it took. Left out when it took none."}},"required":["data"],"description":"A saved report: its query, its latest answer and its runs, each saying what moved."},"example":{"data":{"id":"rp_4kXv9TbQ2mLc7HsR","label":"Care homes in Kent","layers":["cqc"],"createdAt":"2026-10-12T09:15:00.000Z","lastRun":"2026-10-30T06:13:02.000Z","moved":true,"movedAt":"2026-10-30T06:13:02.000Z","request":{"level":"premises","layers":["cqc"],"conditions":[{"field":"cqc.careHome","operator":"equals","value":"Y"}],"groupBy":[],"measures":[{"count":true}],"limit":100},"alert":{"count":3,"points":5},"latest":{"data":{"total":195,"overall":{"withheld":false,"measures":[{"withValue":195,"withoutValue":0,"count":195}]},"legend":[{"kind":"count","field":null,"label":"Count"}],"groups":[],"withheld":[],"totalGroups":0,"moreGroups":false,"asAt":"2026-10-30","release":{"id":"b2026103004001a7f3e","at":"2026-10-30T06:12:08.000Z"}},"attributions":[{"layer":"cqc","text":"Contains Care Quality Commission data. Not endorsed by the Care Quality Commission.","url":"https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/"}],"notices":["Not endorsed by the Care Quality Commission."],"currency":[]},"runs":[{"release":{"id":"b2026103004001a7f3e","at":"2026-10-30T06:12:08.000Z"},"ranAt":"2026-10-30T06:13:02.000Z","total":195,"moved":true,"moves":[{"key":null,"measure":-1,"what":"count","unit":"count","from":192,"to":195}]}]}}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_REQUIRED`, `LAYER_NOT_SUBSCRIBED`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_REQUIRED":{"$ref":"#/components/examples/CONSUMER_REQUIRED"},"LAYER_NOT_SUBSCRIBED":{"$ref":"#/components/examples/LAYER_NOT_SUBSCRIBED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found: `REPORT_NOT_FOUND`.","content":{"application/json":{"examples":{"REPORT_NOT_FOUND":{"$ref":"#/components/examples/REPORT_NOT_FOUND"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_REQUIRED","REPORT_NOT_FOUND","LAYER_NOT_SUBSCRIBED"]},"delete":{"operationId":"deleteReport","summary":"Delete a saved report and its runs","description":"Deletes a saved report and its runs. A consumer keeps at most 50 reports.\n\n**Cost**: see [pricing](https://atlas.oromiq.com/pricing/).\n\n**Called by** a consumer: the client key with `x-atlas-consumer` naming one of its consumers, or a consumer key where the account allows them. The client alone is refused with `CONSUMER_REQUIRED`.\n\n**Your duties**: Show `attributions`, `notices` and `currency` wherever you show the figures, and show `withValue` beside every percentage so a figure is never read as covering more entities than it does.","tags":["Reports"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"type":"string","pattern":"^rp_[A-Za-z0-9_-]{12,40}$","description":"A saved report's id, rp_ and a random part."},"required":true,"description":"A saved report's id, rp_ and a random part.","name":"reportId","in":"path","example":"rp_4kXv9TbQ2mLc7HsR"},{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","example":"cn_8fHq2LmNcV0pXyT3rW6aZe"},"required":false,"description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","name":"x-atlas-consumer","in":"header"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"deleted":{"type":"boolean","enum":[true],"description":"True: the report and its runs are gone."}},"required":["deleted"],"description":"Confirms the deletion."}},"required":["data"]},"example":{"data":{"deleted":true}}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_REQUIRED`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_REQUIRED":{"$ref":"#/components/examples/CONSUMER_REQUIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found: `REPORT_NOT_FOUND`.","content":{"application/json":{"examples":{"REPORT_NOT_FOUND":{"$ref":"#/components/examples/REPORT_NOT_FOUND"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_REQUIRED","REPORT_NOT_FOUND"]}},"/v1/baselines/{baselineKey}":{"get":{"operationId":"baseline","summary":"A cohort baseline as a time series","description":"A benchmarked fact measured across a group of entities, as a daily series: the share of care homes in a region holding each rating, for one. Figures are totals over the group, never one entity's.\n\n- `baselineKey` is a benchmarked fact's catalogue key, such as `cqc.rating` or `cqc.beds`. A key that is not benchmarked answers `CONDITIONS_INVALID`, whose message lists the facts that are.\n- `cohort` is who is measured: `all`, `region:<name>`, `localAuthority:<name>`, or `<fact key>:<value>`, such as `cqc.serviceType:Care home service with nursing`. A cohort with nothing measured answers an empty series.\n- Each point gives `count`, how many entities were measured, and `metrics`. A cohort with fewer than 5 entities gives its `count` with empty `metrics`.\n- `kind` says how to read `metrics`: a distribution gives `pct.<option>` and `count.<option>`; a mean gives `mean`, `median`, `p25`, `p75`, `min`, `max` and `stddev`; a share gives `pct`.\n\n`charged` says what the call spent.\n\n**Cost**: see [pricing](https://atlas.oromiq.com/pricing/).\n\n**Limits**: the consumer must be subscribed to the layer the key names (`cqc.rating` reads `cqc`), otherwise `LAYER_NOT_SUBSCRIBED` with nothing charged.\n\n**Called by** a consumer: the client key with `x-atlas-consumer` naming one of its consumers, or a consumer key where the account allows them. The client alone is refused with `CONSUMER_REQUIRED`.\n\n**Your duties**: Show each layer's attribution line wherever you show the figures.","tags":["Benchmarks"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":80,"description":"A benchmarked fact, by its catalogue key: cqc.rating, gender_pay_gap.medianHourlyGapPercent."},"required":true,"description":"A benchmarked fact, by its catalogue key: cqc.rating, gender_pay_gap.medianHourlyGapPercent.","name":"baselineKey","in":"path","example":"cqc.rating"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Who is measured. all is the whole layer. region:<name> and localAuthority:<name> are an area. <fact key>:<value> is a cohort by another fact of the layer, such as cqc.serviceType:Care home service with nursing. The cohorts a fact offers are in its catalogue entry's benchmark."},"required":true,"description":"Who is measured. all is the whole layer. region:<name> and localAuthority:<name> are an area. <fact key>:<value> is a cohort by another fact of the layer, such as cqc.serviceType:Care home service with nursing. The cohorts a fact offers are in its catalogue entry's benchmark.","name":"cohort","in":"query","example":"region:South East"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Only points on or after this date."},"required":false,"description":"Only points on or after this date.","name":"from","in":"query","example":"2026-10-28"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Only points on or before this date."},"required":false,"description":"Only points on or before this date.","name":"to","in":"query","example":"2026-10-29"},{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","example":"cn_8fHq2LmNcV0pXyT3rW6aZe"},"required":false,"description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","name":"x-atlas-consumer","in":"header"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"baselineKey":{"type":"string","description":"The fact measured, by its catalogue key."},"cohort":{"type":"string","description":"The cohort measured, as asked for."},"kind":{"type":"string","enum":["distribution","mean","share"],"description":"How the fact is measured: distribution for a choice, mean for a number, share for a yes or no."},"series":{"type":"array","items":{"type":"object","properties":{"at":{"allOf":[{"$ref":"#/components/schemas/IsoDate"},{"description":"The date of the measurement."}]},"count":{"type":"integer","minimum":0,"description":"How many entities were measured."},"metrics":{"type":"object","additionalProperties":{"type":"number"},"description":"The figures. For distribution, `pct.<option>` is the percent of the cohort on each option and `count.<option>` the count. For mean: mean, median, p25, p75, min, max and stddev. For share, `pct` is the percent with the value."}},"required":["at","count","metrics"]},"description":"The measurements over time, oldest first."}},"required":["baselineKey","cohort","kind","series"],"description":"The baseline asked for, as a series over time."},"charged":{"type":"integer","minimum":0,"description":"Tokens this call took."}},"required":["data"]},"example":{"data":{"baselineKey":"cqc.rating","cohort":"region:South East","kind":"distribution","series":[{"at":"2026-10-28","count":998,"metrics":{"pct.Outstanding":4.1,"pct.Good":76.4,"pct.Requires Improvement":16.2,"pct.Inadequate":1.3,"pct.Insufficient evidence to rate":2,"count.Outstanding":41,"count.Good":762,"count.Requires Improvement":162,"count.Inadequate":13,"count.Insufficient evidence to rate":20}},{"at":"2026-10-29","count":998,"metrics":{"pct.Outstanding":4.1,"pct.Good":76.4,"pct.Requires Improvement":16.2,"pct.Inadequate":1.3,"pct.Insufficient evidence to rate":2,"count.Outstanding":41,"count.Good":762,"count.Requires Improvement":162,"count.Inadequate":13,"count.Insufficient evidence to rate":20}}]},"charged":20}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`, `CONDITIONS_INVALID`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"},"CONDITIONS_INVALID":{"$ref":"#/components/examples/CONDITIONS_INVALID"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough tokens: `TOKENS_EXHAUSTED`.","content":{"application/json":{"examples":{"TOKENS_EXHAUSTED":{"$ref":"#/components/examples/TOKENS_EXHAUSTED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_REQUIRED`, `LAYER_NOT_SUBSCRIBED`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_REQUIRED":{"$ref":"#/components/examples/CONSUMER_REQUIRED"},"LAYER_NOT_SUBSCRIBED":{"$ref":"#/components/examples/LAYER_NOT_SUBSCRIBED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable: `NOT_READY`.","content":{"application/json":{"examples":{"NOT_READY":{"$ref":"#/components/examples/NOT_READY"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_REQUIRED","CONDITIONS_INVALID","LAYER_NOT_SUBSCRIBED","TOKENS_EXHAUSTED","NOT_READY"]}},"/v1/positions":{"post":{"operationId":"position","summary":"Where an entity or portfolio stands against a cohort","description":"Where one entity stands against a cohort on a benchmarked fact: `above` means better than most of the cohort, `below` means worse, and `inline` means much the same. The answer carries the entity's `value`, how far it is from the cohort (`delta`), the cohort's `count` and `metrics`, and its `trajectory` over the last year.\n\n- `delta` for a choice, such as a rating, is the percent of the cohort on worse options less the percent on better ones. For a number, it is the value less the cohort mean. Where lower is better, above and below follow the fact's better direction.\n- `position` is `unknown` when the entity has no value for the fact, its option has no place in the order (the CQC's Insufficient evidence to rate), or the cohort has fewer than 5 entities, which shows its `count` alone.\n- `cohort` takes the same values as `GET /v1/baselines/{baselineKey}`.\n\n`charged` says what the call spent.\n\n**Cost**: see [pricing](https://atlas.oromiq.com/pricing/).\n\n**Limits**: one entity and one fact a call. The consumer must be subscribed to the layer the key names, otherwise `LAYER_NOT_SUBSCRIBED` with nothing charged. An entity the fact's layer does not know answers `NOT_FOUND`.\n\n**Called by** a consumer: the client key with `x-atlas-consumer` naming one of its consumers, or a consumer key where the account allows them. The client alone is refused with `CONSUMER_REQUIRED`.\n\n**Your duties**: Show each layer's attribution line wherever you show the figures.","tags":["Benchmarks"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","example":"cn_8fHq2LmNcV0pXyT3rW6aZe"},"required":false,"description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","name":"x-atlas-consumer","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"entityId":{"$ref":"#/components/schemas/EntityId"},"baselineKey":{"type":"string","minLength":1,"maxLength":80,"description":"A benchmarked fact, by its catalogue key: cqc.rating, gender_pay_gap.medianHourlyGapPercent."},"cohort":{"type":"string","minLength":1,"maxLength":200,"description":"As for a baseline: all, region:<name>, localAuthority:<name> or <fact key>:<value>."}},"required":["entityId","baselineKey","cohort"]},"example":{"entityId":"prm_pdFPkhx7RuGEeFl8Q1pP","baselineKey":"cqc.rating","cohort":"region:South East"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"position":{"type":"string","enum":["above","inline","below","unknown"],"description":"Where the entity stands against the cohort: above means better than most of the cohort, below means worse, inline means much the same. unknown when the entity has no value or the cohort has fewer than 5 entities."},"delta":{"type":"number","nullable":true,"description":"How far the entity is from the cohort. For a choice, the percent of the cohort on worse options less the percent on better ones. For a number, the value less the cohort mean."},"trajectory":{"type":"string","enum":["improving","steady","declining","unknown"],"description":"The entity's own movement over the last year, read with the fact's better direction."},"at":{"allOf":[{"$ref":"#/components/schemas/IsoDate"},{"description":"The date the position is measured at."}]},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"nullable":true}],"description":"The entity's value."},"cohort":{"type":"object","properties":{"count":{"type":"integer","minimum":0,"description":"How many entities are in the cohort."},"metrics":{"type":"object","additionalProperties":{"type":"number"},"description":"The cohort's figures, under the same keys as a baseline."}},"required":["count","metrics"],"description":"The cohort in the latest release."}},"required":["position","delta","trajectory","at","value","cohort"],"description":"Where the entity stands against its cohort."},"charged":{"type":"integer","minimum":0,"description":"Tokens this call took."}},"required":["data"]},"example":{"data":{"position":"above","delta":15.4,"trajectory":"steady","at":"2026-10-29","value":"Good","cohort":{"count":998,"metrics":{"pct.Outstanding":4.1,"pct.Good":76.4,"pct.Requires Improvement":16.2,"pct.Inadequate":1.3,"pct.Insufficient evidence to rate":2,"count.Outstanding":41,"count.Good":762,"count.Requires Improvement":162,"count.Inadequate":13,"count.Insufficient evidence to rate":20}}},"charged":5}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`, `INVALID_JSON`, `CONDITIONS_INVALID`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"},"INVALID_JSON":{"$ref":"#/components/examples/INVALID_JSON"},"CONDITIONS_INVALID":{"$ref":"#/components/examples/CONDITIONS_INVALID"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough tokens: `TOKENS_EXHAUSTED`.","content":{"application/json":{"examples":{"TOKENS_EXHAUSTED":{"$ref":"#/components/examples/TOKENS_EXHAUSTED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_REQUIRED`, `LAYER_NOT_SUBSCRIBED`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_REQUIRED":{"$ref":"#/components/examples/CONSUMER_REQUIRED"},"LAYER_NOT_SUBSCRIBED":{"$ref":"#/components/examples/LAYER_NOT_SUBSCRIBED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found: `NOT_FOUND`.","content":{"application/json":{"examples":{"NOT_FOUND":{"$ref":"#/components/examples/NOT_FOUND"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The body is too large: `PAYLOAD_TOO_LARGE`.","content":{"application/json":{"examples":{"PAYLOAD_TOO_LARGE":{"$ref":"#/components/examples/PAYLOAD_TOO_LARGE"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable: `NOT_READY`.","content":{"application/json":{"examples":{"NOT_READY":{"$ref":"#/components/examples/NOT_READY"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","INVALID_JSON","PAYLOAD_TOO_LARGE","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_REQUIRED","CONDITIONS_INVALID","LAYER_NOT_SUBSCRIBED","NOT_FOUND","TOKENS_EXHAUSTED","NOT_READY"]}},"/v1/account":{"get":{"operationId":"getAccount","summary":"How this client may call Atlas: whether its consumers may hold keys of their own","description":"How this client may call Atlas: whether its consumers may hold keys of their own, and which are billed at a custom price.\n\n- **`consumerKeys.allowed`**: when false (the default), no consumer key is made or accepted: call with the client key and name the consumer in `x-atlas-consumer`. Consumer keys are turned on on request.\n- **`customPrices`**: the consumers billed at an agreed price in place of their plan's. Their tokens are still counted and limited by their plan.\n\n**Cost**: see [pricing](https://atlas.oromiq.com/pricing/).\n\n**Called by** the client itself: the client key with no `x-atlas-consumer` header. A consumer is refused with `CONSUMER_CANNOT_MANAGE`.","tags":["Account"],"security":[{"clientKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"clientId":{"$ref":"#/components/schemas/ClientId"},"consumerKeys":{"type":"object","properties":{"allowed":{"type":"boolean","description":"Whether this client's consumers may hold keys of their own. When false, consumer keys are neither made nor accepted: call from your own servers with the client key and name the consumer in x-atlas-consumer. Atlas sets it on request."}},"required":["allowed"],"description":"Whether consumers may hold keys of their own."},"customPrices":{"type":"array","items":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"A consumer inside a client: a tenant the client manages. Issued by Atlas; the client keeps its own mapping."},"description":"The consumers Atlas bills at a custom price agreed with the client."}},"required":["clientId","consumerKeys"],"description":"The account."}},"required":["data"],"description":"How this client may call Atlas."},"example":{"data":{"clientId":"cl_Q7mVt2KpLx9RzW4a","consumerKeys":{"allowed":false},"customPrices":[]}}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_CANNOT_MANAGE`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_CANNOT_MANAGE":{"$ref":"#/components/examples/CONSUMER_CANNOT_MANAGE"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_CANNOT_MANAGE"]}},"/v1/plan":{"get":{"operationId":"getPlan","summary":"The client's plan, packs, pool of tokens and the way it pays","description":"Your plan: what every consumer of the account draws on. The plan is the account's, not a consumer's: its tokens are one pool every consumer spends from, its packs give every consumer their layers, and its price is on the account's bill.\n\n- **`tokens.month`**: the pool this month: the allowance, what was granted or bought, what every consumer has spent, and what is left. On an annual plan `tokens.year` is the year's pool, twelve months in one.\n- **`tenants`**: how many consumers the plan includes, how many made a charged call this month, and what each beyond those included costs a month.\n- **`packs`**: the core layers every plan has, the packs you have switched on, how many the plan includes, and what each beyond them costs a month. `PUT /v1/plan/packs` changes them.\n- **`overage`**: off by default, so the allowance is a hard limit. On, calls past the allowance are charged at the top-up rate up to the cap. `PUT /v1/plan/overage` sets it.\n- **`sandbox`**: true on the sandbox plan, where every answer carries the `x-atlas-sandbox` header. `POST /v1/plan/upgrade` moves to a paid plan.\n\n**Cost**: nothing.\n\n**Called by** a consumer: the client key with `x-atlas-consumer` naming one of its consumers, or a consumer key where the account allows them. The client alone is refused with `CONSUMER_REQUIRED`.","tags":["Account"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","example":"cn_8fHq2LmNcV0pXyT3rW6aZe"},"required":false,"description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","name":"x-atlas-consumer","in":"header"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ClientPlan"}},"required":["data"]},"example":{"data":{"tier":"starter","billing":"monthly","since":"2026-11-01T09:00:00.000Z","sandbox":false,"collection":"card","tenants":{"included":3,"active":2,"extraPence":2000},"packs":{"core":["companies_house","gazette","ico"],"chosen":["care_health"],"included":1,"extraPence":9900},"overage":{"enabled":false,"capPence":null,"pencePerToken":1.5},"tokens":{"month":{"allowance":30000,"granted":0,"toppedUp":0,"spent":1240,"balance":28760,"renewsAt":"2026-12-01T00:00:00.000Z"}}}}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_REQUIRED`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_REQUIRED":{"$ref":"#/components/examples/CONSUMER_REQUIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_REQUIRED"]}},"/v1/plan/packs":{"put":{"operationId":"setPlanPacks","summary":"Choose the layer packs the client has","description":"Choose the layer packs the account has. Core comes with every plan; each pack beyond those the plan includes costs its monthly price, on the account's bill from this month. Every consumer reads the packs' layers at once. A pack taken away stops its layers for every consumer; a saved search or report over them is refused until it is back.\n\n**Send**: `packs`, the pack keys, as `GET /v1/pricing` lists them. The answer is the plan as it stands.\n\n**Cost**: the packs beyond the plan's allowance, each month.\n\n**Called by** a consumer: the client key with `x-atlas-consumer` naming one of its consumers, or a consumer key where the account allows them. The client alone is refused with `CONSUMER_REQUIRED`.","tags":["Account"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","example":"cn_8fHq2LmNcV0pXyT3rW6aZe"},"required":false,"description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","name":"x-atlas-consumer","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"packs":{"type":"array","items":{"type":"string","minLength":1,"maxLength":40},"maxItems":20,"description":"The packs beyond core the client wants, by key, as GET /v1/pricing lists them. Those past the plan's allowance are billed monthly."}},"required":["packs"],"description":"Which layer packs the client has."},"example":{"packs":["care_health","food"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ClientPlan"}},"required":["data"]},"example":{"data":{"tier":"starter","billing":"monthly","since":"2026-11-01T09:00:00.000Z","sandbox":false,"collection":"card","tenants":{"included":3,"active":2,"extraPence":2000},"packs":{"core":["companies_house","gazette","ico"],"chosen":["care_health","food"],"included":1,"extraPence":9900},"overage":{"enabled":false,"capPence":null,"pencePerToken":1.5},"tokens":{"month":{"allowance":30000,"granted":0,"toppedUp":0,"spent":1240,"balance":28760,"renewsAt":"2026-12-01T00:00:00.000Z"}}}}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`, `INVALID_JSON`, `PACK_NOT_FOUND`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"},"INVALID_JSON":{"$ref":"#/components/examples/INVALID_JSON"},"PACK_NOT_FOUND":{"$ref":"#/components/examples/PACK_NOT_FOUND"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_REQUIRED`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_REQUIRED":{"$ref":"#/components/examples/CONSUMER_REQUIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The body is too large: `PAYLOAD_TOO_LARGE`.","content":{"application/json":{"examples":{"PAYLOAD_TOO_LARGE":{"$ref":"#/components/examples/PAYLOAD_TOO_LARGE"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","INVALID_JSON","PAYLOAD_TOO_LARGE","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_REQUIRED","PACK_NOT_FOUND"]}},"/v1/plan/overage":{"put":{"operationId":"setPlanOverage","summary":"Turn overage on or off, with its cap","description":"Overage on or off. Off, the allowance is a hard limit: a call that would pass it is refused with `TOKENS_EXHAUSTED` and never billed. On, calls past the allowance are charged at the plan's top-up rate, up to `capPence` a month (or without limit when the cap is null), and the month's overage is a line on the bill. A consumer's own cap still holds. The sandbox plan has no overage.\n\n**Cost**: nothing to set; the overage itself at the top-up rate.\n\n**Called by** a consumer: the client key with `x-atlas-consumer` naming one of its consumers, or a consumer key where the account allows them. The client alone is refused with `CONSUMER_REQUIRED`.","tags":["Account"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","example":"cn_8fHq2LmNcV0pXyT3rW6aZe"},"required":false,"description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","name":"x-atlas-consumer","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean","description":"True to charge calls past the allowance at the top-up rate instead of refusing them."},"capPence":{"type":"integer","nullable":true,"minimum":0,"description":"The most overage a month may cost, in pence; null or left out for no cap."}},"required":["enabled"],"description":"Overage on or off, with its cap."},"example":{"enabled":true,"capPence":10000}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ClientPlan"}},"required":["data"]},"example":{"data":{"tier":"starter","billing":"monthly","since":"2026-11-01T09:00:00.000Z","sandbox":false,"collection":"card","tenants":{"included":3,"active":2,"extraPence":2000},"packs":{"core":["companies_house","gazette","ico"],"chosen":["care_health"],"included":1,"extraPence":9900},"overage":{"enabled":true,"capPence":10000,"pencePerToken":1.5},"tokens":{"month":{"allowance":30000,"granted":0,"toppedUp":0,"spent":1240,"balance":28760,"renewsAt":"2026-12-01T00:00:00.000Z"}}}}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`, `INVALID_JSON`, `TOPUP_NOT_OFFERED`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"},"INVALID_JSON":{"$ref":"#/components/examples/INVALID_JSON"},"TOPUP_NOT_OFFERED":{"$ref":"#/components/examples/TOPUP_NOT_OFFERED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_REQUIRED`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_REQUIRED":{"$ref":"#/components/examples/CONSUMER_REQUIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The body is too large: `PAYLOAD_TOO_LARGE`.","content":{"application/json":{"examples":{"PAYLOAD_TOO_LARGE":{"$ref":"#/components/examples/PAYLOAD_TOO_LARGE"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","INVALID_JSON","PAYLOAD_TOO_LARGE","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_REQUIRED","TOPUP_NOT_OFFERED"]}},"/v1/plan/upgrade":{"post":{"operationId":"upgradePlan","summary":"Move the client to another plan","description":"Move the account to another published plan, monthly or annual. From the sandbox, or to a dearer plan, the move is paid in advance: on an account paid by card, the plan's price is charged to the card on file, and when there is none the answer carries `checkoutUrl`, where a card is given, after which the move is made. An account paid by invoice moves at once and is invoiced. A move to a cheaper plan takes effect from next month.\n\n**Cost**: the new plan's price, in advance.\n\n**Called by** a consumer: the client key with `x-atlas-consumer` naming one of its consumers, or a consumer key where the account allows them. The client alone is refused with `CONSUMER_REQUIRED`.","tags":["Account"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","example":"cn_8fHq2LmNcV0pXyT3rW6aZe"},"required":false,"description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","name":"x-atlas-consumer","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"tier":{"type":"string","pattern":"^[a-z][a-z0-9-]{1,30}$","description":"The plan to move to: a published one."},"billing":{"type":"string","enum":["monthly","annual"],"description":"Monthly unless given."}},"required":["tier"],"description":"A move to another plan."},"example":{"tier":"growth"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"plan":{"type":"object","nullable":true,"properties":{"tier":{"type":"string","pattern":"^[a-z][a-z0-9-]{1,30}$","description":"A plan by name: sandbox, starter, growth, scale, platform or enterprise, or a bespoke plan made for the client. free and standard are retired: a consumer already on one keeps it, a new one cannot take it."},"billing":{"type":"string","enum":["monthly","annual"],"description":"How the plan is billed: a month at a time, or a year paid up front, which pools twelve months of tokens."},"since":{"allOf":[{"$ref":"#/components/schemas/IsoDateTime"},{"description":"When the client took this plan."}]},"sandbox":{"type":"boolean","description":"True on the sandbox plan: every answer carries the x-atlas-sandbox header, and the plan licenses no production use."},"collection":{"type":"string","enum":["card","invoice"],"description":"How the client pays: a card on file charged in advance, or an invoice."},"tenants":{"type":"object","properties":{"included":{"type":"integer","nullable":true,"description":"Consumers the plan includes; null for any number."},"active":{"type":"integer","description":"Consumers that made at least one charged call this month."},"extraPence":{"type":"number","nullable":true,"description":"The price a month of each active consumer beyond those included; null where none may be added."}},"required":["included","active","extraPence"],"description":"The consumers the plan includes, and what more cost."},"packs":{"type":"object","properties":{"core":{"type":"array","items":{"type":"string"},"description":"The core layers, in every plan."},"chosen":{"type":"array","items":{"type":"string"},"description":"The packs the client has switched on, by key."},"included":{"type":"integer","nullable":true,"description":"Packs beyond core the plan includes; null for every pack."},"extraPence":{"type":"number","description":"The price a month of each pack beyond those included."}},"required":["core","chosen","included","extraPence"],"description":"The layer packs: which the client has, and what more cost."},"overage":{"type":"object","properties":{"enabled":{"type":"boolean","description":"True when calls past the allowance are charged at the top-up rate instead of refused."},"capPence":{"type":"integer","nullable":true,"description":"The most overage a month may cost, in pence; null for no cap while enabled."},"pencePerToken":{"type":"number","description":"The top-up rate a token past the allowance is charged at."}},"required":["enabled","capPence","pencePerToken"],"description":"Overage: off by default, so the allowance is a hard limit."},"tokens":{"type":"object","properties":{"month":{"$ref":"#/components/schemas/TokenPool"},"year":{"type":"object","properties":{"allowance":{"type":"integer","nullable":true,"description":"The tokens the period gives; null when unlimited."},"granted":{"type":"integer","description":"Tokens added by hand this period."},"toppedUp":{"type":"integer","description":"Tokens bought this period."},"spent":{"type":"integer","description":"Tokens every consumer of the client spent this period."},"balance":{"type":"integer","nullable":true,"description":"What is left of the allowance, with what was granted and bought; null when unlimited."},"renewsAt":{"allOf":[{"$ref":"#/components/schemas/IsoDateTime"},{"description":"When the period renews."}]}},"required":["allowance","granted","toppedUp","spent","balance","renewsAt"],"description":"On an annual plan: the year the month sits in."}},"required":["month"],"description":"The client's pool, which every consumer draws on."},"discount":{"type":"object","properties":{"percent":{"type":"number","minimum":0,"maximum":100,"description":"The percent off the whole bill."},"until":{"type":"string","nullable":true,"pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"When the discount ends; null for no end."}},"required":["percent","until"],"description":"A discount agreed with Atlas on the whole bill."}},"required":["tier","billing","since","sandbox","collection","tenants","packs","overage","tokens"],"description":"The plan as it stands now; null when a card is needed first."},"checkoutUrl":{"type":"string","nullable":true,"format":"uri","description":"Where to give a card when the plan is paid by card and none is on file; the move is made once a card is given."}},"required":["plan","checkoutUrl"],"description":"What the move came to."}},"required":["data"],"description":"The plan after the move, or where to give a card first."},"example":{"data":{"plan":null,"checkoutUrl":"https://checkout.stripe.com/c/pay/cs_test_example"}}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`, `INVALID_JSON`, `TIER_NOT_AVAILABLE`, `TIER_RETIRED`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"},"INVALID_JSON":{"$ref":"#/components/examples/INVALID_JSON"},"TIER_NOT_AVAILABLE":{"$ref":"#/components/examples/TIER_NOT_AVAILABLE"},"TIER_RETIRED":{"$ref":"#/components/examples/TIER_RETIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_REQUIRED`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_REQUIRED":{"$ref":"#/components/examples/CONSUMER_REQUIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The body is too large: `PAYLOAD_TOO_LARGE`.","content":{"application/json":{"examples":{"PAYLOAD_TOO_LARGE":{"$ref":"#/components/examples/PAYLOAD_TOO_LARGE"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable: `NOT_CONFIGURED`.","content":{"application/json":{"examples":{"NOT_CONFIGURED":{"$ref":"#/components/examples/NOT_CONFIGURED"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","INVALID_JSON","PAYLOAD_TOO_LARGE","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_REQUIRED","TIER_NOT_AVAILABLE","TIER_RETIRED","NOT_CONFIGURED"]}},"/v1/account/key":{"post":{"operationId":"createClientKey","summary":"Make the client's key anew, shown once","description":"Your client key, made anew. The key is in the answer once and never shown again: store it now. Any key the account had before is revoked at the same moment, so a rotation hands over the new key first. Your servers call with it as a bearer token, naming the consumer in `x-atlas-consumer`.\n\n**Cost**: nothing.\n\n**Called by** a consumer: the client key with `x-atlas-consumer` naming one of its consumers, or a consumer key where the account allows them. The client alone is refused with `CONSUMER_REQUIRED`.","tags":["Account"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","example":"cn_8fHq2LmNcV0pXyT3rW6aZe"},"required":false,"description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","name":"x-atlas-consumer","in":"header"}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"token":{"type":"string","description":"The key, shown once and never again: store it now."},"prefix":{"type":"string","description":"Its first characters, by which it is listed."},"replaced":{"type":"boolean","description":"True when a key the client had before was revoked at the same moment."}},"required":["token","prefix","replaced"],"description":"The new key."}},"required":["data"],"description":"The client's key, made anew: any key it had before stops working at once."},"example":{"data":{"token":"atl_live_0123456789abcdef0123456789abcdef","prefix":"atl_live_0123","replaced":true}}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_REQUIRED`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_REQUIRED":{"$ref":"#/components/examples/CONSUMER_REQUIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_REQUIRED"]}},"/v1/consumers":{"get":{"operationId":"listConsumers","summary":"The consumers the client manages","description":"Every consumer of this client, oldest first, each with its label, status, plan, subscriptions, keys (the active one and any revoked, never the key itself) and any monthly token cap. A consumer is a party inside your account that reads data, such as a tenant, an environment or a customer of yours; keep the mapping from consumer id to your own ids. A label is yours to choose; never use your own id for the party as a label.\n\n**Cost**: see [pricing](https://atlas.oromiq.com/pricing/).\n\n**Called by** the client itself: the client key with no `x-atlas-consumer` header. A consumer is refused with `CONSUMER_CANNOT_MANAGE`.","tags":["Consumers"],"security":[{"clientKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Consumer"},"description":"The client's consumers, oldest first."}},"required":["data"]},"example":{"data":[{"consumerId":"cn_8fHq2LmNcV0pXyT3rW6aZe","label":"Northfield staging","status":"active","tier":"growth","createdAt":"2026-10-02T09:14:31.000Z","subscriptions":["companies_house","cqc","fsa"],"keys":[],"tokenCap":null,"customPrice":false},{"consumerId":"cn_Jd4sPq9Rk2VbN7wXcL1mFa","label":"Tenant 14","status":"suspended","tier":"starter","createdAt":"2026-10-09T13:40:05.000Z","subscriptions":["cqc"],"keys":[],"tokenCap":2000,"customPrice":false}]}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_CANNOT_MANAGE`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_CANNOT_MANAGE":{"$ref":"#/components/examples/CONSUMER_CANNOT_MANAGE"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_CANNOT_MANAGE"]},"post":{"operationId":"createConsumer","summary":"Make a consumer inside the client and get its id","description":"Makes a consumer inside this client and returns it with its new id. Each consumer draws on your plan's tokens up to its own cap, and has its own subscriptions, holdings and usage.\n\n- **`tier`**: leave it out, and the consumer is on your plan (`GET /v1/plan`). An account without a plan names a current one from `GET /v1/plans`.\n- **`subscriptions`** (optional) subscribes it to layers at once, beside the layers your packs already give it; change them with `PUT /v1/consumers/{consumerId}/subscriptions`.\n- **`label`** (optional, up to 120 characters) is what you call it, never your own id for the party.\n- The consumer has no key. Call for it with the client key and `x-atlas-consumer`, or, where your account allows consumer keys, make one with `POST /v1/consumers/{consumerId}/keys`.\n\nYour plan includes a number of consumers; one beyond them is billed at the plan's price for an extra consumer in the month it makes a charged call, or refused where the plan allows no more.\n\n**Cost**: see [pricing](https://atlas.oromiq.com/pricing/).\n\n**Called by** the client itself: the client key with no `x-atlas-consumer` header. A consumer is refused with `CONSUMER_CANNOT_MANAGE`.","tags":["Consumers"],"security":[{"clientKey":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":120,"description":"What you call the consumer, at most 120 characters. Never your own id for it."},"tier":{"type":"string","pattern":"^[a-z][a-z0-9-]{1,30}$","description":"The plan it is on. Leave it out under a client plan, which every consumer is on (since 0.40.0); otherwise required, and one that is offered to you and not retired."},"subscriptions":{"type":"array","items":{"$ref":"#/components/schemas/LayerKey"},"maxItems":30,"description":"Layers to subscribe it to at once; each must be one the client may read."}},"required":["label"]},"example":{"label":"Northfield staging","subscriptions":["companies_house","cqc","fsa"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Consumer"}},"required":["data"]},"example":{"data":{"consumerId":"cn_8fHq2LmNcV0pXyT3rW6aZe","label":"Northfield staging","status":"active","tier":"growth","createdAt":"2026-10-02T09:14:31.000Z","subscriptions":["companies_house","cqc","fsa"],"keys":[],"tokenCap":null,"customPrice":false}}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`, `INVALID_JSON`, `TIER_REQUIRED`, `TIER_NOT_AVAILABLE`, `TIER_RETIRED`, `TENANT_LIMIT_REACHED`, `LAYER_NOT_AVAILABLE`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"},"INVALID_JSON":{"$ref":"#/components/examples/INVALID_JSON"},"TIER_REQUIRED":{"$ref":"#/components/examples/TIER_REQUIRED"},"TIER_NOT_AVAILABLE":{"$ref":"#/components/examples/TIER_NOT_AVAILABLE"},"TIER_RETIRED":{"$ref":"#/components/examples/TIER_RETIRED"},"TENANT_LIMIT_REACHED":{"$ref":"#/components/examples/TENANT_LIMIT_REACHED"},"LAYER_NOT_AVAILABLE":{"$ref":"#/components/examples/LAYER_NOT_AVAILABLE"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_CANNOT_MANAGE`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_CANNOT_MANAGE":{"$ref":"#/components/examples/CONSUMER_CANNOT_MANAGE"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The body is too large: `PAYLOAD_TOO_LARGE`.","content":{"application/json":{"examples":{"PAYLOAD_TOO_LARGE":{"$ref":"#/components/examples/PAYLOAD_TOO_LARGE"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","INVALID_JSON","PAYLOAD_TOO_LARGE","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_CANNOT_MANAGE","TIER_REQUIRED","TIER_NOT_AVAILABLE","TIER_RETIRED","TENANT_LIMIT_REACHED","LAYER_NOT_AVAILABLE"]}},"/v1/consumers/{consumerId}":{"get":{"operationId":"getConsumer","summary":"One consumer: its label, status, tier and subscriptions","description":"One consumer of this client: its label, status, plan, subscriptions, keys (the active one and any revoked, never the key itself), any monthly token cap, and whether it is billed at a custom price. A consumer of another client returns `CONSUMER_NOT_FOUND`.\n\n**Cost**: see [pricing](https://atlas.oromiq.com/pricing/).\n\n**Called by** the client itself: the client key with no `x-atlas-consumer` header. A consumer is refused with `CONSUMER_CANNOT_MANAGE`.","tags":["Consumers"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"A consumer inside a client: a tenant the client manages. Issued by Atlas; the client keeps its own mapping."},"required":true,"description":"A consumer inside a client: a tenant the client manages. Issued by Atlas; the client keeps its own mapping.","name":"consumerId","in":"path","example":"cn_8fHq2LmNcV0pXyT3rW6aZe"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Consumer"}},"required":["data"]},"example":{"data":{"consumerId":"cn_8fHq2LmNcV0pXyT3rW6aZe","label":"Northfield staging","status":"active","tier":"growth","createdAt":"2026-10-02T09:14:31.000Z","subscriptions":["companies_house","cqc","fsa"],"keys":[{"keyId":"ckey_Tz8nQ2vLr5Ka","prefix":"ck_Xq7fK2pa","createdAt":"2026-10-21T08:02:11.000Z","createdBy":"api:cl_Q7mVt2KpLx9RzW4a","lastUsedAt":"2026-10-30T07:45:00.000Z","revokedAt":null,"expiresAt":"2027-04-30T00:00:00.000Z","allowedAddresses":["203.0.113.0/24"]},{"keyId":"ckey_Hm3pW9cYd1Fs","prefix":"ck_9bLm2Tqe","createdAt":"2026-10-02T09:15:02.000Z","createdBy":"api:cl_Q7mVt2KpLx9RzW4a","lastUsedAt":"2026-10-21T07:59:40.000Z","revokedAt":"2026-10-21T08:02:11.000Z","expiresAt":null,"allowedAddresses":[]}],"tokenCap":15000,"customPrice":false}}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_CANNOT_MANAGE`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_CANNOT_MANAGE":{"$ref":"#/components/examples/CONSUMER_CANNOT_MANAGE"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found: `CONSUMER_NOT_FOUND`.","content":{"application/json":{"examples":{"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_CANNOT_MANAGE"]},"put":{"operationId":"updateConsumer","summary":"Rename, suspend or resume a consumer","description":"Renames a consumer, suspends or resumes it, or sets its monthly token cap. Send only what changes.\n\n- **`status`**: `suspended` refuses every call the consumer makes (`CONSUMER_SUSPENDED`) until it is `active` again. Its holdings and saved searches are kept.\n- **`tokenCap`**: the most tokens it may spend in a month, at most its plan's allowance; `null` removes the cap. A call that would pass it is refused with `TOKENS_EXHAUSTED`.\n- **`label`**: up to 120 characters. The bill shows the new label from now on.\n\nSuspending a consumer does not take its plan off the month's bill.\n\n**Cost**: see [pricing](https://atlas.oromiq.com/pricing/).\n\n**Called by** the client itself: the client key with no `x-atlas-consumer` header. A consumer is refused with `CONSUMER_CANNOT_MANAGE`.","tags":["Consumers"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"A consumer inside a client: a tenant the client manages. Issued by Atlas; the client keeps its own mapping."},"required":true,"description":"A consumer inside a client: a tenant the client manages. Issued by Atlas; the client keeps its own mapping.","name":"consumerId","in":"path","example":"cn_8fHq2LmNcV0pXyT3rW6aZe"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":120,"description":"A new label, at most 120 characters."},"status":{"type":"string","enum":["active","suspended"],"description":"active, or suspended: a suspended consumer is refused on every call until resumed."},"tokenCap":{"type":"integer","nullable":true,"minimum":0,"description":"The most tokens the consumer may spend in a month, at most its tier's allowance; null removes the cap. A read that would pass it is refused with TOKENS_EXHAUSTED, as at the allowance."}},"description":"A suspended consumer is refused on every call until resumed."},"example":{"tokenCap":15000}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Consumer"}},"required":["data"]},"example":{"data":{"consumerId":"cn_8fHq2LmNcV0pXyT3rW6aZe","label":"Northfield staging","status":"active","tier":"growth","createdAt":"2026-10-02T09:14:31.000Z","subscriptions":["companies_house","cqc","fsa"],"keys":[{"keyId":"ckey_Tz8nQ2vLr5Ka","prefix":"ck_Xq7fK2pa","createdAt":"2026-10-21T08:02:11.000Z","createdBy":"api:cl_Q7mVt2KpLx9RzW4a","lastUsedAt":"2026-10-30T07:45:00.000Z","revokedAt":null,"expiresAt":"2027-04-30T00:00:00.000Z","allowedAddresses":["203.0.113.0/24"]}],"tokenCap":15000,"customPrice":false}}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`, `INVALID_JSON`, `TOKEN_CAP_ABOVE_ALLOWANCE`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"},"INVALID_JSON":{"$ref":"#/components/examples/INVALID_JSON"},"TOKEN_CAP_ABOVE_ALLOWANCE":{"$ref":"#/components/examples/TOKEN_CAP_ABOVE_ALLOWANCE"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_CANNOT_MANAGE`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_CANNOT_MANAGE":{"$ref":"#/components/examples/CONSUMER_CANNOT_MANAGE"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found: `CONSUMER_NOT_FOUND`.","content":{"application/json":{"examples":{"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The body is too large: `PAYLOAD_TOO_LARGE`.","content":{"application/json":{"examples":{"PAYLOAD_TOO_LARGE":{"$ref":"#/components/examples/PAYLOAD_TOO_LARGE"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","INVALID_JSON","PAYLOAD_TOO_LARGE","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_CANNOT_MANAGE","TOKEN_CAP_ABOVE_ALLOWANCE"]},"delete":{"operationId":"deleteConsumer","summary":"Delete a consumer and everything Atlas holds for it","description":"Deletes a consumer and erases everything Atlas holds for it: holdings, subscriptions, token account, usage counts, keys, saved searches, the record of rows served to it, and its watches. It cannot be undone. The answer counts what was erased.\n\nThe consumer's line on this month's bill stays, under the label it had, and the month's plan price is still due.\n\n**Cost**: see [pricing](https://atlas.oromiq.com/pricing/).\n\n**Called by** the client itself: the client key with no `x-atlas-consumer` header. A consumer is refused with `CONSUMER_CANNOT_MANAGE`.","tags":["Consumers"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"A consumer inside a client: a tenant the client manages. Issued by Atlas; the client keeps its own mapping."},"required":true,"description":"A consumer inside a client: a tenant the client manages. Issued by Atlas; the client keeps its own mapping.","name":"consumerId","in":"path","example":"cn_Jd4sPq9Rk2VbN7wXcL1mFa"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"deleted":{"type":"object","properties":{"holdings":{"type":"integer","description":"How many holdings were erased."},"subscriptions":{"type":"integer","description":"How many subscriptions were ended."}},"required":["holdings","subscriptions"],"description":"What was erased, by count."}},"required":["deleted"],"description":"The result."}},"required":["data"],"description":"Erases everything Atlas holds for the consumer."},"example":{"data":{"deleted":{"holdings":128,"subscriptions":1}}}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_CANNOT_MANAGE`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_CANNOT_MANAGE":{"$ref":"#/components/examples/CONSUMER_CANNOT_MANAGE"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found: `CONSUMER_NOT_FOUND`.","content":{"application/json":{"examples":{"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_CANNOT_MANAGE"]}},"/v1/consumers/{consumerId}/tier":{"put":{"operationId":"setConsumerTier","summary":"Move a consumer to another plan","description":"Moves a consumer to another plan. `GET /v1/plans` lists the plans and marks the retired ones, which a consumer already on keeps but none can move to.\n\nThe new plan's rate, allowance and prices apply from then on. The month's bill line takes the new plan's price (an agreed custom price stands), never pro rata.\n\n**Cost**: see [pricing](https://atlas.oromiq.com/pricing/).\n\n**Called by** the client itself: the client key with no `x-atlas-consumer` header. A consumer is refused with `CONSUMER_CANNOT_MANAGE`.","tags":["Consumers"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"A consumer inside a client: a tenant the client manages. Issued by Atlas; the client keeps its own mapping."},"required":true,"description":"A consumer inside a client: a tenant the client manages. Issued by Atlas; the client keeps its own mapping.","name":"consumerId","in":"path","example":"cn_8fHq2LmNcV0pXyT3rW6aZe"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"tier":{"type":"string","pattern":"^[a-z][a-z0-9-]{1,30}$","description":"A plan by name: sandbox, starter, growth, scale, platform or enterprise, or a bespoke plan made for the client. free and standard are retired: a consumer already on one keeps it, a new one cannot take it."}},"required":["tier"]},"example":{"tier":"scale"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Consumer"}},"required":["data"]},"example":{"data":{"consumerId":"cn_8fHq2LmNcV0pXyT3rW6aZe","label":"Northfield staging","status":"active","tier":"scale","createdAt":"2026-10-02T09:14:31.000Z","subscriptions":["companies_house","cqc","fsa"],"keys":[{"keyId":"ckey_Tz8nQ2vLr5Ka","prefix":"ck_Xq7fK2pa","createdAt":"2026-10-21T08:02:11.000Z","createdBy":"api:cl_Q7mVt2KpLx9RzW4a","lastUsedAt":"2026-10-30T07:45:00.000Z","revokedAt":null,"expiresAt":"2027-04-30T00:00:00.000Z","allowedAddresses":["203.0.113.0/24"]}],"tokenCap":null,"customPrice":false}}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`, `INVALID_JSON`, `TIER_NOT_AVAILABLE`, `TIER_RETIRED`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"},"INVALID_JSON":{"$ref":"#/components/examples/INVALID_JSON"},"TIER_NOT_AVAILABLE":{"$ref":"#/components/examples/TIER_NOT_AVAILABLE"},"TIER_RETIRED":{"$ref":"#/components/examples/TIER_RETIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_CANNOT_MANAGE`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_CANNOT_MANAGE":{"$ref":"#/components/examples/CONSUMER_CANNOT_MANAGE"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found: `CONSUMER_NOT_FOUND`.","content":{"application/json":{"examples":{"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The body is too large: `PAYLOAD_TOO_LARGE`.","content":{"application/json":{"examples":{"PAYLOAD_TOO_LARGE":{"$ref":"#/components/examples/PAYLOAD_TOO_LARGE"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","INVALID_JSON","PAYLOAD_TOO_LARGE","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_CANNOT_MANAGE","TIER_NOT_AVAILABLE","TIER_RETIRED"]}},"/v1/consumers/{consumerId}/subscriptions":{"get":{"operationId":"getConsumerSubscriptions","summary":"A consumer's layer subscriptions","description":"The layers a consumer is subscribed to, each with when it was subscribed, in layer order. A call whose `layers` names any other layer is refused with `LAYER_NOT_SUBSCRIBED`. The consumer reads its own list with `GET /v1/subscriptions`.\n\n**Cost**: see [pricing](https://atlas.oromiq.com/pricing/).\n\n**Called by** the client itself: the client key with no `x-atlas-consumer` header. A consumer is refused with `CONSUMER_CANNOT_MANAGE`.","tags":["Consumers"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"A consumer inside a client: a tenant the client manages. Issued by Atlas; the client keeps its own mapping."},"required":true,"description":"A consumer inside a client: a tenant the client manages. Issued by Atlas; the client keeps its own mapping.","name":"consumerId","in":"path","example":"cn_8fHq2LmNcV0pXyT3rW6aZe"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Subscription"},"description":"The layers the consumer may read, one per subscription."}},"required":["data"]},"example":{"data":[{"layer":"companies_house","since":"2026-10-02T09:14:31.000Z"},{"layer":"cqc","since":"2026-10-02T09:14:31.000Z"},{"layer":"fsa","since":"2026-10-02T09:14:31.000Z"}]}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_CANNOT_MANAGE`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_CANNOT_MANAGE":{"$ref":"#/components/examples/CONSUMER_CANNOT_MANAGE"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found: `CONSUMER_NOT_FOUND`.","content":{"application/json":{"examples":{"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_CANNOT_MANAGE"]},"put":{"operationId":"setConsumerSubscriptions","summary":"Subscribe a consumer to layers, or take some away","description":"Subscribes a consumer to layers (`add`) or removes some (`remove`), in one call, and returns its subscriptions afterwards.\n\n- A layer added must be listed in `GET /v1/layers`; any other is refused with `LAYER_NOT_AVAILABLE`, and nothing changes.\n- Removing a layer not subscribed does nothing. Adding one already subscribed keeps its original date.\n- A removed layer can no longer be read by the consumer.\n\n**Cost**: see [pricing](https://atlas.oromiq.com/pricing/).\n\n**Limits**: up to 30 layers in each list.\n\n**Called by** the client itself: the client key with no `x-atlas-consumer` header. A consumer is refused with `CONSUMER_CANNOT_MANAGE`.","tags":["Consumers"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"A consumer inside a client: a tenant the client manages. Issued by Atlas; the client keeps its own mapping."},"required":true,"description":"A consumer inside a client: a tenant the client manages. Issued by Atlas; the client keeps its own mapping.","name":"consumerId","in":"path","example":"cn_8fHq2LmNcV0pXyT3rW6aZe"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"add":{"type":"array","items":{"$ref":"#/components/schemas/LayerKey"},"maxItems":30,"default":[],"description":"Layers to subscribe the consumer to, at most 30."},"remove":{"type":"array","items":{"$ref":"#/components/schemas/LayerKey"},"maxItems":30,"default":[],"description":"Layers to take away, at most 30."}},"description":"Subscribe a consumer to layers, or take some away. A layer that is not available is refused with LAYER_NOT_AVAILABLE."},"example":{"add":["fsa"],"remove":["gazette"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Subscription"},"description":"The layers the consumer may read, one per subscription."}},"required":["data"]},"example":{"data":[{"layer":"companies_house","since":"2026-10-02T09:14:31.000Z"},{"layer":"cqc","since":"2026-10-02T09:14:31.000Z"},{"layer":"fsa","since":"2026-10-02T09:14:31.000Z"}]}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`, `INVALID_JSON`, `LAYER_NOT_AVAILABLE`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"},"INVALID_JSON":{"$ref":"#/components/examples/INVALID_JSON"},"LAYER_NOT_AVAILABLE":{"$ref":"#/components/examples/LAYER_NOT_AVAILABLE"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_CANNOT_MANAGE`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_CANNOT_MANAGE":{"$ref":"#/components/examples/CONSUMER_CANNOT_MANAGE"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found: `CONSUMER_NOT_FOUND`.","content":{"application/json":{"examples":{"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The body is too large: `PAYLOAD_TOO_LARGE`.","content":{"application/json":{"examples":{"PAYLOAD_TOO_LARGE":{"$ref":"#/components/examples/PAYLOAD_TOO_LARGE"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","INVALID_JSON","PAYLOAD_TOO_LARGE","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_CANNOT_MANAGE","LAYER_NOT_AVAILABLE"]}},"/v1/consumers/{consumerId}/usage":{"get":{"operationId":"getConsumerUsage","summary":"A consumer's calls, refusals and tokens for a month (this month by default)","description":"One consumer's month, the same answer the consumer reads with `GET /v1/usage`: its calls and rate-limit refusals, failed calls by outcome, each operation's calls, its tokens (allowance, granted, bought, spent, balance, cap and when the month renews), tokens spent by kind, a daily series, and, for the current month, `unusualUse`: whether its calls are far above its own recent normal, a sign its key may be misused. Counts only, never what was searched or read.\n\nCounts are a minute or so behind.\n\n**Cost**: see [pricing](https://atlas.oromiq.com/pricing/).\n\n**Limits**: `month` is YYYY-MM (UTC); left out, the current month.\n\n**Called by** the client itself: the client key with no `x-atlas-consumer` header. A consumer is refused with `CONSUMER_CANNOT_MANAGE`.","tags":["Consumers"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"A consumer inside a client: a tenant the client manages. Issued by Atlas; the client keeps its own mapping."},"required":true,"description":"A consumer inside a client: a tenant the client manages. Issued by Atlas; the client keeps its own mapping.","name":"consumerId","in":"path","example":"cn_8fHq2LmNcV0pXyT3rW6aZe"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}$","description":"YYYY-MM; default the current month."},"required":false,"description":"YYYY-MM; default the current month.","name":"month","in":"query","example":"2026-10"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Usage"},"example":{"data":{"month":"2026-10","subject":{"clientId":"cl_Q7mVt2KpLx9RzW4a","consumerId":"cn_8fHq2LmNcV0pXyT3rW6aZe"},"tier":"growth","subscriptions":["companies_house","cqc","fsa"],"calls":18406,"refused":12,"failed":{"tokens":0,"forbidden":3,"badRequest":41,"notFound":7,"auth":0,"server":1},"byEndpoint":[{"endpoint":"search","calls":6120,"refused":9,"failed":{"tokens":0,"forbidden":0,"badRequest":37,"notFound":0,"auth":0,"server":0}},{"endpoint":"getEntity","calls":9884,"refused":3,"failed":{"tokens":0,"forbidden":3,"badRequest":4,"notFound":7,"auth":0,"server":1}},{"endpoint":"resolve","calls":2402,"refused":0,"failed":{"tokens":0,"forbidden":0,"badRequest":0,"notFound":0,"auth":0,"server":0}}],"tokens":{"allowance":20000,"granted":0,"toppedUp":0,"spent":7401,"balance":12599,"cap":null,"renewsAt":"2026-11-01T00:00:00.000Z"},"tokensByKind":{"record":2340,"history":160,"search":3912,"lookup":214,"prefill":35,"people":60,"benchmark":45,"network":225},"days":[{"date":"2026-10-29","calls":702,"refused":0,"failed":{"tokens":0,"forbidden":0,"badRequest":2,"notFound":1,"auth":0,"server":0},"tokensByKind":{"record":120,"history":0,"search":148,"lookup":9,"prefill":0,"people":5,"benchmark":0,"network":75}},{"date":"2026-10-30","calls":318,"refused":0,"failed":{"tokens":0,"forbidden":0,"badRequest":0,"notFound":0,"auth":0,"server":0},"tokensByKind":{"record":60,"history":0,"search":52,"lookup":4,"prefill":5,"people":0,"benchmark":0,"network":0}}],"unusualUse":{"flagged":false,"lastTwoHours":41,"usualTwoHours":48,"lastDay":702,"usualDay":590,"judged":true}}}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_CANNOT_MANAGE`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_CANNOT_MANAGE":{"$ref":"#/components/examples/CONSUMER_CANNOT_MANAGE"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found: `CONSUMER_NOT_FOUND`.","content":{"application/json":{"examples":{"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_CANNOT_MANAGE"]}},"/v1/consumers/{consumerId}/statement":{"get":{"operationId":"getConsumerStatement","summary":"A consumer's token movements for a month, newest first","description":"One consumer's token movements for a month, newest first, the same answer the consumer reads with `GET /v1/statement`: every charge (a full read, a history unlock, search rows, a lookup, a prefill, people, a benchmark, a network map, a report run, a standing search's month, a held entity's month), every refund, grant, top-up and the month's renewal.\n\nCharges are negative and everything else positive; `spentToDate` is the month's spending up to and including the row, net of refunds. A refund (`kind: refund`, with `refundOf`) is a charge given back because its answer could not be sent. A row never says who granted tokens or why, or what was searched: a search charge names its saved search and how many rows it was for.\n\n**Cost**: see [pricing](https://atlas.oromiq.com/pricing/).\n\n**Limits**: `limit` up to 200 rows a page (100 by default); follow `next` for more. `month` is YYYY-MM (UTC); left out, the current month.\n\n**Called by** the client itself: the client key with no `x-atlas-consumer` header. A consumer is refused with `CONSUMER_CANNOT_MANAGE`.","tags":["Consumers"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"A consumer inside a client: a tenant the client manages. Issued by Atlas; the client keeps its own mapping."},"required":true,"description":"A consumer inside a client: a tenant the client manages. Issued by Atlas; the client keeps its own mapping.","name":"consumerId","in":"path","example":"cn_8fHq2LmNcV0pXyT3rW6aZe"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}$","description":"YYYY-MM; default the current month."},"required":false,"description":"YYYY-MM; default the current month.","name":"month","in":"query","example":"2026-10"},{"schema":{"$ref":"#/components/schemas/Cursor"},"required":false,"description":"An opaque page token: send back the `next` value of the previous page. Leave out for the first page.","name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":100,"description":"Rows per page, at most 200."},"required":false,"description":"Rows per page, at most 200.","name":"limit","in":"query","example":3}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Statement"},"example":{"data":[{"id":"tl_Rk2Vq9Lp4Xa7","at":"2026-10-30T07:46:12.000Z","kind":"record","refundOf":null,"tokens":-40,"entityId":"prm_pdFPkhx7RuGEeFl8Q1pP","searchId":null,"results":null,"spentToDate":7401},{"id":"tl_Mb6Tn1Wc8Zd3","at":"2026-10-30T07:41:55.000Z","kind":"search","refundOf":null,"tokens":-48,"entityId":null,"searchId":"ss_Lq3Nv8Pz2Kc5Wd","results":48,"spentToDate":7381},{"id":"tl_Fy5Hs2Jq7Ub0","at":"2026-10-29T16:20:03.000Z","kind":"refund","refundOf":"refresh","tokens":10,"entityId":"org_7pmXa7UUhqFbGdQw9mE1","searchId":null,"results":null,"spentToDate":7333}],"next":"MjAyNi0xMC0yOVQxNjoyMDowMy4wMDBafHRsX0Z5NUhzMkpxN1ViMA","month":"2026-10"}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_CANNOT_MANAGE`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_CANNOT_MANAGE":{"$ref":"#/components/examples/CONSUMER_CANNOT_MANAGE"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found: `CONSUMER_NOT_FOUND`.","content":{"application/json":{"examples":{"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_CANNOT_MANAGE"]}},"/v1/consumers/{consumerId}/keys":{"post":{"operationId":"createConsumerKey","summary":"Make a consumer's key, shown once; the previous active one is revoked","description":"Makes a key of the consumer's own (`ck_` and 40 characters) and returns it this once: store it, as it cannot be shown again. Making one revokes the consumer's previous active key at the same moment (`replaced: true`). A consumer has at most one active key.\n\nOnly where your account allows consumer keys (`GET /v1/account`); otherwise refused with `CONSUMER_KEYS_NOT_ALLOWED`.\n\nOptional limits, enforced on every call the key makes:\n\n- **`expiresAt`**: when it stops working (`CONSUMER_KEY_EXPIRED` after).\n- **`allowedAddresses`**: up to 20 IPv4 or IPv6 addresses or CIDR ranges it works from (`CONSUMER_KEY_ADDRESS_NOT_ALLOWED` from any other).\n\n**Cost**: see [pricing](https://atlas.oromiq.com/pricing/).\n\nNever put a key in a browser or an app you ship: call Atlas from your servers.\n\n**Called by** the client itself: the client key with no `x-atlas-consumer` header. A consumer is refused with `CONSUMER_CANNOT_MANAGE`.","tags":["Consumers"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"A consumer inside a client: a tenant the client manages. Issued by Atlas; the client keeps its own mapping."},"required":true,"description":"A consumer inside a client: a tenant the client manages. Issued by Atlas; the client keeps its own mapping.","name":"consumerId","in":"path","example":"cn_8fHq2LmNcV0pXyT3rW6aZe"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"expiresAt":{"type":"string","format":"date-time","description":"When the key stops working; a moment in the future. Left out, it does not expire."},"allowedAddresses":{"type":"array","items":{"type":"string","minLength":2,"maxLength":64,"pattern":"^[0-9A-Fa-f.:]+(\\/\\d{1,3})?$","description":"An IPv4 or IPv6 address, or a CIDR range of either."},"maxItems":20,"description":"The only addresses the key works from. Left out or empty, any address. A call from another is refused with CONSUMER_KEY_ADDRESS_NOT_ALLOWED."}},"description":"Optional limits on the new key. A request with no body makes a key with none."},"example":{"expiresAt":"2027-04-30T00:00:00.000Z","allowedAddresses":["203.0.113.0/24"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"keyId":{"type":"string","pattern":"^ckey_[A-Za-z0-9_-]{8,40}$","description":"A consumer key's id. It starts ckey_."},"token":{"type":"string","minLength":20,"description":"The key itself, shown this once. It starts ck_."},"prefix":{"type":"string","description":"The first characters of the token, to tell keys apart."},"replaced":{"type":"boolean","description":"True when the previous active key was revoked by this one."}},"required":["keyId","token","prefix","replaced"],"description":"The new key."}},"required":["data"],"description":"Making a key revokes the previous active one at the same moment: hand the new one over first."},"example":{"data":{"keyId":"ckey_Tz8nQ2vLr5Ka","token":"ck_Xq7fK2paEXAMPLEonlyNotARealKey0000000000","prefix":"ck_Xq7fK2pa","replaced":true}}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`, `INVALID_JSON`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"},"INVALID_JSON":{"$ref":"#/components/examples/INVALID_JSON"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_CANNOT_MANAGE`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_CANNOT_MANAGE":{"$ref":"#/components/examples/CONSUMER_CANNOT_MANAGE"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found: `CONSUMER_NOT_FOUND`.","content":{"application/json":{"examples":{"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The body is too large: `PAYLOAD_TOO_LARGE`.","content":{"application/json":{"examples":{"PAYLOAD_TOO_LARGE":{"$ref":"#/components/examples/PAYLOAD_TOO_LARGE"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","INVALID_JSON","PAYLOAD_TOO_LARGE","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_CANNOT_MANAGE"]}},"/v1/consumers/{consumerId}/keys/{keyId}":{"delete":{"operationId":"revokeConsumerKey","summary":"Revoke a consumer's key","description":"Revokes one of a consumer's keys at once: calls with it are refused from then on (`UNAUTHENTICATED`). The key stays in the consumer's list with `revokedAt` set. To replace a key, make a new one with `POST /v1/consumers/{consumerId}/keys`, which revokes the old one.\n\nA key that does not exist, is not this consumer's, or is already revoked returns `NOT_FOUND`.\n\n**Cost**: see [pricing](https://atlas.oromiq.com/pricing/).\n\n**Called by** the client itself: the client key with no `x-atlas-consumer` header. A consumer is refused with `CONSUMER_CANNOT_MANAGE`.","tags":["Consumers"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"A consumer inside a client: a tenant the client manages. Issued by Atlas; the client keeps its own mapping."},"required":true,"description":"A consumer inside a client: a tenant the client manages. Issued by Atlas; the client keeps its own mapping.","name":"consumerId","in":"path","example":"cn_8fHq2LmNcV0pXyT3rW6aZe"},{"schema":{"type":"string","pattern":"^ckey_[A-Za-z0-9_-]{8,40}$","description":"A consumer key's id. It starts ckey_."},"required":true,"description":"A consumer key's id. It starts ckey_.","name":"keyId","in":"path","example":"ckey_Hm3pW9cYd1Fs"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true],"description":"Always true: the operation succeeded."}},"required":["ok"],"description":"The result."}},"required":["data"],"description":"Nothing to return beyond success."},"example":{"data":{"ok":true}}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_CANNOT_MANAGE`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_CANNOT_MANAGE":{"$ref":"#/components/examples/CONSUMER_CANNOT_MANAGE"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found: `NOT_FOUND`, `CONSUMER_NOT_FOUND`.","content":{"application/json":{"examples":{"NOT_FOUND":{"$ref":"#/components/examples/NOT_FOUND"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_CANNOT_MANAGE","NOT_FOUND"]}},"/v1/subscriptions":{"get":{"operationId":"getSubscriptions","summary":"The calling consumer's layer subscriptions","description":"The layers the calling consumer is subscribed to, each with when it was subscribed: the layers it may name in `layers`. `layers: [\"subscribed\"]` (or `layers=subscribed`) stands for all of them. Only the client changes them, with `PUT /v1/consumers/{consumerId}/subscriptions`.\n\n**Cost**: see [pricing](https://atlas.oromiq.com/pricing/).\n\n**Called by** a consumer: the client key with `x-atlas-consumer` naming one of its consumers, or a consumer key where the account allows them. The client alone is refused with `CONSUMER_REQUIRED`.","tags":["Account"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","example":"cn_8fHq2LmNcV0pXyT3rW6aZe"},"required":false,"description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","name":"x-atlas-consumer","in":"header"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Subscription"},"description":"The layers the consumer may read, one per subscription."}},"required":["data"]},"example":{"data":[{"layer":"companies_house","since":"2026-10-02T09:14:31.000Z"},{"layer":"cqc","since":"2026-10-02T09:14:31.000Z"},{"layer":"fsa","since":"2026-10-02T09:14:31.000Z"}]}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_REQUIRED`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_REQUIRED":{"$ref":"#/components/examples/CONSUMER_REQUIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_REQUIRED"]}},"/v1/billing":{"get":{"operationId":"getBill","summary":"The client's itemised bill for a period, one line per consumer","description":"The client's itemised bill for a month: one line per consumer that existed in it (suspended and deleted ones included, under the label each had), with its plan and price, any tokens bought, tokens used by kind and calls made, and the total.\n\n- A line's `amount` is its plan's monthly price (`tierPrice`, or its custom price) plus any top-ups. Tokens used never add to the bill.\n- A month under way is current at every moment; once it ends it is `closed` and never changes.\n- **`subtotal`** is what the lines add up to; **`discount`** is any percent off agreed with Atlas and what it takes off; **`total`** is what you pay.\n\n**Cost**: see [pricing](https://atlas.oromiq.com/pricing/).\n\n**Limits**: `month` is YYYY-MM (UTC); left out, the current month. Amounts are in pence.\n\n**Called by** the client itself: the client key with no `x-atlas-consumer` header. A consumer is refused with `CONSUMER_CANNOT_MANAGE`.","tags":["Account"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}$","description":"YYYY-MM; default the current month."},"required":false,"description":"YYYY-MM; default the current month.","name":"month","in":"query","example":"2026-10"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"month":{"type":"string","pattern":"^\\d{4}-\\d{2}$","description":"The period, YYYY-MM."},"clientId":{"$ref":"#/components/schemas/ClientId"},"currency":{"type":"string","enum":["GBP"],"description":"Always GBP: every amount is in pence."},"lines":{"type":"array","items":{"type":"object","properties":{"consumerId":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"A consumer inside a client: a tenant the client manages. Issued by Atlas; the client keeps its own mapping."},"label":{"type":"string","description":"The consumer's label as it was; a deleted consumer keeps its line."},"tier":{"type":"string","pattern":"^[a-z][a-z0-9-]{1,30}$","description":"The plan at the last movement in the period, else the current one."},"tierPrice":{"type":"number","minimum":0,"description":"The month's plan price in pence: the plan's monthly price, or the consumer's custom price."},"customPrice":{"type":"boolean","description":"True when this line is billed at a custom price agreed with the client, for its monthly and top-up prices."},"topUps":{"type":"object","properties":{"tokens":{"type":"integer","description":"Tokens bought this period."},"pence":{"type":"number","minimum":0,"description":"Their price in pence, at the top-up price in force."}},"required":["tokens","pence"],"description":"Tokens bought beyond the allowance this period."},"subscriptions":{"type":"array","items":{"type":"object","properties":{"layer":{"$ref":"#/components/schemas/LayerKey"}},"required":["layer"]},"description":"The layers the consumer could read in the period."},"tokens":{"type":"object","properties":{"snapshot":{"type":"integer","description":"First reads of entities, before 0.40.0."},"record":{"type":"integer","description":"Full reads of entities (0.40.0)."},"refresh":{"type":"integer","description":"Refreshes, before 0.40.0 (always 0 since)."},"history":{"type":"integer","description":"History unlocks."},"search":{"type":"integer","description":"Search rows served and rows read again by id."},"lookup":{"type":"integer","description":"Lookups and resolves that found something."},"prefill":{"type":"integer","description":"Prefills."},"people":{"type":"integer","description":"Officers and PSCs."},"benchmark":{"type":"integer","description":"Benchmark positions and baselines."},"watch":{"type":"integer","description":"Watched entities, before 0.40.0."},"network":{"type":"integer","description":"Entity network maps."},"count":{"type":"integer","description":"Counts, before 0.40.0."},"report":{"type":"integer","description":"Report runs."},"standingSearch":{"type":"integer","description":"Standing searches, a month each."},"alert":{"type":"integer","description":"Alerts delivered, before 0.40.0."},"heldEntity":{"type":"integer","description":"Held entities, each month held (0.40.0)."},"reportSummary":{"type":"integer","description":"CQC report summaries read (0.40.0)."},"dossier":{"type":"integer","description":"Operator dossiers read (0.40.0)."},"spent":{"type":"integer","description":"Every token spent in the period, added up as it was spent."}},"required":["spent"],"description":"Tokens spent in the period, by kind."},"calls":{"type":"integer","description":"Calls in the period."},"refused":{"type":"integer","description":"Calls refused by the rate limit in the period."},"amount":{"type":"number","minimum":0,"description":"Pence for the line: tierPrice and any top-ups. The plan's tokens are in its price."}},"required":["consumerId","label","tier","tierPrice","subscriptions","tokens","calls","refused","amount"]},"description":"One per consumer that existed in the period, suspended and since-deleted ones included."},"subtotal":{"type":"number","minimum":0,"description":"Pence: what the lines add up to, before any discount."},"discount":{"type":"object","properties":{"percent":{"type":"number","minimum":0,"maximum":100,"description":"The percent off the whole bill."},"pence":{"type":"number","minimum":0,"description":"What the percent takes off the subtotal, in pence."}},"required":["percent","pence"],"description":"A discount agreed with Atlas, applied to the whole bill. Absent or 0 when there is none."},"total":{"type":"number","minimum":0,"description":"Pence: what the client pays Atlas for the period, after any discount."},"tokens":{"type":"integer","description":"Every token spent by every consumer in the period."},"closed":{"type":"boolean","description":"The period has ended: the bill is final and will not change."},"client":{"type":"object","properties":{"plan":{"type":"string","pattern":"^[a-z][a-z0-9-]{1,30}$","description":"The client's plan for the period."},"billing":{"type":"string","enum":["monthly","annual"],"description":"How the plan is billed: a month at a time, or a year paid up front, which pools twelve months of tokens."},"planPence":{"type":"number","minimum":0,"description":"The plan's price for the period, in pence: the month's, or the year's in the month it was taken."},"tenants":{"type":"object","properties":{"active":{"type":"integer","description":"Consumers that made a charged call in the period."},"included":{"type":"integer","nullable":true,"description":"Consumers the plan includes; null for any number."},"extra":{"type":"integer","description":"Active consumers beyond those included."},"pence":{"type":"number","minimum":0,"description":"What the extra consumers cost."}},"required":["active","included","extra","pence"],"description":"The active consumers and what those beyond the plan cost."},"packs":{"type":"object","properties":{"chosen":{"type":"array","items":{"type":"string"},"description":"The packs the client had in the period, by key."},"included":{"type":"integer","nullable":true,"description":"Packs beyond core the plan includes; null for every pack."},"extra":{"type":"integer","description":"Packs beyond those included."},"pence":{"type":"number","minimum":0,"description":"What the extra packs cost."}},"required":["chosen","included","extra","pence"],"description":"The packs and what those beyond the plan cost."},"overage":{"type":"object","properties":{"tokens":{"type":"integer","description":"Tokens spent past the allowance, where overage is on."},"pence":{"type":"number","minimum":0,"description":"What they cost at the top-up rate, within the cap."}},"required":["tokens","pence"],"description":"Overage, where it is on."},"lines":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["plan","tenants","packs","overage","discount"],"description":"What the line is for."},"label":{"type":"string","description":"The line as the bill shows it."},"pence":{"type":"number","description":"Its amount in pence; a discount is negative."}},"required":["kind","label","pence"]},"description":"The client's lines, in order."}},"required":["plan","billing","planPence","tenants","packs","overage","lines"],"description":"The client's own lines (0.40.0): the plan, the active consumers beyond those included, the packs beyond those included, overage, and the discount. Consumer lines carry tokens alone."},"invoices":{"type":"array","items":{"type":"object","properties":{"reason":{"type":"string","description":"Why it was raised: opening for the month's plans, consumer:<id> for a consumer added in the month, upgrade:<id>:<time> for a move to a dearer plan."},"invoiceId":{"type":"string","description":"The invoice's id with the payment provider."},"url":{"type":"string","nullable":true,"format":"uri","description":"Its hosted page."},"pence":{"type":"integer","minimum":0,"description":"What was charged, in pence, after any discount."},"status":{"type":"string","enum":["open","paid","failed","void"],"description":"open: not yet paid. paid: settled. failed: the payment failed. void: cancelled."},"raisedAt":{"type":"string","format":"date-time","description":"When it was raised."}},"required":["reason","invoiceId","url","pence","status","raisedAt"]},"description":"The charges raised for the period, paid in advance, and how each stands."}},"required":["month","clientId","currency","lines","total"],"description":"The bill."}},"required":["data"],"description":"The client's itemised bill for a period, one line per consumer: each consumer's plan price, or custom price, and any tokens bought, with the tokens it used by kind. Atlas invoices the client for the total. A running bill is current at every moment; a period is final when it ends."},"example":{"data":{"month":"2026-10","clientId":"cl_Q7mVt2KpLx9RzW4a","currency":"GBP","lines":[{"consumerId":"cn_8fHq2LmNcV0pXyT3rW6aZe","label":"Northfield staging","tier":"growth","tierPrice":15000,"customPrice":false,"topUps":{"tokens":0,"pence":0},"subscriptions":[{"layer":"companies_house"},{"layer":"cqc"},{"layer":"fsa"}],"tokens":{"record":2340,"history":160,"search":3912,"lookup":214,"prefill":35,"people":60,"benchmark":45,"network":225,"spent":6991},"calls":18406,"refused":12,"amount":15000},{"consumerId":"cn_Jd4sPq9Rk2VbN7wXcL1mFa","label":"Tenant 14","tier":"starter","tierPrice":5000,"customPrice":false,"topUps":{"tokens":2000,"pence":2000},"subscriptions":[{"layer":"cqc"}],"tokens":{"record":3600,"history":0,"search":2710,"lookup":88,"prefill":0,"people":0,"benchmark":0,"network":150,"spent":6548},"calls":9120,"refused":0,"amount":7000}],"subtotal":22000,"discount":{"percent":0,"pence":0},"total":22000,"tokens":13539,"closed":false}}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_CANNOT_MANAGE`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_CANNOT_MANAGE":{"$ref":"#/components/examples/CONSUMER_CANNOT_MANAGE"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_CANNOT_MANAGE"]}},"/v1/billing/account":{"get":{"operationId":"getBillingAccount","summary":"How this client pays: its billing email, whether a card is on file, and its standing","description":"How this client pays Atlas: whether billing is set up (a billing email), whether a card is on file, whether the account is suspended for a payment that failed, and any discount agreed.\n\n- Each month's plans are charged in advance, to the card on file, when the month opens; a consumer added in the month is charged its full month at once; a move to a dearer plan the difference. Tokens beyond a plan's allowance are bought with `POST /v1/billing/top-up-session`.\n- **`suspendedForPayment`** true means every consumer call is refused until an invoice is paid; the billing operations and `GET /v1/billing` still answer, so the account can be put right.\n\n**Cost**: nothing.\n\n**Called by** a consumer: the client key with `x-atlas-consumer` naming one of its consumers, or a consumer key where the account allows them. The client alone is refused with `CONSUMER_REQUIRED`.","tags":["Account"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","example":"cn_8fHq2LmNcV0pXyT3rW6aZe"},"required":false,"description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","name":"x-atlas-consumer","in":"header"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"setUp":{"type":"boolean","description":"True once a billing email is set: Atlas can then charge the account."},"email":{"type":"string","nullable":true,"description":"Where invoices and receipts go. Null until set."},"cardOnFile":{"type":"boolean","description":"True when a card is on file. Each charge is taken from it."},"suspendedForPayment":{"type":"boolean","description":"True while a payment has failed and nothing has been paid since: every consumer call is refused until an invoice is paid. The billing operations still answer."},"discountPercent":{"type":"number","minimum":0,"maximum":100,"description":"The percent off the whole bill agreed with Atlas; 0 for none."}},"required":["setUp","email","cardOnFile","suspendedForPayment","discountPercent"],"description":"How this client pays."}},"required":["data"],"description":"How the client pays Atlas: its billing email, whether a card is on file, and its standing."},"example":{"data":{"setUp":true,"email":"accounts@example.com","cardOnFile":true,"suspendedForPayment":false,"discountPercent":0}}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_REQUIRED`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_REQUIRED":{"$ref":"#/components/examples/CONSUMER_REQUIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable: `NOT_CONFIGURED`.","content":{"application/json":{"examples":{"NOT_CONFIGURED":{"$ref":"#/components/examples/NOT_CONFIGURED"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_REQUIRED","NOT_CONFIGURED"]},"put":{"operationId":"setBillingEmail","summary":"Set the billing email, which sets billing up","description":"Sets where invoices and receipts go. Setting it the first time sets billing up: Atlas can then charge the account, once a card is given with `POST /v1/billing/card-session`.\n\n**Cost**: nothing.\n\n**Called by** a consumer: the client key with `x-atlas-consumer` naming one of its consumers, or a consumer key where the account allows them. The client alone is refused with `CONSUMER_REQUIRED`.","tags":["Account"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","example":"cn_8fHq2LmNcV0pXyT3rW6aZe"},"required":false,"description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","name":"x-atlas-consumer","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","maxLength":200,"format":"email","description":"Where invoices and receipts go."}},"required":["email"],"description":"The billing email. Setting it the first time sets billing up."},"example":{"email":"accounts@example.com"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"setUp":{"type":"boolean","description":"True once a billing email is set: Atlas can then charge the account."},"email":{"type":"string","nullable":true,"description":"Where invoices and receipts go. Null until set."},"cardOnFile":{"type":"boolean","description":"True when a card is on file. Each charge is taken from it."},"suspendedForPayment":{"type":"boolean","description":"True while a payment has failed and nothing has been paid since: every consumer call is refused until an invoice is paid. The billing operations still answer."},"discountPercent":{"type":"number","minimum":0,"maximum":100,"description":"The percent off the whole bill agreed with Atlas; 0 for none."}},"required":["setUp","email","cardOnFile","suspendedForPayment","discountPercent"],"description":"How this client pays."}},"required":["data"],"description":"How the client pays Atlas: its billing email, whether a card is on file, and its standing."},"example":{"data":{"setUp":true,"email":"accounts@example.com","cardOnFile":false,"suspendedForPayment":false,"discountPercent":0}}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`, `INVALID_JSON`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"},"INVALID_JSON":{"$ref":"#/components/examples/INVALID_JSON"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_REQUIRED`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_REQUIRED":{"$ref":"#/components/examples/CONSUMER_REQUIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The body is too large: `PAYLOAD_TOO_LARGE`.","content":{"application/json":{"examples":{"PAYLOAD_TOO_LARGE":{"$ref":"#/components/examples/PAYLOAD_TOO_LARGE"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable: `NOT_CONFIGURED`.","content":{"application/json":{"examples":{"NOT_CONFIGURED":{"$ref":"#/components/examples/NOT_CONFIGURED"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","INVALID_JSON","PAYLOAD_TOO_LARGE","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_REQUIRED","NOT_CONFIGURED"]}},"/v1/billing/card-session":{"post":{"operationId":"createCardSession","summary":"A page where the client gives a card","description":"A page, hosted by the payment provider, where a person gives the card each charge is taken from. Send the person to `url`; the card never passes through Atlas or your servers. Ask for a new page each time: one lasts a short while.\n\n**Cost**: nothing.\n\n**Called by** a consumer: the client key with `x-atlas-consumer` naming one of its consumers, or a consumer key where the account allows them. The client alone is refused with `CONSUMER_REQUIRED`.","tags":["Account"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","example":"cn_8fHq2LmNcV0pXyT3rW6aZe"},"required":false,"description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","name":"x-atlas-consumer","in":"header"}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Send the person here. Valid for a short while; ask again for a new one."}},"required":["url"],"description":"A page hosted by the payment provider."}},"required":["data"],"description":"A page hosted by the payment provider, for the client to use in a browser."},"example":{"data":{"url":"https://checkout.stripe.com/c/pay/cs_test_a1B2c3"}}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_REQUIRED`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_REQUIRED":{"$ref":"#/components/examples/CONSUMER_REQUIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"In conflict with what is already recorded: `BILLING_NOT_SET_UP`.","content":{"application/json":{"examples":{"BILLING_NOT_SET_UP":{"$ref":"#/components/examples/BILLING_NOT_SET_UP"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable: `NOT_CONFIGURED`.","content":{"application/json":{"examples":{"NOT_CONFIGURED":{"$ref":"#/components/examples/NOT_CONFIGURED"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_REQUIRED","NOT_CONFIGURED","BILLING_NOT_SET_UP"]}},"/v1/billing/portal-session":{"post":{"operationId":"createPortalSession","summary":"A page where the client manages its cards and sees its invoices","description":"A page, hosted by the payment provider, where a person sees the account's invoices and receipts and changes its cards. Send the person to `url`.\n\n**Cost**: nothing.\n\n**Called by** a consumer: the client key with `x-atlas-consumer` naming one of its consumers, or a consumer key where the account allows them. The client alone is refused with `CONSUMER_REQUIRED`.","tags":["Account"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","example":"cn_8fHq2LmNcV0pXyT3rW6aZe"},"required":false,"description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","name":"x-atlas-consumer","in":"header"}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Send the person here. Valid for a short while; ask again for a new one."}},"required":["url"],"description":"A page hosted by the payment provider."}},"required":["data"],"description":"A page hosted by the payment provider, for the client to use in a browser."},"example":{"data":{"url":"https://billing.stripe.com/p/session/test_a1B2c3"}}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_REQUIRED`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_REQUIRED":{"$ref":"#/components/examples/CONSUMER_REQUIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"In conflict with what is already recorded: `BILLING_NOT_SET_UP`.","content":{"application/json":{"examples":{"BILLING_NOT_SET_UP":{"$ref":"#/components/examples/BILLING_NOT_SET_UP"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable: `NOT_CONFIGURED`.","content":{"application/json":{"examples":{"NOT_CONFIGURED":{"$ref":"#/components/examples/NOT_CONFIGURED"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_REQUIRED","NOT_CONFIGURED","BILLING_NOT_SET_UP"]}},"/v1/billing/top-up-session":{"post":{"operationId":"createTopUpSession","summary":"A page where the client buys tokens for one consumer","description":"A page, hosted by the payment provider, where a person pays for tokens for one consumer: `tokens` at the plan's top-up price, less any discount. Send the person to `url`; the tokens are added to the consumer once the payment settles, within a minute, and show on the bill as tokens bought. `pence` is the price before VAT.\n\n**Cost**: the price given.\n\n**Called by** a consumer: the client key with `x-atlas-consumer` naming one of its consumers, or a consumer key where the account allows them. The client alone is refused with `CONSUMER_REQUIRED`.","tags":["Account"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","example":"cn_8fHq2LmNcV0pXyT3rW6aZe"},"required":false,"description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","name":"x-atlas-consumer","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"consumerId":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"The consumer the tokens are for."},"tokens":{"type":"integer","minimum":100,"maximum":10000000,"description":"How many tokens to buy, at the plan's top-up price, less any discount."}},"required":["consumerId","tokens"],"description":"Tokens to buy now for one consumer."},"example":{"consumerId":"cn_8fHq2LmNcV0pXyT3rW6aZe","tokens":5000}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Send the person here to pay. The tokens arrive once paid."},"pence":{"type":"integer","minimum":0,"description":"What the top-up costs, in pence, before VAT."}},"required":["url","pence"],"description":"The payment page and the price."}},"required":["data"],"description":"A payment page for a top-up. The tokens are added to the consumer once it is paid."},"example":{"data":{"url":"https://checkout.stripe.com/c/pay/cs_test_d4E5f6","pence":5000}}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`, `INVALID_JSON`, `TOPUP_NOT_OFFERED`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"},"INVALID_JSON":{"$ref":"#/components/examples/INVALID_JSON"},"TOPUP_NOT_OFFERED":{"$ref":"#/components/examples/TOPUP_NOT_OFFERED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_REQUIRED`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_REQUIRED":{"$ref":"#/components/examples/CONSUMER_REQUIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"In conflict with what is already recorded: `BILLING_NOT_SET_UP`.","content":{"application/json":{"examples":{"BILLING_NOT_SET_UP":{"$ref":"#/components/examples/BILLING_NOT_SET_UP"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The body is too large: `PAYLOAD_TOO_LARGE`.","content":{"application/json":{"examples":{"PAYLOAD_TOO_LARGE":{"$ref":"#/components/examples/PAYLOAD_TOO_LARGE"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable: `NOT_CONFIGURED`.","content":{"application/json":{"examples":{"NOT_CONFIGURED":{"$ref":"#/components/examples/NOT_CONFIGURED"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","INVALID_JSON","PAYLOAD_TOO_LARGE","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_REQUIRED","NOT_CONFIGURED","BILLING_NOT_SET_UP","TOPUP_NOT_OFFERED"]}},"/v1/billing/invoices":{"get":{"operationId":"listInvoices","summary":"The client's invoices, newest first","description":"The client's invoices, newest first, as the payment provider holds them: each with its id, its hosted page (where an open one can be paid), its status and its amount after any discount.\n\n**Cost**: nothing.\n\n**Called by** a consumer: the client key with `x-atlas-consumer` naming one of its consumers, or a consumer key where the account allows them. The client alone is refused with `CONSUMER_REQUIRED`.","tags":["Account"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","example":"cn_8fHq2LmNcV0pXyT3rW6aZe"},"required":false,"description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","name":"x-atlas-consumer","in":"header"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"invoiceId":{"type":"string","description":"The invoice's id with the payment provider."},"url":{"type":"string","nullable":true,"format":"uri","description":"Its hosted page, where it can be viewed and paid."},"status":{"type":"string","enum":["draft","open","paid","void","uncollectible"],"description":"open: raised and not yet paid. paid: settled. void: cancelled by Atlas."},"pence":{"type":"integer","minimum":0,"description":"What it is for, in pence, after any discount."}},"required":["invoiceId","url","status","pence"],"description":"One invoice."},"description":"The invoices, newest first."}},"required":["data"],"description":"The client's invoices, newest first, as the payment provider holds them."},"example":{"data":[{"invoiceId":"in_1QxYz2AbCdEfGh","url":"https://invoice.stripe.com/i/acct_1/test_a1B2c3","status":"paid","pence":20000}]}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_REQUIRED`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_REQUIRED":{"$ref":"#/components/examples/CONSUMER_REQUIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"In conflict with what is already recorded: `BILLING_NOT_SET_UP`.","content":{"application/json":{"examples":{"BILLING_NOT_SET_UP":{"$ref":"#/components/examples/BILLING_NOT_SET_UP"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable: `NOT_CONFIGURED`.","content":{"application/json":{"examples":{"NOT_CONFIGURED":{"$ref":"#/components/examples/NOT_CONFIGURED"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_REQUIRED","NOT_CONFIGURED","BILLING_NOT_SET_UP"]}},"/v1/connections/requests/{requestId}":{"get":{"operationId":"getConnectionRequest","summary":"What an assistant asks for when it signs in: who it is and where it goes next","description":"What an assistant asks for when it signs in to Atlas through the MCP endpoint, for the page where a person decides: what the assistant calls itself and its OAuth client id (as it gave them, not checked by Atlas), the host the person is sent back to, what it asks to do (always `atlas`: read as the consumer chosen), and when the request lapses. The client console calls this on the page the sign-in lands on; your own integration need not.\n\nA request already decided, lapsed, or never made answers `CONNECTION_REQUEST_NOT_FOUND`.\n\n**Cost**: see [pricing](https://atlas.oromiq.com/pricing/).\n\n**Called by** a consumer: the client key with `x-atlas-consumer` naming one of its consumers, or a consumer key where the account allows them. The client alone is refused with `CONSUMER_REQUIRED`.","tags":["Assistants"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"type":"string","pattern":"^cxr_[A-Za-z0-9_-]{12,40}$","description":"A sign-in an assistant has started and not yet had decided."},"required":true,"description":"A sign-in an assistant has started and not yet had decided.","name":"requestId","in":"path","example":"cxr_Nf7wQ2pLk9VbT4sXa"},{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","example":"cn_8fHq2LmNcV0pXyT3rW6aZe"},"required":false,"description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","name":"x-atlas-consumer","in":"header"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"requestId":{"type":"string","pattern":"^cxr_[A-Za-z0-9_-]{12,40}$","description":"A sign-in an assistant has started and not yet had decided."},"app":{"$ref":"#/components/schemas/ConnectingApp"},"redirectHost":{"type":"string","description":"The host the person is sent back to once the decision is made: the assistant’s own. Shown so a person sees where they are going."},"scope":{"type":"string","description":"What the assistant asked to do. Always `atlas`: read as the consumer chosen."},"expiresAt":{"allOf":[{"$ref":"#/components/schemas/IsoDateTime"},{"description":"When the request lapses: a decision after it is refused, and the assistant starts again."}]}},"required":["requestId","app","redirectHost","scope","expiresAt"],"description":"The sign-in an assistant has started, for the page where a person decides it."}},"required":["data"]},"example":{"data":{"requestId":"cxr_Nf7wQ2pLk9VbT4sXa","app":{"name":"Northfield Assistant","clientId":"https://assistant.northfield.example/oauth/client-metadata.json","website":"https://assistant.northfield.example"},"redirectHost":"assistant.northfield.example","scope":"atlas","expiresAt":"2026-11-19T10:20:00.000Z"}}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_REQUIRED`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_REQUIRED":{"$ref":"#/components/examples/CONSUMER_REQUIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found: `CONNECTION_REQUEST_NOT_FOUND`.","content":{"application/json":{"examples":{"CONNECTION_REQUEST_NOT_FOUND":{"$ref":"#/components/examples/CONNECTION_REQUEST_NOT_FOUND"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_REQUIRED","CONNECTION_REQUEST_NOT_FOUND"]},"post":{"operationId":"decideConnectionRequest","summary":"Approve an assistant’s sign-in as one of your consumers, or refuse it","description":"Approves an assistant's sign-in as one of your consumers, or refuses it. Approved, the assistant reads data as that consumer through the MCP endpoint, within the consumer's subscriptions and paid for in its tokens, and never writes; the connection it makes lasts until it is revoked, thirty days after its last use, or a year after it was made. Refused, the assistant is told so. Either way `redirectTo` is where to send the person next: the assistant's own address, carrying the outcome.\n\nA request already decided, lapsed, or never made answers `CONNECTION_REQUEST_NOT_FOUND`. Approving needs an active consumer of this client: another answers `CONSUMER_NOT_FOUND`.\n\n**Cost**: see [pricing](https://atlas.oromiq.com/pricing/).\n\n**Called by** a consumer: the client key with `x-atlas-consumer` naming one of its consumers, or a consumer key where the account allows them. The client alone is refused with `CONSUMER_REQUIRED`.","tags":["Assistants"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"type":"string","pattern":"^cxr_[A-Za-z0-9_-]{12,40}$","description":"A sign-in an assistant has started and not yet had decided."},"required":true,"description":"A sign-in an assistant has started and not yet had decided.","name":"requestId","in":"path","example":"cxr_Nf7wQ2pLk9VbT4sXa"},{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","example":"cn_8fHq2LmNcV0pXyT3rW6aZe"},"required":false,"description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","name":"x-atlas-consumer","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"approve":{"type":"boolean","description":"true to connect the assistant to the consumer named; false to refuse it."},"consumerId":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"The consumer the assistant will act as: one of this client’s, active. Required to approve."}},"required":["approve"]},"example":{"approve":true,"consumerId":"cn_8fHq2LmNcV0pXyT3rW6aZe"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"redirectTo":{"type":"string","description":"Where to send the person next: the assistant’s own address, carrying the outcome. Send the browser there at once."},"connectionId":{"type":"string","nullable":true,"pattern":"^cx_[A-Za-z0-9_-]{12,40}$","description":"The connection made, when approved; null when refused."}},"required":["redirectTo","connectionId"],"description":"The outcome, and where to send the person next."}},"required":["data"]},"example":{"data":{"redirectTo":"https://assistant.northfield.example/oauth/callback?code=Vq2pLm9Rk&state=Kd8s&iss=https%3A%2F%2Fapi.atlas.oromiq.com","connectionId":"cx_Hs3dK8mRq1ZcY6tWb"}}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`, `INVALID_JSON`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"},"INVALID_JSON":{"$ref":"#/components/examples/INVALID_JSON"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_REQUIRED`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_REQUIRED":{"$ref":"#/components/examples/CONSUMER_REQUIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found: `CONNECTION_REQUEST_NOT_FOUND`.","content":{"application/json":{"examples":{"CONNECTION_REQUEST_NOT_FOUND":{"$ref":"#/components/examples/CONNECTION_REQUEST_NOT_FOUND"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The body is too large: `PAYLOAD_TOO_LARGE`.","content":{"application/json":{"examples":{"PAYLOAD_TOO_LARGE":{"$ref":"#/components/examples/PAYLOAD_TOO_LARGE"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","INVALID_JSON","PAYLOAD_TOO_LARGE","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_REQUIRED","CONNECTION_REQUEST_NOT_FOUND"]}},"/v1/connections":{"get":{"operationId":"listConnections","summary":"The assistants connected to your consumers, newest first","description":"Every assistant connected to one of your consumers, newest first, revoked ones included: the consumer each reads as, what the assistant calls itself, when it was approved, when it last read anything, when it ends of itself, and when it was revoked. Nothing here names a person: a connection is the assistant's, approved from the client console.\n\n**Cost**: see [pricing](https://atlas.oromiq.com/pricing/).\n\n**Called by** a consumer: the client key with `x-atlas-consumer` naming one of its consumers, or a consumer key where the account allows them. The client alone is refused with `CONSUMER_REQUIRED`.","tags":["Assistants"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","example":"cn_8fHq2LmNcV0pXyT3rW6aZe"},"required":false,"description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","name":"x-atlas-consumer","in":"header"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Connection"},"description":"Every connection of this client, newest first, revoked ones included."}},"required":["data"]},"example":{"data":[{"connectionId":"cx_Hs3dK8mRq1ZcY6tWb","consumerId":"cn_8fHq2LmNcV0pXyT3rW6aZe","app":{"name":"Northfield Assistant","clientId":"https://assistant.northfield.example/oauth/client-metadata.json","website":"https://assistant.northfield.example"},"scope":"atlas","createdAt":"2026-11-19T10:12:40.000Z","lastUsedAt":"2026-11-19T15:03:12.000Z","expiresAt":"2026-12-19T15:03:12.000Z","revokedAt":null}]}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_REQUIRED`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_REQUIRED":{"$ref":"#/components/examples/CONSUMER_REQUIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_REQUIRED"]}},"/v1/connections/{connectionId}":{"delete":{"operationId":"revokeConnection","summary":"Cut an assistant off: its connection stops at once","description":"Cuts an assistant off at once: every read with that connection is refused from then on, and the assistant has to sign in again, which lands on your console for a new decision. The connection stays in the list with `revokedAt` set.\n\nA connection that does not exist or is not this client's answers `CONNECTION_NOT_FOUND`.\n\n**Cost**: see [pricing](https://atlas.oromiq.com/pricing/).\n\n**Called by** a consumer: the client key with `x-atlas-consumer` naming one of its consumers, or a consumer key where the account allows them. The client alone is refused with `CONSUMER_REQUIRED`.","tags":["Assistants"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"type":"string","pattern":"^cx_[A-Za-z0-9_-]{12,40}$","description":"An assistant’s connection to one of your consumers."},"required":true,"description":"An assistant’s connection to one of your consumers.","name":"connectionId","in":"path","example":"cx_Hs3dK8mRq1ZcY6tWb"},{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","example":"cn_8fHq2LmNcV0pXyT3rW6aZe"},"required":false,"description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","name":"x-atlas-consumer","in":"header"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true],"description":"Always true: the operation succeeded."}},"required":["ok"],"description":"The result."}},"required":["data"],"description":"Nothing to return beyond success."},"example":{"data":{"ok":true}}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_REQUIRED`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_REQUIRED":{"$ref":"#/components/examples/CONSUMER_REQUIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found: `CONNECTION_NOT_FOUND`.","content":{"application/json":{"examples":{"CONNECTION_NOT_FOUND":{"$ref":"#/components/examples/CONNECTION_NOT_FOUND"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_REQUIRED","CONNECTION_NOT_FOUND"]}},"/v1/plans":{"get":{"operationId":"listPlans","summary":"The plans: prices, allowances, consumers and packs included, rights and rate, with the price list","description":"The plans and what each allows: its monthly and annual price, monthly token allowance, the consumers and layer packs it includes, what it licenses, its rate (calls a second and the burst), and whether and at what price tokens can be bought beyond the allowance. `tokens` is what each action costs in tokens and `rules` how a price scales or lapses, the same for every plan.\n\n- **`tokensPerMonth`** is a hard limit: a call that would pass it is refused with `TOKENS_EXHAUSTED`.\n- **What is listed:** a client sees the published plans, its own plans, and any other plan one of its consumers is on. A consumer key sees the published plans and its own plan.\n- **`current`** names the plan your client is on. Absent until Atlas has set one.\n- **`retired`** plans stay with the consumers already on them; no consumer can be given one.\n- Prices are in pence.\n\n**Cost**: nothing.\n\n**Called by** the client or any of its consumers.","tags":["Reference"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"One of your consumers, to call as that consumer; left out, the call is the client's own. Not sent with a consumer key.","example":"cn_8fHq2LmNcV0pXyT3rW6aZe"},"required":false,"description":"One of your consumers, to call as that consumer; left out, the call is the client's own. Not sent with a consumer key.","name":"x-atlas-consumer","in":"header"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Tier"},"description":"The plans the client may put a consumer on."},"current":{"type":"string","pattern":"^[a-z][a-z0-9-]{1,30}$","description":"The plan the caller's client is on, by its name (0.40.1). Absent when the client has no plan yet."},"tokens":{"type":"object","properties":{"searchRow":{"type":"integer","minimum":0,"description":"One search row, facts only, when a page serves it. A row served to the same consumer within `rules.searchRowFreeDays` takes nothing."},"rowExpand":{"type":"integer","minimum":0,"description":"On top of a search row, when the row carries its attached lists (`expand=attached`)."},"lookup":{"type":"integer","minimum":0,"description":"A lookup that finds an entity, or a resolve that finds a candidate."},"record":{"type":"integer","minimum":0,"description":"A full read of an entity. Reading an entity the consumer holds takes nothing."},"history":{"type":"integer","minimum":0,"description":"An entity's history, wherever it is served: once per entity, free again for `rules.historyFreeDays`."},"prefill":{"type":"integer","minimum":0,"description":"A prefill that finds something."},"people":{"type":"integer","minimum":0,"description":"`POST /v1/people` when it names someone."},"position":{"type":"integer","minimum":0,"description":"A benchmark position that answers."},"baseline":{"type":"integer","minimum":0,"description":"A benchmark baseline, per cohort series returned."},"network":{"type":"integer","minimum":0,"description":"An entity network map: the base, plus `rules.networkPerNode` for each node returned."},"report":{"type":"integer","minimum":0,"description":"A report run: the base, plus `rules.reportPerThousand` for each 1,000 entities in its scope, up to `rules.reportMax`."},"reportSummary":{"type":"integer","minimum":0,"description":"A CQC report summary, per report. Reading it again takes nothing for `rules.rereadFreeDays`."},"dossier":{"type":"integer","minimum":0,"description":"An operator dossier. Reading it again takes nothing for `rules.rereadFreeDays`."},"heldEntity":{"type":"integer","minimum":0,"description":"A held entity, each month it is held, from `setHoldings`: it covers alerts, refreshes, people names and the enrichment-only layers on it."},"standingSearch":{"type":"integer","minimum":0,"description":"A standing search, each month it runs, from `createInterest`: when it is made, then at the start of each month."}},"required":["searchRow","rowExpand","lookup","record","history","prefill","people","position","baseline","network","report","reportSummary","dossier","heldEntity","standingSearch"],"description":"What each action costs in tokens, the same for every plan."},"rules":{"type":"object","properties":{"reportPerThousand":{"type":"integer","minimum":0,"description":"Tokens a report adds for each 1,000 entities in its scope, on top of `tokens.report`."},"reportMax":{"type":"integer","minimum":0,"description":"The most tokens one report run takes."},"networkPerNode":{"type":"integer","minimum":0,"description":"Tokens a network map adds for each node returned, on top of `tokens.network`."},"networkMaxNodes":{"type":"integer","minimum":0,"description":"The most nodes one network map returns."},"historyFreeDays":{"type":"integer","minimum":0,"description":"Days an entity's history stays free to the consumer once paid for."},"searchRowFreeDays":{"type":"integer","minimum":0,"description":"Days a search row stays free to the consumer it was served to."},"rereadFreeDays":{"type":"integer","minimum":0,"description":"Days a report summary or a dossier stays free to read again."}},"required":["reportPerThousand","reportMax","networkPerNode","networkMaxNodes","historyFreeDays","searchRowFreeDays","rereadFreeDays"],"description":"The rules a price scales or lapses by, the same for every plan."}},"required":["data"]},"example":{"data":[{"name":"starter","callsPerSecond":5,"burst":25,"annualPence":29000,"tenantsIncluded":3,"extraTenantPence":2000,"packsIncluded":1,"holdingsCap":null,"rights":"Embedded use","tokensPerMonth":30000,"monthlyPence":34900,"topUps":true,"pencePerToken":1.5,"retired":false}],"current":"starter","tokens":{"searchRow":1,"rowExpand":5,"lookup":1,"record":40,"history":20,"prefill":5,"people":15,"position":15,"baseline":25,"network":50,"report":10,"reportSummary":15,"dossier":150,"heldEntity":5,"standingSearch":25},"rules":{"reportPerThousand":1,"reportMax":250,"networkPerNode":2,"networkMaxNodes":1000,"historyFreeDays":30,"searchRowFreeDays":90,"rereadFreeDays":30}}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL"]}},"/v1/pricing":{"get":{"operationId":"pricing","summary":"The prices: the tokens each action takes and the published plans, with no key","description":"The prices, with no key: what each action costs in tokens, the rules a price scales or lapses by, the operations that cost nothing, the published plans with their prices, allowances, consumers and packs included, rights and rate, and the layer packs. What the pricing page shows.\n\n- **`tokens`** names each action and what it takes. An action that finds nothing takes nothing.\n- **`rules`** are the figures a price scales by (a report per 1,000 entities in its scope, a network per node returned) and the days a row, a history, a summary or a dossier stays free.\n- **`free`** lists the operations that cost nothing, by operation id.\n- **`plans`** are the published plans, in order. A plan made for one client is not listed: `GET /v1/plans` lists it to that client.\n- **`packs`** are the layer packs: core comes with every plan; a plan includes some number of the others.\n- Prices are in pence. `asOf` is when they were last set.\n\n**Cost**: nothing, and no key is needed.\n\n**Called by** anyone: no key is needed.","tags":["Reference"],"security":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"tokens":{"$ref":"#/components/schemas/TokenPrices"},"rules":{"$ref":"#/components/schemas/PriceRules"},"free":{"type":"array","items":{"type":"string"},"description":"The operations that never take tokens, by operation id, setting up your account, keys, consumers and webhooks among them: counted and rate-limited, never charged. Every other operation takes one of the prices in tokens."},"plans":{"type":"array","items":{"$ref":"#/components/schemas/PublishedPlan"},"description":"The published plans, in order."},"packs":{"type":"array","items":{"$ref":"#/components/schemas/LayerPack"},"description":"The layer packs, core first."},"currency":{"type":"string","enum":["GBP"],"description":"Every price is in pence sterling."},"asOf":{"type":"string","format":"date-time","description":"When the prices were last set."}},"required":["tokens","plans","currency","asOf"],"description":"The prices: what each action costs in tokens, the rules a price scales by, what is free, the published plans and the layer packs."}},"required":["data"]}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_REQUIRED`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_REQUIRED":{"$ref":"#/components/examples/CONSUMER_REQUIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/usage":{"get":{"operationId":"getUsage","summary":"The calling consumer's calls, refusals and tokens for a month (this month by default)","description":"The calling consumer's month: its calls and rate-limit refusals, failed calls by outcome, each operation's calls, its tokens (allowance, granted, bought, spent, balance, cap and when the month renews), tokens spent by kind, a daily series, and, for the current month, `unusualUse`: whether its calls are far above its own recent normal, a sign its key may be misused. A call that would take more tokens than `tokens.balance` is refused with `TOKENS_EXHAUSTED`, and nothing is charged. Counts only, never what was searched or read.\n\nCounts are a minute or so behind.\n\n**Cost**: see [pricing](https://atlas.oromiq.com/pricing/).\n\n**Limits**: `month` is YYYY-MM (UTC); left out, the current month. The month renews at midnight UTC on the first.\n\n**Called by** a consumer: the client key with `x-atlas-consumer` naming one of its consumers, or a consumer key where the account allows them. The client alone is refused with `CONSUMER_REQUIRED`.","tags":["Account"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}$","description":"YYYY-MM; default the current month."},"required":false,"description":"YYYY-MM; default the current month.","name":"month","in":"query","example":"2026-10"},{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","example":"cn_8fHq2LmNcV0pXyT3rW6aZe"},"required":false,"description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","name":"x-atlas-consumer","in":"header"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Usage"},"example":{"data":{"month":"2026-10","subject":{"clientId":"cl_Q7mVt2KpLx9RzW4a","consumerId":"cn_8fHq2LmNcV0pXyT3rW6aZe"},"tier":"growth","subscriptions":["companies_house","cqc","fsa"],"calls":18406,"refused":12,"failed":{"tokens":0,"forbidden":3,"badRequest":41,"notFound":7,"auth":0,"server":1},"byEndpoint":[{"endpoint":"search","calls":6120,"refused":9,"failed":{"tokens":0,"forbidden":0,"badRequest":37,"notFound":0,"auth":0,"server":0}},{"endpoint":"getEntity","calls":9884,"refused":3,"failed":{"tokens":0,"forbidden":3,"badRequest":4,"notFound":7,"auth":0,"server":1}},{"endpoint":"resolve","calls":2402,"refused":0,"failed":{"tokens":0,"forbidden":0,"badRequest":0,"notFound":0,"auth":0,"server":0}}],"tokens":{"allowance":20000,"granted":0,"toppedUp":0,"spent":7401,"balance":12599,"cap":null,"renewsAt":"2026-11-01T00:00:00.000Z"},"tokensByKind":{"record":2340,"history":160,"search":3912,"lookup":214,"prefill":35,"people":60,"benchmark":45,"network":225},"days":[{"date":"2026-10-29","calls":702,"refused":0,"failed":{"tokens":0,"forbidden":0,"badRequest":2,"notFound":1,"auth":0,"server":0},"tokensByKind":{"record":120,"history":0,"search":148,"lookup":9,"prefill":0,"people":5,"benchmark":0,"network":75}},{"date":"2026-10-30","calls":318,"refused":0,"failed":{"tokens":0,"forbidden":0,"badRequest":0,"notFound":0,"auth":0,"server":0},"tokensByKind":{"record":60,"history":0,"search":52,"lookup":4,"prefill":5,"people":0,"benchmark":0,"network":0}}],"unusualUse":{"flagged":false,"lastTwoHours":41,"usualTwoHours":48,"lastDay":702,"usualDay":590,"judged":true}}}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_REQUIRED`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_REQUIRED":{"$ref":"#/components/examples/CONSUMER_REQUIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_REQUIRED"]}},"/v1/statement":{"get":{"operationId":"getStatement","summary":"The calling consumer's token movements for a month, newest first","description":"The calling consumer's token movements for a month, newest first: every charge (a full read, a history unlock, search rows, a lookup, a prefill, people, a benchmark, a network map, a report run, a standing search's month, a held entity's month), every refund, grant, top-up and the month's renewal.\n\nCharges are negative and everything else positive; `spentToDate` is the month's spending up to and including the row, net of refunds. A refund (`kind: refund`, with `refundOf`) is a charge given back because its answer could not be sent. A row never says who granted tokens or why, or what was searched: a search charge names its saved search and how many rows it was for.\n\n**Cost**: see [pricing](https://atlas.oromiq.com/pricing/).\n\n**Limits**: `limit` up to 200 rows a page (100 by default); follow `next` for more. `month` is YYYY-MM (UTC); left out, the current month.\n\n**Called by** a consumer: the client key with `x-atlas-consumer` naming one of its consumers, or a consumer key where the account allows them. The client alone is refused with `CONSUMER_REQUIRED`.","tags":["Account"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}$","description":"YYYY-MM; default the current month."},"required":false,"description":"YYYY-MM; default the current month.","name":"month","in":"query","example":"2026-10"},{"schema":{"$ref":"#/components/schemas/Cursor"},"required":false,"description":"An opaque page token: send back the `next` value of the previous page. Leave out for the first page.","name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":100,"description":"Rows per page, at most 200."},"required":false,"description":"Rows per page, at most 200.","name":"limit","in":"query","example":3},{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","example":"cn_8fHq2LmNcV0pXyT3rW6aZe"},"required":false,"description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","name":"x-atlas-consumer","in":"header"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Statement"},"example":{"data":[{"id":"tl_Rk2Vq9Lp4Xa7","at":"2026-10-30T07:46:12.000Z","kind":"record","refundOf":null,"tokens":-40,"entityId":"prm_pdFPkhx7RuGEeFl8Q1pP","searchId":null,"results":null,"spentToDate":7401},{"id":"tl_Mb6Tn1Wc8Zd3","at":"2026-10-30T07:41:55.000Z","kind":"search","refundOf":null,"tokens":-48,"entityId":null,"searchId":"ss_Lq3Nv8Pz2Kc5Wd","results":48,"spentToDate":7381},{"id":"tl_Fy5Hs2Jq7Ub0","at":"2026-10-29T16:20:03.000Z","kind":"refund","refundOf":"refresh","tokens":10,"entityId":"org_7pmXa7UUhqFbGdQw9mE1","searchId":null,"results":null,"spentToDate":7333}],"next":"MjAyNi0xMC0yOVQxNjoyMDowMy4wMDBafHRsX0Z5NUhzMkpxN1ViMA","month":"2026-10"}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_REQUIRED`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_REQUIRED":{"$ref":"#/components/examples/CONSUMER_REQUIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_REQUIRED"]}},"/v1/holdings":{"get":{"operationId":"listHoldings","summary":"The entities this consumer holds, a page at a time","description":"Every entity this consumer holds, as entity ids in id order, a page at a time. Holdings are each consumer's own. Follow the pages with `cursor` set to the previous page's `next`; `next` is null on the last page.\n\n**Cost**: see [pricing](https://atlas.oromiq.com/pricing/).\n\n**Limits**: at most 1,000 ids a page, which is the default.\n\n**Called by** a consumer: the client key with `x-atlas-consumer` naming one of its consumers, or a consumer key where the account allows them. The client alone is refused with `CONSUMER_REQUIRED`.\n\n**Your duties**: Send entity ids only, never your own record or anything about a person.","tags":["Holdings"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"$ref":"#/components/schemas/Cursor"},"required":false,"description":"An opaque page token: send back the `next` value of the previous page. Leave out for the first page.","name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":1000,"default":1000,"description":"Entity ids per page, at most 1000. 1000 by default."},"required":false,"description":"Entity ids per page, at most 1000. 1000 by default.","name":"limit","in":"query","example":2},{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","example":"cn_8fHq2LmNcV0pXyT3rW6aZe"},"required":false,"description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","name":"x-atlas-consumer","in":"header"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/EntityId"},"description":"The ids of the held entities."},"next":{"type":"string","nullable":true,"minLength":1,"maxLength":200,"description":"The cursor for the next page; null on the last."}},"required":["data","next"],"description":"Every entity the acting client holds, a page at a time."},"example":{"data":["org_7pmXa7UUhqFbGdQw9mE1","prm_pdFPkhx7RuGEeFl8Q1pP"],"next":"prm_pdFPkhx7RuGEeFl8Q1pP"}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_REQUIRED`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_REQUIRED":{"$ref":"#/components/examples/CONSUMER_REQUIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_REQUIRED"]},"put":{"operationId":"setHoldings","summary":"Add or remove entities this consumer holds","description":"Tells Atlas which entities this consumer holds: entity ids only, never your own record. A holding decides what is answered for the entity: the people its registers name, and the layers answered only for a held entity. Add entities as your users attach them to their records, and remove them when they detach. Data answered only for a held entity, such as a company's officers, can take until the next day to appear.\n\n`add` and `remove` take up to 500 ids each. An id in both is added. Adding an id already held, or removing one not held, changes nothing. The answer is how many entities the consumer now holds. When the last holding of an entity ends, the names kept for it are deleted.\n\n**Cost**: see [pricing](https://atlas.oromiq.com/pricing/).\n\n**Called by** a consumer: the client key with `x-atlas-consumer` naming one of its consumers, or a consumer key where the account allows them. The client alone is refused with `CONSUMER_REQUIRED`.\n\n**Your duties**: Send entity ids only, never your own record or anything about a person.","tags":["Holdings"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","example":"cn_8fHq2LmNcV0pXyT3rW6aZe"},"required":false,"description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","name":"x-atlas-consumer","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"add":{"type":"array","items":{"$ref":"#/components/schemas/EntityId"},"maxItems":500,"default":[],"description":"Entities to add to the holdings, at most 500 a call."},"remove":{"type":"array","items":{"$ref":"#/components/schemas/EntityId"},"maxItems":500,"default":[],"description":"Entities to take out of the holdings, at most 500 a call."}},"description":"Which entities the acting client holds. Entity ids only, never your own record. Holdings decide where people data and enrichment-only layers may be served, and how long people data is kept."},"example":{"add":["org_7pmXa7UUhqFbGdQw9mE1","prm_pdFPkhx7RuGEeFl8Q1pP"],"remove":[]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"held":{"type":"integer","description":"How many entities are held after the change."}},"required":["held"],"description":"The holdings after the change."}},"required":["data"]},"example":{"data":{"held":2}}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`, `INVALID_JSON`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"},"INVALID_JSON":{"$ref":"#/components/examples/INVALID_JSON"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_REQUIRED`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_REQUIRED":{"$ref":"#/components/examples/CONSUMER_REQUIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The body is too large: `PAYLOAD_TOO_LARGE`.","content":{"application/json":{"examples":{"PAYLOAD_TOO_LARGE":{"$ref":"#/components/examples/PAYLOAD_TOO_LARGE"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","INVALID_JSON","PAYLOAD_TOO_LARGE","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_REQUIRED"]}},"/v1/holdings/moved":{"get":{"operationId":"movedHoldings","summary":"Which held entities merged or split since a date","description":"Which entities this consumer holds have moved since a date: an id that merged into another (`merged`: `from` now answers as `to`), or an entity that split (`split`: `to` split off `from`, which keeps its id). Every id still answers; call this daily or so to update the ids you store. Oldest first.\n\n**Cost**: see [pricing](https://atlas.oromiq.com/pricing/).\n\n**Called by** a consumer: the client key with `x-atlas-consumer` naming one of its consumers, or a consumer key where the account allows them. The client alone is refused with `CONSUMER_REQUIRED`.\n\n**Your duties**: Send entity ids only, never your own record or anything about a person.","tags":["Holdings"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"allOf":[{"$ref":"#/components/schemas/IsoDate"},{"description":"Moves on or after this day."}]},"required":true,"description":"Moves on or after this day.","name":"since","in":"query","example":"2026-10-01"},{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","example":"cn_8fHq2LmNcV0pXyT3rW6aZe"},"required":false,"description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","name":"x-atlas-consumer","in":"header"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"from":{"$ref":"#/components/schemas/EntityId"},"to":{"$ref":"#/components/schemas/EntityId"},"kind":{"type":"string","enum":["merged","split"],"description":"merged: `from` is now served as `to`. split: `to` split off `from`, which keeps its id."},"since":{"$ref":"#/components/schemas/IsoDate"}},"required":["from","to","kind","since"]},"description":"The moves, one per held entity that moved."}},"required":["data"],"description":"Which of the entities the acting client holds have moved since a date: an id that merged into another, or an entity that split. Every id still works; update the ids you store."},"example":{"data":[{"from":"org_Kd2LmT8xYp3kQ7vH9q1B","to":"org_7pmXa7UUhqFbGdQw9mE1","kind":"merged","since":"2026-10-14"}]}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_REQUIRED`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_REQUIRED":{"$ref":"#/components/examples/CONSUMER_REQUIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable: `NOT_READY`.","content":{"application/json":{"examples":{"NOT_READY":{"$ref":"#/components/examples/NOT_READY"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_REQUIRED","NOT_READY"]}},"/v1/links/{linkId}/flags":{"post":{"operationId":"flagLink","summary":"Flag a possible match for review","description":"Flags a possible match your team doubts, by the `linkId` it came with from `POST /v1/possible-matches` or a search row. A flag is a signal for Atlas to review the match, never a decision: Atlas confirms matches, and `reviewed` on the match says when it has. Who raised it, and any note, stay with you.\n\n- `reason`: `same` or `not_same` (what your users make of the match itself), `out_of_date` (a record is out of date or closed), or `other`.\n- A link no longer shown answers `LINK_NOT_FOUND`. `same` on a match Atlas has already confirmed answers `LINK_ALREADY_REVIEWED`; `not_same` is still taken.\n\n**Cost**: see [pricing](https://atlas.oromiq.com/pricing/).\n\n**Called by** a consumer: the client key with `x-atlas-consumer` naming one of its consumers, or a consumer key where the account allows them. The client alone is refused with `CONSUMER_REQUIRED`.","tags":["Entities"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":80,"description":"A possible match's linkId."},"required":true,"description":"A possible match's linkId.","name":"linkId","in":"path","example":"lk_Xq3vR8tYp2LmK9wHd4Fj7Nc1sBe"},{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","example":"cn_8fHq2LmNcV0pXyT3rW6aZe"},"required":false,"description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","name":"x-atlas-consumer","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","enum":["same","not_same","out_of_date","other"],"description":"same: your users take the record for the same organisation or premises. not_same: they do not. out_of_date: a record is out of date or closed. other: something else is wrong."}},"required":["reason"],"additionalProperties":false,"description":"Tells Atlas what your users make of a possible match, as a signal to review it: a flag never confirms or rejects the match, Atlas does. Atlas keeps the flag only, never who raised it or any note."},"example":{"reason":"not_same"}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"flagged":{"type":"boolean","enum":[true],"description":"Always true."}},"required":["flagged"],"description":"Confirms the flag was kept."}},"required":["data"]},"example":{"data":{"flagged":true}}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`, `INVALID_JSON`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"},"INVALID_JSON":{"$ref":"#/components/examples/INVALID_JSON"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_REQUIRED`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_REQUIRED":{"$ref":"#/components/examples/CONSUMER_REQUIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found: `LINK_NOT_FOUND`.","content":{"application/json":{"examples":{"LINK_NOT_FOUND":{"$ref":"#/components/examples/LINK_NOT_FOUND"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"In conflict with what is already recorded: `LINK_ALREADY_REVIEWED`.","content":{"application/json":{"examples":{"LINK_ALREADY_REVIEWED":{"$ref":"#/components/examples/LINK_ALREADY_REVIEWED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The body is too large: `PAYLOAD_TOO_LARGE`.","content":{"application/json":{"examples":{"PAYLOAD_TOO_LARGE":{"$ref":"#/components/examples/PAYLOAD_TOO_LARGE"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable: `NOT_READY`.","content":{"application/json":{"examples":{"NOT_READY":{"$ref":"#/components/examples/NOT_READY"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","INVALID_JSON","PAYLOAD_TOO_LARGE","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_REQUIRED","LINK_NOT_FOUND","LINK_ALREADY_REVIEWED","NOT_READY"]}},"/v1/interests":{"get":{"operationId":"listInterests","summary":"The client's standing searches and watches","description":"The calling consumer's alerts: its standing searches and watches. Each says whether new data is being checked against it (`matching`), and if not, why (`stopped`, `notice`); a `notice` can also say why fewer events are sent while it goes on, such as a paused watch.\n\n`heldBackLastDay` on an interest counts the events dropped past its limit of 1,000 an hour in the last 24 hours; beside `data`, it counts those dropped past the consumer's limit of 5,000 an hour across its interests.\n\n**Cost**: see [pricing](https://atlas.oromiq.com/pricing/).\n\n**Called by** a consumer: the client key with `x-atlas-consumer` naming one of its consumers, or a consumer key where the account allows them. The client alone is refused with `CONSUMER_REQUIRED`.\n\n**Your duties**: Show an event's `attributions` wherever you show its data, and `currency.asOf` where `currency.required` is true. Check every webhook delivery's signature.","tags":["Alerts"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","example":"cn_8fHq2LmNcV0pXyT3rW6aZe"},"required":false,"description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","name":"x-atlas-consumer","in":"header"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Interest"},"description":"The consumer's standing searches and watches."},"next":{"type":"string","nullable":true,"minLength":1,"maxLength":200,"description":"The cursor for the next page; null on the last."},"heldBackLastDay":{"type":"integer","minimum":0,"description":"Events dropped past the consumer's own limit across its standing searches and watches in the last 24 hours. Present only when there were some."}},"required":["data","next"]},"example":{"data":[{"id":"int_9Hq2LmT8xYp3kQ7v","kind":"search","label":"Nursing homes in the South East rated Inadequate","conditions":[{"field":"region","operator":"equals","value":"South East"},{"field":"cqc.rating","operator":"equals","value":"Inadequate"}],"entityIds":[],"signals":[],"layers":["cqc"],"createdAt":"2026-10-30T09:15:00.000Z","level":"premises","fields":["cqc.status"],"on":["entered","changed","left"],"matching":true}],"next":null}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_REQUIRED`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_REQUIRED":{"$ref":"#/components/examples/CONSUMER_REQUIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_REQUIRED"]},"post":{"operationId":"createInterest","summary":"Add a standing search or watch","description":"Adds an alert: a standing search (`kind: \"search\"`, with `conditions` as `POST /v1/search` takes them, narrowing rule included) or a watch (`kind: \"watch\"`, with the `entityIds` to follow). Events arrive through `GET /v1/interests/events` and your webhook.\n\n- `fields`: the catalogue keys whose change counts. Left out, any change you could see counts. Never a field about a person.\n- `on`: `entered`, `changed`, `left`. Left out, `entered` and `changed`. A watch is told of `changed` only.\n- `matching` in the answer says whether new data is checked against the interest. A search whose conditions cannot be checked as data arrives is kept with `matching: false` and a `notice`; a watch that would need the same is refused with `WATCH_NOT_LIVE`.\n- A new interest sends nothing for what already matches: run the same conditions as a search for the current list.\n- An interest over a layer answered only for a held entity, such as the ICO's, is refused.\n\nA watch costs nothing.\n\n**Cost**: see [pricing](https://atlas.oromiq.com/pricing/).\n\n**Limits**: at most 50 interests per consumer, and 1,000 events an interest an hour; past that, one `interest.too_broad` event and the rest are dropped.\n\n**Called by** a consumer: the client key with `x-atlas-consumer` naming one of its consumers, or a consumer key where the account allows them. The client alone is refused with `CONSUMER_REQUIRED`.\n\n**Your duties**: Show an event's `attributions` wherever you show its data, and `currency.asOf` where `currency.required` is true. Check every webhook delivery's signature.","tags":["Alerts"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","example":"cn_8fHq2LmNcV0pXyT3rW6aZe"},"required":false,"description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","name":"x-atlas-consumer","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["search","watch"],"description":"search: a standing search over conditions. watch: a watch on named entities."},"label":{"type":"string","maxLength":120,"description":"A name of your own for it, at most 120 characters."},"level":{"type":"string","enum":["organisation","premises"],"description":"Only organisations or only premises: the same as a level condition."},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/Condition"},"maxItems":20,"description":"For a search: the standing conditions, exactly as `POST /v1/search` takes them, with its narrowing rule. At most 20."},"entityIds":{"type":"array","items":{"$ref":"#/components/schemas/EntityId"},"minItems":1,"maxItems":100,"description":"For a watch: the entities watched."},"fields":{"type":"array","items":{"type":"string","minLength":1,"maxLength":80},"maxItems":30,"description":"The fields whose change is news, by catalogue key, such as companies_house.status, cqc.rating or region. At most 30. Left out, any change you can see in its layers counts. Never a field about a person."},"on":{"type":"array","items":{"$ref":"#/components/schemas/InterestOn"},"minItems":1,"maxItems":3,"description":"What is news: entered, changed, left. Left out, entered and changed. A watch gets changed alone."},"signals":{"type":"array","items":{"type":"string","minLength":1},"maxItems":30,"default":[],"description":"Signal keys that raise an event. The catalogue lists none, so leave it out."},"layers":{"$ref":"#/components/schemas/LayerScope"}},"required":["kind","layers"],"description":"A standing search or watch. One over an enrichment-only layer, such as ico, is refused, as is a condition or watched field about a person. At most 50 per consumer."},"example":{"kind":"search","label":"Nursing homes in the South East rated Inadequate","level":"premises","conditions":[{"field":"region","operator":"equals","value":"South East"},{"field":"cqc.rating","operator":"equals","value":"Inadequate"}],"fields":["cqc.status"],"on":["entered","changed","left"],"layers":["cqc"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Interest"}},"required":["data"]},"example":{"data":{"id":"int_9Hq2LmT8xYp3kQ7v","kind":"search","label":"Nursing homes in the South East rated Inadequate","conditions":[{"field":"region","operator":"equals","value":"South East"},{"field":"cqc.rating","operator":"equals","value":"Inadequate"}],"entityIds":[],"signals":[],"layers":["cqc"],"createdAt":"2026-10-30T09:15:00.000Z","level":"premises","fields":["cqc.status"],"on":["entered","changed","left"],"matching":true}}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`, `INVALID_JSON`, `INTEREST_FIELD_INVALID`, `WATCH_NOT_LIVE`, `WATCH_ENTITY_NOT_IN_LAYERS`, `CONDITIONS_INVALID`, `NARROWING_REQUIRED`, `VIA_NOT_CONNECTED`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"},"INVALID_JSON":{"$ref":"#/components/examples/INVALID_JSON"},"INTEREST_FIELD_INVALID":{"$ref":"#/components/examples/INTEREST_FIELD_INVALID"},"WATCH_NOT_LIVE":{"$ref":"#/components/examples/WATCH_NOT_LIVE"},"WATCH_ENTITY_NOT_IN_LAYERS":{"$ref":"#/components/examples/WATCH_ENTITY_NOT_IN_LAYERS"},"CONDITIONS_INVALID":{"$ref":"#/components/examples/CONDITIONS_INVALID"},"NARROWING_REQUIRED":{"$ref":"#/components/examples/NARROWING_REQUIRED"},"VIA_NOT_CONNECTED":{"$ref":"#/components/examples/VIA_NOT_CONNECTED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_REQUIRED`, `LAYER_NOT_SUBSCRIBED`, `INTEREST_LAYER_NOT_ALLOWED`, `INTEREST_PERSON_FIELD`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_REQUIRED":{"$ref":"#/components/examples/CONSUMER_REQUIRED"},"LAYER_NOT_SUBSCRIBED":{"$ref":"#/components/examples/LAYER_NOT_SUBSCRIBED"},"INTEREST_LAYER_NOT_ALLOWED":{"$ref":"#/components/examples/INTEREST_LAYER_NOT_ALLOWED"},"INTEREST_PERSON_FIELD":{"$ref":"#/components/examples/INTEREST_PERSON_FIELD"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found: `WATCH_ENTITY_NOT_FOUND`.","content":{"application/json":{"examples":{"WATCH_ENTITY_NOT_FOUND":{"$ref":"#/components/examples/WATCH_ENTITY_NOT_FOUND"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"In conflict with what is already recorded: `INTEREST_LIMIT_REACHED`.","content":{"application/json":{"examples":{"INTEREST_LIMIT_REACHED":{"$ref":"#/components/examples/INTEREST_LIMIT_REACHED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The body is too large: `PAYLOAD_TOO_LARGE`.","content":{"application/json":{"examples":{"PAYLOAD_TOO_LARGE":{"$ref":"#/components/examples/PAYLOAD_TOO_LARGE"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable: `NOT_READY`.","content":{"application/json":{"examples":{"NOT_READY":{"$ref":"#/components/examples/NOT_READY"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","INVALID_JSON","PAYLOAD_TOO_LARGE","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_REQUIRED","LAYER_NOT_SUBSCRIBED","INTEREST_LIMIT_REACHED","INTEREST_LAYER_NOT_ALLOWED","INTEREST_PERSON_FIELD","INTEREST_FIELD_INVALID","WATCH_NOT_LIVE","WATCH_ENTITY_NOT_FOUND","WATCH_ENTITY_NOT_IN_LAYERS","CONDITIONS_INVALID","NARROWING_REQUIRED","VIA_NOT_CONNECTED","NOT_READY"]}},"/v1/interests/events":{"get":{"operationId":"interestEvents","summary":"The calling consumer's interest events, with a cursor or a time window, waiting up to 30 seconds","description":"The calling consumer's feed: every event of its alerts, oldest first, kept 30 days.\n\n- Keep `next` and send it back as `after`. A cursor is yours alone; one past the end of your feed is refused.\n- `wait`, up to 30 seconds, holds the call until an event arrives.\n- `from` and `to` read a window again, if you lost your cursor; `interestId` keeps to one interest. Page with `next` and the same bounds; a call answering no events has read the window.\n- Read `type` first and ignore any type you do not know: `interest.change`, `interest.too_broad`, `consumer.too_broad`, `report.moved` and `person.notice`.\n- A `person.notice` says a person this consumer was given has objected or asked for erasure: act on it by its `actBy`. `GET /v1/people/notices` lists the same.\n- An event with data from a layer you are no longer subscribed to is withheld. People are never named in an event, and a postcode is its outward code only.\n\nCounted in your usage.\n\n**Cost**: see [pricing](https://atlas.oromiq.com/pricing/).\n\n**Called by** a consumer: the client key with `x-atlas-consumer` naming one of its consumers, or a consumer key where the account allows them. The client alone is refused with `CONSUMER_REQUIRED`.\n\n**Your duties**: Show an event's `attributions` wherever you show its data, and `currency.asOf` where `currency.required` is true. Check every webhook delivery's signature.","tags":["Alerts"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"The event id to resume after: the previous answer's `next`. Left out, the feed starts with the oldest event still kept, 30 days back."},"required":false,"description":"The event id to resume after: the previous answer's `next`. Left out, the feed starts with the oldest event still kept, 30 days back.","name":"after","in":"query","example":"ev_1841_aB3dE9xY"},{"schema":{"type":"integer","nullable":true,"minimum":0,"maximum":30,"default":0,"description":"With nothing new, how many seconds to hold the call open for an event before returning, at most 30. 0 returns at once."},"required":false,"description":"With nothing new, how many seconds to hold the call open for an event before returning, at most 30. 0 returns at once.","name":"wait","in":"query","example":30},{"schema":{"type":"string","format":"date-time","description":"Only events made at or after this instant, for a client that lost its cursor or wants a window again. With `after`, the later of the two starts the page. Events are kept 30 days."},"required":false,"description":"Only events made at or after this instant, for a client that lost its cursor or wants a window again. With `after`, the later of the two starts the page. Events are kept 30 days.","name":"from","in":"query"},{"schema":{"type":"string","format":"date-time","description":"Only events made before this instant. A page that reaches it returns `next` as usual; once a call returns no events, the window is read."},"required":false,"description":"Only events made before this instant. A page that reaches it returns `next` as usual; once a call returns no events, the window is read.","name":"to","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":80,"description":"Only this standing search's or watch's events, also once it has been deleted."},"required":false,"description":"Only this standing search's or watch's events, also once it has been deleted.","name":"interestId","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":500,"default":100,"description":"Events per page, at most 500. 100 by default."},"required":false,"description":"Events per page, at most 500. 100 by default.","name":"limit","in":"query"},{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","example":"cn_8fHq2LmNcV0pXyT3rW6aZe"},"required":false,"description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","name":"x-atlas-consumer","in":"header"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/InterestEvent"},"description":"The events, oldest first."},"next":{"type":"string","nullable":true,"minLength":1,"maxLength":200,"description":"The cursor to send back as `after`: the last event returned, or the one sent when there was none. Null only when the feed has never had an event and none was sent."},"charged":{"type":"integer","minimum":0,"description":"Tokens this page took: the events on it not delivered to you before. Left out when none."}},"required":["data","next"],"description":"The calling consumer's feed: every event of its standing searches and watches, oldest first. Keep `next` and send it back; a client in a loop with wait=30 sees each event within about a second of it being made. Also the catch-up while a webhook is down: events stay 30 days."},"example":{"data":[{"id":"ev_1842_aB3dE9xY","occurredAt":"2026-10-30T10:14:05.000Z","type":"interest.change","interestId":"int_9Hq2LmT8xYp3kQ7v","entityId":"prm_pdFPkhx7RuGEeFl8Q1pP","record":{"layer":"cqc","source":"locations","externalId":"1-2000000009"},"what":"changed","changes":[{"field":"cqc.status","from":"Registered","to":"Deregistered","asOf":"2026-10-29"}],"attributions":[{"layer":"cqc","text":"Care Quality Commission ratings and registration data, © CQC, licensed under the Open Government Licence v3.0."}],"currency":{"asOf":"2026-10-29","required":false},"homeBased":false}],"next":"ev_1842_aB3dE9xY"}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`, `INTEREST_CURSOR_INVALID`, `INTEREST_WINDOW_INVALID`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"},"INTEREST_CURSOR_INVALID":{"$ref":"#/components/examples/INTEREST_CURSOR_INVALID"},"INTEREST_WINDOW_INVALID":{"$ref":"#/components/examples/INTEREST_WINDOW_INVALID"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_REQUIRED`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_REQUIRED":{"$ref":"#/components/examples/CONSUMER_REQUIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_REQUIRED","INTEREST_CURSOR_INVALID","INTEREST_WINDOW_INVALID"]}},"/v1/interests/webhook":{"post":{"operationId":"createInterestWebhook","summary":"Register the consumer's webhook; its signing secret is shown once","description":"Registers the consumer's webhook: one https address, to which Atlas posts each event. The answer holds `secret`, **shown this once**. Registering again replaces the webhook with a new secret, resumes a paused one and starts from the newest event; ask for earlier events with `POST /v1/interests/webhook/redeliver`.\n\n- Each delivery is a POST of up to 50 events and the cursor after them, `{ data, next }`, with `x-atlas-timestamp` (Unix seconds) and `x-atlas-signature` (`v1=` and the hex HMAC SHA-256 of the timestamp, a full stop and the raw body, keyed with the secret).\n- Answer 2xx within 10 seconds. A failure is retried with growing gaps for 24 hours, then the webhook is paused. A redirect is a failure.\n- An address that is, or resolves to, a private, loopback or link-local one is refused. Check the signature on every delivery; do not rely on the sending address.\n\nEach delivery is counted in your usage.\n\n**Cost**: see [pricing](https://atlas.oromiq.com/pricing/).\n\n**Called by** a consumer: the client key with `x-atlas-consumer` naming one of its consumers, or a consumer key where the account allows them. The client alone is refused with `CONSUMER_REQUIRED`.\n\n**Your duties**: Show an event's `attributions` wherever you show its data, and `currency.asOf` where `currency.required` is true. Check every webhook delivery's signature.","tags":["Webhooks"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","example":"cn_8fHq2LmNcV0pXyT3rW6aZe"},"required":false,"description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","name":"x-atlas-consumer","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","maxLength":2000,"format":"uri","pattern":"^https:\\/\\/","description":"Where to post events: https only, never a private, loopback or link-local address."}},"required":["url"],"additionalProperties":false,"description":"The consumer's webhook. Registering one again replaces it, with a new secret, and resumes a paused one."},"example":{"url":"https://hooks.oakfield.example/atlas"}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"url":{"type":"string","description":"Where events are posted."},"status":{"type":"string","enum":["active","paused"],"description":"paused: deliveries failed for 24 hours; none is sent until the webhook is registered again. Events stay in the feed."},"pausedReason":{"type":"string","nullable":true,"description":"Why it was paused; null while active."},"pausedAt":{"type":"string","nullable":true,"format":"date-time","description":"When it was paused; null while active."},"createdAt":{"$ref":"#/components/schemas/IsoDateTime"},"notice":{"type":"string","description":"Why deliveries may be held just now, though the webhook is active. Events stay in the feed meanwhile."},"lastDelivery":{"type":"object","nullable":true,"properties":{"at":{"$ref":"#/components/schemas/IsoDateTime"},"ok":{"type":"boolean","description":"True when the delivery was accepted with a 2xx status."},"status":{"type":"integer","nullable":true,"description":"The HTTP status your endpoint returned; null when it returned none."}},"required":["at","ok","status"],"description":"The last delivery attempted; null before the first."},"secret":{"type":"string","minLength":32,"description":"The signing secret, shown this once."}},"required":["url","status","pausedReason","pausedAt","createdAt","lastDelivery","secret"],"description":"The webhook as registered, with its secret."}},"required":["data"],"description":"Each delivery is a POST of `{ data, next }`: the events, oldest first, and the feed cursor after them. It carries two headers: x-atlas-timestamp, the Unix seconds when it was signed, and x-atlas-signature, `v1=` followed by the hex HMAC SHA-256 of the timestamp, a full stop and the raw body, keyed with the secret. Return 2xx within 10 seconds. A failed delivery is retried with growing gaps for 24 hours, then the webhook is paused."},"example":{"data":{"url":"https://hooks.oakfield.example/atlas","status":"active","pausedReason":null,"pausedAt":null,"createdAt":"2026-10-30T09:20:00.000Z","lastDelivery":null,"secret":"whsec_Xq3vR8tYp2LmK9wHd4Fj7Nc1sBeGaT6uZoPiVy0JrWk"}}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`, `INVALID_JSON`, `WEBHOOK_URL_NOT_ALLOWED`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"},"INVALID_JSON":{"$ref":"#/components/examples/INVALID_JSON"},"WEBHOOK_URL_NOT_ALLOWED":{"$ref":"#/components/examples/WEBHOOK_URL_NOT_ALLOWED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_REQUIRED`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_REQUIRED":{"$ref":"#/components/examples/CONSUMER_REQUIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The body is too large: `PAYLOAD_TOO_LARGE`.","content":{"application/json":{"examples":{"PAYLOAD_TOO_LARGE":{"$ref":"#/components/examples/PAYLOAD_TOO_LARGE"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable: `NOT_READY`.","content":{"application/json":{"examples":{"NOT_READY":{"$ref":"#/components/examples/NOT_READY"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","INVALID_JSON","PAYLOAD_TOO_LARGE","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_REQUIRED","WEBHOOK_URL_NOT_ALLOWED","NOT_READY"]},"get":{"operationId":"getInterestWebhook","summary":"The consumer's webhook: its address, whether it is paused and why, its last delivery","description":"The consumer's webhook: its address, whether it is paused and why, and its last delivery, never its secret. A `notice` says when deliveries are stopped on Atlas's side; events stay in the feed meanwhile.\n\n**Cost**: see [pricing](https://atlas.oromiq.com/pricing/).\n\n**Called by** a consumer: the client key with `x-atlas-consumer` naming one of its consumers, or a consumer key where the account allows them. The client alone is refused with `CONSUMER_REQUIRED`.\n\n**Your duties**: Show an event's `attributions` wherever you show its data, and `currency.asOf` where `currency.required` is true. Check every webhook delivery's signature.","tags":["Webhooks"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","example":"cn_8fHq2LmNcV0pXyT3rW6aZe"},"required":false,"description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","name":"x-atlas-consumer","in":"header"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/InterestWebhook"}},"required":["data"]},"example":{"data":{"url":"https://hooks.oakfield.example/atlas","status":"active","pausedReason":null,"pausedAt":null,"createdAt":"2026-10-30T09:20:00.000Z","lastDelivery":{"at":"2026-10-30T10:14:06.000Z","ok":true,"status":204}}}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_REQUIRED`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_REQUIRED":{"$ref":"#/components/examples/CONSUMER_REQUIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found: `WEBHOOK_NOT_FOUND`.","content":{"application/json":{"examples":{"WEBHOOK_NOT_FOUND":{"$ref":"#/components/examples/WEBHOOK_NOT_FOUND"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_REQUIRED","WEBHOOK_NOT_FOUND"]},"delete":{"operationId":"deleteInterestWebhook","summary":"Remove the consumer's webhook","description":"Removes the consumer's webhook. Nothing more is posted; events stay in the feed.\n\n**Cost**: see [pricing](https://atlas.oromiq.com/pricing/).\n\n**Called by** a consumer: the client key with `x-atlas-consumer` naming one of its consumers, or a consumer key where the account allows them. The client alone is refused with `CONSUMER_REQUIRED`.\n\n**Your duties**: Show an event's `attributions` wherever you show its data, and `currency.asOf` where `currency.required` is true. Check every webhook delivery's signature.","tags":["Webhooks"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","example":"cn_8fHq2LmNcV0pXyT3rW6aZe"},"required":false,"description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","name":"x-atlas-consumer","in":"header"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true],"description":"Always true: the operation succeeded."}},"required":["ok"],"description":"The result."}},"required":["data"],"description":"Nothing to return beyond success."},"example":{"data":{"ok":true}}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_REQUIRED`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_REQUIRED":{"$ref":"#/components/examples/CONSUMER_REQUIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found: `WEBHOOK_NOT_FOUND`.","content":{"application/json":{"examples":{"WEBHOOK_NOT_FOUND":{"$ref":"#/components/examples/WEBHOOK_NOT_FOUND"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_REQUIRED","WEBHOOK_NOT_FOUND"]}},"/v1/interests/webhook/redeliver":{"post":{"operationId":"redeliverInterestWebhook","summary":"Send a window of events to the webhook again","description":"Sends a window of events to the webhook again, in order, marked `x-atlas-redelivery: true`, after anything new. `failedOnly` keeps to events no delivery was answered for. The answer says how many are `queued`. A second request replaces the first. Use an event's `id` to ignore one you already have.\n\nEach delivery is counted in your usage.\n\n**Cost**: see [pricing](https://atlas.oromiq.com/pricing/).\n\n**Called by** a consumer: the client key with `x-atlas-consumer` naming one of its consumers, or a consumer key where the account allows them. The client alone is refused with `CONSUMER_REQUIRED`.\n\n**Your duties**: Show an event's `attributions` wherever you show its data, and `currency.asOf` where `currency.required` is true. Check every webhook delivery's signature.","tags":["Webhooks"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","example":"cn_8fHq2LmNcV0pXyT3rW6aZe"},"required":false,"description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","name":"x-atlas-consumer","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"allOf":[{"$ref":"#/components/schemas/IsoDateTime"},{"description":"Resend the events made at or after this instant. Events are kept 30 days."}]},"to":{"type":"string","format":"date-time","description":"And before this one; left out, up to now."},"interestId":{"type":"string","minLength":1,"maxLength":80,"description":"Only this standing search's or watch's events."},"failedOnly":{"type":"boolean","default":false,"description":"Only the events whose delivery failed or was never made because the webhook was paused or absent."}},"required":["from"],"additionalProperties":false,"description":"Sends a window of events to the webhook again, in order, as deliveries marked x-atlas-redelivery: true, after any delivery waiting. The webhook must be active. At most one redelivery waits per consumer: a second replaces the first."},"example":{"from":"2026-10-29T14:00:00.000Z","to":"2026-10-29T16:30:00.000Z","failedOnly":true}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"queued":{"type":"integer","minimum":0,"description":"How many events will be sent again."},"from":{"$ref":"#/components/schemas/IsoDateTime"},"to":{"$ref":"#/components/schemas/IsoDateTime"}},"required":["queued","from","to"],"description":"The window queued, with its count."}},"required":["data"]},"example":{"data":{"queued":12,"from":"2026-10-29T14:00:00.000Z","to":"2026-10-29T16:30:00.000Z"}}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`, `INVALID_JSON`, `INTEREST_WINDOW_INVALID`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"},"INVALID_JSON":{"$ref":"#/components/examples/INVALID_JSON"},"INTEREST_WINDOW_INVALID":{"$ref":"#/components/examples/INTEREST_WINDOW_INVALID"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_REQUIRED`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_REQUIRED":{"$ref":"#/components/examples/CONSUMER_REQUIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found: `WEBHOOK_NOT_FOUND`.","content":{"application/json":{"examples":{"WEBHOOK_NOT_FOUND":{"$ref":"#/components/examples/WEBHOOK_NOT_FOUND"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"In conflict with what is already recorded: `WEBHOOK_PAUSED`.","content":{"application/json":{"examples":{"WEBHOOK_PAUSED":{"$ref":"#/components/examples/WEBHOOK_PAUSED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The body is too large: `PAYLOAD_TOO_LARGE`.","content":{"application/json":{"examples":{"PAYLOAD_TOO_LARGE":{"$ref":"#/components/examples/PAYLOAD_TOO_LARGE"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","INVALID_JSON","PAYLOAD_TOO_LARGE","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_REQUIRED","WEBHOOK_NOT_FOUND","WEBHOOK_PAUSED","INTEREST_WINDOW_INVALID"]}},"/v1/interests/{interestId}":{"delete":{"operationId":"deleteInterest","summary":"Remove a standing search or watch","description":"Removes a standing search or watch, by its id. Its events stay in the feed for their 30 days.\n\n**Cost**: see [pricing](https://atlas.oromiq.com/pricing/).\n\n**Called by** a consumer: the client key with `x-atlas-consumer` naming one of its consumers, or a consumer key where the account allows them. The client alone is refused with `CONSUMER_REQUIRED`.\n\n**Your duties**: Show an event's `attributions` wherever you show its data, and `currency.asOf` where `currency.required` is true. Check every webhook delivery's signature.","tags":["Alerts"],"security":[{"clientKey":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":80,"description":"The id of the standing search or watch."},"required":true,"description":"The id of the standing search or watch.","name":"interestId","in":"path","example":"int_9Hq2LmT8xYp3kQ7v"},{"schema":{"type":"string","pattern":"^(cn|cl)_[A-Za-z0-9_-]{12,40}$","description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","example":"cn_8fHq2LmNcV0pXyT3rW6aZe"},"required":false,"description":"The consumer the call reads data as: one of your consumers, with the client key. Not sent with a consumer key, which names its own.","name":"x-atlas-consumer","in":"header"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true],"description":"Always true: the operation succeeded."}},"required":["ok"],"description":"The result."}},"required":["data"],"description":"Nothing to return beyond success."},"example":{"data":{"ok":true}}}}},"400":{"description":"The request cannot be answered as sent: `INVALID_REQUEST`.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"$ref":"#/components/examples/INVALID_REQUEST"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No current key: `UNAUTHENTICATED`, `CONSUMER_KEY_EXPIRED`.","content":{"application/json":{"examples":{"UNAUTHENTICATED":{"$ref":"#/components/examples/UNAUTHENTICATED"},"CONSUMER_KEY_EXPIRED":{"$ref":"#/components/examples/CONSUMER_KEY_EXPIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Refused for this caller: `CLIENT_SUSPENDED`, `CONSUMER_KEYS_NOT_ALLOWED`, `CONSUMER_KEY_ADDRESS_NOT_ALLOWED`, `CONSUMER_NOT_FOUND`, `CONSUMER_SUSPENDED`, `CONSUMER_REQUIRED`.","content":{"application/json":{"examples":{"CLIENT_SUSPENDED":{"$ref":"#/components/examples/CLIENT_SUSPENDED"},"CONSUMER_KEYS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEYS_NOT_ALLOWED"},"CONSUMER_KEY_ADDRESS_NOT_ALLOWED":{"$ref":"#/components/examples/CONSUMER_KEY_ADDRESS_NOT_ALLOWED"},"CONSUMER_NOT_FOUND":{"$ref":"#/components/examples/CONSUMER_NOT_FOUND"},"CONSUMER_SUSPENDED":{"$ref":"#/components/examples/CONSUMER_SUSPENDED"},"CONSUMER_REQUIRED":{"$ref":"#/components/examples/CONSUMER_REQUIRED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found: `INTEREST_NOT_FOUND`.","content":{"application/json":{"examples":{"INTEREST_NOT_FOUND":{"$ref":"#/components/examples/INTEREST_NOT_FOUND"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate: `RATE_LIMITED`.","content":{"application/json":{"examples":{"RATE_LIMITED":{"$ref":"#/components/examples/RATE_LIMITED"}},"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Atlas could not answer: `INTERNAL`.","content":{"application/json":{"examples":{"INTERNAL":{"$ref":"#/components/examples/INTERNAL"}},"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-atlas-errors":["INVALID_REQUEST","UNAUTHENTICATED","CONSUMER_KEY_EXPIRED","CLIENT_SUSPENDED","CONSUMER_KEYS_NOT_ALLOWED","CONSUMER_KEY_ADDRESS_NOT_ALLOWED","CONSUMER_NOT_FOUND","CONSUMER_SUSPENDED","RATE_LIMITED","INTERNAL","CONSUMER_REQUIRED","INTEREST_NOT_FOUND"]}}},"x-atlas-errors":[{"code":"INVALID_REQUEST","status":400,"meaning":"The path, query or body does not match the contract: a field missing, of the wrong type, out of range or not allowed. The message names the part and the first field at fault.","fix":"Correct the field the message names. The reference lists every field, its type and its limits."},{"code":"INVALID_JSON","status":400,"meaning":"The request body is not valid JSON.","fix":"Send a JSON body with `Content-Type: application/json`."},{"code":"VALIDATION","status":400,"meaning":"A value of the right form that is still not one Atlas can read, such as a date written YYYY-MM-DD that is not a real day.","fix":"Send a real value: the message names the field."},{"code":"UNAUTHENTICATED","status":401,"meaning":"No key, or a key Atlas does not recognise: mistyped, cut short, rotated or revoked.","fix":"Send a current key as `Authorization: Bearer <key>`, copied whole. The client console shows which key is active."},{"code":"CLIENT_SUSPENDED","status":403,"meaning":"A consumer key of a suspended client. While a client is suspended none of its keys work: its client key is refused as not current (`UNAUTHENTICATED`).","fix":"Talk to us: a suspension is lifted by Atlas."},{"code":"NOT_FOUND","status":404,"meaning":"Nothing to answer at this address: no such operation, or no such entity, consumer, key or other resource for this caller.","fix":"Check the path starts with `/v1` and the id is one Atlas gave you. An entity id answers for good, so an old id is never the cause."},{"code":"PAYLOAD_TOO_LARGE","status":413,"meaning":"The request body is over 8 MB.","fix":"Send less in one call: every list in a body has its own, much smaller, limit."},{"code":"INTERNAL","status":500,"meaning":"Atlas could not answer. Anything the call charged is given back before the error is sent.","fix":"Try again shortly. If it persists, tell us the time of the call and the operation."},{"code":"CONTRACT_MISMATCH","status":500,"meaning":"Atlas could not form a valid answer, so none was sent. Anything the call charged is given back.","fix":"Nothing on your side: tell us the time of the call and the operation."},{"code":"NOT_IMPLEMENTED","status":501,"meaning":"The operation is not available.","fix":"Do not call it."},{"code":"NOT_READY","status":503,"meaning":"Atlas has no data to answer from at the moment.","fix":"Try again shortly."},{"code":"NOT_CONFIGURED","status":503,"meaning":"This part of Atlas is not set up here: charging, where no payment provider is connected.","fix":"Talk to us."},{"code":"CONSUMER_NOT_FOUND","status":403,"meaning":"No consumer of this client has the id named in the x-atlas-consumer header or in the path.","fix":"Name one of this client's own consumers in `x-atlas-consumer`: `GET /v1/consumers` lists them.","otherStatuses":[404]},{"code":"CONSUMER_SUSPENDED","status":403,"meaning":"The consumer is suspended.","fix":"Resume the consumer (`PUT /v1/consumers/{consumerId}` with `status: \"active\"`), as the client."},{"code":"CONSUMER_CANNOT_MANAGE","status":403,"meaning":"A consumer called an operation only the client itself may make.","fix":"Call with the client key and no `x-atlas-consumer` header: only the client manages consumers and reads the bill."},{"code":"CONSUMER_REQUIRED","status":403,"meaning":"A client (no consumer) called an operation that reads data: data is read as a consumer.","fix":"Data is read as a consumer: name one of the client's consumers in `x-atlas-consumer`, or call with that consumer's own key."},{"code":"LAYER_NOT_SUBSCRIBED","status":403,"meaning":"A layer in the scope the subject is not subscribed to. The message lists what it may read.","fix":"Ask only for the layers the message lists, or send `layers: [\"subscribed\"]` for them all. The client subscribes a consumer to more with `PUT /v1/consumers/{consumerId}/subscriptions`."},{"code":"LAYER_NOT_AVAILABLE","status":400,"meaning":"A layer that is not available to this client.","fix":"Choose from `GET /v1/layers`: the live layers a consumer may be subscribed to."},{"code":"TIER_NOT_AVAILABLE","status":400,"meaning":"No such plan, or one not offered to this client.","fix":"Choose a plan from `GET /v1/plans`: it lists the plans your account may give."},{"code":"TIER_RETIRED","status":400,"meaning":"A plan that is retired: not given to a new consumer or a change of plan.","fix":"Choose a current plan from `GET /v1/plans`."},{"code":"TIER_REQUIRED","status":400,"meaning":"A consumer made without a plan: a plan is required.","fix":"Name a plan when you make the consumer: `GET /v1/plans` lists them."},{"code":"PACK_NOT_FOUND","status":400,"meaning":"No layer pack by that key.","fix":"Choose pack keys from `GET /v1/pricing`, which lists the layer packs.","since":"0.40.0"},{"code":"TENANT_LIMIT_REACHED","status":400,"meaning":"More consumers than the plan allows: the plan includes a number and lets none be added.","fix":"The plan includes a set number of consumers and lets none be added: move to a larger plan with `POST /v1/plan/upgrade`.","since":"0.40.0"},{"code":"RATE_LIMITED","status":429,"meaning":"Over the tier's rate.","fix":"Wait the number of seconds in `Retry-After`, then try again. Spread calls out: `x-ratelimit-remaining` says how many are left."},{"code":"TOKENS_EXHAUSTED","status":402,"meaning":"Not enough tokens for what was asked. Nothing is charged or served; what was already bought stays readable.","fix":"Wait for the month to renew, buy more tokens, or move to a larger plan. Nothing was charged, and what costs nothing (held entities, saved searches) can still be read."},{"code":"BILLING_NOT_SET_UP","status":409,"meaning":"Billing is not set up for the client: no billing email yet.","fix":"Set a billing email with `PUT /v1/billing/account` first.","since":"0.38.0"},{"code":"TOPUP_NOT_OFFERED","status":400,"meaning":"The consumer's plan offers no top-ups.","fix":"Move the consumer to a plan that offers top-ups (`PUT /v1/consumers/{consumerId}/tier`), or raise its plan.","since":"0.38.0"},{"code":"CONSUMER_KEYS_NOT_ALLOWED","status":403,"meaning":"The client does not allow consumer keys: none is made, and one presented is refused. Call with the client key and x-atlas-consumer.","fix":"Call with the client key and name the consumer in `x-atlas-consumer`. Consumer keys are turned on per account: `GET /v1/account` says which applies."},{"code":"CONSUMER_KEY_EXPIRED","status":401,"meaning":"The consumer key has passed its expiry.","fix":"Ask the client for a new key for the consumer."},{"code":"CONSUMER_KEY_ADDRESS_NOT_ALLOWED","status":403,"meaning":"The consumer key is limited to addresses the call did not come from.","fix":"Call from one of the addresses listed for the key, or ask the client to make a key that allows this one."},{"code":"TOKEN_CAP_ABOVE_ALLOWANCE","status":400,"meaning":"A consumer's token cap above its tier's monthly allowance.","fix":"Set a cap at or below the plan's monthly allowance (`GET /v1/plans`), or leave it out."},{"code":"LINK_NOT_FOUND","status":404,"meaning":"No such link, or one that is no longer shown.","fix":"Use a `linkId` from a current possible match. One staff found wrong or suppressed is no longer shown and cannot be flagged."},{"code":"LINK_ALREADY_REVIEWED","status":409,"meaning":"A \"same\" flag on a match already confirmed.","fix":"Nothing to do: staff have already confirmed the match. Flag it `not_same` if you believe it is wrong."},{"code":"CONNECTION_REQUEST_NOT_FOUND","status":404,"meaning":"No sign-in request with that id, or one already decided or lapsed.","fix":"Have the assistant start its sign-in again: a request is decided once and lapses after ten minutes.","since":"0.39.0"},{"code":"CONNECTION_NOT_FOUND","status":404,"meaning":"No connection of this client with that id.","fix":"Check the id against `GET /v1/connections`: a connection is this client’s own.","since":"0.39.0"},{"code":"CONNECTION_NOT_ALLOWED","status":403,"meaning":"An assistant’s connection presented on an operation it may not make: it reads through the MCP endpoint only.","fix":"An assistant’s connection reads through the MCP endpoint only: call the API with a client or consumer key instead.","since":"0.39.0"},{"code":"INTEREST_LIMIT_REACHED","status":409,"meaning":"The consumer has 50 interests already: delete one first.","fix":"Delete an interest you no longer need with `DELETE /v1/interests/{interestId}`, then make this one."},{"code":"INTEREST_NOT_FOUND","status":404,"meaning":"No such interest of this consumer.","fix":"Use an id from `GET /v1/interests` for the same consumer."},{"code":"INTEREST_LAYER_NOT_ALLOWED","status":403,"meaning":"A layer whose licence allows no standing search (the ICO, HM Land Registry: enrichment only), or a reference layer.","fix":"Take the enrichment-only or reference layer out of `layers`. Read that layer on an entity you hold instead."},{"code":"INTEREST_PERSON_FIELD","status":403,"meaning":"A condition or watched field about a person: never a criterion or something watched.","fix":"Take the field out: a field about a person is never a condition or watched. Atlas's people data is read through `POST /v1/people` for an entity you hold."},{"code":"INTEREST_FIELD_INVALID","status":400,"meaning":"A watched field the layers in scope do not send.","fix":"Use a key the layers in scope send: `GET /v1/layers/{layer}/schema` lists each layer's."},{"code":"WATCH_NOT_LIVE","status":400,"meaning":"A watch Atlas cannot answer on these layers or fields.","fix":"Watch a layer that has entities, on fields of its records, or use a search instead."},{"code":"WATCH_ENTITY_NOT_FOUND","status":404,"meaning":"A watched entity Atlas has never issued.","fix":"Use an id Atlas has answered with: from a search, a resolve or an entity read."},{"code":"WATCH_ENTITY_NOT_IN_LAYERS","status":400,"meaning":"A watched entity with no current record in the watch's layers.","fix":"Add a layer the entity has a current record in, or leave this entity out: `layers` on an entity read says which it has."},{"code":"WEBHOOK_URL_NOT_ALLOWED","status":400,"meaning":"A webhook address that is not https, or that reaches a private, loopback or link-local address.","fix":"Use an https address on a public host, with no user name or password in it."},{"code":"WEBHOOK_NOT_FOUND","status":404,"meaning":"The consumer has no webhook.","fix":"Register one with `POST /v1/interests/webhook`."},{"code":"WEBHOOK_PAUSED","status":409,"meaning":"A redelivery while the webhook is paused: register it again first.","fix":"Register the webhook again (`POST /v1/interests/webhook`), then ask for the window. The address must answer 2xx within 10 seconds."},{"code":"INTEREST_WINDOW_INVALID","status":400,"meaning":"A window that ends before it starts.","fix":"Send a `to` later than `from`."},{"code":"INTEREST_CURSOR_INVALID","status":400,"meaning":"A feed cursor that is not this consumer's, not one Atlas issued, or past the end of its feed.","fix":"Send back an event's `id` or `next`, as the same consumer, unchanged. Lost it? Leave it out, or read a window with `from`."},{"code":"REPORT_NOT_FOUND","status":404,"meaning":"A report that is not this consumer's, never was, or was deleted.","fix":"Use an id from `GET /v1/reports` for the same consumer: a deleted report, or another consumer's, is not found."},{"code":"TOO_MANY_REPORTS","status":422,"meaning":"This consumer keeps 50 reports already: delete one first.","fix":"Delete a report you no longer need (`DELETE /v1/reports/{reportId}`), then save again."},{"code":"REPORT_TOO_LARGE","status":422,"meaning":"The query's answer could be too large to keep: ask for fewer groups or fewer distributions.","fix":"Ask for a lower `limit`, fewer distributions or no series, and save it again."},{"code":"CONDITIONS_INVALID","status":400,"meaning":"A condition the catalogue refuses: unknown field, wrong operator or value.","fix":"Read `GET /v1/catalogue` for the layers in scope: use a field it lists, one of the operators that field takes, and a value of its type (an option it lists, for a field with options)."},{"code":"NARROWING_REQUIRED","status":400,"meaning":"No narrowing field with a positive operator.","fix":"Add a condition on one of the catalogue's `narrowingFields` with a positive operator (`equals`, `in`, `contains`, a range), such as a region, a rating or a local authority."},{"code":"TOO_BROAD","status":422,"meaning":"The search covers too much of a register, or ran out of time.","fix":"Narrow the search with another condition, or a tighter one, and run it again. `POST /v1/search/count` says how many a search would find, free."},{"code":"SAVED_SEARCH_NOT_FOUND","status":404,"meaning":"A saved search that is not this consumer's, never was, or has expired (kept 90 days).","fix":"Use an id from `GET /v1/searches` for the same consumer. A saved search is kept 90 days: run the search again for a new one.","since":"0.21.0"},{"code":"EXCLUDE_TOO_LARGE","status":400,"meaning":"More to leave out than one search takes: see the limits on `exclude`.","fix":"Leave out fewer: at most 10,000 entity ids and 20 saved searches, and 100,000 entities in all once those searches are opened.","since":"0.21.0"},{"code":"SEARCH_CURSOR_INVALID","status":400,"meaning":"A cursor that is not a saved search's page, or not this consumer's, or a filter's cursor sent with another filter or saved search: run the search again.","fix":"Send the `next` value from the previous page of the same search (or the same filter), as the same consumer, unchanged. To start again, leave `cursor` out.","since":"0.21.0"},{"code":"VIA_NOT_CONNECTED","status":400,"meaning":"A condition's `via` that does not connect: the search has no level condition, its level is not the one the relation starts from (organisation for premises, premises for operator), or the field does not live where the relation leads (the catalogue's levels), or is the level itself.","fix":"Add a positive `level` condition naming the type the relation starts from (`organisation` for `premises`, `premises` for `operator`), and put `via` only on a field that lives where the relation leads: the catalogue's `levels` and `relations` say which.","since":"0.24.0"},{"code":"VIA_UNAVAILABLE","status":503,"meaning":"A search with `via` cannot be answered at the moment; a search without `via` is unaffected.","fix":"Run the search without `via`, or try again after the next release.","since":"0.24.0"},{"code":"STATS_INVALID","status":400,"meaning":"A grouping or a measure the catalogue cannot answer: unknown field, a measure its type does not take.","fix":"Read `GET /v1/catalogue`: group by an area or by a field holding a choice, a yes or no, a list or text, and measure each field in a way its type takes."},{"code":"LICENCE_REFUSED","status":400,"meaning":"A field its licence keeps out of stats: an enrichment-only layer's (the ICO's) as a condition, grouping or measure; a name, an address or a postcode as a grouping; a field about a person as a grouping or measure.","fix":"Leave the field out: an enrichment-only field is never a condition, grouping or measure, and nothing is grouped by a name, an address, a postcode or a person."},{"code":"TOO_MANY_GROUPS","status":500,"meaning":"The groupings would make more groups than one query may: group more coarsely, or narrow.","fix":"Group more coarsely (a region rather than a local authority), or narrow the conditions.","otherStatuses":[422]},{"code":"STATS_TIMEOUT","status":422,"meaning":"The query ran past its time limit (10 seconds): narrow it, or ask for fewer measures.","fix":"Narrow the conditions, or ask for fewer measures, and run it again."},{"code":"STATS_TOO_LARGE","status":422,"meaning":"The query is too large to answer: narrow it, or ask for fewer measures.","fix":"Narrow the conditions, or ask for fewer measures, and run it again."},{"code":"SCOPE_UNAVAILABLE","status":400,"meaning":"A scope this operation does not take, such as a saved search in a saved report.","fix":"A saved report cannot keep a `savedSearch` scope, as a saved search expires after 90 days: save its conditions instead. Elsewhere, send the query to `POST /v1/stats`."},{"code":"NO_AREA","status":422,"meaning":"A scope's entity has no value for the area asked for (`near`), so it has no area to measure.","fix":"Choose another area, or another entity: this one has no value for the area asked for."},{"code":"GEOGRAPHY_UNAVAILABLE","status":503,"meaning":"This area (ward, icb or country) is not available at the moment: group or scope by region or localAuthority.","fix":"Group or scope by `region` or `localAuthority` instead."}],"tags":[{"name":"Search","description":"Find entities by conditions on the fields the catalogue lists, count them, and page through the results. The [search guide](https://atlas.oromiq.com/developers/guides/search/) walks through it."},{"name":"Saved searches","description":"Every search is kept for 90 days: list, recall, rename, filter and delete them."},{"name":"Entities","description":"One entity and everything the layers hold about it: its register records, facts, relations and its network of owners and operators. Find an entity from a name or an identifier. The [entities guide](https://atlas.oromiq.com/developers/guides/entities/) walks through it."},{"name":"History","description":"An entity's past: every change to its facts, dates and status, and the entity as it stood on a day (`?at=` on reading one entity)."},{"name":"People","description":"The people a held entity names in its registers, within the rules the [holdings and people guide](https://atlas.oromiq.com/developers/guides/holdings-and-people/) explains, and the notices people have given."},{"name":"Holdings","description":"Say which entities you hold, and learn which of them merged or split since a date."},{"name":"Reports","description":"Figures over many entities at once: counts, distributions, shares and summaries, grouped by area or by field, with one entity benchmarked against the rest. Save a report and it runs again on every data release and says what moved. Figures only, never a list. The [reports guide](https://atlas.oromiq.com/developers/guides/reports/) walks through it."},{"name":"Benchmarks","description":"A benchmarked fact measured across a cohort as a series over time, and where one entity stands against that cohort."},{"name":"Alerts","description":"Standing searches and watches that tell you as data arrives, through a feed you poll. The [alerts guide](https://atlas.oromiq.com/developers/guides/alerts/) walks through it."},{"name":"Webhooks","description":"A signed webhook on an alert, so events reach you as they happen."},{"name":"Account","description":"Your own subscriptions, usage, statement and bill. Called with the client key. The [account guide](https://atlas.oromiq.com/developers/guides/account/) walks through it."},{"name":"Consumers","description":"Your consumers: make them, give them plans, subscriptions and keys, and read their usage and statements."},{"name":"Assistants","description":"The assistants (such as a chat app) your people have connected to Atlas through its MCP endpoint, each reading as one of your consumers: what a sign-in asks for, the decision, the connections it made, and cutting one off."},{"name":"Reference","description":"What a program reads to plan its calls: the layers and the fields each sends, what changed and when, the plans and the prices."}],"x-tagGroups":[{"name":"Search","tags":["Search","Saved searches"]},{"name":"Entities","tags":["Entities","History","People","Holdings"]},{"name":"Reports","tags":["Reports","Benchmarks"]},{"name":"Alerts","tags":["Alerts","Webhooks"]},{"name":"Account","tags":["Account","Consumers","Assistants"]},{"name":"Reference","tags":["Reference"]}]}