{
  "openapi": "3.1.0",
  "info": {
    "title": "RiskMotor Screening API",
    "version": "1.0.0",
    "summary": "Screen a person or company against official restriction and PEP registries.",
    "description": "RiskMotor screens names against official sanctions, trade-restriction and\npolitically-exposed-person registries, and returns **potential matches for\nhuman review** — never a determination.\n\nTwo ideas do the most work in every response, and conflating them is the\nmost common integration mistake:\n\n- A **unique listing** is one designation by one authority. This is what\n  `unique_listing_count` counts, and what a compliance decision is about.\n- A **source confirmation** is one official file that carries that\n  designation. Treasury publishes the same SDN entry in both the SDN list\n  and the Consolidated Screening List, so one listing routinely arrives\n  with two confirmations. **Two confirmations are not two sanctions.**\n\nLikewise, `match_confidence` answers \"is this the same real-world entity?\"\nIt is not a measure of how serious the listing is — that is `severity`.\n",
    "contact": {
      "name": "RiskMotor",
      "url": "https://riskmotor.com"
    },
    "license": {
      "name": "Proprietary",
      "url": "https://riskmotor.com/terms"
    }
  },
  "servers": [
    {
      "url": "https://api.riskmotor.com/v1",
      "description": "Production"
    }
  ],
  "security": [
    {
      "bearerApiKey": []
    }
  ],
  "tags": [
    {
      "name": "Screening",
      "description": "Run a screening and read back the ones you have run."
    },
    {
      "name": "Batches",
      "description": "Screen many subjects in one job. A batch row produces an ordinary\nscreening — same engine, same metering, same audit record — so a name\nscreened in a batch is indistinguishable from one screened on its own\nexcept for the `batch_id` recording which job produced it.\n"
    },
    {
      "name": "Datasets",
      "description": "What is screened against, and how current it is."
    },
    {
      "name": "Monitoring",
      "description": "Enrol a subject and we re-screen it daily, telling you when something\nNEW appears against it.\n\n⚠ **Each check is a screening and is billed as one.** Enrolling a\nsubject is a standing daily commitment, not a one-off cost — 100\nsubjects is 100 screenings a day. Monitoring is therefore unavailable on\nTEST keys, and each account has a cap on how many subjects it may\nmonitor at once.\n\nEnrolment screens immediately and returns the result. That first result\nis the baseline, which is why an existing designation never arrives as\nan alert: you were told about it when you enrolled.\n\nAlerts are the set difference of listing keys against the previous\ncheck, so a listing that disappears is not an alert, re-ordering is not\nan alert, and a subject that newly MATCHES a years-old listing is.\n"
    },
    {
      "name": "Adverse media",
      "description": "Optional add-on: whether the press reports anything adverse about the\nsubject — negative news in the last 180 days, or a major past event —\nwith evidence an auditor can open. It is a **separate, asynchronous\njob** requested beside a screening (`adverse_media: true`) or on an\nexisting one, delivered in a few minutes, and **billed per delivered\nrun** on top of the screening. Every finding is something a named\npublisher *reported*: never a RiskMotor conclusion, and never part of\nthe screening's `overall_status` or `highest_severity`.\n"
    },
    {
      "name": "RTU lookups",
      "description": "Guatemala only: a taxpayer's record in SAT's Registro Tributario\nUnificado (RTU), looked up by NIT and a reference date (date of birth\nfor a person, date of incorporation for a company), with SAT's own\ncertificate as a PDF and its QR code.\n\n**Asynchronous and slow by nature.** SAT's portal is paced, so a lookup\ntakes from a few minutes to some hours. The request answers `202` at once\nwith a queue position; the result arrives by the\n`rtu_lookup.completed` webhook, or by polling `GET /rtu-lookups/{id}`.\n\n**Billed only when SAT answers** — any answer, including \"NIT not\nregistered\" or \"date does not match\". A lookup SAT could not answer\n(portal down, verification failed) is retried for you and, if it still\nfails, ends `FAILED` and is not billed.\n\n**The document links are the permission.** Whoever holds `pdf_url` or\n`qr_url` can open the taxpayer's record. Show them only to the person\nwho asked, never log them, and revoke them\n(`POST /rtu-lookups/{id}/revoke-links`) if one leaks.\n\n**TEST keys use a sandbox** and never reach SAT. Sandbox NITs, each with\none outcome (any date): `10000011` SUCCESS, `10000038` NIT_NOT_FOUND,\n`10000046` DATE_MISMATCH, `10000054` NIT_INACTIVE, `10000062` — SAT\nunavailable, ends `FAILED`. Any other valid NIT answers NIT_NOT_FOUND.\n"
    },
    {
      "name": "Tax compliance lookups",
      "description": "Guatemala only: whether a taxpayer is up to date with SAT\n(Superintendencia de Administración Tributaria), looked up by NIT\nthrough SAT's Verificador Integrado — \"Solvencia fiscal SAT\" in the web\napp. SAT says whether the taxpayer **presents incumplimientos** and, if\nso, which: RTU data pending update, omitted returns (year, period, tax,\nform), books pending authorization, and any category SAT adds later\n(type `OTHER`, with SAT's own label and text). SAT's own report comes\nas a PDF.\n\n**Asynchronous and slow by nature.** SAT answers one lookup every few\nminutes for every customer together, so a lookup takes from a few\nminutes to some hours. The request answers `202` at once with a queue\nposition; the result arrives by the `tax_compliance_lookup.completed`\nwebhook, or by polling `GET /tax-compliance-lookups/{id}`.\n\n**Billed only when SAT answers** — \"up to date\", \"presents\nincumplimientos\" and \"NIT not registered\" alike. A lookup SAT could not\nanswer (portal down, verification failed) is retried before it is\nreported and, if it still fails, ends `FAILED` and is not billed.\n\n**The PDF link is the permission.** Whoever holds `pdf_url` can open\nSAT's report. Show it only to the person who asked, never log it, and\nrevoke it (`POST /tax-compliance-lookups/{id}/revoke-links`) if it leaks.\n\n**A verdict relayed, not a determination.** `has_incumplimientos` is\nSAT's own flag at `sat_checked_at`; RiskMotor relays it unchanged and\ndoes not verify it.\n\n**TEST keys use a sandbox** and never reach SAT. Sandbox NITs, each with\none outcome: `20000014` SUCCESS, up to date; `20000022` SUCCESS with\nincumplimientos (every category, `OTHER` included); `20000030`\nNIT_NOT_FOUND; `20000049` — verification failed, ends `FAILED`. Any\nother valid NIT answers NIT_NOT_FOUND. Sandbox answers carry no PDF.\n"
    },
    {
      "name": "Registro de Detenciones Guatemala searches",
      "description": "Guatemala only: the **Registro de Detenciones Guatemala** (the Organismo Judicial's\nRegistro Central de Detenidos), searched by a person's name in parts — first name, second\nname, first surname, second surname. Each answer lists the\nregistrations Registro de Detenciones Guatemala published for that text: document, date of arrest,\ndetention centre, who ordered it and the court, exactly as Registro de Detenciones Guatemala wrote\nthem (placeholders such as `\"No Porta\"` or `\"-\"` included).\n\n**Read the caveats before relying on a result.** Every answered search\ncarries `caveats` — always all four, records found or not:\n`TEXT_NOT_PEOPLE` (Registro de Detenciones Guatemala matches text, not people: \"JUAN\" also finds\n\"JUANA\", and a registration may belong to someone else with the same\nname), `NO_RECORDS_NOT_CLEAN` (no registrations is not a clean record:\na misspelling or a missing part can miss them), `DETENTION_SNAPSHOT`\n(a registration is a detention on its date; it says nothing about\ntoday) and `NOT_CRIMINAL_RECORD` (detentions, not convictions). Show\nthem to whoever reads the result.\n\n**People only, and never a guess.** Send the parts you know for certain\nand leave the others out: every part you send must appear in the\nregistration. We never split a full name for you — a wrong split\nreturns a reassuring \"no records\" for the wrong text.\n\n**Asynchronous.** Registro de Detenciones Guatemala answers one search at a time for everyone, so\nthe request answers `202` with a queue position and an estimate in\nminutes; the result arrives by the `recede_search.completed` webhook,\nor by polling `GET /recede-searches/{id}`. A Registro de Detenciones Guatemala search never\nchanges a screening's `overall_status`.\n\n**Billed only when Registro de Detenciones Guatemala answers** — `RECORDS_FOUND` and `NO_RECORDS`\nalike. A search Registro de Detenciones Guatemala could not answer ends `FAILED` and is not\nbilled; nor is one refused or cancelled.\n\n**When the source itself is down.** If the Organismo Judicial's site stops answering, new\nLIVE searches are still accepted but wait in our queue rather than failing; `queue.source`\nand, while it waits, the search's `source` say `available: false` and since when. They are\nsent by themselves once it is back.\n\n**TEST keys use a sandbox** and never reach Registro de Detenciones Guatemala. Sandbox names,\nfirst name `PRUEBA` and first surname: `REGISTROS` → RECORDS_FOUND with\ntwo fabricated registrations, `SINREGISTROS` → NO_RECORDS,\n`NODISPONIBLE` → Registro de Detenciones Guatemala unavailable (ends `FAILED`), `ILEGIBLE` →\nextraction failed (ends `FAILED`). Any other valid name answers\nNO_RECORDS.\n"
    },
    {
      "name": "Webhooks",
      "description": "Rather than polling a long batch, have us tell you when it finishes.\nEndpoints are configured by RiskMotor on request — there is no endpoint\nto manage them, because they carry a signing secret we must hold in\nclear and hand over out of band.\n\n**Verifying a delivery.** Every request carries\n`RiskMotor-Signature: t=<unix>,v1=<hex>`, an HMAC-SHA256 over\n`<timestamp>.<raw body>` using your endpoint's signing secret. Compute\nthe same over the RAW body — not a re-serialised copy — compare in\nconstant time, and reject a timestamp more than five minutes old. The\ntimestamp is inside the signed material, so it cannot be swapped for a\nfresh one.\n\n**Answer quickly.** We wait ten seconds, then treat it as a failure.\nAcknowledge with a 2xx and do your work afterwards.\n\n**Retries.** Anything that is not a 2xx is retried at roughly 1, 5 and\n25 minutes, then 2, 6 and 12 hours, and given up after that. Each\nattempt carries the same `RiskMotor-Delivery-Id` and the same event\n`id`, so **deduplicate on it** — a delivery you already processed can\narrive again if your 200 was lost on the way back.\n\nHeaders on every delivery: `RiskMotor-Signature`,\n`RiskMotor-Event-Type`, `RiskMotor-Delivery-Id`.\n\nEvent types: `batch.completed`, which fires on any terminal state —\nread `data.status` for `COMPLETED`, `PARTIAL` or `CANCELLED`;\n`adverse_media.completed`, which fires when an adverse media run\nreaches any terminal state, including `PROVIDER_FAILURE` — an\nintegration never waits forever. `data` carries `run_id`,\n`screening_id`, `status`, `finding_count`, `highest_severity` and\n`requires_human_review`.\n\n`rtu_lookup.completed` fires when an RTU lookup is settled —\n`COMPLETED` (SAT answered) or `FAILED` (it could not); `data` is the\nsame object `GET /rtu-lookups/{id}` returns, document links included.\n\n`tax_compliance_lookup.completed` fires when a tax compliance lookup is\nsettled — `COMPLETED` (SAT answered) or `FAILED` (it could not); `data`\nis the same object `GET /tax-compliance-lookups/{id}` returns, the PDF\nlink included.\n\n`recede_search.completed` fires when a Registro de Detenciones Guatemala search is settled —\n`COMPLETED` (Registro de Detenciones Guatemala answered) or `FAILED` (it could not); `data` is a\n`RecedeSearchListItem`: counts and the outcome, **never the\nregistrations** — fetch `GET /recede-searches/{id}` for them.\n"
    }
  ],
  "paths": {
    "/screenings": {
      "post": {
        "tags": [
          "Screening"
        ],
        "summary": "Screen a subject",
        "operationId": "createScreening",
        "description": "Runs a screening and returns the consolidated result. **This is the\nbillable call** — every request that returns 200 is one metered run.\n\nSend an `Idempotency-Key`. A client cannot distinguish a request that\nnever arrived from a response lost on the way back, so retrying after a\ntimeout is correct — and without the header that retry is a second\nbillable run.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScreeningRequest"
              },
              "examples": {
                "company": {
                  "summary": "A company, narrowed by country",
                  "value": {
                    "name": "Example Trading Company",
                    "type": "COMPANY",
                    "country": "GT"
                  }
                },
                "personWithId": {
                  "summary": "A person, with an identifier to confirm identity",
                  "value": {
                    "name": "Juan Pérez García",
                    "type": "PERSON",
                    "country": "GT",
                    "dob": "1975-03-14",
                    "identifier_type": "PASSPORT",
                    "identifier_value": "A1234567"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The screening ran. A result with no matches is a success, not a 404.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "X-RateLimit-Minute-Limit": {
                "$ref": "#/components/headers/RateLimitMinuteLimit"
              },
              "X-RateLimit-Minute-Remaining": {
                "$ref": "#/components/headers/RateLimitMinuteRemaining"
              },
              "Idempotent-Replay": {
                "description": "`true` when this is a stored response replayed for a repeated\n`Idempotency-Key`. A replay is not metered, so it carries no\nrate-limit headers.\n",
                "schema": {
                  "type": "string",
                  "enum": [
                    "true"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Screening"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "description": "A request with this `Idempotency-Key` is still running. Wait and\nretry rather than starting a second billable screening.\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "This `Idempotency-Key` was already used for a **different** request.\nRefused rather than replayed: returning the earlier subject's result\nwould tell you that you screened someone you never screened.\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/QuotaExceeded"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      },
      "get": {
        "tags": [
          "Screening"
        ],
        "summary": "List your screenings",
        "operationId": "listScreenings",
        "description": "Screenings this account has run **through the API**, newest first.\nRuns made by people in the web app are deliberately not listed here:\nthose belong to individual users, and an API key is not a reason to\nhand over what a colleague searched. LIVE and TEST are separate.\n\nScheduled **monitoring** checks are also excluded by default — a\ncustomer monitoring 500 subjects generates 500 runs a day, which would\nbury the calls they made themselves. Pass `include=monitoring` to see\nthem. Either way an individual monitoring run is always retrievable by\nits id.\n",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "include",
            "in": "query",
            "description": "Set to `monitoring` to include scheduled monitoring checks in the list.",
            "schema": {
              "type": "string",
              "enum": [
                "monitoring"
              ]
            }
          },
          {
            "name": "starting_after",
            "in": "query",
            "description": "A screening id from a previous page. Keyset, not offset — rows cannot shift under you between pages.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of screenings.",
            "headers": {
              "X-RateLimit-Minute-Limit": {
                "$ref": "#/components/headers/RateLimitMinuteLimit"
              },
              "X-RateLimit-Minute-Remaining": {
                "$ref": "#/components/headers/RateLimitMinuteRemaining"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "object",
                    "data",
                    "has_more"
                  ],
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "list"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ScreeningSummary"
                      }
                    },
                    "has_more": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/QuotaExceeded"
          }
        }
      }
    },
    "/screenings/{id}": {
      "get": {
        "tags": [
          "Screening"
        ],
        "summary": "Retrieve a screening",
        "operationId": "getScreening",
        "description": "Returns the screening exactly as it was answered at the time, replayed\nfrom the stored snapshot — never recomputed against today's data. A\nscreening read back a year later says what it said then, which is what\nmakes it usable as an audit record.\n",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The stored screening.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ScreeningSummary"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "$ref": "#/components/schemas/Screening"
                        },
                        "notice": {
                          "$ref": "#/components/schemas/Notice"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "description": "No such screening on this account. Another account's screening\nanswers identically — a 403 would confirm the id is real.\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/screenings/{id}/adverse-media": {
      "post": {
        "tags": [
          "Adverse media"
        ],
        "summary": "Request adverse media for an existing screening",
        "operationId": "requestAdverseMedia",
        "description": "Queues an adverse media run for a screening you can read. Idempotent\nwhile a run is live: a second call answers the same `run_id` with\n`created: false` and is not billed. After a `PROVIDER_FAILURE`, pass\n`force: true` to start a new run — a new billable run.\n",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "force": {
                    "type": "boolean",
                    "default": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A run was already live for this screening; nothing new was queued or billed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdverseMediaRequest"
                }
              }
            }
          },
          "201": {
            "description": "A run was queued.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdverseMediaRequest"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "description": "`spend_cap_reached`, or a plan refusal (`subscription_required`, `usage_limit_reached`, …).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`adverse_media_not_enabled` — the account cannot request adverse media.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "`adverse_media_run_exists` — a previous run failed; send `force: true` to start another.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`test_adverse_media_quota` — a TEST key's daily allowance for adverse media runs is spent.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "`feature_disabled` — adverse media is temporarily switched off platform-wide; `enqueue_failed` — the run could not be queued, request it again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Adverse media"
        ],
        "summary": "Read the adverse media run of a screening",
        "operationId": "getAdverseMedia",
        "description": "The run's status (poll `stage` while it is in progress; a run takes a\nfew minutes), its surfaced findings with the reviewer's current\ndecision, and the evidence considered — publisher, title, URL and\ndates. Article text is never returned: open the publisher.\n\nA `PROVIDER_FAILURE` is reported as such, never as \"no findings\".\n",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The run.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdverseMediaRun"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "description": "No such screening, or adverse media was never requested for it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/batches": {
      "post": {
        "tags": [
          "Batches"
        ],
        "summary": "Submit a batch",
        "operationId": "createBatch",
        "description": "Creates a **draft**. Nothing is screened and nothing is billed until\nyou confirm it — the draft exists so you can check the quote and the\nrow count first.\n\nRows whose name is shorter than two characters are dropped rather than\nqueued, and counted in `rows_skipped`: a row that cannot be screened\nmust never reach the queue, where it would fail and look like an\noutage.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "rows"
                ],
                "properties": {
                  "rows": {
                    "type": "array",
                    "maxItems": 2000,
                    "items": {
                      "type": "object",
                      "required": [
                        "name"
                      ],
                      "properties": {
                        "row_no": {
                          "type": "integer",
                          "description": "Your own row number, echoed back on every result so findings reconcile against your records."
                        },
                        "name": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "PERSON",
                            "COMPANY",
                            "UNKNOWN"
                          ]
                        },
                        "country": {
                          "type": "string"
                        },
                        "dob": {
                          "type": "string"
                        },
                        "identifier_type": {
                          "type": "string"
                        },
                        "identifier_value": {
                          "type": "string"
                        },
                        "adverse_media": {
                          "type": "boolean",
                          "default": false,
                          "description": "Also run an adverse media check on this row once it is\nscreened — a separate run, billed per row on its own\nstatement line, only if it is delivered. Choose rows\nindividually; the quote's `adverse` line counts them.\nRequires adverse media on your account (else 403\n`adverse_media_not_enabled`). A value that is not a\nboolean is a 400 `invalid_adverse_media`.\n"
                        },
                        "recede": {
                          "type": "boolean",
                          "default": false,
                          "description": "Also search Registro de Detenciones Guatemala for this row once it is screened,\nwith the name in `recede_name`. People only (a COMPANY\nrow is a 400 `recede_person_only`); billed per answered\nsearch. The quote's `recede` line counts these rows.\n"
                        },
                        "recede_name": {
                          "allOf": [
                            {
                              "$ref": "#/components/schemas/RecedeName"
                            }
                          ],
                          "description": "Required when `recede` is true. An invalid name is a 400 `invalid_recede_name` naming the row."
                        },
                        "renap": {
                          "type": "boolean",
                          "default": false,
                          "description": "Also look the row's DPI (`identifier_value`) up in RENAP\nonce the row is screened. A person in Guatemala with a\nvalid 13-digit DPI only, else a 400 naming the row\n(`renap_person_only`, `renap_not_guatemala`,\n`renap_invalid_cui`). Billed per lookup RENAP answers,\nincluding \"no such DPI\". The quote's `renap` line counts\nthese rows. Requires RENAP on your account (else 403\n`renap_not_enabled`); at confirm, 409 `renap_capacity`\nsays how many fit right now (`max_renap_rows`).\n"
                        },
                        "rtu": {
                          "type": "boolean",
                          "default": false,
                          "description": "Also look `nit` up in SAT's RTU against\n`reference_date`. SAT answers few lookups an hour for\nevery customer, so a batch can ask for a limited number\n(400 `rtu_batch_too_large` with `max`) and an account a\nlimited number waiting (429 `rtu_queue_full` with\n`room`). Billed per lookup SAT answers — including NIT\nnot found and a date that does not match. Read SAT's\nrecord with `GET /v1/rtu-lookups/{lookup_id}`.\n"
                        },
                        "tax_compliance": {
                          "type": "boolean",
                          "default": false,
                          "description": "Also ask SAT whether `nit` is up to date with SAT\n(tax compliance) once the row is screened. SAT answers\none lookup every few minutes for every customer, so a\nbatch can ask for a limited number (400\n`tax_compliance_batch_too_large` with `max`) and an\naccount a limited number waiting (429\n`tax_compliance_queue_full` with `room`). Billed per\nlookup SAT answers, \"NIT not registered\" included.\nRequires tax compliance on your account (else 403\n`tax_compliance_not_enabled`). Read SAT's answer with\n`GET /v1/tax-compliance-lookups/{lookup_id}`.\n"
                        },
                        "nit": {
                          "type": "string",
                          "description": "Guatemalan NIT, with or without the hyphen. Required when `rtu` or `tax_compliance` is true; a wrong check digit is a 400 `invalid_nit` naming the row."
                        },
                        "reference_date": {
                          "type": "string",
                          "format": "date",
                          "description": "The date SAT compares against: a person's date of birth,\na company's date of incorporation (YYYY-MM-DD, not in\nthe future). Defaults to `dob` when absent. Invalid is a\n400 `invalid_reference_date` naming the row.\n"
                        }
                      }
                    }
                  },
                  "threshold": {
                    "type": "integer",
                    "minimum": 30,
                    "maximum": 100
                  },
                  "sources": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The draft, with a quote.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "batch": {
                      "$ref": "#/components/schemas/Batch"
                    },
                    "quote": {
                      "$ref": "#/components/schemas/BatchQuote"
                    },
                    "row_count": {
                      "type": "integer",
                      "description": "Rows actually queued, after unusable ones were dropped."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/QuotaExceeded"
          }
        }
      },
      "get": {
        "tags": [
          "Batches"
        ],
        "summary": "List batches",
        "operationId": "listBatches",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Batches raised by this account through the API.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "batches": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Batch"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/batches/{id}": {
      "get": {
        "tags": [
          "Batches"
        ],
        "summary": "Retrieve a batch and its progress",
        "operationId": "getBatch",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The batch and a live count of where its rows have got to.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "batch": {
                      "$ref": "#/components/schemas/Batch"
                    },
                    "progress": {
                      "$ref": "#/components/schemas/BatchProgress"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/batches/{id}/confirm": {
      "post": {
        "tags": [
          "Batches"
        ],
        "summary": "Confirm a batch and start it",
        "operationId": "confirmBatch",
        "description": "Freezes the row count and starts the queue. **This is where the work\nbecomes chargeable** — the number frozen here is the number on the\ninvoice, and it is never recomputed.\n\nThe whole batch is checked against your remaining daily allowance and\nrefused outright if it will not fit. Running half of a batch and\nfailing the rest is the worst of the available answers, so it is not\none of them.\n\nRows that asked for adverse media are checked the same way, whole: when\nthey will not fit this month's adverse media capacity the batch is\nrefused with 409 `adverse_media_capacity` and `max_adverse_runs` — the\nnumber that would fit — so you can resubmit with fewer rows marked.\n",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Confirmed; the queue has started.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "batch": {
                      "$ref": "#/components/schemas/Batch"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "description": "The account's plan cannot cover the whole batch (see\n`PaymentRequired`). The batch stays a draft and nothing is billed.\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Adverse media rows on an account without adverse media (`adverse_media_not_enabled`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "The batch is no longer a draft (`conflict`), or its adverse media\nrows will not fit (`adverse_media_capacity`, with\n`max_adverse_runs`). Nothing was reserved or billed.\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "The batch needs more screenings than remain in today's allowance.\nThe message names both numbers. Split it, raise the account's\nlimit, or confirm it after the reset.\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/batches/{id}/cancel": {
      "post": {
        "tags": [
          "Batches"
        ],
        "summary": "Cancel a batch",
        "operationId": "cancelBatch",
        "description": "Withdraws everything not yet started. Rows already screened stay done\nand stay billed — that work was really performed.\n",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Cancelled.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "batch": {
                      "$ref": "#/components/schemas/Batch"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "The batch has already finished or been cancelled.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/batches/{id}/adverse-media": {
      "post": {
        "tags": [
          "Batches"
        ],
        "summary": "Add adverse media to rows already screened",
        "operationId": "addBatchAdverseMedia",
        "description": "Requests an adverse media check on rows of a CONFIRMED batch — typically\nafter reading the results, for the rows that need review. Rows whose\nprevious check failed (`PROVIDER_FAILURE`, `CANCELLED`) or could not be\nqueued (`REFUSED`) may be asked again; that is a new run, billed only\nif it is delivered.\n\nTwo calls on purpose: send `confirm: false` (the default) to get the\nquote and the eligible count — nothing is reserved — then the same\n`row_ids` with `confirm: true`. Rows not yet screened, not screened at\nall, or already checked are skipped and counted in `skipped`, never\ncharged. Choose rows for a batch you have NOT confirmed yet with each\nrow's `adverse_media` field instead (409 `batch_not_confirmed`).\n",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "row_ids"
                ],
                "properties": {
                  "row_ids": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 2000,
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "description": "Row `id`s from `GET /v1/batches/{id}/rows`."
                  },
                  "confirm": {
                    "type": "boolean",
                    "default": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The quote (`confirm` false). Nothing was reserved.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "eligible": {
                      "type": "integer"
                    },
                    "skipped": {
                      "$ref": "#/components/schemas/AdverseSkipped"
                    },
                    "quote": {
                      "$ref": "#/components/schemas/AdverseQuote"
                    }
                  }
                }
              }
            }
          },
          "202": {
            "description": "Reserved and queued. Results appear on the rows as each run completes.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "requested": {
                      "type": "integer"
                    },
                    "retried": {
                      "type": "integer",
                      "description": "How many of them repeat a check that had failed."
                    },
                    "queued": {
                      "type": "integer",
                      "description": "Queued in this request; the rest follow within minutes."
                    },
                    "skipped": {
                      "$ref": "#/components/schemas/AdverseSkipped"
                    },
                    "quote": {
                      "$ref": "#/components/schemas/AdverseQuote"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "`invalid_row_ids`, or `no_eligible_rows` when confirming a selection with nothing to check.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "description": "The account's plan cannot cover these checks (see `PaymentRequired`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`adverse_media_not_enabled` for this account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "`batch_not_confirmed`, or `adverse_media_capacity` with `max_adverse_runs`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`test_adverse_media_quota`: a TEST key's daily adverse media allowance.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/batches/{id}/rows": {
      "get": {
        "tags": [
          "Batches"
        ],
        "summary": "Read a batch's rows and their outcomes",
        "operationId": "listBatchRows",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "outcome",
            "in": "query",
            "description": "Narrow to one outcome, e.g. only the rows needing review.",
            "schema": {
              "type": "string",
              "enum": [
                "RESTRICTIONS",
                "PEP_ONLY",
                "NO_MATCH"
              ]
            }
          },
          {
            "name": "include",
            "in": "query",
            "description": "Set to `result` to get each row's FULL consolidated result inline,\ninstead of fetching them one at a time. This is the answer to \"2,000\nrows should not mean 2,000 requests\".\n\nFull results are large, so this mode is paged — use `limit` and\n`offset`. Offset paging is safe here specifically because a batch's\nrow set is fixed once created, so nothing shifts under a reader.\n",
            "schema": {
              "type": "string",
              "enum": [
                "result"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Rows per page. Only used with `include=result`.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Rows to skip. Only used with `include=result`.",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Every row with its outcome. Without `include=result` each row\ncarries a one-line summary and a `screening_request_id` to fetch;\nwith it, each row carries the whole `result` object — the same\nshape `POST /v1/screenings` returns — plus `offset` and `has_more`.\n",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "rows": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/BatchRow"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/monitored-subjects": {
      "post": {
        "tags": [
          "Monitoring"
        ],
        "summary": "Enrol a subject",
        "operationId": "enrolMonitoredSubject",
        "description": "Screens the subject immediately, returns that result as the baseline,\nand re-screens it daily from then on. **The enrolment screening and\nevery subsequent check are billed as screenings.**\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 2
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "PERSON",
                      "COMPANY",
                      "UNKNOWN"
                    ]
                  },
                  "country": {
                    "type": "string"
                  },
                  "dob": {
                    "type": "string"
                  },
                  "identifier_type": {
                    "type": "string"
                  },
                  "identifier_value": {
                    "type": "string"
                  },
                  "sources": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "threshold": {
                    "type": "integer",
                    "minimum": 30,
                    "maximum": 100
                  },
                  "external_ref": {
                    "type": "string",
                    "description": "Your own identifier — a case or client number. Echoed on every alert so a finding lands in your system without a lookup."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Enrolled, with the baseline screening.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "monitored_subject": {
                      "$ref": "#/components/schemas/MonitoredSubject"
                    },
                    "baseline": {
                      "$ref": "#/components/schemas/Screening"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "description": "A TEST key (monitoring bills, so it is live-only), the key lacks\n`monitoring:write`, or the account is already monitoring as many\nsubjects as its limit allows.\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Monitoring"
        ],
        "summary": "List monitored subjects",
        "operationId": "listMonitoredSubjects",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Subjects this account is monitoring.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "list"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/MonitoredSubject"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/monitored-subjects/{id}": {
      "get": {
        "tags": [
          "Monitoring"
        ],
        "summary": "Retrieve a monitored subject",
        "operationId": "getMonitoredSubject",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The subject.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MonitoredSubject"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "patch": {
        "tags": [
          "Monitoring"
        ],
        "summary": "Pause, resume, or relabel",
        "operationId": "updateMonitoredSubject",
        "description": "Only `status` and `external_ref` may change. The screening input is\nfrozen on purpose: a subject whose name is edited is a DIFFERENT\nsubject, and rewriting it in place would rebase the alert history onto\nsomeone else. Enrol a new one instead.\n\nPausing stops the daily checks, and therefore the daily charge.\n",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "ACTIVE",
                      "PAUSED"
                    ]
                  },
                  "external_ref": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated subject.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MonitoredSubject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "delete": {
        "tags": [
          "Monitoring"
        ],
        "summary": "Stop monitoring a subject",
        "operationId": "deleteMonitoredSubject",
        "description": "Checks stop and the charge stops with them. The screenings already\nperformed stay in your history — they were run and billed.\n",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Removed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "deleted": {
                      "type": "boolean"
                    },
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/rtu-lookups": {
      "post": {
        "tags": [
          "RTU lookups"
        ],
        "summary": "Request an RTU lookup",
        "operationId": "createRtuLookup",
        "description": "Queues a lookup and answers at once with its position in the queue.\nThe NIT's verification digit and the date are checked here, so a typo\nis refused immediately, costs nothing and never reaches SAT. Send an\n`Idempotency-Key`: a retry then replays instead of queueing (and\nbilling) the lookup twice. Requires `rtu:write`.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "nit",
                  "reference_date"
                ],
                "properties": {
                  "nit": {
                    "type": "string",
                    "description": "With or without the hyphen (`1234567-8` or `12345678`); `K` as a check digit is accepted.",
                    "example": "1031154-71"
                  },
                  "reference_date": {
                    "type": "string",
                    "format": "date",
                    "description": "Date of birth for a person, date of incorporation for a company. Must match SAT's record.",
                    "example": "2018-11-16"
                  },
                  "customer_reference": {
                    "type": "string",
                    "maxLength": 128,
                    "description": "Yours, echoed back on the lookup and in its webhook."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Queued.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/RtuLookup"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "queue": {
                          "type": "object",
                          "properties": {
                            "position": {
                              "type": "integer",
                              "description": "1 = next to be sent to SAT."
                            },
                            "estimated_hours": {
                              "type": [
                                "number",
                                "null"
                              ],
                              "description": "Rough wait, from the rate SAT answered over the last day. Null until there is history."
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "`invalid_nit` (wrong verification digit), `invalid_reference_date`, `invalid_customer_reference`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "description": "A plan refusal (`subscription_required`, `usage_limit_reached`, …).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`rtu_not_enabled` — the account cannot request RTU lookups; or `insufficient_scope`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`test_rtu_quota` — this TEST key's daily sandbox allowance is spent.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "`feature_disabled` — RTU lookups are temporarily switched off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "RTU lookups"
        ],
        "summary": "List RTU lookups",
        "operationId": "listRtuLookups",
        "description": "This account's lookups made with keys of the same environment, newest\nfirst. Items carry no record and no document links — open one for\nthose. Requires `rtu:read`.\n",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of lookups.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "enum": [
                        "list"
                      ]
                    },
                    "has_more": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RtuLookupListItem"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/rtu-lookups/{id}": {
      "get": {
        "tags": [
          "RTU lookups"
        ],
        "summary": "Retrieve an RTU lookup",
        "operationId": "getRtuLookup",
        "description": "The lookup, with SAT's record and the document links once SAT has answered. Requires `rtu:read`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The lookup.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RtuLookup"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/rtu-lookups/{id}/cancel": {
      "post": {
        "tags": [
          "RTU lookups"
        ],
        "summary": "Cancel an RTU lookup that has not been sent",
        "operationId": "cancelRtuLookup",
        "description": "Only a lookup still `QUEUED` can be cancelled; once it is at SAT it will\nbe answered (and, if SAT answers, billed). Requires `rtu:write`.\n",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Cancelled.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RtuLookup"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "`not_cancellable` — already sent to SAT, or finished.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/rtu-lookups/{id}/revoke-links": {
      "post": {
        "tags": [
          "RTU lookups"
        ],
        "summary": "Revoke an RTU lookup's document links",
        "operationId": "revokeRtuLinks",
        "description": "Invalidates every document link issued for this lookup — including\nthose already delivered by webhook — and returns the lookup with new\nones. Use it when a link has leaked. Requires `rtu:write`.\n",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The lookup, with new links.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RtuLookup"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "`no_documents` — the lookup has no document links (not answered with a record, or a TEST lookup).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/tax-compliance-lookups": {
      "post": {
        "tags": [
          "Tax compliance lookups"
        ],
        "summary": "Request a tax compliance lookup",
        "operationId": "createTaxComplianceLookup",
        "description": "Queues a lookup and answers at once with its position in the queue.\nThe NIT's verification digit is checked here, so a typo is refused\nimmediately, costs nothing and never reaches SAT. Send an\n`Idempotency-Key`: a retry then replays instead of queueing (and\nbilling) the lookup twice. Requires `tax_compliance:write`.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "nit"
                ],
                "properties": {
                  "nit": {
                    "type": "string",
                    "description": "With or without the hyphen (`1234567-8` or `12345678`); `K` as a check digit is accepted.",
                    "example": "2000002-2"
                  },
                  "customer_reference": {
                    "type": "string",
                    "maxLength": 128,
                    "description": "Yours, echoed back on the lookup and in its webhook."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Queued.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/TaxComplianceLookup"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "queue": {
                          "type": "object",
                          "properties": {
                            "position": {
                              "type": "integer",
                              "description": "1 = next to be sent to SAT."
                            },
                            "estimated_hours": {
                              "type": "number",
                              "description": "Rough wait, from SAT's current pace and the lookups ahead of this one."
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "`invalid_nit` (wrong verification digit), `invalid_customer_reference`, `invalid_body`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "description": "A plan refusal (`subscription_required`, `usage_limit_reached`, …).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`tax_compliance_not_enabled` — the account cannot request tax compliance lookups; or `insufficient_scope`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`test_tax_compliance_quota` — this TEST key's daily sandbox allowance is spent.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "`feature_disabled` — tax compliance lookups are temporarily switched off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Tax compliance lookups"
        ],
        "summary": "List tax compliance lookups",
        "operationId": "listTaxComplianceLookups",
        "description": "This account's lookups made with keys of the same environment, newest\nfirst. Items carry SAT's verdict, the taxpayer's name and each\ncategory's type and count — never the category detail or the PDF\nlink; open one for those. Requires `tax_compliance:read`.\n",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of lookups.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "enum": [
                        "list"
                      ]
                    },
                    "has_more": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TaxComplianceLookupListItem"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/tax-compliance-lookups/{id}": {
      "get": {
        "tags": [
          "Tax compliance lookups"
        ],
        "summary": "Retrieve a tax compliance lookup",
        "operationId": "getTaxComplianceLookup",
        "description": "The lookup, with SAT's verdict, every category and the PDF link once SAT has answered. Requires `tax_compliance:read`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The lookup.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaxComplianceLookup"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/tax-compliance-lookups/{id}/cancel": {
      "post": {
        "tags": [
          "Tax compliance lookups"
        ],
        "summary": "Cancel a tax compliance lookup that has not been sent",
        "operationId": "cancelTaxComplianceLookup",
        "description": "Only a lookup still `QUEUED` can be cancelled; once it is at SAT it will\nbe answered (and, if SAT answers, billed). Requires `tax_compliance:write`.\n",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Cancelled.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaxComplianceLookup"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "`not_cancellable` — already sent to SAT, or finished.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/tax-compliance-lookups/{id}/revoke-links": {
      "post": {
        "tags": [
          "Tax compliance lookups"
        ],
        "summary": "Revoke a tax compliance lookup's PDF link",
        "operationId": "revokeTaxComplianceLinks",
        "description": "Invalidates the PDF link issued for this lookup — including one already\ndelivered by webhook — and returns the lookup with a new one. Use it\nwhen a link has leaked. Requires `tax_compliance:write`.\n",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The lookup, with a new link.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaxComplianceLookup"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "`no_documents` — the lookup has no PDF (not answered by SAT, or a TEST lookup).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/recede-searches": {
      "post": {
        "tags": [
          "Registro de Detenciones Guatemala searches"
        ],
        "summary": "Request a Registro de Detenciones Guatemala search",
        "operationId": "createRecedeSearch",
        "description": "Queues a search and answers at once with its position in the queue.\nThe name is checked here, so a typo is refused immediately, costs\nnothing and never reaches Registro de Detenciones Guatemala. Send an `Idempotency-Key`: a retry\nthen replays instead of queueing (and billing) the search twice.\nRequires `recede:write`.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/RecedeName"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "customer_reference": {
                        "type": "string",
                        "maxLength": 128,
                        "description": "Yours, echoed back on the search and in its webhook."
                      },
                      "screening_id": {
                        "type": "string",
                        "format": "uuid",
                        "description": "Link the search to one of your screenings, so it is\nlisted with `?screening_id=`. A screening of a company\nis refused (`recede_person_only`).\n"
                      }
                    }
                  }
                ]
              },
              "example": {
                "first_name": "ROXANA",
                "first_last_name": "BALDETTI",
                "customer_reference": "exp-77"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Queued.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/RecedeSearch"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "queue": {
                          "type": "object",
                          "properties": {
                            "position": {
                              "type": "integer",
                              "description": "1 = next to be sent to Registro de Detenciones Guatemala."
                            },
                            "estimated_minutes": {
                              "type": [
                                "integer",
                                "null"
                              ],
                              "description": "Rough wait, from the pace Registro de Detenciones Guatemala answered at recently (never faster than its nominal pace). `null` while the source is not answering."
                            },
                            "source": {
                              "$ref": "#/components/schemas/RecedeSource"
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "`invalid_recede_name` (with `param` naming the part), `recede_person_only`, `invalid_customer_reference`, `invalid_screening_id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "description": "A plan refusal (`subscription_required`, `usage_limit_reached`, …).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`recede_not_enabled` — the account cannot request Registro de Detenciones Guatemala searches; or `insufficient_scope`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "description": "`recede_queue_full` — this account already has the maximum waiting; or `test_recede_quota` — a TEST key's daily sandbox allowance is spent.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "`feature_disabled` — Registro de Detenciones Guatemala searches are temporarily switched off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Registro de Detenciones Guatemala searches"
        ],
        "summary": "List Registro de Detenciones Guatemala searches",
        "operationId": "listRecedeSearches",
        "description": "This account's searches made with keys of the same environment, newest\nfirst. Items carry no registrations — open one for those. Requires\n`recede:read`.\n",
        "parameters": [
          {
            "name": "screening_id",
            "in": "query",
            "description": "Only the searches linked to this screening.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of searches.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "enum": [
                        "list"
                      ]
                    },
                    "has_more": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RecedeSearchListItem"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/recede-searches/{id}": {
      "get": {
        "tags": [
          "Registro de Detenciones Guatemala searches"
        ],
        "summary": "Retrieve a Registro de Detenciones Guatemala search",
        "operationId": "getRecedeSearch",
        "description": "The search, with the Registro de Detenciones Guatemala registrations and the caveats once it has answered. Requires `recede:read`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The search.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecedeSearch"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/recede-searches/{id}/cancel": {
      "post": {
        "tags": [
          "Registro de Detenciones Guatemala searches"
        ],
        "summary": "Cancel a Registro de Detenciones Guatemala search that has not been sent",
        "operationId": "cancelRecedeSearch",
        "description": "Only a search still `QUEUED` can be cancelled; once it is at Registro de Detenciones Guatemala it\nwill be answered (and, if Registro de Detenciones Guatemala answers, billed). Requires\n`recede:write`.\n",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Cancelled.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecedeSearch"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "`not_cancellable` — already sent to Registro de Detenciones Guatemala, or finished.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/sources": {
      "get": {
        "tags": [
          "Datasets"
        ],
        "summary": "List datasets and their freshness",
        "operationId": "listSources",
        "description": "What every screening is run against, and how current each dataset is.\nThis is the endpoint to cite when an auditor asks what you screen\nagainst and when it was last verified.\n",
        "responses": {
          "200": {
            "description": "The active datasets.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "list"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Source"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/QuotaExceeded"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerApiKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "`Authorization: Bearer rm_live_...`\n\nYour account administrators create keys in the RiskMotor app\n(Settings → API keys); RiskMotor can also issue them. `rm_live_` keys\nare metered and billed;\n`rm_test_` keys run the identical engine against the identical data and\nare never billed.\n\n**Server-side only.** This API sends no CORS headers, so a browser\ncannot call it — deliberately: a key in a web page is a key in every\nvisitor's devtools.\n"
      },
      "apiKeyHeader": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key",
        "description": "Alternative to `Authorization`, for HTTP layers that reserve it."
      }
    },
    "parameters": {
      "IdempotencyKey": {
        "name": "Idempotency-Key",
        "in": "header",
        "required": false,
        "description": "Any unique string up to 255 characters — an order id works well. For\n24 hours, a repeat with the same key and the same body replays the\nstored response instead of screening again.\n",
        "schema": {
          "type": "string",
          "maxLength": 255
        }
      }
    },
    "headers": {
      "XRequestId": {
        "description": "Quote this when contacting support; it appears in our logs for the same request.",
        "schema": {
          "type": "string",
          "format": "uuid"
        }
      },
      "RateLimitLimit": {
        "description": "Screenings allowed per day.",
        "schema": {
          "type": "integer"
        }
      },
      "RateLimitRemaining": {
        "description": "Screenings left in the current day.",
        "schema": {
          "type": "integer"
        }
      },
      "RateLimitReset": {
        "description": "Unix seconds at which the allowance resets — **local midnight in your\naccount's billing timezone**, not UTC midnight, so it matches your own\nrecords and your invoice.\n",
        "schema": {
          "type": "integer"
        }
      },
      "RateLimitMinuteLimit": {
        "description": "Requests allowed per minute. A separate limit from the daily one, and\nnamed apart from it because the two have different remedies: this one\nmeans \"slow down\", the daily one means \"come back tomorrow\".\n",
        "schema": {
          "type": "integer"
        }
      },
      "RateLimitMinuteRemaining": {
        "description": "Requests left in the current minute. Present on every response, including reads.",
        "schema": {
          "type": "integer"
        }
      }
    },
    "schemas": {
      "RecedeName": {
        "type": "object",
        "required": [
          "first_name",
          "first_last_name"
        ],
        "description": "A person's name in the parts Registro de Detenciones Guatemala searches. Each part: letters,\nspaces, hyphens, apostrophes and periods, at most 60 characters; the\nwhole name at least 5 characters. Send only parts you know for\ncertain — every part sent must appear in the registration.\n",
        "properties": {
          "first_name": {
            "type": "string",
            "maxLength": 60
          },
          "second_name": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 60
          },
          "first_last_name": {
            "type": "string",
            "maxLength": 60,
            "description": "First surname."
          },
          "second_last_name": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 60,
            "description": "Second surname."
          }
        }
      },
      "RecedeSearchListItem": {
        "type": "object",
        "description": "A Registro de Detenciones Guatemala search without its registrations — the shape of list items and of the `recede_search.completed` webhook.",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "recede_search"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "enum": [
              "QUEUED",
              "IN_PROGRESS",
              "COMPLETED",
              "FAILED",
              "REJECTED",
              "CANCELLED"
            ],
            "description": "`QUEUED` waiting to be sent to Registro de Detenciones Guatemala; `IN_PROGRESS` at Registro de Detenciones Guatemala;\n`COMPLETED` Registro de Detenciones Guatemala answered (billed); `FAILED` Registro de Detenciones Guatemala could not\nanswer (not billed); `REJECTED` refused before reaching Registro de Detenciones Guatemala\n(not billed); `CANCELLED` withdrawn by you (not billed).\n"
          },
          "environment": {
            "type": "string",
            "enum": [
              "LIVE",
              "TEST"
            ]
          },
          "first_name": {
            "type": "string"
          },
          "second_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "first_last_name": {
            "type": "string"
          },
          "second_last_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "searched_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The text Registro de Detenciones Guatemala was asked for, once it accepted the search."
          },
          "customer_reference": {
            "type": [
              "string",
              "null"
            ]
          },
          "screening_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "batch_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "outcome": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "RECORDS_FOUND",
              "NO_RECORDS",
              "RECEDE_UNAVAILABLE",
              "EXTRACTION_FAILED",
              "BLOCKED",
              "ABANDONED",
              null
            ],
            "description": "The Registro de Detenciones Guatemala answer once `COMPLETED` (`RECORDS_FOUND` or `NO_RECORDS`), or why it could not answer once `FAILED`. Null otherwise."
          },
          "recede_answered": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "True once COMPLETED, false once FAILED."
          },
          "rejection_code": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "NAME_MISSING",
              "NAME_INVALID",
              "NAME_TOO_SHORT",
              null
            ]
          },
          "reported_total": {
            "type": [
              "integer",
              "null"
            ],
            "description": "How many registrations Registro de Detenciones Guatemala said it found."
          },
          "row_count": {
            "type": [
              "integer",
              "null"
            ],
            "description": "How many registrations were delivered and kept."
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "submitted_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "completed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "RecedeSearch": {
        "allOf": [
          {
            "$ref": "#/components/schemas/RecedeSearchListItem"
          },
          {
            "type": "object",
            "properties": {
              "rows": {
                "type": [
                  "array",
                  "null"
                ],
                "description": "The Registro de Detenciones Guatemala registrations, in its order, only once\n`COMPLETED`. Values are exactly as Registro de Detenciones Guatemala published them,\nplaceholders included (`\"No Porta\"`, `\"NO TIENE\"`, `\"-\"`).\nEach may be a different person with the same name.\n",
                "items": {
                  "$ref": "#/components/schemas/RecedeRow"
                }
              },
              "rows_unavailable": {
                "type": "boolean",
                "description": "Registro de Detenciones Guatemala found registrations but they were no longer retrievable when the answer was recovered. Billed — Registro de Detenciones Guatemala answered."
              },
              "caveats": {
                "type": "array",
                "description": "All four, on every answered search. Show them before the result.",
                "items": {
                  "type": "string",
                  "enum": [
                    "TEXT_NOT_PEOPLE",
                    "NO_RECORDS_NOT_CLEAN",
                    "DETENTION_SNAPSHOT",
                    "NOT_CRIMINAL_RECORD"
                  ]
                }
              },
              "notice": {
                "type": "string"
              },
              "source": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/RecedeSource"
                  }
                ],
                "description": "Only while a LIVE search is `QUEUED` or `IN_PROGRESS`."
              }
            }
          }
        ]
      },
      "RecedeSource": {
        "type": "object",
        "description": "Whether Registro de Detenciones Guatemala itself (the Organismo Judicial's site) is\nanswering. While it is not, LIVE searches wait in our queue instead of being sent: they\nare not billed, can still be cancelled, and go out by themselves once it is back.\nUnknown reads as available.\n",
        "properties": {
          "available": {
            "type": "boolean"
          },
          "since": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When it stopped answering, while `available` is false."
          }
        }
      },
      "RecedeRow": {
        "type": "object",
        "properties": {
          "index": {
            "type": "integer"
          },
          "person_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "document_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "document_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "detention_center": {
            "type": [
              "string",
              "null"
            ]
          },
          "arrest_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "The date of arrest when it could be read; a calendar date with no time zone."
          },
          "arrest_date_raw": {
            "type": [
              "string",
              "null"
            ],
            "description": "The date exactly as Registro de Detenciones Guatemala wrote it."
          },
          "ordered_by": {
            "type": [
              "string",
              "null"
            ]
          },
          "court": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "RecedeSearchRequestOutcome": {
        "type": "object",
        "description": "The queued search, or the refusal, beside a screening result.",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "recede_search_request"
            ]
          },
          "search_id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "enum": [
              "QUEUED"
            ]
          },
          "error": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string"
              },
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "resets_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              }
            }
          }
        }
      },
      "RecedeQuote": {
        "type": "object",
        "description": "The Registro de Detenciones Guatemala line — rows with `recede: true`. Same rule as the runs:\n`priced: false` means no rate is configured, not free.\n",
        "properties": {
          "runs": {
            "type": "integer"
          },
          "unit_price": {
            "type": [
              "number",
              "null"
            ]
          },
          "amount": {
            "type": [
              "number",
              "null"
            ]
          },
          "priced": {
            "type": "boolean"
          },
          "eta_hours": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Rough hours until the last search is answered, at the Registro de Detenciones Guatemala nominal pace shared by every customer."
          }
        }
      },
      "RtuQuote": {
        "type": "object",
        "description": "The SAT RTU line — rows with `rtu: true`. Same rule as the runs:\n`priced: false` means no rate is configured, not free.\n",
        "properties": {
          "runs": {
            "type": "integer"
          },
          "unit_price": {
            "type": [
              "number",
              "null"
            ]
          },
          "amount": {
            "type": [
              "number",
              "null"
            ]
          },
          "priced": {
            "type": "boolean"
          },
          "eta_hours_min": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Hours until the last lookup is answered at SAT's fastest nominal pace, counting the lookups already ahead of it."
          },
          "eta_hours_max": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The same at SAT's slowest nominal pace."
          },
          "eta_hours": {
            "type": [
              "number",
              "null"
            ],
            "description": "The same at the pace answers actually arrived over the last day; null without history."
          }
        }
      },
      "BatchRowRenap": {
        "type": "object",
        "description": "A row's RENAP lookup — status, outcome and comparison codes only. The record and photo are on the screening's own page in the web app.",
        "properties": {
          "status": {
            "type": "string",
            "description": "`QUEUED`, `IN_PROGRESS`, `COMPLETED`, `FAILED`, or before a lookup exists `WAITING`, `REFUSED` (see `error`), `NOT_SCREENED`."
          },
          "lookup_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "outcome": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "FOUND",
              "NOT_FOUND",
              null
            ]
          },
          "name_comparison": {
            "type": [
              "string",
              "null"
            ],
            "description": "The name as screened against RENAP's: MATCH, CONTAINED, PARTIAL, DIFFERENT, NOT_PROVIDED, NOT_AVAILABLE. A comparison, not a determination of identity."
          },
          "dob_comparison": {
            "type": [
              "string",
              "null"
            ]
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "BatchRowRtu": {
        "type": "object",
        "description": "A row's SAT RTU lookup — status and outcome only. Read SAT's record with `GET /v1/rtu-lookups/{lookup_id}`.",
        "properties": {
          "status": {
            "type": "string",
            "description": "`QUEUED`, `IN_PROGRESS`, `COMPLETED`, `FAILED`, `REJECTED`, `CANCELLED`, or before a lookup exists `WAITING`, `REFUSED` (see `error`), `NOT_SCREENED`."
          },
          "lookup_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "outcome": {
            "type": [
              "string",
              "null"
            ]
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "BatchRowRecede": {
        "type": "object",
        "description": "A row's Registro de Detenciones Guatemala search — counts and status only; read the registrations with `GET /v1/recede-searches/{search_id}`.",
        "properties": {
          "status": {
            "type": "string",
            "description": "The search's own status once queued, or one of three states before\none exists: `WAITING` (the row is not screened or queued yet),\n`REFUSED` (it could not be queued — see `error`), `NOT_SCREENED`\n(the row itself failed).\n"
          },
          "search_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "outcome": {
            "type": [
              "string",
              "null"
            ]
          },
          "row_count": {
            "type": [
              "integer",
              "null"
            ]
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "RtuLookup": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "rtu_lookup"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "enum": [
              "QUEUED",
              "IN_PROGRESS",
              "COMPLETED",
              "FAILED",
              "REJECTED",
              "CANCELLED"
            ],
            "description": "`QUEUED` waiting to be sent to SAT; `IN_PROGRESS` at SAT;\n`COMPLETED` SAT answered (billed); `FAILED` SAT could not answer\nafter retries (not billed); `REJECTED` refused before reaching SAT\n(not billed); `CANCELLED` withdrawn by you (not billed).\n"
          },
          "environment": {
            "type": "string",
            "enum": [
              "LIVE",
              "TEST"
            ]
          },
          "nit": {
            "type": "string",
            "description": "Normalized: no separators, uppercase K."
          },
          "reference_date": {
            "type": "string",
            "format": "date"
          },
          "customer_reference": {
            "type": [
              "string",
              "null"
            ]
          },
          "screening_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "outcome": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "SUCCESS",
              "NIT_NOT_FOUND",
              "DATE_MISMATCH",
              "NIT_INACTIVE",
              "NIT_DECEASED",
              "DATE_UNDER_MIN_AGE",
              "SAT_UNAVAILABLE",
              "CAPTCHA_FAILED",
              "EXTRACTION_FAILED",
              "BLOCKED",
              "ABANDONED"
            ],
            "description": "SAT's answer once `COMPLETED`, or the last failure once `FAILED`. Null otherwise."
          },
          "sat_answered": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "True once COMPLETED, false once FAILED."
          },
          "rejection_code": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "NIT_INVALID",
              "DATE_INVALID",
              null
            ]
          },
          "rtu": {
            "type": [
              "object",
              "null"
            ],
            "description": "SAT's record, verbatim, only when the outcome is SUCCESS.",
            "properties": {
              "legal_name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "fields": {
                "type": "array",
                "description": "Every label SAT printed, in page order. Render from this list;\n`key` is a stable machine name where one is known, null for\nlabels not yet mapped.\n",
                "items": {
                  "type": "object",
                  "properties": {
                    "section": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "label": {
                      "type": "string"
                    },
                    "key": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "value": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "documents": {
            "type": [
              "object",
              "null"
            ],
            "description": "SAT's certificate and QR. Bearer links — whoever holds one can open the record.",
            "properties": {
              "pdf_url": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uri",
                "description": "On riskmotor.com. Valid until the links are revoked.",
                "example": "https://riskmotor.com/d/rtu-pdf/0b9a3c1e-5f4d-4e2a-9c7b-1a2b3c4d5e6f/Xq3…/constancia-rtu.pdf"
              },
              "qr_url": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uri",
                "description": "On riskmotor.com. Valid until the links are revoked.",
                "example": "https://riskmotor.com/d/rtu-qr/0b9a3c1e-5f4d-4e2a-9c7b-1a2b3c4d5e6f/Kp9…/codigo-qr-rtu.png"
              },
              "archive": {
                "type": "object",
                "description": "Our evidence copy of each document. Present on a single lookup (GET by id, the webhook); `null` for a document with no copy.",
                "properties": {
                  "pdf": {
                    "anyOf": [
                      {
                        "$ref": "#/components/schemas/SatDocumentArchive"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "qr": {
                    "anyOf": [
                      {
                        "$ref": "#/components/schemas/SatDocumentArchive"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              }
            }
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "completed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "notice": {
            "type": "string"
          }
        }
      },
      "RtuLookupListItem": {
        "type": "object",
        "description": "An RtuLookup without `rtu`, `documents` or `notice`, plus SAT's legal name when found.",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "rtu_lookup"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string"
          },
          "environment": {
            "type": "string",
            "enum": [
              "LIVE",
              "TEST"
            ]
          },
          "nit": {
            "type": "string"
          },
          "reference_date": {
            "type": "string",
            "format": "date"
          },
          "customer_reference": {
            "type": [
              "string",
              "null"
            ]
          },
          "outcome": {
            "type": [
              "string",
              "null"
            ]
          },
          "legal_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "completed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "TaxComplianceQuote": {
        "type": "object",
        "description": "The tax compliance line — rows with `tax_compliance: true`. Same rule as\nthe runs: `priced: false` means no rate is configured, not free.\n",
        "properties": {
          "runs": {
            "type": "integer"
          },
          "unit_price": {
            "type": [
              "number",
              "null"
            ]
          },
          "amount": {
            "type": [
              "number",
              "null"
            ]
          },
          "priced": {
            "type": "boolean"
          },
          "eta_hours": {
            "type": [
              "number",
              "null"
            ],
            "description": "Hours until the last lookup is answered at SAT's current pace, counting the lookups already ahead of it."
          }
        }
      },
      "BatchRowTaxCompliance": {
        "type": "object",
        "description": "A row's tax compliance lookup — status, outcome and SAT's verdict flag only. Read the categories and the PDF with `GET /v1/tax-compliance-lookups/{lookup_id}`.",
        "properties": {
          "status": {
            "type": "string",
            "description": "`QUEUED`, `IN_PROGRESS`, `COMPLETED`, `FAILED`, `REJECTED`, `CANCELLED`, or before a lookup exists `WAITING`, `REFUSED` (see `error`), `NOT_SCREENED`."
          },
          "lookup_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "outcome": {
            "type": [
              "string",
              "null"
            ]
          },
          "has_incumplimientos": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "SAT's flag once `COMPLETED` with outcome SUCCESS."
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "TaxComplianceIncumplimiento": {
        "type": "object",
        "description": "One category SAT reported, with SAT's label verbatim. The list is\nOPEN: render `label` for any `type` you do not recognise — SAT adds\ncategories, which arrive as `OTHER` with SAT's own `text`.\n",
        "required": [
          "type",
          "label"
        ],
        "properties": {
          "type": {
            "type": "string",
            "description": "`RTU_UPDATE_PENDING`, `OMITTED_RETURNS`, `BOOKS_PENDING`, `OTHER`."
          },
          "label": {
            "type": "string",
            "description": "SAT's heading for the category, verbatim."
          },
          "last_update_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "`RTU_UPDATE_PENDING`: when the RTU was last updated."
          },
          "returns": {
            "type": "array",
            "description": "`OMITTED_RETURNS`: each return SAT says was not filed.",
            "items": {
              "type": "object",
              "properties": {
                "year": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "period": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "tax": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "form": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              }
            }
          },
          "text": {
            "type": [
              "string",
              "null"
            ],
            "description": "`OTHER` (and any category with free text): SAT's text, verbatim."
          }
        }
      },
      "SatDocumentArchive": {
        "type": "object",
        "description": "RiskMotor's own copy of a SAT document, taken when the answer arrived\nand fingerprinted with SHA-256, so the document can be shown to be the\none SAT issued. The link keeps working while the copy is kept: it is\nserved from the copy (checked against the fingerprint on every\nopening). After `retain_until` the file is deleted (the link then\nanswers 410) and the fingerprint is kept as the record.\n",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "PENDING",
              "FETCHING",
              "ARCHIVED",
              "NOT_AVAILABLE",
              "FAILED",
              "PURGED"
            ],
            "description": "`ARCHIVED` = copy held. `NOT_AVAILABLE` = the file was gone before it could be copied. `PURGED` = retention over, file deleted."
          },
          "sha256": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^[0-9a-f]{64}$",
            "description": "SHA-256 of the file's bytes, once archived."
          },
          "size_bytes": {
            "type": [
              "integer",
              "null"
            ]
          },
          "fetched_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the copy was taken."
          },
          "retain_until": {
            "type": "string",
            "format": "date",
            "description": "Kept until this date (from the lookup's completion)."
          },
          "legal_hold": {
            "type": "boolean",
            "description": "While true the copy is never deleted."
          }
        }
      },
      "TaxComplianceLookup": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "tax_compliance_lookup"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "enum": [
              "QUEUED",
              "IN_PROGRESS",
              "COMPLETED",
              "FAILED",
              "REJECTED",
              "CANCELLED"
            ],
            "description": "`QUEUED` waiting to be sent to SAT; `IN_PROGRESS` at SAT;\n`COMPLETED` SAT answered (billed); `FAILED` SAT could not answer\n(not billed); `REJECTED` refused before reaching SAT (not billed);\n`CANCELLED` withdrawn by you (not billed).\n"
          },
          "environment": {
            "type": "string",
            "enum": [
              "LIVE",
              "TEST"
            ]
          },
          "nit": {
            "type": "string",
            "description": "Normalized: no separators, uppercase K."
          },
          "customer_reference": {
            "type": [
              "string",
              "null"
            ]
          },
          "screening_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Set when the lookup came from a batch row."
          },
          "batch_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "outcome": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "SUCCESS",
              "NIT_NOT_FOUND",
              "SAT_UNAVAILABLE",
              "CAPTCHA_FAILED",
              "EXTRACTION_FAILED",
              "BLOCKED",
              "ABANDONED"
            ],
            "description": "SAT's answer once `COMPLETED` (SUCCESS or NIT_NOT_FOUND), or the last failure once `FAILED`. Null otherwise."
          },
          "sat_answered": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "True once COMPLETED, false once FAILED."
          },
          "rejection_code": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "NIT_INVALID",
              null
            ]
          },
          "has_incumplimientos": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "SAT's verdict — true when SAT says the taxpayer presents incumplimientos. Null unless the outcome is SUCCESS."
          },
          "verification": {
            "type": [
              "object",
              "null"
            ],
            "description": "SAT's answer, verbatim, only when the outcome is SUCCESS.",
            "properties": {
              "has_incumplimientos": {
                "type": "boolean"
              },
              "sat_checked_at": {
                "type": "string",
                "format": "date-time",
                "description": "When SAT answered."
              },
              "taxpayer": {
                "type": "object",
                "properties": {
                  "nit": {
                    "type": "string"
                  },
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                }
              },
              "incumplimientos": {
                "type": "array",
                "description": "Empty when the taxpayer is up to date.",
                "items": {
                  "$ref": "#/components/schemas/TaxComplianceIncumplimiento"
                }
              }
            }
          },
          "document": {
            "type": [
              "object",
              "null"
            ],
            "description": "SAT's report. A bearer link — whoever holds it can open the report. Null for TEST lookups.",
            "properties": {
              "pdf_url": {
                "type": "string",
                "format": "uri",
                "description": "On riskmotor.com. Valid until the link is revoked.",
                "example": "https://riskmotor.com/d/tax-pdf/0b9a3c1e-5f4d-4e2a-9c7b-1a2b3c4d5e6f/Xq3…/solvencia-fiscal-sat.pdf"
              },
              "archive": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/SatDocumentArchive"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Our evidence copy of the report. `null` when there is none (yet)."
              }
            }
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "completed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "notice": {
            "type": "string"
          }
        }
      },
      "TaxComplianceLookupListItem": {
        "type": "object",
        "description": "A TaxComplianceLookup without `verification`, `document` or `notice`, plus the taxpayer's name and each category's type and count.",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "tax_compliance_lookup"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string"
          },
          "environment": {
            "type": "string",
            "enum": [
              "LIVE",
              "TEST"
            ]
          },
          "nit": {
            "type": "string"
          },
          "customer_reference": {
            "type": [
              "string",
              "null"
            ]
          },
          "outcome": {
            "type": [
              "string",
              "null"
            ]
          },
          "has_incumplimientos": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "taxpayer_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "incumplimiento_count": {
            "type": [
              "integer",
              "null"
            ]
          },
          "categories": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string"
                },
                "count": {
                  "type": "integer",
                  "description": "Omitted returns: how many; any other category: 1."
                }
              }
            }
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "completed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "ScreeningRequest": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "adverse_media": {
            "type": "boolean",
            "default": false,
            "description": "Also request an adverse media run for this subject. The screening\nreturns as usual; the run is queued and reported under\n`adverse_media` in the response, then read with\n`GET /screenings/{id}/adverse-media`. Billed per delivered run.\nThe account must have adverse media enabled.\n"
          },
          "recede": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RecedeName"
              }
            ],
            "description": "Also request a Registro de Detenciones Guatemala search for\nthis person, with the name in parts. Checked before the screening\nruns — an invalid name is a 400 `invalid_recede_name` (with\n`param` such as `recede.first_last_name`) and a company a 400\n`recede_person_only` — then queued after it and reported under\n`recede` in the response. Billed when Registro de Detenciones Guatemala answers. The account\nmust have Registro de Detenciones Guatemala searches enabled.\n"
          },
          "name": {
            "type": "string",
            "minLength": 2,
            "description": "The person or company to screen, as written. Accents and original scripts are preserved."
          },
          "type": {
            "type": "string",
            "enum": [
              "PERSON",
              "COMPANY",
              "UNKNOWN"
            ],
            "default": "UNKNOWN"
          },
          "country": {
            "type": "string",
            "description": "ISO 3166-1 alpha-2. Raises confidence on a match; never used to exclude one."
          },
          "dob": {
            "type": "string",
            "description": "Date of birth, `YYYY-MM-DD` or a year. Strong identity corroboration."
          },
          "identifier_type": {
            "type": "string",
            "description": "e.g. PASSPORT, NATIONAL_ID, TAX_ID."
          },
          "identifier_value": {
            "type": "string",
            "description": "An exact identifier match is never downgraded because the name is\nspelled differently.\n"
          },
          "sources": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Dataset codes from `GET /sources`. Omit to screen against\neverything, which is the recommended default — a narrowed list is\nsent verbatim and silently excludes whatever is missing from it.\nAn empty array is rejected rather than treated as \"all\".\n"
          },
          "threshold": {
            "type": "integer",
            "minimum": 30,
            "maximum": 100,
            "default": 65,
            "description": "Minimum match score to report. Lower finds more and reviews more.\nBelow the default you are trading reviewer time for recall\ndeliberately.\n"
          }
        }
      },
      "Screening": {
        "type": "object",
        "description": "The consolidated result. Also stored verbatim as the audit record.",
        "properties": {
          "screening_id": {
            "type": "string",
            "format": "uuid"
          },
          "adverse_media": {
            "description": "Present only when `adverse_media: true` was sent. Either the queued\nrun, or — when the request was refused — an `error` with the same\n`type`/`code` vocabulary as the error envelope. A refusal never\nfails the screening.\n",
            "$ref": "#/components/schemas/AdverseMediaRequestOutcome"
          },
          "recede": {
            "description": "Present only when `recede` was sent. Either the queued search, or —\nwhen the queue refused it — an `error`. A refusal never fails the\nscreening, and Registro de Detenciones Guatemala never changes `overall_status`.\n",
            "$ref": "#/components/schemas/RecedeSearchRequestOutcome"
          },
          "environment": {
            "type": "string",
            "enum": [
              "LIVE",
              "TEST"
            ]
          },
          "overall_status": {
            "type": "string",
            "enum": [
              "NO_MATCH",
              "REVIEW_REQUIRED"
            ],
            "description": "`REVIEW_REQUIRED` means a human must look, not that the subject is\nsanctioned. A PEP-only result is `REVIEW_REQUIRED` with\n`highest_severity: null` — exposure carries no severity.\n"
          },
          "highest_severity": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "CRITICAL",
              "HIGH",
              "MEDIUM",
              "LOW",
              null
            ],
            "description": "The weight of the most serious LISTING found. Null when only political exposure was found."
          },
          "unique_listing_count": {
            "type": "integer",
            "description": "Distinct designations. **This is the number that matters.**"
          },
          "source_confirmation_count": {
            "type": "integer",
            "description": "Official files carrying those designations. Always ≥\n`unique_listing_count`, and a larger number does not mean more\nrestrictions — it means better corroboration.\n"
          },
          "pep_match_count": {
            "type": "integer"
          },
          "screened_subject": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "entity_type": {
                "type": "string"
              },
              "country": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "query": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "normalized_name": {
                "type": "string"
              },
              "threshold": {
                "type": "number"
              },
              "sources": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          },
          "matches": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Match"
            }
          },
          "source_freshness": {
            "type": "object",
            "additionalProperties": {
              "type": [
                "string",
                "null"
              ],
              "format": "date-time"
            },
            "description": "When each dataset last CHANGED."
          },
          "source_verified_at": {
            "type": "object",
            "additionalProperties": {
              "type": [
                "string",
                "null"
              ],
              "format": "date-time"
            },
            "description": "When we last CONFIRMED we hold the authority's current file. Do not\nconflate with `source_freshness`: a list the authority simply has\nnot republished is current, not stale, and this is the field that\nsays so.\n"
          },
          "notice": {
            "$ref": "#/components/schemas/Notice"
          }
        }
      },
      "Notice": {
        "type": "string",
        "description": "The standing caveat, carried in the payload because you render your own\nUI and this is the one place we can still say it.\n"
      },
      "Match": {
        "type": "object",
        "description": "One real-world entity we believe your subject may be.",
        "properties": {
          "match_rank": {
            "type": "integer"
          },
          "canonical_entity": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "entity_type": {
                "type": "string"
              },
              "other_listed_names": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "alias_sample": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          },
          "match_confidence": {
            "type": "number",
            "minimum": 0,
            "maximum": 1,
            "description": "How likely this is the SAME real-world entity. **Not** a measure of\nhow serious the listing is — see `unique_listings[].severity`. A\n0.6 confidence against an SDN is not a confirmed SDN.\n"
          },
          "match_score": {
            "type": "integer",
            "description": "The same judgement on the 0–100 scale."
          },
          "match_type": {
            "type": "string",
            "enum": [
              "POSSIBLE",
              "STRONG",
              "VERY_STRONG",
              "EXACT",
              "NAME_SIMILARITY"
            ]
          },
          "matched_value": {
            "type": "string"
          },
          "matched_via": {
            "type": "string",
            "description": "Which field carried the match, e.g. NAME, ALIAS, IDENTIFIER."
          },
          "match_reasons": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "English prose, kept as the persisted audit record."
          },
          "match_reason_codes": {
            "type": "array",
            "description": "The same reasons as structured data, so you can phrase them in any language.",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string"
                },
                "params": {
                  "type": "object"
                }
              }
            }
          },
          "match_evidence": {
            "type": "array",
            "description": "Per-field working, so a reviewer can see WHY rather than trusting a number.",
            "items": {
              "type": "object",
              "properties": {
                "field": {
                  "type": "string",
                  "description": "name, identifier, date_of_birth, country"
                },
                "result": {
                  "type": "string",
                  "description": "EXACT, PARTIAL, NO_MATCH, NOT_PROVIDED"
                },
                "detail": {
                  "type": "string"
                },
                "params": {
                  "type": "object"
                }
              }
            }
          },
          "highest_severity": {
            "type": [
              "string",
              "null"
            ]
          },
          "pep": {
            "description": "Political exposure, deliberately separate from listings. A PEP is not a restriction and implies no wrongdoing.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/PepMatch"
              },
              {
                "type": "null"
              }
            ]
          },
          "unique_listings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UniqueListing"
            }
          }
        }
      },
      "UniqueListing": {
        "type": "object",
        "description": "One designation by one authority.",
        "properties": {
          "listing_id": {
            "type": "string",
            "format": "uuid"
          },
          "listing_key": {
            "type": "string",
            "description": "Stable logical id, e.g. `OFAC_SDN:424`. Deterministic — never derived from name similarity."
          },
          "authority": {
            "type": "string",
            "description": "UN, US_TREASURY_OFAC, US_COMMERCE_BIS, US_STATE, EU, UK_FCDO, WORLD_BANK, IDB"
          },
          "list": {
            "type": "string",
            "description": "The authority's own name for the list."
          },
          "severity": {
            "type": "string",
            "enum": [
              "CRITICAL",
              "HIGH",
              "MEDIUM",
              "LOW"
            ]
          },
          "restriction_class": {
            "type": "string",
            "enum": [
              "FINANCIAL_BLOCKING",
              "VISA_OR_ENTRY_RESTRICTION",
              "TRADE_RESTRICTION",
              "PROCUREMENT_INTEGRITY",
              "DEBARMENT"
            ],
            "description": "What the restriction DOES, separately from how serious it is. A\nState Department visa restriction is not an OFAC asset freeze, and\na development-bank debarment is procurement ineligibility — not a\nsanction.\n"
          },
          "listed_name": {
            "type": "string"
          },
          "programs": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "remarks": {
            "type": [
              "string",
              "null"
            ],
            "description": "The authority's own note, where published."
          },
          "listed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "designation": {
            "type": [
              "object",
              "null"
            ]
          },
          "listed_details": {
            "type": "object",
            "description": "Identity data as the authority published it.",
            "properties": {
              "dates_of_birth": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "nationalities_countries": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "identifiers": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string"
                    },
                    "value": {
                      "type": "string"
                    },
                    "country": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              },
              "addresses": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          },
          "source_confirmations": {
            "type": "array",
            "description": "The official files carrying this one designation. More entries mean\nbetter corroboration, **not more restrictions**.\n",
            "items": {
              "$ref": "#/components/schemas/SourceConfirmation"
            }
          }
        }
      },
      "SourceConfirmation": {
        "type": "object",
        "properties": {
          "source": {
            "type": "string",
            "description": "Dataset code, as in `GET /sources`."
          },
          "source_record_id": {
            "type": "string",
            "description": "The record's id in that file."
          },
          "role": {
            "type": "string",
            "enum": [
              "PRIMARY",
              "CONFIRMATION"
            ]
          }
        }
      },
      "PepMatch": {
        "type": "object",
        "description": "Political exposure. Never contributes to `unique_listing_count` or\n`highest_severity`.\n",
        "properties": {
          "person_name": {
            "type": "string"
          },
          "pep_status": {
            "type": "string",
            "enum": [
              "CURRENT",
              "FORMER",
              "UNKNOWN"
            ]
          },
          "jurisdictions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "positions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "position_title": {
                  "type": "string"
                },
                "category": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "jurisdiction": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "pep_status": {
                  "type": "string"
                },
                "institution": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "term_start": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "term_end": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              }
            }
          }
        }
      },
      "Batch": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "enum": [
              "DRAFT",
              "CONFIRMED",
              "RUNNING",
              "COMPLETED",
              "PARTIAL",
              "CANCELLED"
            ],
            "description": "`DRAFT` costs nothing. `PARTIAL` means the job finished with some\nrows unscreened — read the rows to see which.\n"
          },
          "confirmed_row_count": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Frozen at confirm and never recomputed. This is the number on the invoice."
          },
          "rows_skipped": {
            "type": "integer",
            "description": "Rows dropped as unscreenable before queueing."
          },
          "duplicates_collapsed": {
            "type": "integer"
          },
          "threshold": {
            "type": [
              "number",
              "null"
            ]
          },
          "sources": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "confirmed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "completed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "adverse_media_rows": {
            "type": "integer",
            "description": "Rows with adverse media requested, at confirm and afterwards."
          },
          "recede_rows": {
            "type": "integer",
            "description": "Rows with a Registro de Detenciones Guatemala search requested."
          }
        }
      },
      "BatchQuote": {
        "type": "object",
        "description": "What the batch will cost in the terms of your own contract.\n",
        "properties": {
          "runs": {
            "type": "integer"
          },
          "priced": {
            "type": "boolean",
            "description": "⚠ **`false` does not mean free.** It means no rate is configured on\nthe account, so we quote the run count and say nothing about money\nrather than print a figure that is not a commercial commitment.\n"
          },
          "currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "unit_price": {
            "type": [
              "number",
              "null"
            ]
          },
          "amount": {
            "type": [
              "number",
              "null"
            ]
          },
          "included_remaining": {
            "type": [
              "integer",
              "null"
            ]
          },
          "overage_runs": {
            "type": [
              "integer",
              "null"
            ]
          },
          "adverse": {
            "$ref": "#/components/schemas/AdverseQuote"
          },
          "recede": {
            "$ref": "#/components/schemas/RecedeQuote"
          },
          "renap": {
            "$ref": "#/components/schemas/AdverseQuote",
            "description": "The RENAP line — rows with `renap: true`. Same rule as the runs."
          },
          "rtu": {
            "$ref": "#/components/schemas/RtuQuote"
          },
          "tax_compliance": {
            "$ref": "#/components/schemas/TaxComplianceQuote"
          }
        }
      },
      "AdverseQuote": {
        "type": "object",
        "description": "The adverse media line — rows with `adverse_media: true`. A separate\nline on your statement, beside the runs. Same rule as the runs:\n`priced: false` means no rate is configured, not free.\n",
        "properties": {
          "runs": {
            "type": "integer"
          },
          "unit_price": {
            "type": [
              "number",
              "null"
            ]
          },
          "amount": {
            "type": [
              "number",
              "null"
            ]
          },
          "priced": {
            "type": "boolean"
          }
        }
      },
      "AdverseSkipped": {
        "type": "object",
        "description": "Rows of the request that will not be checked, and why. Never charged.",
        "properties": {
          "not_found": {
            "type": "integer"
          },
          "already_requested": {
            "type": "integer"
          },
          "not_screened": {
            "type": "integer"
          }
        }
      },
      "BatchProgress": {
        "type": "object",
        "description": "Live counts across the batch's rows.",
        "properties": {
          "total": {
            "type": "integer"
          },
          "pending": {
            "type": "integer"
          },
          "running": {
            "type": "integer"
          },
          "done": {
            "type": "integer"
          },
          "failed": {
            "type": "integer"
          },
          "skipped": {
            "type": "integer"
          },
          "restrictions": {
            "type": "integer",
            "description": "Rows that found a restriction."
          },
          "pep_only": {
            "type": "integer",
            "description": "Rows that found only political exposure."
          },
          "no_match": {
            "type": "integer"
          },
          "am_requested": {
            "type": "integer",
            "description": "Rows with adverse media requested. Each is in exactly one of the next three."
          },
          "am_pending": {
            "type": "integer"
          },
          "am_done": {
            "type": "integer",
            "description": "Delivered."
          },
          "am_failed": {
            "type": "integer",
            "description": "Failed, refused, or the row itself was never screened."
          },
          "am_with_findings": {
            "type": "integer",
            "description": "Delivered with at least one reported finding."
          }
        }
      },
      "BatchRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The row's handle — what `POST /v1/batches/{id}/adverse-media` takes."
          },
          "row_no": {
            "type": "integer",
            "description": "Your own row number, as submitted."
          },
          "query_name": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "PENDING",
              "RUNNING",
              "DONE",
              "FAILED",
              "SKIPPED"
            ]
          },
          "outcome": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "RESTRICTIONS",
              "PEP_ONLY",
              "NO_MATCH",
              null
            ]
          },
          "screening_request_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Fetch it from `/v1/screenings/{id}` for the full consolidated result."
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          },
          "adverse_media": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/BatchRowAdverse"
              },
              {
                "type": "null"
              }
            ],
            "description": "Null when adverse media was not requested for this row. Read the\nfindings with `GET /v1/screenings/{id}/adverse-media`. Adverse\nmedia never changes the row's `outcome`.\n"
          },
          "recede": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/BatchRowRecede"
              },
              {
                "type": "null"
              }
            ],
            "description": "Null when Registro de Detenciones Guatemala was not requested for this row. Never changes the row's `outcome`."
          },
          "renap": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/BatchRowRenap"
              },
              {
                "type": "null"
              }
            ],
            "description": "Null when a RENAP lookup was not requested for this row. Never changes the row's `outcome`."
          },
          "rtu": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/BatchRowRtu"
              },
              {
                "type": "null"
              }
            ],
            "description": "Null when an RTU lookup was not requested for this row. Never changes the row's `outcome`."
          },
          "tax_compliance": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/BatchRowTaxCompliance"
              },
              {
                "type": "null"
              }
            ],
            "description": "Null when a tax compliance lookup was not requested for this row. Never changes the row's `outcome`."
          }
        }
      },
      "BatchRowAdverse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "description": "The run's own status once queued (`QUEUED` … `COMPLETED`,\n`REQUIRES_HUMAN_REVIEW`, `INSUFFICIENT_EVIDENCE`, `PROVIDER_FAILURE`,\n`CANCELLED`), or one of three states before a run exists:\n`WAITING` (the row is not screened or queued yet), `REFUSED` (it could\nnot be queued — see `error`), `NOT_SCREENED` (the row itself failed).\n"
          },
          "run_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "finding_count": {
            "type": "integer"
          },
          "highest_severity": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "CRITICAL",
              "HIGH",
              "MEDIUM",
              "LOW",
              null
            ]
          },
          "error": {
            "type": [
              "string",
              "null"
            ],
            "description": "The refusal code when `status` is `REFUSED`."
          }
        }
      },
      "AdverseMediaRequest": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "adverse_media_request"
            ]
          },
          "run_id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "enum": [
              "QUEUED"
            ]
          },
          "created": {
            "type": "boolean",
            "description": "False when a live run already existed; nothing new was billed."
          }
        }
      },
      "AdverseMediaRequestOutcome": {
        "type": "object",
        "description": "The queued run, or the refusal, beside a screening result.",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "adverse_media_request"
            ]
          },
          "run_id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "enum": [
              "QUEUED"
            ]
          },
          "created": {
            "type": "boolean"
          },
          "error": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string"
              },
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "resets_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              }
            }
          }
        }
      },
      "AdverseMediaEvidence": {
        "type": "object",
        "description": "One article or official page considered. Never the text — open the publisher.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "publisher": {
            "type": [
              "string",
              "null"
            ]
          },
          "title": {
            "type": [
              "string",
              "null"
            ]
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "publication_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "date_source": {
            "type": "string",
            "enum": [
              "PAGE",
              "PROVIDER",
              "UNKNOWN"
            ],
            "description": "Where the date came from. Only PAGE and PROVIDER dates support a \"recent\" flag."
          },
          "source_type": {
            "type": "string",
            "enum": [
              "NEWS",
              "OFFICIAL",
              "COURT",
              "REGULATOR",
              "SOCIAL",
              "AGGREGATOR",
              "OTHER"
            ]
          },
          "fetch_status": {
            "type": "string",
            "description": "Whether the page could be read. FETCHED, PARTIAL (paywall, truncated, bot wall) or FAILED; a finding resting on an unread page always requires human review."
          },
          "sources_count": {
            "type": "integer",
            "description": "How many independent search sources returned this page. Source names are not disclosed."
          },
          "language": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "AdverseMediaFinding": {
        "type": "object",
        "description": "One reported event. `subject_match` answers \"is this the same person\nor company?\" and `severity` answers \"if so, how serious?\" — read\nthem separately, exactly like confidence and severity on a match.\nFindings with an INSUFFICIENT or NOT_SAME_SUBJECT identity are never\nreturned.\n",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "subject_match": {
            "type": "string",
            "enum": [
              "HIGH",
              "MEDIUM",
              "LOW"
            ]
          },
          "category": {
            "type": "string",
            "enum": [
              "FRAUD",
              "CORRUPTION",
              "MONEY_LAUNDERING",
              "TERRORISM_FINANCING",
              "SANCTIONS_EVASION",
              "ORGANIZED_CRIME",
              "VIOLENT_CRIME",
              "REGULATORY",
              "TAX",
              "ENVIRONMENTAL",
              "LABOR",
              "OTHER"
            ]
          },
          "subcategory": {
            "type": [
              "string",
              "null"
            ]
          },
          "event_status": {
            "type": "string",
            "enum": [
              "REPORTED_INVESTIGATION",
              "REPORTED_ALLEGATION",
              "REPORTED_CHARGE",
              "REPORTED_CONVICTION",
              "REPORTED_SETTLEMENT",
              "REPORTED_ACQUITTAL",
              "REPORTED_DISMISSAL",
              "UNCLEAR"
            ],
            "description": "What was REPORTED, by the cited publishers. Not a finding of fact."
          },
          "severity": {
            "type": "string",
            "enum": [
              "CRITICAL",
              "HIGH",
              "MEDIUM",
              "LOW"
            ]
          },
          "recent_180_days": {
            "type": "boolean",
            "description": "True only when a cited page or provider date falls inside the recent window."
          },
          "historical_major_event": {
            "type": "boolean"
          },
          "event_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "event_date_precision": {
            "type": "string",
            "enum": [
              "DAY",
              "MONTH",
              "YEAR",
              "UNKNOWN"
            ]
          },
          "headline_en": {
            "type": "string"
          },
          "headline_es": {
            "type": "string"
          },
          "summary_en": {
            "type": "string"
          },
          "summary_es": {
            "type": "string"
          },
          "reason_codes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "escalated": {
            "type": "boolean",
            "description": "A second, stronger model reviewed this event."
          },
          "fingerprint": {
            "type": "string",
            "description": "Stable key for the same reported case across re-runs."
          },
          "review_status": {
            "type": "string",
            "enum": [
              "UNREVIEWED",
              "POSSIBLE_MATCH",
              "TRUE_MATCH",
              "FALSE_POSITIVE",
              "ESCALATED"
            ]
          },
          "reviewed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "review_notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "evidence": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AdverseMediaEvidence"
            }
          },
          "exonerating_evidence": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AdverseMediaEvidence"
            },
            "description": "Pages reporting an acquittal, dismissal, withdrawal or correction. Shown first."
          }
        }
      },
      "AdverseMediaRun": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "adverse_media_run"
            ]
          },
          "run_id": {
            "type": "string",
            "format": "uuid"
          },
          "screening_id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "enum": [
              "QUEUED",
              "RETRIEVING",
              "FETCHING",
              "ADJUDICATING",
              "COMPLETED",
              "COMPLETED_WITH_WARNINGS",
              "INSUFFICIENT_EVIDENCE",
              "REQUIRES_HUMAN_REVIEW",
              "PROVIDER_FAILURE",
              "CANCELLED"
            ],
            "description": "COMPLETED with `finding_count: 0` means nothing adverse was found\nin the sources searched — not that the subject is clean.\nINSUFFICIENT_EVIDENCE means too little could be retrieved to\nassess. PROVIDER_FAILURE means the check could not be completed;\nrequest it again (`force: true`).\n"
          },
          "stage": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "QUEUED",
              "RETRIEVING",
              "FETCHING",
              "ADJUDICATING",
              null
            ],
            "description": "What is happening now; null once terminal. Poll every few seconds."
          },
          "requested_at": {
            "type": "string",
            "format": "date-time"
          },
          "completed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "adjudicator_version": {
            "type": [
              "string",
              "null"
            ]
          },
          "finding_count": {
            "type": "integer"
          },
          "highest_severity": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "CRITICAL",
              "HIGH",
              "MEDIUM",
              "LOW",
              null
            ]
          },
          "has_recent": {
            "type": "boolean"
          },
          "has_historical_major": {
            "type": "boolean"
          },
          "requires_human_review": {
            "type": "boolean"
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "partial_retrieval",
                "some_pages_unreadable",
                "evidence_capped",
                "events_capped",
                "review_required_by_policy"
              ]
            },
            "description": "What may have limited this run, for the reader. More values may be added; ignore unknown ones."
          },
          "error": {
            "type": [
              "string",
              "null"
            ],
            "description": "A neutral line when the check failed or was cancelled."
          },
          "searched": {
            "type": [
              "object",
              "null"
            ],
            "description": "What was searched — how many public web sources, the recent window, languages, how many pages were considered and read. Source names and queries are not disclosed.",
            "properties": {
              "sources_searched": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "recent_window_days": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "languages": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "evidence_considered": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "evidence_read": {
                "type": [
                  "integer",
                  "null"
                ]
              }
            }
          },
          "findings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AdverseMediaFinding"
            }
          },
          "evidence": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AdverseMediaEvidence"
            }
          },
          "notice": {
            "type": "string"
          }
        }
      },
      "MonitoredSubject": {
        "type": "object",
        "description": "⚠ `identifier_value` is never returned. You supplied it; we do not hand\npassport or national ID numbers back out.\n",
        "properties": {
          "adverse_media": {
            "type": "boolean",
            "description": "Also re-check adverse media every `adverse_media_interval_days` (default 30). Each re-check is a billed adverse media run; new reported findings arrive as `adverse_media.alert`."
          },
          "adverse_media_interval_days": {
            "type": "integer",
            "minimum": 7,
            "maximum": 365,
            "default": 30
          },
          "adverse_media_next_check_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "external_ref": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "entity_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "country": {
            "type": [
              "string",
              "null"
            ]
          },
          "dob": {
            "type": [
              "string",
              "null"
            ]
          },
          "identifier_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "sources": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          },
          "threshold": {
            "type": [
              "number",
              "null"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "ACTIVE",
              "PAUSED"
            ]
          },
          "last_checked_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "last_screening_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "The most recent check, retrievable from `/v1/screenings/{id}`."
          },
          "next_check_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ScreeningSummary": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "query_name": {
            "type": "string"
          },
          "query_type": {
            "type": "string"
          },
          "country": {
            "type": [
              "string",
              "null"
            ]
          },
          "overall_status": {
            "type": "string",
            "enum": [
              "NO_MATCH",
              "REVIEW_REQUIRED"
            ]
          },
          "highest_severity": {
            "type": [
              "string",
              "null"
            ]
          },
          "unique_listing_count": {
            "type": "integer"
          },
          "source_confirmation_count": {
            "type": "integer"
          },
          "threshold": {
            "type": "number"
          }
        }
      },
      "Source": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "record_class": {
            "type": "string",
            "enum": [
              "RESTRICTION",
              "PEP"
            ],
            "description": "A PEP register is not a restriction list."
          },
          "last_successful_sync_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When this dataset last CHANGED."
          },
          "last_verified_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When we last confirmed we hold the authority's current file."
          },
          "is_overdue": {
            "type": "boolean",
            "description": "Verification is older than twice this dataset's refresh interval."
          }
        }
      },
      "Error": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "type",
              "code",
              "message",
              "request_id"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "authentication_error",
                  "permission_error",
                  "invalid_request_error",
                  "rate_limit_error",
                  "not_found_error",
                  "conflict_error",
                  "billing_error",
                  "api_error"
                ]
              },
              "code": {
                "type": "string",
                "description": "The stable identifier to branch on. `type` and `code` are the\ncontract; `message` is prose and may be reworded.\n"
              },
              "message": {
                "type": "string"
              },
              "param": {
                "type": "string",
                "description": "The offending field, where one can be named."
              },
              "resets_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "On billing refusals, when the exhausted allowance returns."
              },
              "extra_usage_available": {
                "type": "boolean",
                "description": "On `usage_limit_reached`, whether the plan allows extra usage paid from credits."
              },
              "request_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          }
        }
      }
    },
    "responses": {
      "BadRequest": {
        "description": "The request could not be understood.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": {
                "type": "invalid_request_error",
                "code": "invalid_threshold",
                "message": "`threshold` must be a number between 30 and 100.",
                "param": "threshold",
                "request_id": "0b5c1d2e-3f4a-5b6c-7d8e-9f0a1b2c3d4e"
              }
            }
          }
        }
      },
      "Unauthorized": {
        "description": "Missing, malformed, unknown, revoked or expired key — all answered\nidentically on purpose. Distinguishing them tells someone probing which\nof their guesses was real.\n",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Forbidden": {
        "description": "The key is valid but lacks the scope, or the account is suspended.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "NotFound": {
        "description": "No such resource on this account. Another account's batch answers\nidentically — a 403 would confirm the id is real.\n",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "QuotaExceeded": {
        "description": "Too many requests. **Two different limits answer 429, and the `code`\ntells them apart** — they call for different reactions:\n\n- `rate_limit_exceeded` — the per-minute ceiling. Slow down and retry\n  after `Retry-After` seconds. It counts every request, reads\n  included, and a refused request still counts, so hammering keeps you\n  refused.\n- `daily_quota_exceeded` — the day's screenings are spent.\n  `X-RateLimit-Reset` says when the allowance returns, at local\n  midnight in your billing timezone.\n- `usage_window_exceeded` — the plan's short-term cap (e.g. N\n  screenings per few hours) is reached. `Retry-After` and `resets_at`\n  say when the window reopens.\n\nNeither is billed: both are checked before any screening runs.\n",
        "headers": {
          "Retry-After": {
            "schema": {
              "type": "integer"
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "PaymentRequired": {
        "description": "The account's plan does not cover this call. Nothing ran and nothing\nwas billed. Branch on `code`:\n\n- `subscription_required` — the account has no active plan.\n- `payment_past_due` — the account's plan payment is overdue.\n- `usage_limit_reached` — the period's allowance is spent. `resets_at`\n  says when it returns.\n- `insufficient_credits` — the account's prepaid balance cannot cover\n  the call.\n\nIn every case, contact your RiskMotor account manager. Accounts on a\ncontract (the default) are never refused for these reasons.\n",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": {
                "type": "billing_error",
                "code": "usage_limit_reached",
                "message": "The plan's allowance for this period is used up. Turn on extra usage (or raise its monthly cap) and hold credits to continue, or upgrade the plan. It resets at 2026-11-01T06:00:00.000Z.",
                "resets_at": "2026-11-01T06:00:00.000Z",
                "extra_usage_available": true,
                "request_id": "0b5c1d2e-3f4a-5b6c-7d8e-9f0a1b2c3d4e"
              }
            }
          }
        }
      },
      "ServerError": {
        "description": "Our fault. The body carries a `request_id` and nothing else — the cause\nis in our logs under that id.\n",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    }
  }
}
