{"openapi":"3.1.0","info":{"title":"SecondAppraisal GAP Provider API","version":"1.6.0","description":"Referral submission and status tracking for GAP administrators, lenders and carriers, and the roster of vehicles enrolled in Total Loss Appraisal Support (TLAS).\n\n- Every request body is JSON (`Content-Type: application/json`). A field the schema does not name is refused with 400 `unknown_field`. A field a referral must never carry (an SSN, a birth date, an account number) is refused first, with 400 `prohibited_field`, naming the field and never its value.\n- Money is integer cents. Timestamps are ISO 8601 in UTC.\n- Every refusal the API makes is an RFC 9457 problem (`application/problem+json`): a stable `code`, the `error` sentence, `field_errors` on validation, and the `request_id` that is also sent as `X-Request-Id`. `x-error-catalog` lists every code.\n- During a failover, the platform can answer a write (POST or PATCH) itself, before the API sees it: 503 with `Retry-After: 60` and a plain JSON body, `\"error\": \"platform_standby\"`, with no problem members and no `X-Request-Id`. Nothing was written: send the same request again after `Retry-After` seconds, with the same `Idempotency-Key` where the operation takes one. Reads are not refused this way.\n- Responses are open: ignore fields you don't know.\n- A later release may add values to an enum a response carries; each such enum says what to do with a value you don't recognise.\n- Each operation states the key permission it needs (`x-required-permission`), its rate class (`x-rate-class`), its idempotency (`x-idempotency`), which key modes reach it (`x-availability`) and the most sensitive data class it carries (`x-data-class`, described in `x-data-classes`). A `staged` operation answers 404 `operation_not_open` until the switch `x-availability.opens_with` names opens.\n- A field marked `x-requires-permission` is null for a key that doesn't hold the permission it names, wherever the field appears in a response.\n- Pipeline state is exposed through the provider-facing milestone timeline only."},"servers":[{"url":"https://secondappraisal.com"}],"security":[{"bearerAuth":[]},{"signedRequest":[]}],"tags":[{"name":"referrals","description":"Refer a borrower, follow the referral, edit or cancel it."},{"name":"analytics","description":"Your funnel, outcomes and spend."},{"name":"plans","description":"Total Loss Appraisal Support (TLAS): the vehicles you enroll, the consultations drawn against them and your monthly statements. TLAS is not insurance: nothing is paid to a member and no result is promised."},{"name":"events","description":"What happened to your referrals and enrollments, for polling instead of, or beside, webhooks."},{"name":"document","description":"This document."},{"name":"credentials","description":"The key making the call: what it is, what it may do and when it expires; and a signed credential's activation."}],"paths":{"/api/gap/v1/referrals":{"post":{"operationId":"createReferral","tags":["referrals"],"summary":"Create a referral","description":"Submits one borrower referral. Requires an executed MSA; provider-paid and split-pay referrals also need a billing method. Send an `Idempotency-Key` header to make retries safe: a replay returns the original referral with `idempotent_replay: true` and 200. Keys are per institution and per key mode: the same key sent with a live key and a test key makes two referrals, and a live key can't send a key that starts with `test:` (409 `idempotency_key_mode_conflict`). A key that doesn't hold `referrals:read` gets an acknowledgement instead of the referral: its `id`, `object` and `status`, never its data. Such a key's replay must repeat its own request exactly: a key that came with a different request, or with one sent before requests were fingerprinted, is 422 `idempotency_key_reused`. Test keys (`sa_test_...`) get 403 `test_key_referrals_unavailable` until the referral sandbox opens; from then on a test key reaches sandbox referrals only, and a live key never sees them.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes a retry safe: a request with a key your institution already used returns the original result with `idempotent_replay: true`. At most 255 characters, trimmed; a longer key is refused, never cut. On a signed request (`signedRequest`) it is required and signed: 1 to 255 visible ASCII characters (`!` to `~`), no spaces, or the call gets 401 `signature_profile_invalid`.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"description":"`Content-Type: application/json`, at most 65,536 bytes. A field the schema does not name is refused (`unknown_field`). A field a referral must never carry is refused before anything else is checked (`prohibited_field`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferralCreateInput"}}}},"responses":{"200":{"description":"An idempotent replay: the original referral, whatever this body says. For a key that doesn't hold `referrals:read`: an acknowledgement, never the referral.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ReferralCreateResult"},{"$ref":"#/components/schemas/ReferralCreateAcknowledgement"}]}}}},"201":{"description":"Created. For a key that doesn't hold `referrals:read`: an acknowledgement, never the referral.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ReferralCreateResult"},{"$ref":"#/components/schemas/ReferralCreateAcknowledgement"}]}}}},"400":{"description":"Refused. `code` is one of: `invalid_json`, `prohibited_field`, `validation_failed`, `idempotency_key_too_long`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["invalid_json","prohibited_field","validation_failed","idempotency_key_too_long"]},"401":{"description":"Refused. `code` is one of: `missing_api_key`, `invalid_api_key`, `api_key_expired`, `signature_profile_invalid`, `signature_expired`, `target_uri_not_allowed`, `signature_invalid`, `environment_mismatch`, `credential_not_activated`, `signed_requests_required`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["missing_api_key","invalid_api_key","api_key_expired","signature_profile_invalid","signature_expired","target_uri_not_allowed","signature_invalid","environment_mismatch","credential_not_activated","signed_requests_required"]},"403":{"description":"Refused. `code` is one of: `key_not_scoped`, `provider_terminated`, `permission_denied`, `edge_auth_required`, `ip_not_allowed`, `test_key_referrals_unavailable`, `provider_suspended`, `provider_not_active`, `msa_required`, `admin_of_record_unverified`, `billing_required`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["key_not_scoped","provider_terminated","permission_denied","edge_auth_required","ip_not_allowed","test_key_referrals_unavailable","provider_suspended","provider_not_active","msa_required","admin_of_record_unverified","billing_required"]},"409":{"description":"Refused. `code` is one of: `signature_replay`, `script_version_stale`, `duplicate_reference`, `idempotency_key_mode_conflict`, `duplicate_referral`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","properties":{"existing_referral_id":{"type":"string","x-data-class":"institution_confidential","description":"On `duplicate_referral`: your referral for the same loss. Never sent to a key that doesn't hold `referrals:read`."}}}]}}},"x-error-codes":["signature_replay","script_version_stale","duplicate_reference","idempotency_key_mode_conflict","duplicate_referral"]},"413":{"description":"Refused. `code` is one of: `payload_too_large`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["payload_too_large"]},"415":{"description":"Refused. `code` is one of: `unsupported_media_type`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["unsupported_media_type"]},"422":{"description":"Refused. `code` is one of: `email_required_sms_disabled`, `idempotency_key_reused`, `state_not_served`, `state_not_launched`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","properties":{"state":{"type":"string","x-data-class":"borrower_personal","description":"On `state_not_served` and `state_not_launched`: the state judged, a two-letter code."},"basis":{"type":"string","enum":["garaged","loss"],"x-data-class":"public","description":"On `state_not_served` and `state_not_launched`: `garaged` when the state judged is `garaged_state`, `loss` when it is `loss_state`. New values may be added: treat one you don't recognise as unknown, and don't fail."},"launch_states":{"type":"array","items":{"type":"string"},"x-data-class":"institution_confidential","description":"On `state_not_launched`: the states your launch covers, two-letter codes."}}}]}}},"x-error-codes":["email_required_sms_disabled","idempotency_key_reused","state_not_served","state_not_launched"]},"429":{"description":"Refused. `code` is one of: `rate_limited`, `auth_failures_throttled`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["rate_limited","auth_failures_throttled"]},"500":{"description":"Refused. `code` is one of: `internal_error`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["internal_error"]},"503":{"description":"Refused. `code` is one of: `credentials_unavailable`, `platform_standby`, `request_refused`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["credentials_unavailable","platform_standby","request_refused"]}},"x-required-permission":"referrals:write","x-rate-class":"write","x-idempotency":{"kind":"header","header":"Idempotency-Key","maxLength":255},"x-availability":{"status":"available","modes":["live"]},"x-data-class":"borrower_contact"},"get":{"operationId":"listReferrals","tags":["referrals"],"summary":"List referrals","description":"Your referrals, newest first, a page at a time. Once a borrower withdraws permission to report a referral's progress to you, the referral shows `status: reporting_withdrawn` and `reporting_withdrawn_at`, the fields you supplied, and no progress. `status` matches the status shown: `reporting_withdrawn` lists those referrals, and any other status leaves them out. Test keys (`sa_test_...`) get 403 `test_key_referrals_unavailable` until the referral sandbox opens; from then on a test key reaches sandbox referrals only, and a live key never sees them.","parameters":[{"name":"status","in":"query","description":"Comma-separated statuses, e.g. `invited,activated`. Case-insensitive. `?status=` is no filter; a value naming no status (`,`, or only spaces) is refused. A status matches the status a referral is shown with: `reporting_withdrawn` lists the referrals whose borrower withdrew permission to report their progress, and any other status leaves them out.","style":"form","explode":false,"schema":{"x-data-class":"public","type":"array","items":{"type":"string","enum":["submitted","invited","handoff_pending","outreach_queued","contact_attempted","activated","in_progress","settled","closed","declined","unreachable","expired","cancelled","reporting_withdrawn"]}}},{"name":"external_ref","in":"query","description":"Exact match on the external_ref you sent, trimmed. `?external_ref=` is no filter; only spaces is refused. Deprecated: the reference travels in the URL, where the systems it passes through can record it. It still filters; retrieve a referral by the id its create returned instead.","deprecated":true,"schema":{"x-data-class":"institution_confidential","type":"string"}},{"name":"limit","in":"query","description":"Page size, 1 to 100, written in digits. A blank value means the default.","schema":{"x-data-class":"public","type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"starting_after","in":"query","description":"Cursor: the previous page's `next_cursor` (its last referral's id, or with `updated_after` an opaque `u1.` cursor). `?starting_after=` is the first page; only spaces is refused.","schema":{"x-data-class":"institution_confidential","type":"string"}},{"name":"updated_after","in":"query","description":"Only the referrals changed after this time (ISO 8601 with its offset, such as `2026-10-01T00:00:00Z`, from 0001-01-01T00:00:00Z through 9999-12-31T23:59:59.999Z), oldest change first; a referral that changes again before you reach it moves to a later page. A referral whose borrower withdraws permission to report its progress is listed once more, at `reporting_withdrawn_at`, and never again. A change is listed about a minute after it happens. Every page, the last and an empty one too, returns an opaque `u1.` `next_cursor`: to poll, keep the latest one and send it as `starting_after` with the same `updated_after`, never a time from your own clock, which misses the changes made in the minute before each poll. A cursor works only for the institution and mode it was issued to; if one is refused (400 `invalid_cursor`), start again from your `updated_after` without it. `?updated_after=` is no filter; only spaces is refused. Spaces around the time are ignored.","schema":{"x-data-class":"public","type":"string","format":"date-time","examples":["2026-10-01T00:00:00Z"]}}],"responses":{"200":{"description":"A newest-first page.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferralList"}}}},"400":{"description":"Refused. `code` is one of: `validation_failed`, `invalid_cursor`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["validation_failed","invalid_cursor"]},"401":{"description":"Refused. `code` is one of: `missing_api_key`, `invalid_api_key`, `api_key_expired`, `signature_profile_invalid`, `signature_expired`, `target_uri_not_allowed`, `signature_invalid`, `environment_mismatch`, `credential_not_activated`, `signed_requests_required`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["missing_api_key","invalid_api_key","api_key_expired","signature_profile_invalid","signature_expired","target_uri_not_allowed","signature_invalid","environment_mismatch","credential_not_activated","signed_requests_required"]},"403":{"description":"Refused. `code` is one of: `key_not_scoped`, `provider_terminated`, `permission_denied`, `edge_auth_required`, `ip_not_allowed`, `test_key_referrals_unavailable`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["key_not_scoped","provider_terminated","permission_denied","edge_auth_required","ip_not_allowed","test_key_referrals_unavailable"]},"409":{"description":"Refused. `code` is one of: `signature_replay`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["signature_replay"]},"429":{"description":"Refused. `code` is one of: `rate_limited`, `auth_failures_throttled`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["rate_limited","auth_failures_throttled"]},"500":{"description":"Refused. `code` is one of: `internal_error`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["internal_error"]},"503":{"description":"Refused. `code` is one of: `credentials_unavailable`, `platform_standby`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["credentials_unavailable","platform_standby"]}},"x-required-permission":"referrals:read","x-rate-class":"read","x-idempotency":{"kind":"none"},"x-availability":{"status":"available","modes":["live"]},"x-data-class":"borrower_contact"}},"/api/gap/v1/referrals/{id}":{"get":{"operationId":"getReferral","tags":["referrals"],"summary":"Retrieve a referral","description":"The full referral, with the provider-facing milestone timeline and the financial panel. Once a borrower withdraws permission to report a referral's progress to you, the referral shows `status: reporting_withdrawn` and `reporting_withdrawn_at`, the fields you supplied, and no progress. Its `timeline` and `financial` are then null, as are `consultation_number` and `days_in_appraisal`. Test keys (`sa_test_...`) get 403 `test_key_referrals_unavailable` until the referral sandbox opens; from then on a test key reaches sandbox referrals only, and a live key never sees them.","parameters":[{"name":"id","in":"path","description":"The referral's id.","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"x-data-class":"institution_confidential"}}],"responses":{"200":{"description":"The referral.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferralDetail"}}}},"400":{"description":"Refused. `code` is one of: `validation_failed`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["validation_failed"]},"401":{"description":"Refused. `code` is one of: `missing_api_key`, `invalid_api_key`, `api_key_expired`, `signature_profile_invalid`, `signature_expired`, `target_uri_not_allowed`, `signature_invalid`, `environment_mismatch`, `credential_not_activated`, `signed_requests_required`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["missing_api_key","invalid_api_key","api_key_expired","signature_profile_invalid","signature_expired","target_uri_not_allowed","signature_invalid","environment_mismatch","credential_not_activated","signed_requests_required"]},"403":{"description":"Refused. `code` is one of: `key_not_scoped`, `provider_terminated`, `permission_denied`, `edge_auth_required`, `ip_not_allowed`, `test_key_referrals_unavailable`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["key_not_scoped","provider_terminated","permission_denied","edge_auth_required","ip_not_allowed","test_key_referrals_unavailable"]},"404":{"description":"Refused. `code` is one of: `not_found`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["not_found"]},"409":{"description":"Refused. `code` is one of: `signature_replay`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["signature_replay"]},"429":{"description":"Refused. `code` is one of: `rate_limited`, `auth_failures_throttled`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["rate_limited","auth_failures_throttled"]},"500":{"description":"Refused. `code` is one of: `internal_error`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["internal_error"]},"503":{"description":"Refused. `code` is one of: `credentials_unavailable`, `platform_standby`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["credentials_unavailable","platform_standby"]}},"x-required-permission":"referrals:read","x-rate-class":"read","x-idempotency":{"kind":"none"},"x-availability":{"status":"available","modes":["live"]},"x-data-class":"borrower_contact"},"patch":{"operationId":"updateReferral","tags":["referrals"],"summary":"Update or cancel a referral","description":"`loan_payoff_cents` is editable until we clear the referral's borrower details under the Data Handling and Retention Schedule (409 `referral_details_cleared` after); `deductible_cents` is accepted and ignored (deprecated). Every other field, and the program terms, until the borrower activates (409 after). `{ \"action\": \"cancel\" }`, sent on its own, cancels before activation (409 after). A referral whose borrower withdrew permission to report its progress is 409 `reporting_withdrawn`, whatever the request asks, and nothing is written. A key that doesn't hold `referrals:read` gets an acknowledgement instead of the referral: its `id`, `object` and `status`, never its data. Test keys (`sa_test_...`) get 403 `test_key_referrals_unavailable` until the referral sandbox opens; from then on a test key reaches sandbox referrals only, and a live key never sees them.","parameters":[{"name":"id","in":"path","description":"The referral's id.","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"x-data-class":"institution_confidential"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"On a signed request (`signedRequest`) it is required and signed, and must be 1 to 255 visible ASCII characters (`!` to `~`), with no spaces, or the call gets 401 `signature_profile_invalid`. A call with an API key may leave it out or send any value. This operation keeps no record of it, so it makes nothing idempotent here.","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"`Content-Type: application/json`, at most 65,536 bytes. A field the schema does not name is refused (`unknown_field`). A field a referral must never carry is refused before anything else is checked (`prohibited_field`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferralPatchInput"}}}},"responses":{"200":{"description":"The updated referral. For a key that doesn't hold `referrals:read`: an acknowledgement, never the referral.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ReferralDetail"},{"$ref":"#/components/schemas/ReferralAcknowledgement"}]}}}},"400":{"description":"Refused. `code` is one of: `invalid_json`, `prohibited_field`, `validation_failed`, `nothing_to_update`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["invalid_json","prohibited_field","validation_failed","nothing_to_update"]},"401":{"description":"Refused. `code` is one of: `missing_api_key`, `invalid_api_key`, `api_key_expired`, `signature_profile_invalid`, `signature_expired`, `target_uri_not_allowed`, `signature_invalid`, `environment_mismatch`, `credential_not_activated`, `signed_requests_required`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["missing_api_key","invalid_api_key","api_key_expired","signature_profile_invalid","signature_expired","target_uri_not_allowed","signature_invalid","environment_mismatch","credential_not_activated","signed_requests_required"]},"403":{"description":"Refused. `code` is one of: `key_not_scoped`, `provider_terminated`, `permission_denied`, `edge_auth_required`, `ip_not_allowed`, `test_key_referrals_unavailable`, `provider_suspended`, `provider_not_active`, `billing_required`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["key_not_scoped","provider_terminated","permission_denied","edge_auth_required","ip_not_allowed","test_key_referrals_unavailable","provider_suspended","provider_not_active","billing_required"]},"404":{"description":"Refused. `code` is one of: `not_found`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["not_found"]},"409":{"description":"Refused. `code` is one of: `signature_replay`, `referral_locked`, `referral_details_cleared`, `cancel_not_allowed`, `economics_locked`, `funding_lowered`, `reporting_withdrawn`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["signature_replay","referral_locked","referral_details_cleared","cancel_not_allowed","economics_locked","funding_lowered","reporting_withdrawn"]},"413":{"description":"Refused. `code` is one of: `payload_too_large`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["payload_too_large"]},"415":{"description":"Refused. `code` is one of: `unsupported_media_type`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["unsupported_media_type"]},"422":{"description":"Refused. `code` is one of: `state_not_served`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","properties":{"state":{"type":"string","x-data-class":"borrower_personal","description":"On `state_not_served`: the state judged, a two-letter code."},"basis":{"type":"string","enum":["garaged","loss"],"x-data-class":"public","description":"On `state_not_served`: `garaged` when the state judged is `garaged_state`, `loss` when it is `loss_state`. New values may be added: treat one you don't recognise as unknown, and don't fail."}}}]}}},"x-error-codes":["state_not_served"]},"429":{"description":"Refused. `code` is one of: `rate_limited`, `auth_failures_throttled`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["rate_limited","auth_failures_throttled"]},"500":{"description":"Refused. `code` is one of: `internal_error`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["internal_error"]},"503":{"description":"Refused. `code` is one of: `credentials_unavailable`, `platform_standby`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["credentials_unavailable","platform_standby"]}},"x-required-permission":"referrals:write","x-rate-class":"write","x-idempotency":{"kind":"none"},"x-availability":{"status":"available","modes":["live"]},"x-data-class":"borrower_contact"}},"/api/gap/v1/referrals/bulk":{"post":{"operationId":"bulkCreateReferrals","tags":["referrals"],"summary":"Create referrals in bulk","description":"Up to 500 referrals in one call. Each row is validated and created on its own: valid rows are created even when siblings fail, and `results` reports every row. A row may carry its own `idempotency_key` and, for a warm handoff, its `disclosure`. An institution without an executed MSA gets 403 `msa_required` for the whole call; a provider-paid or split-pay row without a billing method fails with the row code `billing_required`. A key that doesn't hold `referrals:read` gets each row's referral as an acknowledgement (its `id`, `object` and `status`), and its rows replay only their own requests, as a single create's do. Test keys (`sa_test_...`) get 403 `test_key_referrals_unavailable` until the referral sandbox opens; from then on a test key reaches sandbox referrals only, and a live key never sees them.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"On a signed request (`signedRequest`) it is required and signed, and must be 1 to 255 visible ASCII characters (`!` to `~`), with no spaces, or the call gets 401 `signature_profile_invalid`. A call with an API key may leave it out or send any value. This operation keeps no record of it: each row's `idempotency_key` is what makes a retry safe.","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"`Content-Type: application/json`, at most 1,048,576 bytes. A field the schema does not name is refused (`unknown_field`). A field a referral must never carry is refused before anything else is checked (`prohibited_field`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferralBulkInput"}}}},"responses":{"200":{"description":"Row-level results. For a key that doesn't hold `referrals:read`: an acknowledgement, never the referral.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ReferralBulkResult"},{"$ref":"#/components/schemas/ReferralBulkAcknowledgement"}]}}}},"400":{"description":"Refused. `code` is one of: `invalid_json`, `prohibited_field`, `validation_failed`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["invalid_json","prohibited_field","validation_failed"]},"401":{"description":"Refused. `code` is one of: `missing_api_key`, `invalid_api_key`, `api_key_expired`, `signature_profile_invalid`, `signature_expired`, `target_uri_not_allowed`, `signature_invalid`, `environment_mismatch`, `credential_not_activated`, `signed_requests_required`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["missing_api_key","invalid_api_key","api_key_expired","signature_profile_invalid","signature_expired","target_uri_not_allowed","signature_invalid","environment_mismatch","credential_not_activated","signed_requests_required"]},"403":{"description":"Refused. `code` is one of: `key_not_scoped`, `provider_terminated`, `permission_denied`, `edge_auth_required`, `ip_not_allowed`, `test_key_referrals_unavailable`, `provider_suspended`, `provider_not_active`, `msa_required`, `admin_of_record_unverified`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["key_not_scoped","provider_terminated","permission_denied","edge_auth_required","ip_not_allowed","test_key_referrals_unavailable","provider_suspended","provider_not_active","msa_required","admin_of_record_unverified"]},"409":{"description":"Refused. `code` is one of: `signature_replay`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["signature_replay"]},"413":{"description":"Refused. `code` is one of: `payload_too_large`, `too_many_rows`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["payload_too_large","too_many_rows"]},"415":{"description":"Refused. `code` is one of: `unsupported_media_type`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["unsupported_media_type"]},"429":{"description":"Refused. `code` is one of: `rate_limited`, `auth_failures_throttled`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["rate_limited","auth_failures_throttled"]},"500":{"description":"Refused. `code` is one of: `internal_error`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["internal_error"]},"503":{"description":"Refused. `code` is one of: `credentials_unavailable`, `platform_standby`, `request_refused`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["credentials_unavailable","platform_standby","request_refused"]}},"x-required-permission":"referrals:write","x-rate-class":"bulk","x-idempotency":{"kind":"row","field":"idempotency_key","maxLength":255},"x-availability":{"status":"available","modes":["live"]},"x-data-class":"borrower_contact"}},"/api/gap/v1/referrals/{id}/simulate":{"post":{"operationId":"simulateReferral","tags":["referrals"],"summary":"Simulate a sandbox referral's next step","description":"Test keys only. Moves one of your sandbox referrals one step along its lifecycle, and sends the webhook event a live referral sends at that step (`referral.invited`, `referral.activated`, `referral.declined` or `settlement.updated`) to your test endpoints, marked `livemode: false`. Nothing reaches a borrower and nothing is billed. A key that doesn't hold `referrals:read` gets an acknowledgement instead of the referral: its `id`, `object` and `status`, never its data. A live key gets 403 `simulate_requires_test_key`, an id that is not one of your sandbox referrals 404, and a step off the lifecycle 409 `invalid_transition`. A referral whose borrower withdrew permission to report its progress is 409 `reporting_withdrawn`, whatever the request asks, and nothing is written. Staged: it opens with the referral sandbox, and until then every call answers 404 `operation_not_open`.","parameters":[{"name":"id","in":"path","description":"The referral's id.","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"x-data-class":"institution_confidential"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"On a signed request (`signedRequest`) it is required and signed, and must be 1 to 255 visible ASCII characters (`!` to `~`), with no spaces, or the call gets 401 `signature_profile_invalid`. A call with an API key may leave it out or send any value. This operation keeps no record of it, so it makes nothing idempotent here.","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"`Content-Type: application/json`, at most 65,536 bytes. A field the schema does not name is refused (`unknown_field`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferralSimulateInput"}}}},"responses":{"200":{"description":"The sandbox referral after the step. For a key that doesn't hold `referrals:read`: an acknowledgement, never the referral.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ReferralDetail"},{"$ref":"#/components/schemas/ReferralAcknowledgement"}]}}}},"400":{"description":"Refused. `code` is one of: `invalid_json`, `validation_failed`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["invalid_json","validation_failed"]},"401":{"description":"Refused. `code` is one of: `missing_api_key`, `invalid_api_key`, `api_key_expired`, `signature_profile_invalid`, `signature_expired`, `target_uri_not_allowed`, `signature_invalid`, `environment_mismatch`, `credential_not_activated`, `signed_requests_required`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["missing_api_key","invalid_api_key","api_key_expired","signature_profile_invalid","signature_expired","target_uri_not_allowed","signature_invalid","environment_mismatch","credential_not_activated","signed_requests_required"]},"403":{"description":"Refused. `code` is one of: `key_not_scoped`, `provider_terminated`, `permission_denied`, `edge_auth_required`, `ip_not_allowed`, `test_key_referrals_unavailable`, `provider_suspended`, `provider_not_active`, `simulate_requires_test_key`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["key_not_scoped","provider_terminated","permission_denied","edge_auth_required","ip_not_allowed","test_key_referrals_unavailable","provider_suspended","provider_not_active","simulate_requires_test_key"]},"404":{"description":"Refused. `code` is one of: `operation_not_open`, `not_found`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["operation_not_open","not_found"]},"409":{"description":"Refused. `code` is one of: `signature_replay`, `invalid_transition`, `reporting_withdrawn`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["signature_replay","invalid_transition","reporting_withdrawn"]},"413":{"description":"Refused. `code` is one of: `payload_too_large`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["payload_too_large"]},"415":{"description":"Refused. `code` is one of: `unsupported_media_type`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["unsupported_media_type"]},"429":{"description":"Refused. `code` is one of: `rate_limited`, `auth_failures_throttled`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["rate_limited","auth_failures_throttled"]},"500":{"description":"Refused. `code` is one of: `internal_error`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["internal_error"]},"503":{"description":"Refused. `code` is one of: `credentials_unavailable`, `platform_standby`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["credentials_unavailable","platform_standby"]}},"x-required-permission":"referrals:write","x-rate-class":"write","x-idempotency":{"kind":"none"},"x-availability":{"status":"staged","modes":["test"],"opens_with":"referral_sandbox"},"x-data-class":"borrower_contact"}},"/api/gap/v1/referrals/{id}/attest":{"post":{"operationId":"attestReferral","tags":["referrals"],"summary":"Attest a warm handoff","description":"For a warm-handoff referral created without its `disclosure`: you certify that your staff delivered the disclosure script and that the borrower agreed to be contacted, the same attestation as create's `disclosure`, and the referral is queued for our outreach. Accepted only while the referral waits for its attestation: after that, or for an invitation referral, it is a 409 `invalid_transition`. Script 1.7 asks the borrower to confirm the referral's `borrower_email`, the address SecondAppraisal will email, so its attestation of a referral without one is a 409 `invalid_transition` too: add the address with an update first. An attestation under script 1.6 needs the referral's `borrower_phone` the same way. A script version that is not the current script is a 409 `script_version_stale`. A referral whose borrower withdrew permission to report its progress is 409 `reporting_withdrawn`, whatever the request asks, and nothing is written. A test key attests its sandbox referrals, which reach no one: no outreach is opened for them. A key that doesn't hold `referrals:read` gets an acknowledgement instead of the referral: its `id`, `object` and `status`, never its data. Staged: it opens with the referral sandbox, and until then every call answers 404 `operation_not_open`.","parameters":[{"name":"id","in":"path","description":"The referral's id.","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"x-data-class":"institution_confidential"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"On a signed request (`signedRequest`) it is required and signed, and must be 1 to 255 visible ASCII characters (`!` to `~`), with no spaces, or the call gets 401 `signature_profile_invalid`. A call with an API key may leave it out or send any value. This operation keeps no record of it, so it makes nothing idempotent here.","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"`Content-Type: application/json`, at most 65,536 bytes. A field the schema does not name is refused (`unknown_field`). A field a referral must never carry is refused before anything else is checked (`prohibited_field`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisclosureInput"}}}},"responses":{"200":{"description":"The referral, queued for our outreach. For a key that doesn't hold `referrals:read`: an acknowledgement, never the referral.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ReferralDetail"},{"$ref":"#/components/schemas/ReferralAcknowledgement"}]}}}},"400":{"description":"Refused. `code` is one of: `invalid_json`, `prohibited_field`, `validation_failed`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["invalid_json","prohibited_field","validation_failed"]},"401":{"description":"Refused. `code` is one of: `missing_api_key`, `invalid_api_key`, `api_key_expired`, `signature_profile_invalid`, `signature_expired`, `target_uri_not_allowed`, `signature_invalid`, `environment_mismatch`, `credential_not_activated`, `signed_requests_required`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["missing_api_key","invalid_api_key","api_key_expired","signature_profile_invalid","signature_expired","target_uri_not_allowed","signature_invalid","environment_mismatch","credential_not_activated","signed_requests_required"]},"403":{"description":"Refused. `code` is one of: `key_not_scoped`, `provider_terminated`, `permission_denied`, `edge_auth_required`, `ip_not_allowed`, `test_key_referrals_unavailable`, `provider_suspended`, `provider_not_active`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["key_not_scoped","provider_terminated","permission_denied","edge_auth_required","ip_not_allowed","test_key_referrals_unavailable","provider_suspended","provider_not_active"]},"404":{"description":"Refused. `code` is one of: `operation_not_open`, `not_found`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["operation_not_open","not_found"]},"409":{"description":"Refused. `code` is one of: `signature_replay`, `script_version_stale`, `invalid_transition`, `reporting_withdrawn`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["signature_replay","script_version_stale","invalid_transition","reporting_withdrawn"]},"413":{"description":"Refused. `code` is one of: `payload_too_large`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["payload_too_large"]},"415":{"description":"Refused. `code` is one of: `unsupported_media_type`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["unsupported_media_type"]},"429":{"description":"Refused. `code` is one of: `rate_limited`, `auth_failures_throttled`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["rate_limited","auth_failures_throttled"]},"500":{"description":"Refused. `code` is one of: `internal_error`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["internal_error"]},"503":{"description":"Refused. `code` is one of: `credentials_unavailable`, `platform_standby`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["credentials_unavailable","platform_standby"]}},"x-required-permission":"referrals:write","x-rate-class":"write","x-idempotency":{"kind":"none"},"x-availability":{"status":"staged","modes":["live","test"],"opens_with":"referral_sandbox"},"x-data-class":"borrower_contact"}},"/api/gap/v1/referrals/disclosure-preview":{"post":{"operationId":"previewReferralDisclosure","tags":["referrals"],"summary":"Preview a warm handoff's disclosure script","description":"The disclosure script your staff read to the borrower for a warm-handoff referral with these program terms, before you create it: the script filled in for them, the points your attestation certifies, what it certifies word for word, and the script version, which you send as `script_version` in the attestation on create, on a bulk row or on attest. Send the `program` you'll send on create, or none for your program's defaults; terms create would refuse are refused here the same way. The script's last question asks the borrower to confirm the email address SecondAppraisal will write to, which the preview doesn't take: it keeps `{{BORROWER_EMAIL}}` there, where your staff say the address you'll send as `borrower_email`. Nothing you send is stored and no referral is created; the call is recorded in the access log we keep for your institution, like any other, and a signed request's nonce is kept briefly for replay protection, as on every signed call. The preview doesn't check what create checks of your account (your agreement and billing, `msa_required` and `billing_required`, and the live-data gates), so a 200 here doesn't promise that create succeeds. A test key may preview too, so a sandbox integration can show the script it will attest. A preview counts against your key's 120 writes a minute.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"On a signed request (`signedRequest`) it is required and signed, and must be 1 to 255 visible ASCII characters (`!` to `~`), with no spaces, or the call gets 401 `signature_profile_invalid`. A call with an API key may leave it out or send any value. This operation keeps no record of it, so it makes nothing idempotent here.","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"`Content-Type: application/json`, at most 65,536 bytes. A field the schema does not name is refused (`unknown_field`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisclosurePreviewInput"}}}},"responses":{"200":{"description":"The script for those terms.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisclosurePreview"}}}},"400":{"description":"Refused. `code` is one of: `invalid_json`, `validation_failed`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["invalid_json","validation_failed"]},"401":{"description":"Refused. `code` is one of: `missing_api_key`, `invalid_api_key`, `api_key_expired`, `signature_profile_invalid`, `signature_expired`, `target_uri_not_allowed`, `signature_invalid`, `environment_mismatch`, `credential_not_activated`, `signed_requests_required`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["missing_api_key","invalid_api_key","api_key_expired","signature_profile_invalid","signature_expired","target_uri_not_allowed","signature_invalid","environment_mismatch","credential_not_activated","signed_requests_required"]},"403":{"description":"Refused. `code` is one of: `key_not_scoped`, `provider_terminated`, `permission_denied`, `edge_auth_required`, `ip_not_allowed`, `provider_suspended`, `provider_not_active`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["key_not_scoped","provider_terminated","permission_denied","edge_auth_required","ip_not_allowed","provider_suspended","provider_not_active"]},"409":{"description":"Refused. `code` is one of: `signature_replay`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["signature_replay"]},"413":{"description":"Refused. `code` is one of: `payload_too_large`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["payload_too_large"]},"415":{"description":"Refused. `code` is one of: `unsupported_media_type`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["unsupported_media_type"]},"429":{"description":"Refused. `code` is one of: `rate_limited`, `auth_failures_throttled`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["rate_limited","auth_failures_throttled"]},"500":{"description":"Refused. `code` is one of: `internal_error`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["internal_error"]},"503":{"description":"Refused. `code` is one of: `credentials_unavailable`, `platform_standby`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["credentials_unavailable","platform_standby"]}},"x-required-permission":"referrals:write","x-rate-class":"write","x-idempotency":{"kind":"none"},"x-availability":{"status":"available","modes":["live","test"]},"x-data-class":"institution_confidential"}},"/api/gap/v1/analytics":{"get":{"operationId":"getAnalytics","tags":["analytics"],"summary":"Savings and spend analytics","description":"Your referral funnel and activation rate, settled outcomes (uplift, exposure reduction), spend (fees, ROI multiple, net savings), and breakdowns by market and carrier: the numbers the portal's Analytics page shows. Filter on the referral's creation date with `from` (inclusive) and `to` (exclusive). Test keys (`sa_test_...`) get 403 `test_key_referrals_unavailable` until the referral sandbox opens; from then on a test key reaches sandbox referrals only, and a live key never sees them.","parameters":[{"name":"from","in":"query","description":"Referrals created on or after this date (UTC), YYYY-MM-DD. `?from=` is no bound. Spaces around it are ignored.","schema":{"x-data-class":"public","type":"string","format":"date","examples":["2026-01-01"]}},{"name":"to","in":"query","description":"Referrals created before this date (UTC), YYYY-MM-DD: the bound is exclusive. Must be after `from`. `?to=` is no bound. Spaces around it are ignored.","schema":{"x-data-class":"public","type":"string","format":"date","examples":["2026-07-01"]}}],"responses":{"200":{"description":"The report.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyticsReport"}}}},"400":{"description":"Refused. `code` is one of: `validation_failed`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["validation_failed"]},"401":{"description":"Refused. `code` is one of: `missing_api_key`, `invalid_api_key`, `api_key_expired`, `signature_profile_invalid`, `signature_expired`, `target_uri_not_allowed`, `signature_invalid`, `environment_mismatch`, `credential_not_activated`, `signed_requests_required`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["missing_api_key","invalid_api_key","api_key_expired","signature_profile_invalid","signature_expired","target_uri_not_allowed","signature_invalid","environment_mismatch","credential_not_activated","signed_requests_required"]},"403":{"description":"Refused. `code` is one of: `key_not_scoped`, `provider_terminated`, `permission_denied`, `edge_auth_required`, `ip_not_allowed`, `test_key_referrals_unavailable`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["key_not_scoped","provider_terminated","permission_denied","edge_auth_required","ip_not_allowed","test_key_referrals_unavailable"]},"409":{"description":"Refused. `code` is one of: `signature_replay`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["signature_replay"]},"429":{"description":"Refused. `code` is one of: `rate_limited`, `auth_failures_throttled`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["rate_limited","auth_failures_throttled"]},"500":{"description":"Refused. `code` is one of: `internal_error`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["internal_error"]},"503":{"description":"Refused. `code` is one of: `credentials_unavailable`, `platform_standby`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["credentials_unavailable","platform_standby"]}},"x-required-permission":"reporting:read","x-rate-class":"read","x-idempotency":{"kind":"none"},"x-availability":{"status":"available","modes":["live"]},"x-data-class":"borrower_personal"}},"/api/gap/v1/program-report":{"get":{"operationId":"getProgramReport","tags":["analytics"],"summary":"Program report by quarter","description":"Your last four calendar quarters in Mountain Time (America/Denver), oldest first. Each quarter counts the referrals you created in it and what has become of them since: reach and first contact, activation, reviews completed and the undervaluations they found, settlement and how long it took, the uplift and the exposure reduction. The numbers the portal's program report shows. A referral whose borrower withdrew permission to report its progress counts as referred and in `reporting_withdrawn`, never in its progress. Test keys (`sa_test_...`) get 403 `test_key_referrals_unavailable` until the referral sandbox opens; from then on a test key reaches sandbox referrals only, and a live key never sees them.","responses":{"200":{"description":"The report.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProgramReport"}}}},"400":{"description":"Refused. `code` is one of: `validation_failed`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["validation_failed"]},"401":{"description":"Refused. `code` is one of: `missing_api_key`, `invalid_api_key`, `api_key_expired`, `signature_profile_invalid`, `signature_expired`, `target_uri_not_allowed`, `signature_invalid`, `environment_mismatch`, `credential_not_activated`, `signed_requests_required`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["missing_api_key","invalid_api_key","api_key_expired","signature_profile_invalid","signature_expired","target_uri_not_allowed","signature_invalid","environment_mismatch","credential_not_activated","signed_requests_required"]},"403":{"description":"Refused. `code` is one of: `key_not_scoped`, `provider_terminated`, `permission_denied`, `edge_auth_required`, `ip_not_allowed`, `test_key_referrals_unavailable`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["key_not_scoped","provider_terminated","permission_denied","edge_auth_required","ip_not_allowed","test_key_referrals_unavailable"]},"409":{"description":"Refused. `code` is one of: `signature_replay`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["signature_replay"]},"429":{"description":"Refused. `code` is one of: `rate_limited`, `auth_failures_throttled`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["rate_limited","auth_failures_throttled"]},"500":{"description":"Refused. `code` is one of: `internal_error`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["internal_error"]},"503":{"description":"Refused. `code` is one of: `credentials_unavailable`, `platform_standby`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["credentials_unavailable","platform_standby"]}},"x-required-permission":"reporting:read","x-rate-class":"read","x-idempotency":{"kind":"none"},"x-availability":{"status":"available","modes":["live"]},"x-data-class":"borrower_personal"}},"/api/gap/v1/plans/enrollments":{"post":{"operationId":"createPlanEnrollment","tags":["plans"],"summary":"Enroll one vehicle","description":"Idempotent per institution and key mode with the `Idempotency-Key` header: a replay returns the original with `idempotent_replay: true` and 200, and a key already used for another request (another VIN, or the same VIN with other fields) is a 422 `idempotency_key_reused`. The same key sent with a live key and a test key makes two enrollments, and a live key can't send a key that starts with `test:` (409 `idempotency_key_mode_conflict`, as is a key an enrollment of the other mode already holds). Partner-billed institutions get an ACTIVE enrollment at once (you are the payer of record); direct-collect institutions get a PENDING one with an `activation_url` for the member.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes a retry safe: a request with a key your institution already used returns the original result with `idempotent_replay: true`. At most 255 characters, trimmed; a longer key is refused, never cut. On a signed request (`signedRequest`) it is required and signed: 1 to 255 visible ASCII characters (`!` to `~`), no spaces, or the call gets 401 `signature_profile_invalid`.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"description":"`Content-Type: application/json`, at most 65,536 bytes. A field the schema does not name is refused (`unknown_field`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanEnrollmentInput"}}}},"responses":{"200":{"description":"An idempotent replay: the original enrollment.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanEnrollmentCreateResult"}}}},"201":{"description":"Enrolled.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanEnrollmentCreateResult"}}}},"400":{"description":"Refused. `code` is one of: `invalid_json`, `validation_failed`, `idempotency_key_too_long`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["invalid_json","validation_failed","idempotency_key_too_long"]},"401":{"description":"Refused. `code` is one of: `missing_api_key`, `invalid_api_key`, `api_key_expired`, `signature_profile_invalid`, `signature_expired`, `target_uri_not_allowed`, `signature_invalid`, `environment_mismatch`, `credential_not_activated`, `signed_requests_required`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["missing_api_key","invalid_api_key","api_key_expired","signature_profile_invalid","signature_expired","target_uri_not_allowed","signature_invalid","environment_mismatch","credential_not_activated","signed_requests_required"]},"403":{"description":"Refused. `code` is one of: `key_not_scoped`, `provider_terminated`, `permission_denied`, `edge_auth_required`, `ip_not_allowed`, `provider_suspended`, `provider_not_active`, `membership_not_enabled`, `membership_rider_unsigned`, `membership_billing_mode_required`, `membership_billing_method_required`, `plan_not_enabled`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["key_not_scoped","provider_terminated","permission_denied","edge_auth_required","ip_not_allowed","provider_suspended","provider_not_active","membership_not_enabled","membership_rider_unsigned","membership_billing_mode_required","membership_billing_method_required","plan_not_enabled"]},"404":{"description":"Refused. `code` is one of: `membership_program_closed`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["membership_program_closed"]},"409":{"description":"Refused. `code` is one of: `signature_replay`, `vin_already_live`, `idempotency_key_mode_conflict`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["signature_replay","vin_already_live","idempotency_key_mode_conflict"]},"413":{"description":"Refused. `code` is one of: `payload_too_large`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["payload_too_large"]},"415":{"description":"Refused. `code` is one of: `unsupported_media_type`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["unsupported_media_type"]},"422":{"description":"Refused. `code` is one of: `vin_already_consulted`, `vin_not_enrollable`, `state_required`, `state_blocked`, `vin_invalid`, `invalid_customer_price`, `idempotency_key_reused`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["vin_already_consulted","vin_not_enrollable","state_required","state_blocked","vin_invalid","invalid_customer_price","idempotency_key_reused"]},"429":{"description":"Refused. `code` is one of: `rate_limited`, `auth_failures_throttled`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["rate_limited","auth_failures_throttled"]},"500":{"description":"Refused. `code` is one of: `auth_unavailable`, `internal_error`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["auth_unavailable","internal_error"]},"503":{"description":"Refused. `code` is one of: `credentials_unavailable`, `platform_standby`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["credentials_unavailable","platform_standby"]}},"x-required-permission":"plans:write","x-rate-class":"write","x-idempotency":{"kind":"header","header":"Idempotency-Key","maxLength":255},"x-availability":{"status":"available","modes":["live","test"]},"x-data-class":"credential"},"get":{"operationId":"listPlanEnrollments","tags":["plans"],"summary":"List your roster","description":"Your enrollments in this key's mode, newest first. A key scoped to `read` may list, and an institution whose membership gate is closed can still read its roster.","parameters":[{"name":"vin","in":"query","description":"Only this VIN: 17 characters; case, spaces, dashes and dots are ignored. The check digit is not checked. `?vin=` is no filter. Deprecated: the VIN travels in the URL, where the systems it passes through can record it. It still filters; retrieve an enrollment by the id its create returned instead.","deprecated":true,"schema":{"x-data-class":"borrower_personal","type":"string"}},{"name":"status","in":"query","description":"Only this status, case-insensitive. `?status=` is no filter.","schema":{"x-data-class":"public","type":"string","enum":["PENDING","ACTIVE","PAST_DUE","LAPSED","CANCELLED"]}},{"name":"cursor","in":"query","description":"The previous page's `next_cursor`. `?cursor=` is the first page; only spaces is refused.","schema":{"x-data-class":"institution_confidential","type":"string"}},{"name":"limit","in":"query","description":"Page size, 1 to 200, written in digits. A blank value means the default.","schema":{"x-data-class":"public","type":"integer","minimum":1,"maximum":200,"default":100}}],"responses":{"200":{"description":"A newest-first page.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanEnrollmentList"}}}},"400":{"description":"Refused. `code` is one of: `validation_failed`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["validation_failed"]},"401":{"description":"Refused. `code` is one of: `missing_api_key`, `invalid_api_key`, `api_key_expired`, `signature_profile_invalid`, `signature_expired`, `target_uri_not_allowed`, `signature_invalid`, `environment_mismatch`, `credential_not_activated`, `signed_requests_required`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["missing_api_key","invalid_api_key","api_key_expired","signature_profile_invalid","signature_expired","target_uri_not_allowed","signature_invalid","environment_mismatch","credential_not_activated","signed_requests_required"]},"403":{"description":"Refused. `code` is one of: `key_not_scoped`, `provider_terminated`, `permission_denied`, `edge_auth_required`, `ip_not_allowed`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["key_not_scoped","provider_terminated","permission_denied","edge_auth_required","ip_not_allowed"]},"404":{"description":"Refused. `code` is one of: `membership_program_closed`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["membership_program_closed"]},"409":{"description":"Refused. `code` is one of: `signature_replay`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["signature_replay"]},"429":{"description":"Refused. `code` is one of: `rate_limited`, `auth_failures_throttled`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["rate_limited","auth_failures_throttled"]},"500":{"description":"Refused. `code` is one of: `auth_unavailable`, `internal_error`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["auth_unavailable","internal_error"]},"503":{"description":"Refused. `code` is one of: `credentials_unavailable`, `platform_standby`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["credentials_unavailable","platform_standby"]}},"x-required-permission":"plans:read","x-rate-class":"read","x-idempotency":{"kind":"none"},"x-availability":{"status":"available","modes":["live","test"]},"x-data-class":"credential"}},"/api/gap/v1/plans/enrollments/{id}":{"get":{"operationId":"getPlanEnrollment","tags":["plans"],"summary":"Retrieve one enrollment","description":"One of your enrollments in this key's mode.","parameters":[{"name":"id","in":"path","description":"The enrollment's id.","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"x-data-class":"institution_confidential"}}],"responses":{"200":{"description":"The enrollment.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanEnrollment"}}}},"400":{"description":"Refused. `code` is one of: `validation_failed`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["validation_failed"]},"401":{"description":"Refused. `code` is one of: `missing_api_key`, `invalid_api_key`, `api_key_expired`, `signature_profile_invalid`, `signature_expired`, `target_uri_not_allowed`, `signature_invalid`, `environment_mismatch`, `credential_not_activated`, `signed_requests_required`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["missing_api_key","invalid_api_key","api_key_expired","signature_profile_invalid","signature_expired","target_uri_not_allowed","signature_invalid","environment_mismatch","credential_not_activated","signed_requests_required"]},"403":{"description":"Refused. `code` is one of: `key_not_scoped`, `provider_terminated`, `permission_denied`, `edge_auth_required`, `ip_not_allowed`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["key_not_scoped","provider_terminated","permission_denied","edge_auth_required","ip_not_allowed"]},"404":{"description":"Refused. `code` is one of: `membership_program_closed`, `not_found`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["membership_program_closed","not_found"]},"409":{"description":"Refused. `code` is one of: `signature_replay`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["signature_replay"]},"429":{"description":"Refused. `code` is one of: `rate_limited`, `auth_failures_throttled`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["rate_limited","auth_failures_throttled"]},"500":{"description":"Refused. `code` is one of: `auth_unavailable`, `internal_error`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["auth_unavailable","internal_error"]},"503":{"description":"Refused. `code` is one of: `credentials_unavailable`, `platform_standby`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["credentials_unavailable","platform_standby"]}},"x-required-permission":"plans:read","x-rate-class":"read","x-idempotency":{"kind":"none"},"x-availability":{"status":"available","modes":["live","test"]},"x-data-class":"credential"},"patch":{"operationId":"updatePlanEnrollment","tags":["plans"],"summary":"Cancel, swap the VIN, or edit contact details","description":"`{ \"cancel\": true }`, on its own, cancels: at once for a partner-billed enrollment, at period end for a direct-collect one. `{ \"new_vin\": … }` enrolls the new VIN and closes this enrollment (201): the new vehicle is eligible from the time of the change; `garaged_state`, `external_ref` and each member field carry over unless sent, and a paying direct-collect member's subscription moves to the new enrollment. Any other body edits `external_ref` and `member` only; a body with nothing to apply is a 400. In external_ref, send your own enrollment or file ID. Never a loan, account or policy number (a credit union member number is an account number).","parameters":[{"name":"id","in":"path","description":"The enrollment's id.","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"x-data-class":"institution_confidential"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"On a signed request (`signedRequest`) it is required and signed, and must be 1 to 255 visible ASCII characters (`!` to `~`), with no spaces, or the call gets 401 `signature_profile_invalid`. A call with an API key may leave it out or send any value. This operation keeps no record of it, so it makes nothing idempotent here.","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"`Content-Type: application/json`, at most 65,536 bytes. A field the schema does not name is refused (`unknown_field`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanEnrollmentPatchInput"}}}},"responses":{"200":{"description":"The cancelled or edited enrollment.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanEnrollment"}}}},"201":{"description":"Swapped: the new enrollment, naming the one it replaced.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanEnrollmentSwapResult"}}}},"400":{"description":"Refused. `code` is one of: `invalid_json`, `validation_failed`, `nothing_to_update`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["invalid_json","validation_failed","nothing_to_update"]},"401":{"description":"Refused. `code` is one of: `missing_api_key`, `invalid_api_key`, `api_key_expired`, `signature_profile_invalid`, `signature_expired`, `target_uri_not_allowed`, `signature_invalid`, `environment_mismatch`, `credential_not_activated`, `signed_requests_required`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["missing_api_key","invalid_api_key","api_key_expired","signature_profile_invalid","signature_expired","target_uri_not_allowed","signature_invalid","environment_mismatch","credential_not_activated","signed_requests_required"]},"403":{"description":"Refused. `code` is one of: `key_not_scoped`, `provider_terminated`, `permission_denied`, `edge_auth_required`, `ip_not_allowed`, `provider_suspended`, `provider_not_active`, `membership_not_enabled`, `membership_rider_unsigned`, `membership_billing_mode_required`, `membership_billing_method_required`, `plan_not_enabled`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["key_not_scoped","provider_terminated","permission_denied","edge_auth_required","ip_not_allowed","provider_suspended","provider_not_active","membership_not_enabled","membership_rider_unsigned","membership_billing_mode_required","membership_billing_method_required","plan_not_enabled"]},"404":{"description":"Refused. `code` is one of: `membership_program_closed`, `not_found`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["membership_program_closed","not_found"]},"409":{"description":"Refused. `code` is one of: `signature_replay`, `not_live`, `vin_already_live`, `idempotency_key_mode_conflict`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["signature_replay","not_live","vin_already_live","idempotency_key_mode_conflict"]},"413":{"description":"Refused. `code` is one of: `payload_too_large`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["payload_too_large"]},"415":{"description":"Refused. `code` is one of: `unsupported_media_type`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["unsupported_media_type"]},"422":{"description":"Refused. `code` is one of: `vin_already_consulted`, `vin_not_enrollable`, `state_required`, `state_blocked`, `vin_invalid`, `invalid_customer_price`, `idempotency_key_reused`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["vin_already_consulted","vin_not_enrollable","state_required","state_blocked","vin_invalid","invalid_customer_price","idempotency_key_reused"]},"429":{"description":"Refused. `code` is one of: `rate_limited`, `auth_failures_throttled`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["rate_limited","auth_failures_throttled"]},"500":{"description":"Refused. `code` is one of: `auth_unavailable`, `internal_error`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["auth_unavailable","internal_error"]},"503":{"description":"Refused. `code` is one of: `credentials_unavailable`, `platform_standby`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["credentials_unavailable","platform_standby"]}},"x-required-permission":"plans:write","x-rate-class":"write","x-idempotency":{"kind":"none"},"x-availability":{"status":"available","modes":["live","test"]},"x-data-class":"credential"}},"/api/gap/v1/plans/enrollments/bulk":{"post":{"operationId":"bulkCreatePlanEnrollments","tags":["plans"],"summary":"Enroll up to 500 vehicles","description":"Each row is validated and enrolled on its own; `results` reports every row. A row's `idempotency_key` replays it like the single endpoint's header. An `Idempotency-Key` header (at most 251 characters) keys every row without its own as `<header>:<index>`, so re-sending the same batch replays it.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"A batch key: every row without its own `idempotency_key` is keyed `<header>:<index>`, so re-sending the same batch replays it. At most 251 characters, trimmed. On a signed request (`signedRequest`) it is required and signed: 1 to 255 visible ASCII characters (`!` to `~`), no spaces, or the call gets 401 `signature_profile_invalid`.","schema":{"type":"string","maxLength":251}}],"requestBody":{"required":true,"description":"`Content-Type: application/json`, at most 1,048,576 bytes. A field the schema does not name is refused (`unknown_field`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanEnrollmentBulkInput"}}}},"responses":{"200":{"description":"Row-level results.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanEnrollmentBulkResult"}}}},"400":{"description":"Refused. `code` is one of: `invalid_json`, `validation_failed`, `idempotency_key_too_long`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["invalid_json","validation_failed","idempotency_key_too_long"]},"401":{"description":"Refused. `code` is one of: `missing_api_key`, `invalid_api_key`, `api_key_expired`, `signature_profile_invalid`, `signature_expired`, `target_uri_not_allowed`, `signature_invalid`, `environment_mismatch`, `credential_not_activated`, `signed_requests_required`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["missing_api_key","invalid_api_key","api_key_expired","signature_profile_invalid","signature_expired","target_uri_not_allowed","signature_invalid","environment_mismatch","credential_not_activated","signed_requests_required"]},"403":{"description":"Refused. `code` is one of: `key_not_scoped`, `provider_terminated`, `permission_denied`, `edge_auth_required`, `ip_not_allowed`, `provider_suspended`, `provider_not_active`, `membership_not_enabled`, `membership_rider_unsigned`, `membership_billing_mode_required`, `membership_billing_method_required`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["key_not_scoped","provider_terminated","permission_denied","edge_auth_required","ip_not_allowed","provider_suspended","provider_not_active","membership_not_enabled","membership_rider_unsigned","membership_billing_mode_required","membership_billing_method_required"]},"404":{"description":"Refused. `code` is one of: `membership_program_closed`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["membership_program_closed"]},"409":{"description":"Refused. `code` is one of: `signature_replay`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["signature_replay"]},"413":{"description":"Refused. `code` is one of: `payload_too_large`, `too_many_rows`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["payload_too_large","too_many_rows"]},"415":{"description":"Refused. `code` is one of: `unsupported_media_type`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["unsupported_media_type"]},"429":{"description":"Refused. `code` is one of: `rate_limited`, `auth_failures_throttled`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["rate_limited","auth_failures_throttled"]},"500":{"description":"Refused. `code` is one of: `auth_unavailable`, `internal_error`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["auth_unavailable","internal_error"]},"503":{"description":"Refused. `code` is one of: `credentials_unavailable`, `platform_standby`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["credentials_unavailable","platform_standby"]}},"x-required-permission":"plans:write","x-rate-class":"bulk","x-idempotency":{"kind":"header+row","header":"Idempotency-Key","maxLength":251,"field":"idempotency_key","rowMaxLength":255},"x-availability":{"status":"available","modes":["live","test"]},"x-data-class":"borrower_contact"}},"/api/gap/v1/plans/roster-sync":{"post":{"operationId":"syncPlanRoster","tags":["plans"],"summary":"Reconcile your full roster","description":"Every VIN in the list ends up live; every live VIN of yours not in the list is cancelled (you stopped billing that member), at period end for a paying direct-collect member. Only an explicit `{ \"enrollments\": [] }` empties the roster; a bare array is refused. Any malformed row refuses the whole sync (400 with `rejected`), so a parse error can never cancel a live member. Built for a nightly job from a loan-servicing system. One call carries your whole roster, at most 500 vehicles: a roster over 500 vehicles must use a roster-sync session (`POST /api/gap/v1/plans/roster-sync/sessions`), because each call cancels every live vehicle it leaves out, so two calls of part of a roster each cancel the other's vehicles. A sync that would cancel more than 25 of your live enrollments in this key's mode and more than 20% of them, counting those roster syncs cancelled in the last 7 days, answers 409 `roster_cancel_unconfirmed` and changes nothing; its `detail` states how many it would cancel and how many are live, and you send that number as `confirm_cancel_count` to go ahead. One roster is applied at a time for your institution and mode: while a session's large commit is being applied, or another sync holds it for longer than a few seconds, a sync answers 409 `roster_commit_in_progress` with `Retry-After`. In external_ref, send your own enrollment or file ID. Never a loan, account or policy number (a credit union member number is an account number).","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"On a signed request (`signedRequest`) it is required and signed, and must be 1 to 255 visible ASCII characters (`!` to `~`), with no spaces, or the call gets 401 `signature_profile_invalid`. A call with an API key may leave it out or send any value. This operation keeps no record of it, so it makes nothing idempotent here.","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"`Content-Type: application/json`, at most 1,048,576 bytes. A field the schema does not name is refused (`unknown_field`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanRosterSyncInput"}}}},"responses":{"200":{"description":"What the sync did.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanRosterSyncResult"}}}},"400":{"description":"Refused. `code` is one of: `invalid_json`, `validation_failed`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","properties":{"rejected":{"type":"array","items":{"$ref":"#/components/schemas/PlanRosterRejection"},"description":"On `validation_failed` for rows: every row that failed, by index, with its field errors. Nothing was changed."}}}]}}},"x-error-codes":["invalid_json","validation_failed"]},"401":{"description":"Refused. `code` is one of: `missing_api_key`, `invalid_api_key`, `api_key_expired`, `signature_profile_invalid`, `signature_expired`, `target_uri_not_allowed`, `signature_invalid`, `environment_mismatch`, `credential_not_activated`, `signed_requests_required`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["missing_api_key","invalid_api_key","api_key_expired","signature_profile_invalid","signature_expired","target_uri_not_allowed","signature_invalid","environment_mismatch","credential_not_activated","signed_requests_required"]},"403":{"description":"Refused. `code` is one of: `key_not_scoped`, `provider_terminated`, `permission_denied`, `edge_auth_required`, `ip_not_allowed`, `provider_suspended`, `provider_not_active`, `membership_not_enabled`, `membership_rider_unsigned`, `membership_billing_mode_required`, `membership_billing_method_required`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["key_not_scoped","provider_terminated","permission_denied","edge_auth_required","ip_not_allowed","provider_suspended","provider_not_active","membership_not_enabled","membership_rider_unsigned","membership_billing_mode_required","membership_billing_method_required"]},"404":{"description":"Refused. `code` is one of: `membership_program_closed`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["membership_program_closed"]},"409":{"description":"Refused. `code` is one of: `signature_replay`, `roster_cancel_unconfirmed`, `roster_commit_in_progress`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["signature_replay","roster_cancel_unconfirmed","roster_commit_in_progress"]},"413":{"description":"Refused. `code` is one of: `payload_too_large`, `too_many_rows`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["payload_too_large","too_many_rows"]},"415":{"description":"Refused. `code` is one of: `unsupported_media_type`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["unsupported_media_type"]},"429":{"description":"Refused. `code` is one of: `rate_limited`, `auth_failures_throttled`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["rate_limited","auth_failures_throttled"]},"500":{"description":"Refused. `code` is one of: `auth_unavailable`, `internal_error`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["auth_unavailable","internal_error"]},"503":{"description":"Refused. `code` is one of: `credentials_unavailable`, `platform_standby`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["credentials_unavailable","platform_standby"]}},"x-required-permission":"plans:write","x-rate-class":"bulk","x-idempotency":{"kind":"none"},"x-availability":{"status":"available","modes":["live","test"]},"x-data-class":"borrower_contact"}},"/api/gap/v1/plans/roster-sync/sessions":{"post":{"operationId":"openPlanRosterSession","tags":["plans"],"summary":"Open a roster-sync session","description":"For a roster of any size, sent in chunks and applied once. Open a session (no body), send the roster in chunks of up to 500 vehicles, then commit it. A roster over 500 vehicles must use a session: chunks only stage rows, and nothing is enrolled or cancelled until the commit, which then reconciles your whole roster as `POST /api/gap/v1/plans/roster-sync` does. A session belongs to your institution and this key's mode, and expires 24 hours after it opens; an expired session, or one you abort, applies nothing. Staged: it opens when roster-sync sessions open for institutions, and until then every call answers 404 `operation_not_open`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"On a signed request (`signedRequest`) it is required and signed, and must be 1 to 255 visible ASCII characters (`!` to `~`), with no spaces, or the call gets 401 `signature_profile_invalid`. A call with an API key may leave it out or send any value. This operation keeps no record of it, so it makes nothing idempotent here.","schema":{"type":"string"}}],"responses":{"201":{"description":"Opened.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanRosterSession"}}}},"400":{"description":"Refused. `code` is one of: `validation_failed`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["validation_failed"]},"401":{"description":"Refused. `code` is one of: `missing_api_key`, `invalid_api_key`, `api_key_expired`, `signature_profile_invalid`, `signature_expired`, `target_uri_not_allowed`, `signature_invalid`, `environment_mismatch`, `credential_not_activated`, `signed_requests_required`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["missing_api_key","invalid_api_key","api_key_expired","signature_profile_invalid","signature_expired","target_uri_not_allowed","signature_invalid","environment_mismatch","credential_not_activated","signed_requests_required"]},"403":{"description":"Refused. `code` is one of: `key_not_scoped`, `provider_terminated`, `permission_denied`, `edge_auth_required`, `ip_not_allowed`, `provider_suspended`, `provider_not_active`, `membership_not_enabled`, `membership_rider_unsigned`, `membership_billing_mode_required`, `membership_billing_method_required`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["key_not_scoped","provider_terminated","permission_denied","edge_auth_required","ip_not_allowed","provider_suspended","provider_not_active","membership_not_enabled","membership_rider_unsigned","membership_billing_mode_required","membership_billing_method_required"]},"404":{"description":"Refused. `code` is one of: `operation_not_open`, `membership_program_closed`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["operation_not_open","membership_program_closed"]},"409":{"description":"Refused. `code` is one of: `signature_replay`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["signature_replay"]},"429":{"description":"Refused. `code` is one of: `rate_limited`, `auth_failures_throttled`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["rate_limited","auth_failures_throttled"]},"500":{"description":"Refused. `code` is one of: `auth_unavailable`, `internal_error`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["auth_unavailable","internal_error"]},"503":{"description":"Refused. `code` is one of: `credentials_unavailable`, `platform_standby`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["credentials_unavailable","platform_standby"]}},"x-required-permission":"plans:write","x-rate-class":"write","x-idempotency":{"kind":"none"},"x-availability":{"status":"staged","modes":["live","test"],"opens_with":"roster_sync_sessions"},"x-data-class":"institution_confidential"}},"/api/gap/v1/plans/roster-sync/sessions/{id}/chunks":{"post":{"operationId":"addPlanRosterSessionChunk","tags":["plans"],"summary":"Stage up to 500 vehicles of a roster","description":"Stages one chunk of your roster in an open session; nothing is enrolled or cancelled until the commit. Rows take the shape roster sync takes, and any malformed row refuses the whole chunk (400 with `rejected`) and stores none of it. Number chunks from 0 and send them in order. A chunk re-sent with its number and the same rows is a replay (200); other rows under a number already received, or a number that skips one, is a 409 `roster_chunk_conflict`. A VIN sent twice in a session is staged once, with the row sent last. 404 for a session that isn't yours in this key's mode; 409 `roster_session_not_open` once it expired, was aborted or is committing. Staged: it opens when roster-sync sessions open for institutions, and until then every call answers 404 `operation_not_open`.","parameters":[{"name":"id","in":"path","description":"The roster session's id.","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"x-data-class":"institution_confidential"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"On a signed request (`signedRequest`) it is required and signed, and must be 1 to 255 visible ASCII characters (`!` to `~`), with no spaces, or the call gets 401 `signature_profile_invalid`. A call with an API key may leave it out or send any value. This operation keeps no record of it, so it makes nothing idempotent here.","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"`Content-Type: application/json`, at most 1,048,576 bytes. A field the schema does not name is refused (`unknown_field`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanRosterSessionChunkInput"}}}},"responses":{"200":{"description":"A replay: this chunk had already been received with the same rows.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanRosterSessionChunkResult"}}}},"201":{"description":"Staged.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanRosterSessionChunkResult"}}}},"400":{"description":"Refused. `code` is one of: `invalid_json`, `validation_failed`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","properties":{"rejected":{"type":"array","items":{"$ref":"#/components/schemas/PlanRosterRejection"},"description":"On `validation_failed` for rows: every row of the chunk that failed, by its index in the chunk, with its field errors. Nothing was staged."}}}]}}},"x-error-codes":["invalid_json","validation_failed"]},"401":{"description":"Refused. `code` is one of: `missing_api_key`, `invalid_api_key`, `api_key_expired`, `signature_profile_invalid`, `signature_expired`, `target_uri_not_allowed`, `signature_invalid`, `environment_mismatch`, `credential_not_activated`, `signed_requests_required`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["missing_api_key","invalid_api_key","api_key_expired","signature_profile_invalid","signature_expired","target_uri_not_allowed","signature_invalid","environment_mismatch","credential_not_activated","signed_requests_required"]},"403":{"description":"Refused. `code` is one of: `key_not_scoped`, `provider_terminated`, `permission_denied`, `edge_auth_required`, `ip_not_allowed`, `provider_suspended`, `provider_not_active`, `membership_not_enabled`, `membership_rider_unsigned`, `membership_billing_mode_required`, `membership_billing_method_required`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["key_not_scoped","provider_terminated","permission_denied","edge_auth_required","ip_not_allowed","provider_suspended","provider_not_active","membership_not_enabled","membership_rider_unsigned","membership_billing_mode_required","membership_billing_method_required"]},"404":{"description":"Refused. `code` is one of: `operation_not_open`, `membership_program_closed`, `not_found`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["operation_not_open","membership_program_closed","not_found"]},"409":{"description":"Refused. `code` is one of: `signature_replay`, `roster_session_not_open`, `roster_chunk_conflict`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["signature_replay","roster_session_not_open","roster_chunk_conflict"]},"413":{"description":"Refused. `code` is one of: `payload_too_large`, `too_many_rows`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["payload_too_large","too_many_rows"]},"415":{"description":"Refused. `code` is one of: `unsupported_media_type`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["unsupported_media_type"]},"429":{"description":"Refused. `code` is one of: `rate_limited`, `auth_failures_throttled`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["rate_limited","auth_failures_throttled"]},"500":{"description":"Refused. `code` is one of: `auth_unavailable`, `internal_error`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["auth_unavailable","internal_error"]},"503":{"description":"Refused. `code` is one of: `credentials_unavailable`, `platform_standby`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["credentials_unavailable","platform_standby"]}},"x-required-permission":"plans:write","x-rate-class":"write","x-idempotency":{"kind":"none"},"x-availability":{"status":"staged","modes":["live","test"],"opens_with":"roster_sync_sessions"},"x-data-class":"borrower_contact"}},"/api/gap/v1/plans/roster-sync/sessions/{id}/commit":{"post":{"operationId":"commitPlanRosterSession","tags":["plans"],"summary":"Apply a roster-sync session","description":"Applies the staged roster once, as `POST /api/gap/v1/plans/roster-sync` applies a roster: every staged VIN ends up live, and every live VIN of yours in this key's mode that the roster leaves out is cancelled, at period end for a paying direct-collect member. Up to 5,000 staged vehicles it answers 200 with what it did; above that it answers 202 with the session, is applied in the background, and `GET` the session reads its counts once it is `committed`. A commit that would cancel more than 25 of your live enrollments and more than 20% of them, counting those roster syncs cancelled in the last 7 days, answers 409 `roster_cancel_unconfirmed` with `cancel_count` and `live_count`, and the session stays open, until you send `confirm_cancel_count` equal to `cancel_count`. One roster is applied at a time for your institution and mode (409 `roster_commit_in_progress`, with `Retry-After`, while another session's commit is being applied, or another roster sync holds it for longer than a few seconds). Send `{}` when you have nothing to confirm. Staged: it opens when roster-sync sessions open for institutions, and until then every call answers 404 `operation_not_open`.","parameters":[{"name":"id","in":"path","description":"The roster session's id.","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"x-data-class":"institution_confidential"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"On a signed request (`signedRequest`) it is required and signed, and must be 1 to 255 visible ASCII characters (`!` to `~`), with no spaces, or the call gets 401 `signature_profile_invalid`. A call with an API key may leave it out or send any value. This operation keeps no record of it, so it makes nothing idempotent here.","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"`Content-Type: application/json`, at most 65,536 bytes. A field the schema does not name is refused (`unknown_field`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanRosterSessionCommitInput"}}}},"responses":{"200":{"description":"Committed: what the commit did, in roster sync's shape, with the session.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanRosterSessionCommitResult"}}}},"202":{"description":"Accepted: a large roster, applied in the background. GET the session for its result.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanRosterSession"}}}},"400":{"description":"Refused. `code` is one of: `invalid_json`, `validation_failed`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["invalid_json","validation_failed"]},"401":{"description":"Refused. `code` is one of: `missing_api_key`, `invalid_api_key`, `api_key_expired`, `signature_profile_invalid`, `signature_expired`, `target_uri_not_allowed`, `signature_invalid`, `environment_mismatch`, `credential_not_activated`, `signed_requests_required`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["missing_api_key","invalid_api_key","api_key_expired","signature_profile_invalid","signature_expired","target_uri_not_allowed","signature_invalid","environment_mismatch","credential_not_activated","signed_requests_required"]},"403":{"description":"Refused. `code` is one of: `key_not_scoped`, `provider_terminated`, `permission_denied`, `edge_auth_required`, `ip_not_allowed`, `provider_suspended`, `provider_not_active`, `membership_not_enabled`, `membership_rider_unsigned`, `membership_billing_mode_required`, `membership_billing_method_required`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["key_not_scoped","provider_terminated","permission_denied","edge_auth_required","ip_not_allowed","provider_suspended","provider_not_active","membership_not_enabled","membership_rider_unsigned","membership_billing_mode_required","membership_billing_method_required"]},"404":{"description":"Refused. `code` is one of: `operation_not_open`, `membership_program_closed`, `not_found`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["operation_not_open","membership_program_closed","not_found"]},"409":{"description":"Refused. `code` is one of: `signature_replay`, `roster_session_not_open`, `roster_commit_in_progress`, `roster_cancel_unconfirmed`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","properties":{"cancel_count":{"type":"integer","description":"On `roster_cancel_unconfirmed`: how many live enrollments the roster would cancel. Send it as `confirm_cancel_count` to go ahead."},"live_count":{"type":"integer","description":"On `roster_cancel_unconfirmed`: your live enrollments in this key's mode, not counting those already ending at period end."}}}]}}},"x-error-codes":["signature_replay","roster_session_not_open","roster_commit_in_progress","roster_cancel_unconfirmed"]},"413":{"description":"Refused. `code` is one of: `payload_too_large`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["payload_too_large"]},"415":{"description":"Refused. `code` is one of: `unsupported_media_type`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["unsupported_media_type"]},"429":{"description":"Refused. `code` is one of: `rate_limited`, `auth_failures_throttled`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["rate_limited","auth_failures_throttled"]},"500":{"description":"Refused. `code` is one of: `auth_unavailable`, `internal_error`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["auth_unavailable","internal_error"]},"503":{"description":"Refused. `code` is one of: `credentials_unavailable`, `platform_standby`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["credentials_unavailable","platform_standby"]}},"x-required-permission":"plans:write","x-rate-class":"write","x-idempotency":{"kind":"none"},"x-availability":{"status":"staged","modes":["live","test"],"opens_with":"roster_sync_sessions"},"x-data-class":"borrower_personal"}},"/api/gap/v1/plans/roster-sync/sessions/{id}/abort":{"post":{"operationId":"abortPlanRosterSession","tags":["plans"],"summary":"Abort a roster-sync session","description":"Drops an open session (no body): nothing staged in it is applied, and it takes no more chunks. Aborting an aborted session answers it again. 404 for a session that isn't yours in this key's mode; 409 `roster_session_not_open` once it expired or is committing or committed. Staged: it opens when roster-sync sessions open for institutions, and until then every call answers 404 `operation_not_open`.","parameters":[{"name":"id","in":"path","description":"The roster session's id.","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"x-data-class":"institution_confidential"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"On a signed request (`signedRequest`) it is required and signed, and must be 1 to 255 visible ASCII characters (`!` to `~`), with no spaces, or the call gets 401 `signature_profile_invalid`. A call with an API key may leave it out or send any value. This operation keeps no record of it, so it makes nothing idempotent here.","schema":{"type":"string"}}],"responses":{"200":{"description":"Aborted.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanRosterSession"}}}},"400":{"description":"Refused. `code` is one of: `validation_failed`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["validation_failed"]},"401":{"description":"Refused. `code` is one of: `missing_api_key`, `invalid_api_key`, `api_key_expired`, `signature_profile_invalid`, `signature_expired`, `target_uri_not_allowed`, `signature_invalid`, `environment_mismatch`, `credential_not_activated`, `signed_requests_required`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["missing_api_key","invalid_api_key","api_key_expired","signature_profile_invalid","signature_expired","target_uri_not_allowed","signature_invalid","environment_mismatch","credential_not_activated","signed_requests_required"]},"403":{"description":"Refused. `code` is one of: `key_not_scoped`, `provider_terminated`, `permission_denied`, `edge_auth_required`, `ip_not_allowed`, `provider_suspended`, `provider_not_active`, `membership_not_enabled`, `membership_rider_unsigned`, `membership_billing_mode_required`, `membership_billing_method_required`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["key_not_scoped","provider_terminated","permission_denied","edge_auth_required","ip_not_allowed","provider_suspended","provider_not_active","membership_not_enabled","membership_rider_unsigned","membership_billing_mode_required","membership_billing_method_required"]},"404":{"description":"Refused. `code` is one of: `operation_not_open`, `membership_program_closed`, `not_found`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["operation_not_open","membership_program_closed","not_found"]},"409":{"description":"Refused. `code` is one of: `signature_replay`, `roster_session_not_open`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["signature_replay","roster_session_not_open"]},"429":{"description":"Refused. `code` is one of: `rate_limited`, `auth_failures_throttled`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["rate_limited","auth_failures_throttled"]},"500":{"description":"Refused. `code` is one of: `auth_unavailable`, `internal_error`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["auth_unavailable","internal_error"]},"503":{"description":"Refused. `code` is one of: `credentials_unavailable`, `platform_standby`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["credentials_unavailable","platform_standby"]}},"x-required-permission":"plans:write","x-rate-class":"write","x-idempotency":{"kind":"none"},"x-availability":{"status":"staged","modes":["live","test"],"opens_with":"roster_sync_sessions"},"x-data-class":"institution_confidential"}},"/api/gap/v1/plans/roster-sync/sessions/{id}":{"get":{"operationId":"getPlanRosterSession","tags":["plans"],"summary":"Retrieve a roster-sync session","description":"One of your roster-sync sessions in this key's mode: its status, what it has received, and once committed what the commit did, as counts. An open session past its 24 hours reads `expired`. Staged: it opens when roster-sync sessions open for institutions, and until then every call answers 404 `operation_not_open`.","parameters":[{"name":"id","in":"path","description":"The roster session's id.","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"x-data-class":"institution_confidential"}}],"responses":{"200":{"description":"The session.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanRosterSession"}}}},"400":{"description":"Refused. `code` is one of: `validation_failed`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["validation_failed"]},"401":{"description":"Refused. `code` is one of: `missing_api_key`, `invalid_api_key`, `api_key_expired`, `signature_profile_invalid`, `signature_expired`, `target_uri_not_allowed`, `signature_invalid`, `environment_mismatch`, `credential_not_activated`, `signed_requests_required`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["missing_api_key","invalid_api_key","api_key_expired","signature_profile_invalid","signature_expired","target_uri_not_allowed","signature_invalid","environment_mismatch","credential_not_activated","signed_requests_required"]},"403":{"description":"Refused. `code` is one of: `key_not_scoped`, `provider_terminated`, `permission_denied`, `edge_auth_required`, `ip_not_allowed`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["key_not_scoped","provider_terminated","permission_denied","edge_auth_required","ip_not_allowed"]},"404":{"description":"Refused. `code` is one of: `operation_not_open`, `membership_program_closed`, `not_found`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["operation_not_open","membership_program_closed","not_found"]},"409":{"description":"Refused. `code` is one of: `signature_replay`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["signature_replay"]},"429":{"description":"Refused. `code` is one of: `rate_limited`, `auth_failures_throttled`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["rate_limited","auth_failures_throttled"]},"500":{"description":"Refused. `code` is one of: `auth_unavailable`, `internal_error`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["auth_unavailable","internal_error"]},"503":{"description":"Refused. `code` is one of: `credentials_unavailable`, `platform_standby`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["credentials_unavailable","platform_standby"]}},"x-required-permission":"plans:read","x-rate-class":"read","x-idempotency":{"kind":"none"},"x-availability":{"status":"staged","modes":["live","test"],"opens_with":"roster_sync_sessions"},"x-data-class":"institution_confidential"}},"/api/gap/v1/plans/loss-notices":{"post":{"operationId":"recordPlanLossNotice","tags":["plans"],"summary":"Tell us a member vehicle was declared a total loss","description":"The payoff-request trigger: you usually know before the member does. Records the notice on the enrollment so we can reach the member with a running start. Once loss reporting opens for your institution, a notice with a `date_of_loss` uses the membership in force on that date, even if it has ended since (a vehicle cancelled at payoff); without one, or before then, the live membership. 404 `not_a_member_vehicle` when the VIN has neither under your institution; a `date_of_loss` more than a day ahead is a 400.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"On a signed request (`signedRequest`) it is required and signed, and must be 1 to 255 visible ASCII characters (`!` to `~`), with no spaces, or the call gets 401 `signature_profile_invalid`. A call with an API key may leave it out or send any value. This operation keeps no record of it, so it makes nothing idempotent here.","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"`Content-Type: application/json`, at most 65,536 bytes. A field the schema does not name is refused (`unknown_field`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanLossNoticeInput"}}}},"responses":{"200":{"description":"Recorded.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanLossNoticeResult"}}}},"400":{"description":"Refused. `code` is one of: `invalid_json`, `validation_failed`, `vin_invalid`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["invalid_json","validation_failed","vin_invalid"]},"401":{"description":"Refused. `code` is one of: `missing_api_key`, `invalid_api_key`, `api_key_expired`, `signature_profile_invalid`, `signature_expired`, `target_uri_not_allowed`, `signature_invalid`, `environment_mismatch`, `credential_not_activated`, `signed_requests_required`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["missing_api_key","invalid_api_key","api_key_expired","signature_profile_invalid","signature_expired","target_uri_not_allowed","signature_invalid","environment_mismatch","credential_not_activated","signed_requests_required"]},"403":{"description":"Refused. `code` is one of: `key_not_scoped`, `provider_terminated`, `permission_denied`, `edge_auth_required`, `ip_not_allowed`, `provider_suspended`, `provider_not_active`, `membership_not_enabled`, `membership_rider_unsigned`, `membership_billing_mode_required`, `membership_billing_method_required`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["key_not_scoped","provider_terminated","permission_denied","edge_auth_required","ip_not_allowed","provider_suspended","provider_not_active","membership_not_enabled","membership_rider_unsigned","membership_billing_mode_required","membership_billing_method_required"]},"404":{"description":"Refused. `code` is one of: `membership_program_closed`, `not_a_member_vehicle`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["membership_program_closed","not_a_member_vehicle"]},"409":{"description":"Refused. `code` is one of: `signature_replay`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["signature_replay"]},"413":{"description":"Refused. `code` is one of: `payload_too_large`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["payload_too_large"]},"415":{"description":"Refused. `code` is one of: `unsupported_media_type`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["unsupported_media_type"]},"429":{"description":"Refused. `code` is one of: `rate_limited`, `auth_failures_throttled`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["rate_limited","auth_failures_throttled"]},"500":{"description":"Refused. `code` is one of: `auth_unavailable`, `internal_error`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["auth_unavailable","internal_error"]},"503":{"description":"Refused. `code` is one of: `credentials_unavailable`, `platform_standby`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["credentials_unavailable","platform_standby"]}},"x-required-permission":"plans:write","x-rate-class":"write","x-idempotency":{"kind":"none"},"x-availability":{"status":"available","modes":["live","test"]},"x-data-class":"borrower_personal"},"get":{"operationId":"listPlanLossNotices","tags":["plans"],"summary":"The total losses you reported, and whether each is included","description":"Newest first, a page at a time, one row per loss: a repeat of the same loss is shown once, with `reported_again_at`. `pending` means no date of loss yet; `denied` carries the reason. A test key lists only sandbox notices. Empty until loss reporting opens for your institution.","parameters":[{"name":"cursor","in":"query","description":"The previous page's `next_cursor`. `?cursor=` is the first page; only spaces is refused.","schema":{"x-data-class":"institution_confidential","type":"string"}},{"name":"limit","in":"query","description":"Page size, 1 to 200, written in digits. A blank value means the default.","schema":{"x-data-class":"public","type":"integer","minimum":1,"maximum":200,"default":100}}],"responses":{"200":{"description":"A newest-first page.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanLossNoticeList"}}}},"400":{"description":"Refused. `code` is one of: `validation_failed`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["validation_failed"]},"401":{"description":"Refused. `code` is one of: `missing_api_key`, `invalid_api_key`, `api_key_expired`, `signature_profile_invalid`, `signature_expired`, `target_uri_not_allowed`, `signature_invalid`, `environment_mismatch`, `credential_not_activated`, `signed_requests_required`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["missing_api_key","invalid_api_key","api_key_expired","signature_profile_invalid","signature_expired","target_uri_not_allowed","signature_invalid","environment_mismatch","credential_not_activated","signed_requests_required"]},"403":{"description":"Refused. `code` is one of: `key_not_scoped`, `provider_terminated`, `permission_denied`, `edge_auth_required`, `ip_not_allowed`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["key_not_scoped","provider_terminated","permission_denied","edge_auth_required","ip_not_allowed"]},"404":{"description":"Refused. `code` is one of: `membership_program_closed`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["membership_program_closed"]},"409":{"description":"Refused. `code` is one of: `signature_replay`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["signature_replay"]},"429":{"description":"Refused. `code` is one of: `rate_limited`, `auth_failures_throttled`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["rate_limited","auth_failures_throttled"]},"500":{"description":"Refused. `code` is one of: `auth_unavailable`, `internal_error`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["auth_unavailable","internal_error"]},"503":{"description":"Refused. `code` is one of: `credentials_unavailable`, `platform_standby`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["credentials_unavailable","platform_standby"]}},"x-required-permission":"plans:read","x-rate-class":"read","x-idempotency":{"kind":"none"},"x-availability":{"status":"available","modes":["live","test"]},"x-data-class":"borrower_personal"}},"/api/gap/v1/plans/redemptions":{"get":{"operationId":"listPlanRedemptions","tags":["plans"],"summary":"Member consultations drawn against your roster","description":"Ids, VIN, status, dates and the outcome once settled: never the consultation's internals. Newest first, a page at a time. A redemption names the referral its member consultation made (`referral_id`); once the borrower withdraws permission to report that referral's progress to you, the redemption shows `status: REPORTING_WITHDRAWN` and `reporting_withdrawn_at`, with no outcome and no `settled_at`, as the referral itself reads (`status: reporting_withdrawn`).","parameters":[{"name":"cursor","in":"query","description":"The previous page's `next_cursor`. `?cursor=` is the first page; only spaces is refused.","schema":{"x-data-class":"institution_confidential","type":"string"}},{"name":"limit","in":"query","description":"Page size, 1 to 200, written in digits. A blank value means the default.","schema":{"x-data-class":"public","type":"integer","minimum":1,"maximum":200,"default":200}}],"responses":{"200":{"description":"A newest-first page.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanRedemptionList"}}}},"400":{"description":"Refused. `code` is one of: `validation_failed`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["validation_failed"]},"401":{"description":"Refused. `code` is one of: `missing_api_key`, `invalid_api_key`, `api_key_expired`, `signature_profile_invalid`, `signature_expired`, `target_uri_not_allowed`, `signature_invalid`, `environment_mismatch`, `credential_not_activated`, `signed_requests_required`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["missing_api_key","invalid_api_key","api_key_expired","signature_profile_invalid","signature_expired","target_uri_not_allowed","signature_invalid","environment_mismatch","credential_not_activated","signed_requests_required"]},"403":{"description":"Refused. `code` is one of: `key_not_scoped`, `provider_terminated`, `permission_denied`, `edge_auth_required`, `ip_not_allowed`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["key_not_scoped","provider_terminated","permission_denied","edge_auth_required","ip_not_allowed"]},"404":{"description":"Refused. `code` is one of: `membership_program_closed`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["membership_program_closed"]},"409":{"description":"Refused. `code` is one of: `signature_replay`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["signature_replay"]},"429":{"description":"Refused. `code` is one of: `rate_limited`, `auth_failures_throttled`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["rate_limited","auth_failures_throttled"]},"500":{"description":"Refused. `code` is one of: `auth_unavailable`, `internal_error`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["auth_unavailable","internal_error"]},"503":{"description":"Refused. `code` is one of: `credentials_unavailable`, `platform_standby`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["credentials_unavailable","platform_standby"]}},"x-required-permission":"plans:read","x-rate-class":"read","x-idempotency":{"kind":"none"},"x-availability":{"status":"available","modes":["live","test"]},"x-data-class":"borrower_personal"}},"/api/gap/v1/plans/statements":{"get":{"operationId":"listPlanStatements","tags":["plans"],"summary":"Your monthly membership statements","description":"Your last 36 monthly statements, newest first. A test key gets an empty list: statements bill only live enrollments.","responses":{"200":{"description":"Your statements.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanStatementList"}}}},"400":{"description":"Refused. `code` is one of: `validation_failed`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["validation_failed"]},"401":{"description":"Refused. `code` is one of: `missing_api_key`, `invalid_api_key`, `api_key_expired`, `signature_profile_invalid`, `signature_expired`, `target_uri_not_allowed`, `signature_invalid`, `environment_mismatch`, `credential_not_activated`, `signed_requests_required`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["missing_api_key","invalid_api_key","api_key_expired","signature_profile_invalid","signature_expired","target_uri_not_allowed","signature_invalid","environment_mismatch","credential_not_activated","signed_requests_required"]},"403":{"description":"Refused. `code` is one of: `key_not_scoped`, `provider_terminated`, `permission_denied`, `edge_auth_required`, `ip_not_allowed`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["key_not_scoped","provider_terminated","permission_denied","edge_auth_required","ip_not_allowed"]},"404":{"description":"Refused. `code` is one of: `membership_program_closed`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["membership_program_closed"]},"409":{"description":"Refused. `code` is one of: `signature_replay`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["signature_replay"]},"429":{"description":"Refused. `code` is one of: `rate_limited`, `auth_failures_throttled`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["rate_limited","auth_failures_throttled"]},"500":{"description":"Refused. `code` is one of: `auth_unavailable`, `internal_error`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["auth_unavailable","internal_error"]},"503":{"description":"Refused. `code` is one of: `credentials_unavailable`, `platform_standby`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["credentials_unavailable","platform_standby"]}},"x-required-permission":"plans:read","x-rate-class":"read","x-idempotency":{"kind":"none"},"x-availability":{"status":"available","modes":["live","test"]},"x-data-class":"institution_confidential"}},"/api/gap/v1/plans/statements/{id}/lines":{"get":{"operationId":"listPlanStatementLines","tags":["plans"],"summary":"The lines of one monthly statement","description":"One of your monthly statements, a line per vehicle billed, a page at a time (100 by default, at most 1,000): ordered by `enrollment_id`, then `tlas_mode`, then `line_kind`. To page, send each page's `next_cursor` as `starting_after`; `has_more` says whether another page follows. A statement issued before its lines were listed this way (one without `line_count`) lists the lines its `lines` carries, in that order, with `tlas_mode`, `line_kind`, `days_live`, `amount_cents`, `collected_cents`, `rev_share_cents` and `subsidy_cents` null. A test key gets 404: statements bill only live enrollments. Another institution's statement, or one still being issued, is 404 too.","parameters":[{"name":"id","in":"path","description":"The statement's id, as the statement list gives it.","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"x-data-class":"institution_confidential"}},{"name":"limit","in":"query","description":"Page size, 1 to 1000, written in digits. A blank value means the default.","schema":{"x-data-class":"public","type":"integer","minimum":1,"maximum":1000,"default":100}},{"name":"starting_after","in":"query","description":"The previous page's `next_cursor`, an opaque position in this statement's lines; the page starts after it. Anything else is a 400. `?starting_after=` is the first page; only spaces is refused.","schema":{"x-data-class":"institution_confidential","type":"string"}}],"responses":{"200":{"description":"A page of the statement's lines.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanStatementLineList"}}}},"400":{"description":"Refused. `code` is one of: `validation_failed`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["validation_failed"]},"401":{"description":"Refused. `code` is one of: `missing_api_key`, `invalid_api_key`, `api_key_expired`, `signature_profile_invalid`, `signature_expired`, `target_uri_not_allowed`, `signature_invalid`, `environment_mismatch`, `credential_not_activated`, `signed_requests_required`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["missing_api_key","invalid_api_key","api_key_expired","signature_profile_invalid","signature_expired","target_uri_not_allowed","signature_invalid","environment_mismatch","credential_not_activated","signed_requests_required"]},"403":{"description":"Refused. `code` is one of: `key_not_scoped`, `provider_terminated`, `permission_denied`, `edge_auth_required`, `ip_not_allowed`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["key_not_scoped","provider_terminated","permission_denied","edge_auth_required","ip_not_allowed"]},"404":{"description":"Refused. `code` is one of: `membership_program_closed`, `not_found`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["membership_program_closed","not_found"]},"409":{"description":"Refused. `code` is one of: `signature_replay`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["signature_replay"]},"429":{"description":"Refused. `code` is one of: `rate_limited`, `auth_failures_throttled`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["rate_limited","auth_failures_throttled"]},"500":{"description":"Refused. `code` is one of: `auth_unavailable`, `internal_error`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["auth_unavailable","internal_error"]},"503":{"description":"Refused. `code` is one of: `credentials_unavailable`, `platform_standby`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["credentials_unavailable","platform_standby"]}},"x-required-permission":"plans:read","x-rate-class":"read","x-idempotency":{"kind":"none"},"x-availability":{"status":"available","modes":["live","test"]},"x-data-class":"borrower_personal"}},"/api/gap/v1/events":{"get":{"operationId":"listEvents","tags":["events"],"summary":"List your events","description":"Your institution's events from the last 30 days, oldest first: every event we record for you, whether or not a webhook endpoint takes it, as a thin event (ids, your `external_ref`, statuses, the milestone reached, outcome codes and timestamps; never a borrower's contact details, a payoff, a VIN or an amount). Each event type needs its own permission: the referral and review events `referrals:read`, `charge.created` `reporting:read`, and the membership plan events `plans:read`. A key lists only the types it holds the permission for, and a key that holds none of them gets an empty list; a key without `referrals:read` gets each event's referral as its `id` only. The membership plan events are listed only while the membership program is open to your institution, and a test key lists the referral and charge events only once the referral sandbox opens, as those operations answer. The review events (`review.completed`, `review.updated` and `referral.closed`) are listed only while review records are open, as the review-status lookup and the review record answer. Once a borrower withdraws permission to report a referral's progress, its events from before the withdrawal stay listed, and from the withdrawal on, only the event that announces it is listed (`referral.closed`, or `review.updated` citing the `REPORTING_WITHDRAWN` version); its `charge.created` and the membership plan's enrollment and statement events stay, while `plan.benefit.redeemed` and `plan.benefit.completed` follow the referral the redemption made. A live key lists live events, and a test key sandbox ones. An event is listed about a minute after it happens. To poll, keep the `next_cursor` every page returns and send it as `starting_after`, never an event's `id`: an event can reach the feed after a newer one's webhook has gone out, so a position taken from a webhook would skip it. Webhooks and the feed carry the same event ids, so drop duplicates by `id` across both. Which types are listed is decided when you read: the events of a surface closed then are not listed later to a poller that has read past them. To see them, or after a 400 `invalid_cursor` (a cursor works only for the institution and mode it was issued to), start again without `starting_after`: the feed lists the last 30 days, and you drop the ids you have. Staged: it opens with the partner security platform, and until then every call answers 404 `operation_not_open`.","parameters":[{"name":"limit","in":"query","description":"Page size, 1 to 100, written in digits. A blank value means the default.","schema":{"x-data-class":"public","type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"starting_after","in":"query","description":"The previous page's `next_cursor`: an opaque position, the last event this feed listed to you; the page starts after it. Never an event's `id`, not even one a webhook delivered: an event can reach the feed after a newer one's webhook has gone out, so a position taken from a webhook would skip it. A cursor works only for the institution and mode it was issued to; anything else is 400 `invalid_cursor`. `?starting_after=` is the first page; only spaces is refused.","schema":{"x-data-class":"institution_confidential","type":"string"}}],"responses":{"200":{"description":"An oldest-first page of thin events.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventFeedPage"}}}},"400":{"description":"Refused. `code` is one of: `validation_failed`, `invalid_cursor`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["validation_failed","invalid_cursor"]},"401":{"description":"Refused. `code` is one of: `missing_api_key`, `invalid_api_key`, `api_key_expired`, `signature_profile_invalid`, `signature_expired`, `target_uri_not_allowed`, `signature_invalid`, `environment_mismatch`, `credential_not_activated`, `signed_requests_required`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["missing_api_key","invalid_api_key","api_key_expired","signature_profile_invalid","signature_expired","target_uri_not_allowed","signature_invalid","environment_mismatch","credential_not_activated","signed_requests_required"]},"403":{"description":"Refused. `code` is one of: `provider_terminated`, `edge_auth_required`, `ip_not_allowed`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["provider_terminated","edge_auth_required","ip_not_allowed"]},"404":{"description":"Refused. `code` is one of: `operation_not_open`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["operation_not_open"]},"409":{"description":"Refused. `code` is one of: `signature_replay`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["signature_replay"]},"429":{"description":"Refused. `code` is one of: `rate_limited`, `auth_failures_throttled`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["rate_limited","auth_failures_throttled"]},"500":{"description":"Refused. `code` is one of: `internal_error`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["internal_error"]},"503":{"description":"Refused. `code` is one of: `credentials_unavailable`, `platform_standby`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["credentials_unavailable","platform_standby"]}},"x-required-permission":"none","x-rate-class":"read","x-idempotency":{"kind":"none"},"x-availability":{"status":"staged","modes":["live","test"],"opens_with":"partner_events"},"x-data-class":"institution_confidential"}},"/api/gap/v1/openapi":{"get":{"operationId":"getOpenApiDocument","tags":["document"],"summary":"This OpenAPI document","description":"The OpenAPI 3.1 document for this API, generated from the contract the API runs on. No key needed. `?oas=3.0` serves a derived OpenAPI 3.0.3 copy.","security":[],"parameters":[{"name":"oas","in":"query","description":"`3.0` serves the derived OpenAPI 3.0.3 copy, for tooling that predates 3.1.","schema":{"x-data-class":"public","type":"string","enum":["3.1","3.0"],"default":"3.1"}}],"responses":{"200":{"description":"The document.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenApiDocument"}}}},"400":{"description":"Refused. `code` is one of: `validation_failed`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["validation_failed"]},"403":{"description":"Refused. `code` is one of: `edge_auth_required`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["edge_auth_required"]},"500":{"description":"Refused. `code` is one of: `internal_error`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["internal_error"]}},"x-required-permission":"none","x-rate-class":"none","x-idempotency":{"kind":"none"},"x-availability":{"status":"available","modes":[]},"x-data-class":"public"}},"/api/gap/v1/openapi.json":{"get":{"operationId":"getOpenApiDocumentJson","tags":["document"],"summary":"This OpenAPI document (`.json` alias)","description":"The same document as `GET /api/gap/v1/openapi`, under a path ending in `.json` for tools that expect one.","security":[],"parameters":[{"name":"oas","in":"query","description":"`3.0` serves the derived OpenAPI 3.0.3 copy, for tooling that predates 3.1.","schema":{"x-data-class":"public","type":"string","enum":["3.1","3.0"],"default":"3.1"}}],"responses":{"200":{"description":"The document.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenApiDocument"}}}},"400":{"description":"Refused. `code` is one of: `validation_failed`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["validation_failed"]},"403":{"description":"Refused. `code` is one of: `edge_auth_required`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["edge_auth_required"]},"500":{"description":"Refused. `code` is one of: `internal_error`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["internal_error"]}},"x-required-permission":"none","x-rate-class":"none","x-idempotency":{"kind":"none"},"x-availability":{"status":"available","modes":[]},"x-data-class":"public","x-alias-of":"getOpenApiDocument"}},"/api/gap/v1/me":{"get":{"operationId":"getMe","tags":["credentials"],"summary":"The key making this call","description":"Which API key made the call and what it may do: its id and prefix, live or test, its format and how it authenticates, the permissions it holds, when it expires, your institution's id and status, and how many address ranges its IP allowlist holds. Any key reaches it, live or test, whatever it may do, so it is the call to make first when a key is refused elsewhere. A terminated institution's key gets 403 `provider_terminated`.","responses":{"200":{"description":"The key.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyIntrospection"}}}},"400":{"description":"Refused. `code` is one of: `validation_failed`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["validation_failed"]},"401":{"description":"Refused. `code` is one of: `missing_api_key`, `invalid_api_key`, `api_key_expired`, `signature_profile_invalid`, `signature_expired`, `target_uri_not_allowed`, `signature_invalid`, `environment_mismatch`, `credential_not_activated`, `signed_requests_required`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["missing_api_key","invalid_api_key","api_key_expired","signature_profile_invalid","signature_expired","target_uri_not_allowed","signature_invalid","environment_mismatch","credential_not_activated","signed_requests_required"]},"403":{"description":"Refused. `code` is one of: `provider_terminated`, `edge_auth_required`, `ip_not_allowed`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["provider_terminated","edge_auth_required","ip_not_allowed"]},"409":{"description":"Refused. `code` is one of: `signature_replay`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["signature_replay"]},"429":{"description":"Refused. `code` is one of: `rate_limited`, `auth_failures_throttled`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["rate_limited","auth_failures_throttled"]},"500":{"description":"Refused. `code` is one of: `internal_error`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["internal_error"]},"503":{"description":"Refused. `code` is one of: `credentials_unavailable`, `platform_standby`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["credentials_unavailable","platform_standby"]}},"x-required-permission":"none","x-rate-class":"read","x-idempotency":{"kind":"none"},"x-availability":{"status":"available","modes":["live","test"]},"x-data-class":"institution_confidential"}},"/api/gap/v1/credentials/{id}/verify":{"post":{"operationId":"verifyCredential","tags":["credentials"],"summary":"Activate a signed credential","description":"A signed credential registered in the portal starts unactivated: until this call succeeds, every other call it signs gets 401 `credential_not_activated`. Sign this call with the credential itself, `{id}` being its id (the `keyid` it signs with), with an empty body: the signature proves you hold the private key of the public key you registered. It answers the credential with `activated_at`, and a later call answers the same time. A public key is active for one credential at most: if another credential has already activated it, this call gets 409 `public_key_in_use`, and you register a new key pair instead. Any other caller, a bearer key or another credential, gets 404. Staged: it opens when signed credentials open, and until then every call answers 404 `operation_not_open`.","security":[{"signedRequest":[]}],"parameters":[{"name":"id","in":"path","description":"The signed credential's id: the `keyid` its signatures name.","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"x-data-class":"institution_confidential"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"On a signed request (`signedRequest`), the only kind this call takes, it is required and signed: 1 to 255 visible ASCII characters (`!` to `~`), no spaces, or the call gets 401 `signature_profile_invalid`. This call keeps no record of it: it is idempotent itself, and a retry is signed again, with a new nonce.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[!-~]+$"}}],"responses":{"200":{"description":"The credential, activated.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialActivation"}}}},"400":{"description":"Refused. `code` is one of: `invalid_json`, `validation_failed`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["invalid_json","validation_failed"]},"401":{"description":"Refused. `code` is one of: `missing_api_key`, `invalid_api_key`, `api_key_expired`, `signature_profile_invalid`, `signature_expired`, `target_uri_not_allowed`, `signature_invalid`, `environment_mismatch`, `signed_requests_required`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["missing_api_key","invalid_api_key","api_key_expired","signature_profile_invalid","signature_expired","target_uri_not_allowed","signature_invalid","environment_mismatch","signed_requests_required"]},"403":{"description":"Refused. `code` is one of: `provider_terminated`, `edge_auth_required`, `ip_not_allowed`, `provider_suspended`, `provider_not_active`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["provider_terminated","edge_auth_required","ip_not_allowed","provider_suspended","provider_not_active"]},"404":{"description":"Refused. `code` is one of: `operation_not_open`, `not_found`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["operation_not_open","not_found"]},"409":{"description":"Refused. `code` is one of: `signature_replay`, `public_key_in_use`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["signature_replay","public_key_in_use"]},"413":{"description":"Refused. `code` is one of: `payload_too_large`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["payload_too_large"]},"429":{"description":"Refused. `code` is one of: `rate_limited`, `auth_failures_throttled`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["rate_limited","auth_failures_throttled"]},"500":{"description":"Refused. `code` is one of: `internal_error`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["internal_error"]},"503":{"description":"Refused. `code` is one of: `credentials_unavailable`, `platform_standby`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["credentials_unavailable","platform_standby"]}},"x-required-permission":"none","x-rate-class":"write","x-idempotency":{"kind":"none"},"x-availability":{"status":"staged","modes":["live","test"],"opens_with":"signed_credentials"},"x-data-class":"institution_confidential"}},"/api/gap/v1/signature-check":{"post":{"operationId":"checkSignature","tags":["credentials"],"summary":"Check a signature (test credentials)","description":"For a test credential while you build your signer. Sign a request with a test signed credential and send it here: it answers 200 with whether the signature verified, the signature base built from the request as received (to compare byte for byte with yours), each check's result, and the code the same request would be refused with on any other operation. It never spends the signature's nonce, so you can send the same request again, and a check that fails is never counted as failed authentication from your address. A credential that isn't a test one, is unknown or is revoked, or is named with another algorithm than its own, gets the same answer as a signature that doesn't verify. A test credential not yet activated is checked as if it were: activate it with `POST /api/gap/v1/credentials/{id}/verify`. Send any body of at most 65,536 bytes, or none: its `Content-Digest` is checked against the bytes as received. It takes no query string: a request with one is answered 400 `validation_failed`, unchecked. At most 60 calls a minute from one address our edge vouches for (for IPv6, from its /64); past that it answers 429 `rate_limited`, with `Retry-After`. A call from an address our edge can't vouch for, or from a range many callers share (a proxy or CDN range, a private network, carrier-grade NAT), isn't limited this way. It checks no key, so its answers carry no `RateLimit` or `RateLimit-Policy` header. Your access log lists a check only when its signature verified and its `created` was within the window, at most 60 checks a minute for one credential. Staged: it opens when signed credentials open, and until then every call answers 404 `operation_not_open`.","security":[{"signedRequest":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"On a signed request (`signedRequest`), the only kind this call takes, it is required and signed: 1 to 255 visible ASCII characters (`!` to `~`), no spaces; a request without one, or with one off the profile, is reported with `code` `signature_profile_invalid`. This call keeps no record of it and spends no nonce, so you can send the same signed request again.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[!-~]+$"}}],"responses":{"200":{"description":"What the signature looked like to the API.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignatureCheckResult"}}}},"400":{"description":"Refused. `code` is one of: `invalid_json`, `validation_failed`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["invalid_json","validation_failed"]},"401":{"description":"Refused. `code` is one of: `missing_api_key`, `invalid_api_key`, `api_key_expired`, `signature_profile_invalid`, `signature_expired`, `target_uri_not_allowed`, `signature_invalid`, `environment_mismatch`, `signed_requests_required`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["missing_api_key","invalid_api_key","api_key_expired","signature_profile_invalid","signature_expired","target_uri_not_allowed","signature_invalid","environment_mismatch","signed_requests_required"]},"403":{"description":"Refused. `code` is one of: `provider_terminated`, `edge_auth_required`, `ip_not_allowed`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["provider_terminated","edge_auth_required","ip_not_allowed"]},"404":{"description":"Refused. `code` is one of: `operation_not_open`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["operation_not_open"]},"409":{"description":"Refused. `code` is one of: `signature_replay`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["signature_replay"]},"413":{"description":"Refused. `code` is one of: `payload_too_large`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["payload_too_large"]},"429":{"description":"Refused. `code` is one of: `rate_limited`, `auth_failures_throttled`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["rate_limited","auth_failures_throttled"]},"500":{"description":"Refused. `code` is one of: `internal_error`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["internal_error"]},"503":{"description":"Refused. `code` is one of: `credentials_unavailable`, `platform_standby`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["credentials_unavailable","platform_standby"]}},"x-required-permission":"none","x-rate-class":"read","x-idempotency":{"kind":"none"},"x-availability":{"status":"staged","modes":["test"],"opens_with":"signed_credentials"},"x-data-class":"institution_confidential"}},"/api/gap/v1/review-status/lookup":{"post":{"operationId":"lookupReviewStatus","tags":["referrals"],"summary":"Look up review status by VIN, claim number or reference","description":"Finds your referrals by one identifier, sent in the body so it never travels in a URL: `vin`, `claim_number` or `external_ref`, as you sent it on the referral. Each match comes with the latest version of its review record, cited as `{ id, version, hash }` with its status and when it was written, and with its close reason: what the review webhooks carry. Read the version itself with `GET /api/gap/v1/referrals/{id}/review-record`. Newest first, at most 100 (`has_more` says more matched); no match is an empty list. `record` is null while a referral's record has no version to show: before its first, and from the borrower's request that we stop reporting the referral's progress until the version that records it. It writes nothing, but during a failover the platform can still answer it as it answers a write (503 `platform_standby`). Test keys (`sa_test_...`) get 403 `test_key_referrals_unavailable` until the referral sandbox opens; from then on a test key reaches sandbox referrals only, and a live key never sees them. Staged: it opens with review records, once their sweep is on and has finished its first pass; until then every call answers 404 `operation_not_open`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"On a signed request (`signedRequest`) it is required and signed, and must be 1 to 255 visible ASCII characters (`!` to `~`), with no spaces, or the call gets 401 `signature_profile_invalid`. A call with an API key may leave it out or send any value. This operation keeps no record of it, so it makes nothing idempotent here.","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"`Content-Type: application/json`, at most 65,536 bytes. A field the schema does not name is refused (`unknown_field`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewStatusLookupInput"}}}},"responses":{"200":{"description":"Your matching referrals, newest first, each with its review status.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewStatusList"}}}},"400":{"description":"Refused. `code` is one of: `invalid_json`, `validation_failed`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["invalid_json","validation_failed"]},"401":{"description":"Refused. `code` is one of: `missing_api_key`, `invalid_api_key`, `api_key_expired`, `signature_profile_invalid`, `signature_expired`, `target_uri_not_allowed`, `signature_invalid`, `environment_mismatch`, `credential_not_activated`, `signed_requests_required`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["missing_api_key","invalid_api_key","api_key_expired","signature_profile_invalid","signature_expired","target_uri_not_allowed","signature_invalid","environment_mismatch","credential_not_activated","signed_requests_required"]},"403":{"description":"Refused. `code` is one of: `key_not_scoped`, `provider_terminated`, `permission_denied`, `edge_auth_required`, `ip_not_allowed`, `test_key_referrals_unavailable`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["key_not_scoped","provider_terminated","permission_denied","edge_auth_required","ip_not_allowed","test_key_referrals_unavailable"]},"404":{"description":"Refused. `code` is one of: `operation_not_open`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["operation_not_open"]},"409":{"description":"Refused. `code` is one of: `signature_replay`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["signature_replay"]},"413":{"description":"Refused. `code` is one of: `payload_too_large`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["payload_too_large"]},"415":{"description":"Refused. `code` is one of: `unsupported_media_type`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["unsupported_media_type"]},"429":{"description":"Refused. `code` is one of: `rate_limited`, `auth_failures_throttled`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["rate_limited","auth_failures_throttled"]},"500":{"description":"Refused. `code` is one of: `internal_error`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["internal_error"]},"503":{"description":"Refused. `code` is one of: `credentials_unavailable`, `platform_standby`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["credentials_unavailable","platform_standby"]}},"x-required-permission":"referrals:read","x-rate-class":"read","x-idempotency":{"kind":"none"},"x-availability":{"status":"staged","modes":["live","test"],"opens_with":"review_record"},"x-data-class":"borrower_personal"}},"/api/gap/v1/referrals/{id}/review-record":{"get":{"operationId":"getReferralReviewRecord","tags":["referrals"],"summary":"Retrieve a referral's review record","description":"One version of the referral's review record: the latest, or the one `?version=` names. A version is written each time the record changes and never edited, and its `hash` is the SHA-256 of `bundle`'s canonical JSON (RFC 8785), so the version you read later still matches the hash a webhook or the lookup cited. `bundle` holds the record: its status, the verdict once it reached the borrower and whether we can help (never a dollar figure), the review window, outreach, a refusal, a review done elsewhere, the appraisal right, the costs by component and payer, the requirement, the outcome and the copy versions. A redacted version keeps its id, version, hash and status, with `bundle: null`. Once the borrower asks us to stop reporting the referral's progress, the latest version says only that, and the versions before it stay readable by number; until the version that records it is written, there is no latest to show. 404 `not_found` for a referral that isn't yours in this key's mode, a version it doesn't have, or a record with no version to show yet. `costs.engagement` and `costs.institution_charges` are null unless the key also holds `reporting:read`. The `hash` covers the whole record, costs included, so a copy with them null still cites the version but doesn't hash to it. Test keys (`sa_test_...`) get 403 `test_key_referrals_unavailable` until the referral sandbox opens; from then on a test key reaches sandbox referrals only, and a live key never sees them. Staged: it opens with review records, once their sweep is on and has finished its first pass; until then every call answers 404 `operation_not_open`.","parameters":[{"name":"id","in":"path","description":"The referral's id.","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"x-data-class":"institution_confidential"}},{"name":"version","in":"query","description":"The version to read, 1 for the record's first, written in digits. Leave it out, or blank, for the latest the record can show.","schema":{"x-data-class":"public","type":"integer","minimum":1,"maximum":2147483647}}],"responses":{"200":{"description":"The version.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewRecord"}}}},"400":{"description":"Refused. `code` is one of: `validation_failed`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["validation_failed"]},"401":{"description":"Refused. `code` is one of: `missing_api_key`, `invalid_api_key`, `api_key_expired`, `signature_profile_invalid`, `signature_expired`, `target_uri_not_allowed`, `signature_invalid`, `environment_mismatch`, `credential_not_activated`, `signed_requests_required`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["missing_api_key","invalid_api_key","api_key_expired","signature_profile_invalid","signature_expired","target_uri_not_allowed","signature_invalid","environment_mismatch","credential_not_activated","signed_requests_required"]},"403":{"description":"Refused. `code` is one of: `key_not_scoped`, `provider_terminated`, `permission_denied`, `edge_auth_required`, `ip_not_allowed`, `test_key_referrals_unavailable`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["key_not_scoped","provider_terminated","permission_denied","edge_auth_required","ip_not_allowed","test_key_referrals_unavailable"]},"404":{"description":"Refused. `code` is one of: `operation_not_open`, `not_found`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["operation_not_open","not_found"]},"409":{"description":"Refused. `code` is one of: `signature_replay`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["signature_replay"]},"429":{"description":"Refused. `code` is one of: `rate_limited`, `auth_failures_throttled`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["rate_limited","auth_failures_throttled"]},"500":{"description":"Refused. `code` is one of: `internal_error`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["internal_error"]},"503":{"description":"Refused. `code` is one of: `credentials_unavailable`, `platform_standby`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["credentials_unavailable","platform_standby"]}},"x-required-permission":"referrals:read","x-rate-class":"read","x-idempotency":{"kind":"none"},"x-availability":{"status":"staged","modes":["live","test"],"opens_with":"review_record"},"x-data-class":"borrower_personal"}},"/api/gap/v1/audit":{"get":{"operationId":"listAuditLog","tags":["credentials"],"summary":"List your access log","description":"The access log we keep for your institution, newest first, a page at a time: each call to this API made with one of your keys or signed credentials, and each read in your portal by one of your seats. Of SecondAppraisal's own reads, only those a SecondAppraisal superadmin makes while viewing your portal as one of your seats are listed; other reads by SecondAppraisal staff are not. Another institution's entries are never listed. An entry names who read (a seat by its name or email, a key by its prefix, a refused call's included; a superadmin viewing your portal only as `SecondAppraisal superadmin view-as`, never a person), what was read, the answer and the caller's address; never a request body or header, and never the address of a read our staff made. Refused and failed-authentication reads in one minute are folded into one entry that counts them. A read is listed a few seconds after it happens, and a folded entry once its minute has ended; this call is recorded too. Needs `audit:read`, on a live key: a key without it, and every test key, gets 403 `permission_denied`. Staged: it opens with access reviews, and until then every call answers 404 `operation_not_open`.","parameters":[{"name":"limit","in":"query","description":"Page size, 1 to 100, written in digits. A blank value means the default.","schema":{"x-data-class":"public","type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"starting_after","in":"query","description":"The previous page's `next_cursor`, an opaque position; the page starts after it. Anything else is 400 `invalid_cursor`. Send the same `from` and `to` with it. `?starting_after=` is the first page; only spaces is refused.","schema":{"x-data-class":"institution_confidential","type":"string"}},{"name":"from","in":"query","description":"Entries at or after this time (ISO 8601 with its offset, such as `2026-10-01T00:00:00Z`). `?from=` is no bound. Spaces around it are ignored.","schema":{"x-data-class":"public","type":"string","format":"date-time","examples":["2026-10-01T00:00:00Z"]}},{"name":"to","in":"query","description":"Entries before this time (ISO 8601 with its offset): the bound is exclusive. Must be after `from`. `?to=` is no bound. Spaces around it are ignored.","schema":{"x-data-class":"public","type":"string","format":"date-time","examples":["2026-11-01T00:00:00Z"]}}],"responses":{"200":{"description":"A newest-first page of entries.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditLogPage"}}}},"400":{"description":"Refused. `code` is one of: `validation_failed`, `invalid_cursor`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["validation_failed","invalid_cursor"]},"401":{"description":"Refused. `code` is one of: `missing_api_key`, `invalid_api_key`, `api_key_expired`, `signature_profile_invalid`, `signature_expired`, `target_uri_not_allowed`, `signature_invalid`, `environment_mismatch`, `credential_not_activated`, `signed_requests_required`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["missing_api_key","invalid_api_key","api_key_expired","signature_profile_invalid","signature_expired","target_uri_not_allowed","signature_invalid","environment_mismatch","credential_not_activated","signed_requests_required"]},"403":{"description":"Refused. `code` is one of: `provider_terminated`, `permission_denied`, `edge_auth_required`, `ip_not_allowed`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["provider_terminated","permission_denied","edge_auth_required","ip_not_allowed"]},"404":{"description":"Refused. `code` is one of: `operation_not_open`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["operation_not_open"]},"409":{"description":"Refused. `code` is one of: `signature_replay`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["signature_replay"]},"429":{"description":"Refused. `code` is one of: `rate_limited`, `auth_failures_throttled`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["rate_limited","auth_failures_throttled"]},"500":{"description":"Refused. `code` is one of: `internal_error`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["internal_error"]},"503":{"description":"Refused. `code` is one of: `credentials_unavailable`, `platform_standby`. Each code is described in `x-error-catalog`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-error-codes":["credentials_unavailable","platform_standby"]}},"x-required-permission":"audit:read","x-rate-class":"read","x-idempotency":{"kind":"none"},"x-availability":{"status":"staged","modes":["live"],"opens_with":"access_review"},"x-data-class":"institution_confidential"}}},"webhooks":{"referral.invited":{"post":{"operationId":"webhook.referral.invited","summary":"The borrower was sent the activation invitation.","description":"Sent with `X-SecondAppraisal-Event: referral.invited` and `User-Agent: SecondAppraisal-Webhooks/1.0`. Which body an endpoint is sent is fixed when the endpoint is created, and its `payloadVersion` (`FULL_V1` or `THIN_V2`, in the response that created it and in the endpoint list) says which. A full-payload endpoint, one created before v2 keys and signed credentials opened (the partner security platform's `issue` stage), or created while that stage couldn't be read, is sent the first form: the full envelope, whose `data` is this type's. A thin-payload endpoint, created from `issue` on, is sent the second: `ThinEvent`, the thin event the events feed lists. The headers are the same for both.","parameters":[{"name":"X-SecondAppraisal-Signature","in":"header","required":true,"description":"`t=<unix seconds>,v1=<hex>`: v1 is HMAC-SHA256 with your endpoint's signing secret over `<t>.<raw body>`. The key is the secret's text for a `whsec_gap_` secret, and its base64-decoded bytes after `whsec_` for a Standard Webhooks secret. Verify it over the exact bytes received, compare in constant time, and refuse an old `t`. During a secret rotation's overlap (1 to 168 hours) it is signed with the previous secret, until you promote the new one or the overlap ends; switch your verifier to the new secret then.","schema":{"type":"string","pattern":"^t=\\d+,v1=[0-9a-f]{64}$"}},{"name":"X-SecondAppraisal-Event","in":"header","required":true,"schema":{"type":"string","const":"referral.invited"}},{"name":"X-SecondAppraisal-Delivery","in":"header","required":true,"description":"This delivery's id. A retry of the same delivery repeats it.","schema":{"type":"string"}},{"name":"webhook-id","in":"header","required":false,"description":"Standard Webhooks: sent only when your endpoint's signing secret is a Standard Webhooks one (`whsec_` and base64). The event's id (`evt_…`); a retry repeats it.","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":false,"description":"Standard Webhooks: sent only when your endpoint's signing secret is a Standard Webhooks one. Unix seconds, the same `t` as the signature header's.","schema":{"type":"string","pattern":"^\\d+$"}},{"name":"webhook-signature","in":"header","required":false,"description":"Standard Webhooks: sent only when your endpoint's signing secret is a Standard Webhooks one. `v1,<base64>` for each Standard Webhooks secret in force (during a rotation's overlap, the new one too), separated by spaces: HMAC-SHA256 keyed with the secret's base64-decoded bytes over `<webhook-id>.<webhook-timestamp>.<raw body>`. Any Standard Webhooks library verifies it; accept the delivery if any `v1` matches.","schema":{"type":"string","pattern":"^v1,[A-Za-z0-9+/]{43}=( v1,[A-Za-z0-9+/]{43}=)*$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"description":"A `referral.invited` delivery: the full envelope to a full-payload endpoint, `ThinEvent` to a thin-payload one. This object and each object in it carry at least these fields; new fields may be added, so ignore any you don't recognise.","anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"The event id (`evt_…`). A retried delivery repeats it: use it to drop duplicates.","x-data-class":"public"},"object":{"type":"string","const":"event","x-data-class":"public"},"type":{"type":"string","const":"referral.invited","x-data-class":"public"},"created_at":{"type":"string","format":"date-time","x-data-class":"public"},"livemode":{"description":"`true` for a live event, `false` for a sandbox one (from a test key's referral). Live events go to your live endpoints only, and sandbox referral events to your test endpoints only. The membership plan events don't carry it yet.","x-data-class":"public","type":"boolean"},"data":{"$ref":"#/components/schemas/WebhookReferralInvitedData"}},"required":["id","object","type","created_at","data"],"not":{"properties":{"api_version":{}},"required":["api_version"]}},{"$ref":"#/components/schemas/ThinEvent"}]}}}},"responses":{"2XX":{"description":"Any 2xx acknowledges the delivery. Anything else, or no answer in 10 seconds, is retried with backoff."}},"x-data-class":"borrower_contact"}},"referral.activated":{"post":{"operationId":"webhook.referral.activated","summary":"The borrower activated: the consultation exists.","description":"Sent with `X-SecondAppraisal-Event: referral.activated` and `User-Agent: SecondAppraisal-Webhooks/1.0`. Which body an endpoint is sent is fixed when the endpoint is created, and its `payloadVersion` (`FULL_V1` or `THIN_V2`, in the response that created it and in the endpoint list) says which. A full-payload endpoint, one created before v2 keys and signed credentials opened (the partner security platform's `issue` stage), or created while that stage couldn't be read, is sent the first form: the full envelope, whose `data` is this type's. A thin-payload endpoint, created from `issue` on, is sent the second: `ThinEvent`, the thin event the events feed lists. The headers are the same for both.","parameters":[{"name":"X-SecondAppraisal-Signature","in":"header","required":true,"description":"`t=<unix seconds>,v1=<hex>`: v1 is HMAC-SHA256 with your endpoint's signing secret over `<t>.<raw body>`. The key is the secret's text for a `whsec_gap_` secret, and its base64-decoded bytes after `whsec_` for a Standard Webhooks secret. Verify it over the exact bytes received, compare in constant time, and refuse an old `t`. During a secret rotation's overlap (1 to 168 hours) it is signed with the previous secret, until you promote the new one or the overlap ends; switch your verifier to the new secret then.","schema":{"type":"string","pattern":"^t=\\d+,v1=[0-9a-f]{64}$"}},{"name":"X-SecondAppraisal-Event","in":"header","required":true,"schema":{"type":"string","const":"referral.activated"}},{"name":"X-SecondAppraisal-Delivery","in":"header","required":true,"description":"This delivery's id. A retry of the same delivery repeats it.","schema":{"type":"string"}},{"name":"webhook-id","in":"header","required":false,"description":"Standard Webhooks: sent only when your endpoint's signing secret is a Standard Webhooks one (`whsec_` and base64). The event's id (`evt_…`); a retry repeats it.","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":false,"description":"Standard Webhooks: sent only when your endpoint's signing secret is a Standard Webhooks one. Unix seconds, the same `t` as the signature header's.","schema":{"type":"string","pattern":"^\\d+$"}},{"name":"webhook-signature","in":"header","required":false,"description":"Standard Webhooks: sent only when your endpoint's signing secret is a Standard Webhooks one. `v1,<base64>` for each Standard Webhooks secret in force (during a rotation's overlap, the new one too), separated by spaces: HMAC-SHA256 keyed with the secret's base64-decoded bytes over `<webhook-id>.<webhook-timestamp>.<raw body>`. Any Standard Webhooks library verifies it; accept the delivery if any `v1` matches.","schema":{"type":"string","pattern":"^v1,[A-Za-z0-9+/]{43}=( v1,[A-Za-z0-9+/]{43}=)*$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"description":"A `referral.activated` delivery: the full envelope to a full-payload endpoint, `ThinEvent` to a thin-payload one. This object and each object in it carry at least these fields; new fields may be added, so ignore any you don't recognise.","anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"The event id (`evt_…`). A retried delivery repeats it: use it to drop duplicates.","x-data-class":"public"},"object":{"type":"string","const":"event","x-data-class":"public"},"type":{"type":"string","const":"referral.activated","x-data-class":"public"},"created_at":{"type":"string","format":"date-time","x-data-class":"public"},"livemode":{"description":"`true` for a live event, `false` for a sandbox one (from a test key's referral). Live events go to your live endpoints only, and sandbox referral events to your test endpoints only. The membership plan events don't carry it yet.","x-data-class":"public","type":"boolean"},"data":{"$ref":"#/components/schemas/WebhookReferralActivatedData"}},"required":["id","object","type","created_at","data"],"not":{"properties":{"api_version":{}},"required":["api_version"]}},{"$ref":"#/components/schemas/ThinEvent"}]}}}},"responses":{"2XX":{"description":"Any 2xx acknowledges the delivery. Anything else, or no answer in 10 seconds, is retried with backoff."}},"x-data-class":"borrower_contact"}},"referral.declined":{"post":{"operationId":"webhook.referral.declined","summary":"The borrower declined.","description":"Sent with `X-SecondAppraisal-Event: referral.declined` and `User-Agent: SecondAppraisal-Webhooks/1.0`. Which body an endpoint is sent is fixed when the endpoint is created, and its `payloadVersion` (`FULL_V1` or `THIN_V2`, in the response that created it and in the endpoint list) says which. A full-payload endpoint, one created before v2 keys and signed credentials opened (the partner security platform's `issue` stage), or created while that stage couldn't be read, is sent the first form: the full envelope, whose `data` is this type's. A thin-payload endpoint, created from `issue` on, is sent the second: `ThinEvent`, the thin event the events feed lists. The headers are the same for both.","parameters":[{"name":"X-SecondAppraisal-Signature","in":"header","required":true,"description":"`t=<unix seconds>,v1=<hex>`: v1 is HMAC-SHA256 with your endpoint's signing secret over `<t>.<raw body>`. The key is the secret's text for a `whsec_gap_` secret, and its base64-decoded bytes after `whsec_` for a Standard Webhooks secret. Verify it over the exact bytes received, compare in constant time, and refuse an old `t`. During a secret rotation's overlap (1 to 168 hours) it is signed with the previous secret, until you promote the new one or the overlap ends; switch your verifier to the new secret then.","schema":{"type":"string","pattern":"^t=\\d+,v1=[0-9a-f]{64}$"}},{"name":"X-SecondAppraisal-Event","in":"header","required":true,"schema":{"type":"string","const":"referral.declined"}},{"name":"X-SecondAppraisal-Delivery","in":"header","required":true,"description":"This delivery's id. A retry of the same delivery repeats it.","schema":{"type":"string"}},{"name":"webhook-id","in":"header","required":false,"description":"Standard Webhooks: sent only when your endpoint's signing secret is a Standard Webhooks one (`whsec_` and base64). The event's id (`evt_…`); a retry repeats it.","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":false,"description":"Standard Webhooks: sent only when your endpoint's signing secret is a Standard Webhooks one. Unix seconds, the same `t` as the signature header's.","schema":{"type":"string","pattern":"^\\d+$"}},{"name":"webhook-signature","in":"header","required":false,"description":"Standard Webhooks: sent only when your endpoint's signing secret is a Standard Webhooks one. `v1,<base64>` for each Standard Webhooks secret in force (during a rotation's overlap, the new one too), separated by spaces: HMAC-SHA256 keyed with the secret's base64-decoded bytes over `<webhook-id>.<webhook-timestamp>.<raw body>`. Any Standard Webhooks library verifies it; accept the delivery if any `v1` matches.","schema":{"type":"string","pattern":"^v1,[A-Za-z0-9+/]{43}=( v1,[A-Za-z0-9+/]{43}=)*$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"description":"A `referral.declined` delivery: the full envelope to a full-payload endpoint, `ThinEvent` to a thin-payload one. This object and each object in it carry at least these fields; new fields may be added, so ignore any you don't recognise.","anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"The event id (`evt_…`). A retried delivery repeats it: use it to drop duplicates.","x-data-class":"public"},"object":{"type":"string","const":"event","x-data-class":"public"},"type":{"type":"string","const":"referral.declined","x-data-class":"public"},"created_at":{"type":"string","format":"date-time","x-data-class":"public"},"livemode":{"description":"`true` for a live event, `false` for a sandbox one (from a test key's referral). Live events go to your live endpoints only, and sandbox referral events to your test endpoints only. The membership plan events don't carry it yet.","x-data-class":"public","type":"boolean"},"data":{"$ref":"#/components/schemas/WebhookReferralData"}},"required":["id","object","type","created_at","data"],"not":{"properties":{"api_version":{}},"required":["api_version"]}},{"$ref":"#/components/schemas/ThinEvent"}]}}}},"responses":{"2XX":{"description":"Any 2xx acknowledges the delivery. Anything else, or no answer in 10 seconds, is retried with backoff."}},"x-data-class":"borrower_contact"}},"consultation.status_changed":{"post":{"operationId":"webhook.consultation.status_changed","summary":"The referral's provider-facing milestone moved.","description":"Sent with `X-SecondAppraisal-Event: consultation.status_changed` and `User-Agent: SecondAppraisal-Webhooks/1.0`. Which body an endpoint is sent is fixed when the endpoint is created, and its `payloadVersion` (`FULL_V1` or `THIN_V2`, in the response that created it and in the endpoint list) says which. A full-payload endpoint, one created before v2 keys and signed credentials opened (the partner security platform's `issue` stage), or created while that stage couldn't be read, is sent the first form: the full envelope, whose `data` is this type's. A thin-payload endpoint, created from `issue` on, is sent the second: `ThinEvent`, the thin event the events feed lists. The headers are the same for both.","parameters":[{"name":"X-SecondAppraisal-Signature","in":"header","required":true,"description":"`t=<unix seconds>,v1=<hex>`: v1 is HMAC-SHA256 with your endpoint's signing secret over `<t>.<raw body>`. The key is the secret's text for a `whsec_gap_` secret, and its base64-decoded bytes after `whsec_` for a Standard Webhooks secret. Verify it over the exact bytes received, compare in constant time, and refuse an old `t`. During a secret rotation's overlap (1 to 168 hours) it is signed with the previous secret, until you promote the new one or the overlap ends; switch your verifier to the new secret then.","schema":{"type":"string","pattern":"^t=\\d+,v1=[0-9a-f]{64}$"}},{"name":"X-SecondAppraisal-Event","in":"header","required":true,"schema":{"type":"string","const":"consultation.status_changed"}},{"name":"X-SecondAppraisal-Delivery","in":"header","required":true,"description":"This delivery's id. A retry of the same delivery repeats it.","schema":{"type":"string"}},{"name":"webhook-id","in":"header","required":false,"description":"Standard Webhooks: sent only when your endpoint's signing secret is a Standard Webhooks one (`whsec_` and base64). The event's id (`evt_…`); a retry repeats it.","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":false,"description":"Standard Webhooks: sent only when your endpoint's signing secret is a Standard Webhooks one. Unix seconds, the same `t` as the signature header's.","schema":{"type":"string","pattern":"^\\d+$"}},{"name":"webhook-signature","in":"header","required":false,"description":"Standard Webhooks: sent only when your endpoint's signing secret is a Standard Webhooks one. `v1,<base64>` for each Standard Webhooks secret in force (during a rotation's overlap, the new one too), separated by spaces: HMAC-SHA256 keyed with the secret's base64-decoded bytes over `<webhook-id>.<webhook-timestamp>.<raw body>`. Any Standard Webhooks library verifies it; accept the delivery if any `v1` matches.","schema":{"type":"string","pattern":"^v1,[A-Za-z0-9+/]{43}=( v1,[A-Za-z0-9+/]{43}=)*$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"description":"A `consultation.status_changed` delivery: the full envelope to a full-payload endpoint, `ThinEvent` to a thin-payload one. This object and each object in it carry at least these fields; new fields may be added, so ignore any you don't recognise.","anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"The event id (`evt_…`). A retried delivery repeats it: use it to drop duplicates.","x-data-class":"public"},"object":{"type":"string","const":"event","x-data-class":"public"},"type":{"type":"string","const":"consultation.status_changed","x-data-class":"public"},"created_at":{"type":"string","format":"date-time","x-data-class":"public"},"livemode":{"description":"`true` for a live event, `false` for a sandbox one (from a test key's referral). Live events go to your live endpoints only, and sandbox referral events to your test endpoints only. The membership plan events don't carry it yet.","x-data-class":"public","type":"boolean"},"data":{"type":"object","properties":{},"additionalProperties":{},"description":"The referral and the milestone it reached. Provisional: the key set is not frozen yet, so read it defensively.","x-provisional":true}},"required":["id","object","type","created_at","data"],"not":{"properties":{"api_version":{}},"required":["api_version"]}},{"$ref":"#/components/schemas/ThinEvent"}]}}}},"responses":{"2XX":{"description":"Any 2xx acknowledges the delivery. Anything else, or no answer in 10 seconds, is retried with backoff."}},"x-data-class":"borrower_contact"}},"appraisal.completed":{"post":{"operationId":"webhook.appraisal.completed","summary":"Our appraisal report is complete.","description":"Sent with `X-SecondAppraisal-Event: appraisal.completed` and `User-Agent: SecondAppraisal-Webhooks/1.0`. Which body an endpoint is sent is fixed when the endpoint is created, and its `payloadVersion` (`FULL_V1` or `THIN_V2`, in the response that created it and in the endpoint list) says which. A full-payload endpoint, one created before v2 keys and signed credentials opened (the partner security platform's `issue` stage), or created while that stage couldn't be read, is sent the first form: the full envelope, whose `data` is this type's. A thin-payload endpoint, created from `issue` on, is sent the second: `ThinEvent`, the thin event the events feed lists. The headers are the same for both.","parameters":[{"name":"X-SecondAppraisal-Signature","in":"header","required":true,"description":"`t=<unix seconds>,v1=<hex>`: v1 is HMAC-SHA256 with your endpoint's signing secret over `<t>.<raw body>`. The key is the secret's text for a `whsec_gap_` secret, and its base64-decoded bytes after `whsec_` for a Standard Webhooks secret. Verify it over the exact bytes received, compare in constant time, and refuse an old `t`. During a secret rotation's overlap (1 to 168 hours) it is signed with the previous secret, until you promote the new one or the overlap ends; switch your verifier to the new secret then.","schema":{"type":"string","pattern":"^t=\\d+,v1=[0-9a-f]{64}$"}},{"name":"X-SecondAppraisal-Event","in":"header","required":true,"schema":{"type":"string","const":"appraisal.completed"}},{"name":"X-SecondAppraisal-Delivery","in":"header","required":true,"description":"This delivery's id. A retry of the same delivery repeats it.","schema":{"type":"string"}},{"name":"webhook-id","in":"header","required":false,"description":"Standard Webhooks: sent only when your endpoint's signing secret is a Standard Webhooks one (`whsec_` and base64). The event's id (`evt_…`); a retry repeats it.","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":false,"description":"Standard Webhooks: sent only when your endpoint's signing secret is a Standard Webhooks one. Unix seconds, the same `t` as the signature header's.","schema":{"type":"string","pattern":"^\\d+$"}},{"name":"webhook-signature","in":"header","required":false,"description":"Standard Webhooks: sent only when your endpoint's signing secret is a Standard Webhooks one. `v1,<base64>` for each Standard Webhooks secret in force (during a rotation's overlap, the new one too), separated by spaces: HMAC-SHA256 keyed with the secret's base64-decoded bytes over `<webhook-id>.<webhook-timestamp>.<raw body>`. Any Standard Webhooks library verifies it; accept the delivery if any `v1` matches.","schema":{"type":"string","pattern":"^v1,[A-Za-z0-9+/]{43}=( v1,[A-Za-z0-9+/]{43}=)*$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"description":"A `appraisal.completed` delivery: the full envelope to a full-payload endpoint, `ThinEvent` to a thin-payload one. This object and each object in it carry at least these fields; new fields may be added, so ignore any you don't recognise.","anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"The event id (`evt_…`). A retried delivery repeats it: use it to drop duplicates.","x-data-class":"public"},"object":{"type":"string","const":"event","x-data-class":"public"},"type":{"type":"string","const":"appraisal.completed","x-data-class":"public"},"created_at":{"type":"string","format":"date-time","x-data-class":"public"},"livemode":{"description":"`true` for a live event, `false` for a sandbox one (from a test key's referral). Live events go to your live endpoints only, and sandbox referral events to your test endpoints only. The membership plan events don't carry it yet.","x-data-class":"public","type":"boolean"},"data":{"type":"object","properties":{},"additionalProperties":{},"description":"The referral and the milestone it reached. Provisional: the key set is not frozen yet, so read it defensively.","x-provisional":true}},"required":["id","object","type","created_at","data"],"not":{"properties":{"api_version":{}},"required":["api_version"]}},{"$ref":"#/components/schemas/ThinEvent"}]}}}},"responses":{"2XX":{"description":"Any 2xx acknowledges the delivery. Anything else, or no answer in 10 seconds, is retried with backoff."}},"x-data-class":"borrower_contact"}},"settlement.updated":{"post":{"operationId":"webhook.settlement.updated","summary":"The final settlement was recorded.","description":"Sent with `X-SecondAppraisal-Event: settlement.updated` and `User-Agent: SecondAppraisal-Webhooks/1.0`. Which body an endpoint is sent is fixed when the endpoint is created, and its `payloadVersion` (`FULL_V1` or `THIN_V2`, in the response that created it and in the endpoint list) says which. A full-payload endpoint, one created before v2 keys and signed credentials opened (the partner security platform's `issue` stage), or created while that stage couldn't be read, is sent the first form: the full envelope, whose `data` is this type's. A thin-payload endpoint, created from `issue` on, is sent the second: `ThinEvent`, the thin event the events feed lists. The headers are the same for both.","parameters":[{"name":"X-SecondAppraisal-Signature","in":"header","required":true,"description":"`t=<unix seconds>,v1=<hex>`: v1 is HMAC-SHA256 with your endpoint's signing secret over `<t>.<raw body>`. The key is the secret's text for a `whsec_gap_` secret, and its base64-decoded bytes after `whsec_` for a Standard Webhooks secret. Verify it over the exact bytes received, compare in constant time, and refuse an old `t`. During a secret rotation's overlap (1 to 168 hours) it is signed with the previous secret, until you promote the new one or the overlap ends; switch your verifier to the new secret then.","schema":{"type":"string","pattern":"^t=\\d+,v1=[0-9a-f]{64}$"}},{"name":"X-SecondAppraisal-Event","in":"header","required":true,"schema":{"type":"string","const":"settlement.updated"}},{"name":"X-SecondAppraisal-Delivery","in":"header","required":true,"description":"This delivery's id. A retry of the same delivery repeats it.","schema":{"type":"string"}},{"name":"webhook-id","in":"header","required":false,"description":"Standard Webhooks: sent only when your endpoint's signing secret is a Standard Webhooks one (`whsec_` and base64). The event's id (`evt_…`); a retry repeats it.","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":false,"description":"Standard Webhooks: sent only when your endpoint's signing secret is a Standard Webhooks one. Unix seconds, the same `t` as the signature header's.","schema":{"type":"string","pattern":"^\\d+$"}},{"name":"webhook-signature","in":"header","required":false,"description":"Standard Webhooks: sent only when your endpoint's signing secret is a Standard Webhooks one. `v1,<base64>` for each Standard Webhooks secret in force (during a rotation's overlap, the new one too), separated by spaces: HMAC-SHA256 keyed with the secret's base64-decoded bytes over `<webhook-id>.<webhook-timestamp>.<raw body>`. Any Standard Webhooks library verifies it; accept the delivery if any `v1` matches.","schema":{"type":"string","pattern":"^v1,[A-Za-z0-9+/]{43}=( v1,[A-Za-z0-9+/]{43}=)*$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"description":"A `settlement.updated` delivery: the full envelope to a full-payload endpoint, `ThinEvent` to a thin-payload one. This object and each object in it carry at least these fields; new fields may be added, so ignore any you don't recognise.","anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"The event id (`evt_…`). A retried delivery repeats it: use it to drop duplicates.","x-data-class":"public"},"object":{"type":"string","const":"event","x-data-class":"public"},"type":{"type":"string","const":"settlement.updated","x-data-class":"public"},"created_at":{"type":"string","format":"date-time","x-data-class":"public"},"livemode":{"description":"`true` for a live event, `false` for a sandbox one (from a test key's referral). Live events go to your live endpoints only, and sandbox referral events to your test endpoints only. The membership plan events don't carry it yet.","x-data-class":"public","type":"boolean"},"data":{"$ref":"#/components/schemas/WebhookSettlementData"}},"required":["id","object","type","created_at","data"],"not":{"properties":{"api_version":{}},"required":["api_version"]}},{"$ref":"#/components/schemas/ThinEvent"}]}}}},"responses":{"2XX":{"description":"Any 2xx acknowledges the delivery. Anything else, or no answer in 10 seconds, is retried with backoff."}},"x-data-class":"borrower_contact"}},"charge.created":{"post":{"operationId":"webhook.charge.created","summary":"A charge for the referral was created.","description":"Sent with `X-SecondAppraisal-Event: charge.created` and `User-Agent: SecondAppraisal-Webhooks/1.0`. Which body an endpoint is sent is fixed when the endpoint is created, and its `payloadVersion` (`FULL_V1` or `THIN_V2`, in the response that created it and in the endpoint list) says which. A full-payload endpoint, one created before v2 keys and signed credentials opened (the partner security platform's `issue` stage), or created while that stage couldn't be read, is sent the first form: the full envelope, whose `data` is this type's. A thin-payload endpoint, created from `issue` on, is sent the second: `ThinEvent`, the thin event the events feed lists. The headers are the same for both.","parameters":[{"name":"X-SecondAppraisal-Signature","in":"header","required":true,"description":"`t=<unix seconds>,v1=<hex>`: v1 is HMAC-SHA256 with your endpoint's signing secret over `<t>.<raw body>`. The key is the secret's text for a `whsec_gap_` secret, and its base64-decoded bytes after `whsec_` for a Standard Webhooks secret. Verify it over the exact bytes received, compare in constant time, and refuse an old `t`. During a secret rotation's overlap (1 to 168 hours) it is signed with the previous secret, until you promote the new one or the overlap ends; switch your verifier to the new secret then.","schema":{"type":"string","pattern":"^t=\\d+,v1=[0-9a-f]{64}$"}},{"name":"X-SecondAppraisal-Event","in":"header","required":true,"schema":{"type":"string","const":"charge.created"}},{"name":"X-SecondAppraisal-Delivery","in":"header","required":true,"description":"This delivery's id. A retry of the same delivery repeats it.","schema":{"type":"string"}},{"name":"webhook-id","in":"header","required":false,"description":"Standard Webhooks: sent only when your endpoint's signing secret is a Standard Webhooks one (`whsec_` and base64). The event's id (`evt_…`); a retry repeats it.","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":false,"description":"Standard Webhooks: sent only when your endpoint's signing secret is a Standard Webhooks one. Unix seconds, the same `t` as the signature header's.","schema":{"type":"string","pattern":"^\\d+$"}},{"name":"webhook-signature","in":"header","required":false,"description":"Standard Webhooks: sent only when your endpoint's signing secret is a Standard Webhooks one. `v1,<base64>` for each Standard Webhooks secret in force (during a rotation's overlap, the new one too), separated by spaces: HMAC-SHA256 keyed with the secret's base64-decoded bytes over `<webhook-id>.<webhook-timestamp>.<raw body>`. Any Standard Webhooks library verifies it; accept the delivery if any `v1` matches.","schema":{"type":"string","pattern":"^v1,[A-Za-z0-9+/]{43}=( v1,[A-Za-z0-9+/]{43}=)*$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"description":"A `charge.created` delivery: the full envelope to a full-payload endpoint, `ThinEvent` to a thin-payload one. This object and each object in it carry at least these fields; new fields may be added, so ignore any you don't recognise.","anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"The event id (`evt_…`). A retried delivery repeats it: use it to drop duplicates.","x-data-class":"public"},"object":{"type":"string","const":"event","x-data-class":"public"},"type":{"type":"string","const":"charge.created","x-data-class":"public"},"created_at":{"type":"string","format":"date-time","x-data-class":"public"},"livemode":{"description":"`true` for a live event, `false` for a sandbox one (from a test key's referral). Live events go to your live endpoints only, and sandbox referral events to your test endpoints only. The membership plan events don't carry it yet.","x-data-class":"public","type":"boolean"},"data":{"type":"object","properties":{},"additionalProperties":{},"description":"The referral and the charge (`id`, `amount_cents`, `status`). A charge on a referral whose borrower withdrew permission to report its progress still comes, with the referral as every read shows it: `status: reporting_withdrawn` and no progress. Provisional: the key set is not frozen yet, so read it defensively.","x-provisional":true}},"required":["id","object","type","created_at","data"],"not":{"properties":{"api_version":{}},"required":["api_version"]}},{"$ref":"#/components/schemas/ThinEvent"}]}}}},"responses":{"2XX":{"description":"Any 2xx acknowledges the delivery. Anything else, or no answer in 10 seconds, is retried with backoff."}},"x-data-class":"borrower_contact"}},"plan.enrollment.activated":{"post":{"operationId":"webhook.plan.enrollment.activated","summary":"A membership enrollment became active.","description":"Sent with `X-SecondAppraisal-Event: plan.enrollment.activated` and `User-Agent: SecondAppraisal-Webhooks/1.0`. Which body an endpoint is sent is fixed when the endpoint is created, and its `payloadVersion` (`FULL_V1` or `THIN_V2`, in the response that created it and in the endpoint list) says which. A full-payload endpoint, one created before v2 keys and signed credentials opened (the partner security platform's `issue` stage), or created while that stage couldn't be read, is sent the first form: the full envelope, whose `data` is this type's. A thin-payload endpoint, created from `issue` on, is sent the second: `ThinEvent`, the thin event the events feed lists. The headers are the same for both.","parameters":[{"name":"X-SecondAppraisal-Signature","in":"header","required":true,"description":"`t=<unix seconds>,v1=<hex>`: v1 is HMAC-SHA256 with your endpoint's signing secret over `<t>.<raw body>`. The key is the secret's text for a `whsec_gap_` secret, and its base64-decoded bytes after `whsec_` for a Standard Webhooks secret. Verify it over the exact bytes received, compare in constant time, and refuse an old `t`. During a secret rotation's overlap (1 to 168 hours) it is signed with the previous secret, until you promote the new one or the overlap ends; switch your verifier to the new secret then.","schema":{"type":"string","pattern":"^t=\\d+,v1=[0-9a-f]{64}$"}},{"name":"X-SecondAppraisal-Event","in":"header","required":true,"schema":{"type":"string","const":"plan.enrollment.activated"}},{"name":"X-SecondAppraisal-Delivery","in":"header","required":true,"description":"This delivery's id. A retry of the same delivery repeats it.","schema":{"type":"string"}},{"name":"webhook-id","in":"header","required":false,"description":"Standard Webhooks: sent only when your endpoint's signing secret is a Standard Webhooks one (`whsec_` and base64). The event's id (`evt_…`); a retry repeats it.","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":false,"description":"Standard Webhooks: sent only when your endpoint's signing secret is a Standard Webhooks one. Unix seconds, the same `t` as the signature header's.","schema":{"type":"string","pattern":"^\\d+$"}},{"name":"webhook-signature","in":"header","required":false,"description":"Standard Webhooks: sent only when your endpoint's signing secret is a Standard Webhooks one. `v1,<base64>` for each Standard Webhooks secret in force (during a rotation's overlap, the new one too), separated by spaces: HMAC-SHA256 keyed with the secret's base64-decoded bytes over `<webhook-id>.<webhook-timestamp>.<raw body>`. Any Standard Webhooks library verifies it; accept the delivery if any `v1` matches.","schema":{"type":"string","pattern":"^v1,[A-Za-z0-9+/]{43}=( v1,[A-Za-z0-9+/]{43}=)*$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"description":"A `plan.enrollment.activated` delivery: the full envelope to a full-payload endpoint, `ThinEvent` to a thin-payload one. This object and each object in it carry at least these fields; new fields may be added, so ignore any you don't recognise.","anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"The event id (`evt_…`). A retried delivery repeats it: use it to drop duplicates.","x-data-class":"public"},"object":{"type":"string","const":"event","x-data-class":"public"},"type":{"type":"string","const":"plan.enrollment.activated","x-data-class":"public"},"created_at":{"type":"string","format":"date-time","x-data-class":"public"},"livemode":{"description":"`true` for a live event, `false` for a sandbox one (from a test key's referral). Live events go to your live endpoints only, and sandbox referral events to your test endpoints only. The membership plan events don't carry it yet.","x-data-class":"public","type":"boolean"},"data":{"type":"object","properties":{},"additionalProperties":{},"description":"The enrollment's id, VIN, external_ref, status and dates; never the member's contact details. Provisional: the key set is not frozen yet, so read it defensively.","x-provisional":true}},"required":["id","object","type","created_at","data"],"not":{"properties":{"api_version":{}},"required":["api_version"]}},{"$ref":"#/components/schemas/ThinEvent"}]}}}},"responses":{"2XX":{"description":"Any 2xx acknowledges the delivery. Anything else, or no answer in 10 seconds, is retried with backoff."}},"x-data-class":"borrower_personal"}},"plan.enrollment.past_due":{"post":{"operationId":"webhook.plan.enrollment.past_due","summary":"A direct-collect membership's renewal is failing.","description":"Sent with `X-SecondAppraisal-Event: plan.enrollment.past_due` and `User-Agent: SecondAppraisal-Webhooks/1.0`. Which body an endpoint is sent is fixed when the endpoint is created, and its `payloadVersion` (`FULL_V1` or `THIN_V2`, in the response that created it and in the endpoint list) says which. A full-payload endpoint, one created before v2 keys and signed credentials opened (the partner security platform's `issue` stage), or created while that stage couldn't be read, is sent the first form: the full envelope, whose `data` is this type's. A thin-payload endpoint, created from `issue` on, is sent the second: `ThinEvent`, the thin event the events feed lists. The headers are the same for both.","parameters":[{"name":"X-SecondAppraisal-Signature","in":"header","required":true,"description":"`t=<unix seconds>,v1=<hex>`: v1 is HMAC-SHA256 with your endpoint's signing secret over `<t>.<raw body>`. The key is the secret's text for a `whsec_gap_` secret, and its base64-decoded bytes after `whsec_` for a Standard Webhooks secret. Verify it over the exact bytes received, compare in constant time, and refuse an old `t`. During a secret rotation's overlap (1 to 168 hours) it is signed with the previous secret, until you promote the new one or the overlap ends; switch your verifier to the new secret then.","schema":{"type":"string","pattern":"^t=\\d+,v1=[0-9a-f]{64}$"}},{"name":"X-SecondAppraisal-Event","in":"header","required":true,"schema":{"type":"string","const":"plan.enrollment.past_due"}},{"name":"X-SecondAppraisal-Delivery","in":"header","required":true,"description":"This delivery's id. A retry of the same delivery repeats it.","schema":{"type":"string"}},{"name":"webhook-id","in":"header","required":false,"description":"Standard Webhooks: sent only when your endpoint's signing secret is a Standard Webhooks one (`whsec_` and base64). The event's id (`evt_…`); a retry repeats it.","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":false,"description":"Standard Webhooks: sent only when your endpoint's signing secret is a Standard Webhooks one. Unix seconds, the same `t` as the signature header's.","schema":{"type":"string","pattern":"^\\d+$"}},{"name":"webhook-signature","in":"header","required":false,"description":"Standard Webhooks: sent only when your endpoint's signing secret is a Standard Webhooks one. `v1,<base64>` for each Standard Webhooks secret in force (during a rotation's overlap, the new one too), separated by spaces: HMAC-SHA256 keyed with the secret's base64-decoded bytes over `<webhook-id>.<webhook-timestamp>.<raw body>`. Any Standard Webhooks library verifies it; accept the delivery if any `v1` matches.","schema":{"type":"string","pattern":"^v1,[A-Za-z0-9+/]{43}=( v1,[A-Za-z0-9+/]{43}=)*$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"description":"A `plan.enrollment.past_due` delivery: the full envelope to a full-payload endpoint, `ThinEvent` to a thin-payload one. This object and each object in it carry at least these fields; new fields may be added, so ignore any you don't recognise.","anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"The event id (`evt_…`). A retried delivery repeats it: use it to drop duplicates.","x-data-class":"public"},"object":{"type":"string","const":"event","x-data-class":"public"},"type":{"type":"string","const":"plan.enrollment.past_due","x-data-class":"public"},"created_at":{"type":"string","format":"date-time","x-data-class":"public"},"livemode":{"description":"`true` for a live event, `false` for a sandbox one (from a test key's referral). Live events go to your live endpoints only, and sandbox referral events to your test endpoints only. The membership plan events don't carry it yet.","x-data-class":"public","type":"boolean"},"data":{"type":"object","properties":{},"additionalProperties":{},"description":"The enrollment's id, VIN, external_ref, status and dates; never the member's contact details. Provisional: the key set is not frozen yet, so read it defensively.","x-provisional":true}},"required":["id","object","type","created_at","data"],"not":{"properties":{"api_version":{}},"required":["api_version"]}},{"$ref":"#/components/schemas/ThinEvent"}]}}}},"responses":{"2XX":{"description":"Any 2xx acknowledges the delivery. Anything else, or no answer in 10 seconds, is retried with backoff."}},"x-data-class":"borrower_personal"}},"plan.enrollment.cancelled":{"post":{"operationId":"webhook.plan.enrollment.cancelled","summary":"A membership enrollment was cancelled or lapsed.","description":"Sent with `X-SecondAppraisal-Event: plan.enrollment.cancelled` and `User-Agent: SecondAppraisal-Webhooks/1.0`. Which body an endpoint is sent is fixed when the endpoint is created, and its `payloadVersion` (`FULL_V1` or `THIN_V2`, in the response that created it and in the endpoint list) says which. A full-payload endpoint, one created before v2 keys and signed credentials opened (the partner security platform's `issue` stage), or created while that stage couldn't be read, is sent the first form: the full envelope, whose `data` is this type's. A thin-payload endpoint, created from `issue` on, is sent the second: `ThinEvent`, the thin event the events feed lists. The headers are the same for both.","parameters":[{"name":"X-SecondAppraisal-Signature","in":"header","required":true,"description":"`t=<unix seconds>,v1=<hex>`: v1 is HMAC-SHA256 with your endpoint's signing secret over `<t>.<raw body>`. The key is the secret's text for a `whsec_gap_` secret, and its base64-decoded bytes after `whsec_` for a Standard Webhooks secret. Verify it over the exact bytes received, compare in constant time, and refuse an old `t`. During a secret rotation's overlap (1 to 168 hours) it is signed with the previous secret, until you promote the new one or the overlap ends; switch your verifier to the new secret then.","schema":{"type":"string","pattern":"^t=\\d+,v1=[0-9a-f]{64}$"}},{"name":"X-SecondAppraisal-Event","in":"header","required":true,"schema":{"type":"string","const":"plan.enrollment.cancelled"}},{"name":"X-SecondAppraisal-Delivery","in":"header","required":true,"description":"This delivery's id. A retry of the same delivery repeats it.","schema":{"type":"string"}},{"name":"webhook-id","in":"header","required":false,"description":"Standard Webhooks: sent only when your endpoint's signing secret is a Standard Webhooks one (`whsec_` and base64). The event's id (`evt_…`); a retry repeats it.","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":false,"description":"Standard Webhooks: sent only when your endpoint's signing secret is a Standard Webhooks one. Unix seconds, the same `t` as the signature header's.","schema":{"type":"string","pattern":"^\\d+$"}},{"name":"webhook-signature","in":"header","required":false,"description":"Standard Webhooks: sent only when your endpoint's signing secret is a Standard Webhooks one. `v1,<base64>` for each Standard Webhooks secret in force (during a rotation's overlap, the new one too), separated by spaces: HMAC-SHA256 keyed with the secret's base64-decoded bytes over `<webhook-id>.<webhook-timestamp>.<raw body>`. Any Standard Webhooks library verifies it; accept the delivery if any `v1` matches.","schema":{"type":"string","pattern":"^v1,[A-Za-z0-9+/]{43}=( v1,[A-Za-z0-9+/]{43}=)*$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"description":"A `plan.enrollment.cancelled` delivery: the full envelope to a full-payload endpoint, `ThinEvent` to a thin-payload one. This object and each object in it carry at least these fields; new fields may be added, so ignore any you don't recognise.","anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"The event id (`evt_…`). A retried delivery repeats it: use it to drop duplicates.","x-data-class":"public"},"object":{"type":"string","const":"event","x-data-class":"public"},"type":{"type":"string","const":"plan.enrollment.cancelled","x-data-class":"public"},"created_at":{"type":"string","format":"date-time","x-data-class":"public"},"livemode":{"description":"`true` for a live event, `false` for a sandbox one (from a test key's referral). Live events go to your live endpoints only, and sandbox referral events to your test endpoints only. The membership plan events don't carry it yet.","x-data-class":"public","type":"boolean"},"data":{"type":"object","properties":{},"additionalProperties":{},"description":"The enrollment's id, VIN, external_ref, status and dates; never the member's contact details. Provisional: the key set is not frozen yet, so read it defensively.","x-provisional":true}},"required":["id","object","type","created_at","data"],"not":{"properties":{"api_version":{}},"required":["api_version"]}},{"$ref":"#/components/schemas/ThinEvent"}]}}}},"responses":{"2XX":{"description":"Any 2xx acknowledges the delivery. Anything else, or no answer in 10 seconds, is retried with backoff."}},"x-data-class":"borrower_personal"}},"plan.benefit.redeemed":{"post":{"operationId":"webhook.plan.benefit.redeemed","summary":"A member's consultation was drawn against their membership.","description":"Sent with `X-SecondAppraisal-Event: plan.benefit.redeemed` and `User-Agent: SecondAppraisal-Webhooks/1.0`. Which body an endpoint is sent is fixed when the endpoint is created, and its `payloadVersion` (`FULL_V1` or `THIN_V2`, in the response that created it and in the endpoint list) says which. A full-payload endpoint, one created before v2 keys and signed credentials opened (the partner security platform's `issue` stage), or created while that stage couldn't be read, is sent the first form: the full envelope, whose `data` is this type's. A thin-payload endpoint, created from `issue` on, is sent the second: `ThinEvent`, the thin event the events feed lists. The headers are the same for both.","parameters":[{"name":"X-SecondAppraisal-Signature","in":"header","required":true,"description":"`t=<unix seconds>,v1=<hex>`: v1 is HMAC-SHA256 with your endpoint's signing secret over `<t>.<raw body>`. The key is the secret's text for a `whsec_gap_` secret, and its base64-decoded bytes after `whsec_` for a Standard Webhooks secret. Verify it over the exact bytes received, compare in constant time, and refuse an old `t`. During a secret rotation's overlap (1 to 168 hours) it is signed with the previous secret, until you promote the new one or the overlap ends; switch your verifier to the new secret then.","schema":{"type":"string","pattern":"^t=\\d+,v1=[0-9a-f]{64}$"}},{"name":"X-SecondAppraisal-Event","in":"header","required":true,"schema":{"type":"string","const":"plan.benefit.redeemed"}},{"name":"X-SecondAppraisal-Delivery","in":"header","required":true,"description":"This delivery's id. A retry of the same delivery repeats it.","schema":{"type":"string"}},{"name":"webhook-id","in":"header","required":false,"description":"Standard Webhooks: sent only when your endpoint's signing secret is a Standard Webhooks one (`whsec_` and base64). The event's id (`evt_…`); a retry repeats it.","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":false,"description":"Standard Webhooks: sent only when your endpoint's signing secret is a Standard Webhooks one. Unix seconds, the same `t` as the signature header's.","schema":{"type":"string","pattern":"^\\d+$"}},{"name":"webhook-signature","in":"header","required":false,"description":"Standard Webhooks: sent only when your endpoint's signing secret is a Standard Webhooks one. `v1,<base64>` for each Standard Webhooks secret in force (during a rotation's overlap, the new one too), separated by spaces: HMAC-SHA256 keyed with the secret's base64-decoded bytes over `<webhook-id>.<webhook-timestamp>.<raw body>`. Any Standard Webhooks library verifies it; accept the delivery if any `v1` matches.","schema":{"type":"string","pattern":"^v1,[A-Za-z0-9+/]{43}=( v1,[A-Za-z0-9+/]{43}=)*$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"description":"A `plan.benefit.redeemed` delivery: the full envelope to a full-payload endpoint, `ThinEvent` to a thin-payload one. This object and each object in it carry at least these fields; new fields may be added, so ignore any you don't recognise.","anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"The event id (`evt_…`). A retried delivery repeats it: use it to drop duplicates.","x-data-class":"public"},"object":{"type":"string","const":"event","x-data-class":"public"},"type":{"type":"string","const":"plan.benefit.redeemed","x-data-class":"public"},"created_at":{"type":"string","format":"date-time","x-data-class":"public"},"livemode":{"description":"`true` for a live event, `false` for a sandbox one (from a test key's referral). Live events go to your live endpoints only, and sandbox referral events to your test endpoints only. The membership plan events don't carry it yet.","x-data-class":"public","type":"boolean"},"data":{"type":"object","properties":{},"additionalProperties":{},"description":"The enrollment, the redemption id and the consultation number. Not sent once the borrower withdrew permission to report the progress of the referral the redemption names. Provisional: the key set is not frozen yet, so read it defensively.","x-provisional":true}},"required":["id","object","type","created_at","data"],"not":{"properties":{"api_version":{}},"required":["api_version"]}},{"$ref":"#/components/schemas/ThinEvent"}]}}}},"responses":{"2XX":{"description":"Any 2xx acknowledges the delivery. Anything else, or no answer in 10 seconds, is retried with backoff."}},"x-data-class":"borrower_personal"}},"plan.benefit.completed":{"post":{"operationId":"webhook.plan.benefit.completed","summary":"A member consultation finished.","description":"Sent with `X-SecondAppraisal-Event: plan.benefit.completed` and `User-Agent: SecondAppraisal-Webhooks/1.0`. Which body an endpoint is sent is fixed when the endpoint is created, and its `payloadVersion` (`FULL_V1` or `THIN_V2`, in the response that created it and in the endpoint list) says which. A full-payload endpoint, one created before v2 keys and signed credentials opened (the partner security platform's `issue` stage), or created while that stage couldn't be read, is sent the first form: the full envelope, whose `data` is this type's. A thin-payload endpoint, created from `issue` on, is sent the second: `ThinEvent`, the thin event the events feed lists. The headers are the same for both.","parameters":[{"name":"X-SecondAppraisal-Signature","in":"header","required":true,"description":"`t=<unix seconds>,v1=<hex>`: v1 is HMAC-SHA256 with your endpoint's signing secret over `<t>.<raw body>`. The key is the secret's text for a `whsec_gap_` secret, and its base64-decoded bytes after `whsec_` for a Standard Webhooks secret. Verify it over the exact bytes received, compare in constant time, and refuse an old `t`. During a secret rotation's overlap (1 to 168 hours) it is signed with the previous secret, until you promote the new one or the overlap ends; switch your verifier to the new secret then.","schema":{"type":"string","pattern":"^t=\\d+,v1=[0-9a-f]{64}$"}},{"name":"X-SecondAppraisal-Event","in":"header","required":true,"schema":{"type":"string","const":"plan.benefit.completed"}},{"name":"X-SecondAppraisal-Delivery","in":"header","required":true,"description":"This delivery's id. A retry of the same delivery repeats it.","schema":{"type":"string"}},{"name":"webhook-id","in":"header","required":false,"description":"Standard Webhooks: sent only when your endpoint's signing secret is a Standard Webhooks one (`whsec_` and base64). The event's id (`evt_…`); a retry repeats it.","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":false,"description":"Standard Webhooks: sent only when your endpoint's signing secret is a Standard Webhooks one. Unix seconds, the same `t` as the signature header's.","schema":{"type":"string","pattern":"^\\d+$"}},{"name":"webhook-signature","in":"header","required":false,"description":"Standard Webhooks: sent only when your endpoint's signing secret is a Standard Webhooks one. `v1,<base64>` for each Standard Webhooks secret in force (during a rotation's overlap, the new one too), separated by spaces: HMAC-SHA256 keyed with the secret's base64-decoded bytes over `<webhook-id>.<webhook-timestamp>.<raw body>`. Any Standard Webhooks library verifies it; accept the delivery if any `v1` matches.","schema":{"type":"string","pattern":"^v1,[A-Za-z0-9+/]{43}=( v1,[A-Za-z0-9+/]{43}=)*$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"description":"A `plan.benefit.completed` delivery: the full envelope to a full-payload endpoint, `ThinEvent` to a thin-payload one. This object and each object in it carry at least these fields; new fields may be added, so ignore any you don't recognise.","anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"The event id (`evt_…`). A retried delivery repeats it: use it to drop duplicates.","x-data-class":"public"},"object":{"type":"string","const":"event","x-data-class":"public"},"type":{"type":"string","const":"plan.benefit.completed","x-data-class":"public"},"created_at":{"type":"string","format":"date-time","x-data-class":"public"},"livemode":{"description":"`true` for a live event, `false` for a sandbox one (from a test key's referral). Live events go to your live endpoints only, and sandbox referral events to your test endpoints only. The membership plan events don't carry it yet.","x-data-class":"public","type":"boolean"},"data":{"type":"object","properties":{},"additionalProperties":{},"description":"The enrollment, the redemption id and the outcome. Not sent once the borrower withdrew permission to report the progress of the referral the redemption names. Provisional: the key set is not frozen yet, so read it defensively.","x-provisional":true}},"required":["id","object","type","created_at","data"],"not":{"properties":{"api_version":{}},"required":["api_version"]}},{"$ref":"#/components/schemas/ThinEvent"}]}}}},"responses":{"2XX":{"description":"Any 2xx acknowledges the delivery. Anything else, or no answer in 10 seconds, is retried with backoff."}},"x-data-class":"borrower_personal"}},"plan.statement.issued":{"post":{"operationId":"webhook.plan.statement.issued","summary":"A monthly membership statement was issued.","description":"Sent with `X-SecondAppraisal-Event: plan.statement.issued` and `User-Agent: SecondAppraisal-Webhooks/1.0`. Which body an endpoint is sent is fixed when the endpoint is created, and its `payloadVersion` (`FULL_V1` or `THIN_V2`, in the response that created it and in the endpoint list) says which. A full-payload endpoint, one created before v2 keys and signed credentials opened (the partner security platform's `issue` stage), or created while that stage couldn't be read, is sent the first form: the full envelope, whose `data` is this type's. A thin-payload endpoint, created from `issue` on, is sent the second: `ThinEvent`, the thin event the events feed lists. The headers are the same for both.","parameters":[{"name":"X-SecondAppraisal-Signature","in":"header","required":true,"description":"`t=<unix seconds>,v1=<hex>`: v1 is HMAC-SHA256 with your endpoint's signing secret over `<t>.<raw body>`. The key is the secret's text for a `whsec_gap_` secret, and its base64-decoded bytes after `whsec_` for a Standard Webhooks secret. Verify it over the exact bytes received, compare in constant time, and refuse an old `t`. During a secret rotation's overlap (1 to 168 hours) it is signed with the previous secret, until you promote the new one or the overlap ends; switch your verifier to the new secret then.","schema":{"type":"string","pattern":"^t=\\d+,v1=[0-9a-f]{64}$"}},{"name":"X-SecondAppraisal-Event","in":"header","required":true,"schema":{"type":"string","const":"plan.statement.issued"}},{"name":"X-SecondAppraisal-Delivery","in":"header","required":true,"description":"This delivery's id. A retry of the same delivery repeats it.","schema":{"type":"string"}},{"name":"webhook-id","in":"header","required":false,"description":"Standard Webhooks: sent only when your endpoint's signing secret is a Standard Webhooks one (`whsec_` and base64). The event's id (`evt_…`); a retry repeats it.","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":false,"description":"Standard Webhooks: sent only when your endpoint's signing secret is a Standard Webhooks one. Unix seconds, the same `t` as the signature header's.","schema":{"type":"string","pattern":"^\\d+$"}},{"name":"webhook-signature","in":"header","required":false,"description":"Standard Webhooks: sent only when your endpoint's signing secret is a Standard Webhooks one. `v1,<base64>` for each Standard Webhooks secret in force (during a rotation's overlap, the new one too), separated by spaces: HMAC-SHA256 keyed with the secret's base64-decoded bytes over `<webhook-id>.<webhook-timestamp>.<raw body>`. Any Standard Webhooks library verifies it; accept the delivery if any `v1` matches.","schema":{"type":"string","pattern":"^v1,[A-Za-z0-9+/]{43}=( v1,[A-Za-z0-9+/]{43}=)*$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"description":"A `plan.statement.issued` delivery: the full envelope to a full-payload endpoint, `ThinEvent` to a thin-payload one. This object and each object in it carry at least these fields; new fields may be added, so ignore any you don't recognise.","anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"The event id (`evt_…`). A retried delivery repeats it: use it to drop duplicates.","x-data-class":"public"},"object":{"type":"string","const":"event","x-data-class":"public"},"type":{"type":"string","const":"plan.statement.issued","x-data-class":"public"},"created_at":{"type":"string","format":"date-time","x-data-class":"public"},"livemode":{"description":"`true` for a live event, `false` for a sandbox one (from a test key's referral). Live events go to your live endpoints only, and sandbox referral events to your test endpoints only. The membership plan events don't carry it yet.","x-data-class":"public","type":"boolean"},"data":{"type":"object","properties":{},"additionalProperties":{},"description":"The statement, as the statements operation returns it. Provisional: the key set is not frozen yet, so read it defensively.","x-provisional":true}},"required":["id","object","type","created_at","data"],"not":{"properties":{"api_version":{}},"required":["api_version"]}},{"$ref":"#/components/schemas/ThinEvent"}]}}}},"responses":{"2XX":{"description":"Any 2xx acknowledges the delivery. Anything else, or no answer in 10 seconds, is retried with backoff."}},"x-data-class":"institution_confidential"}},"review.completed":{"post":{"operationId":"webhook.review.completed","summary":"The referral's review completed: its review record has a new version.","description":"Sent with `X-SecondAppraisal-Event: review.completed` and `User-Agent: SecondAppraisal-Webhooks/1.0`. Which body an endpoint is sent is fixed when the endpoint is created, and its `payloadVersion` (`FULL_V1` or `THIN_V2`, in the response that created it and in the endpoint list) says which. A full-payload endpoint, one created before v2 keys and signed credentials opened (the partner security platform's `issue` stage), or created while that stage couldn't be read, is sent the first form: the full envelope, whose `data` is this type's. A thin-payload endpoint, created from `issue` on, is sent the second: `ThinEvent`, the thin event the events feed lists. The headers are the same for both.","parameters":[{"name":"X-SecondAppraisal-Signature","in":"header","required":true,"description":"`t=<unix seconds>,v1=<hex>`: v1 is HMAC-SHA256 with your endpoint's signing secret over `<t>.<raw body>`. The key is the secret's text for a `whsec_gap_` secret, and its base64-decoded bytes after `whsec_` for a Standard Webhooks secret. Verify it over the exact bytes received, compare in constant time, and refuse an old `t`. During a secret rotation's overlap (1 to 168 hours) it is signed with the previous secret, until you promote the new one or the overlap ends; switch your verifier to the new secret then.","schema":{"type":"string","pattern":"^t=\\d+,v1=[0-9a-f]{64}$"}},{"name":"X-SecondAppraisal-Event","in":"header","required":true,"schema":{"type":"string","const":"review.completed"}},{"name":"X-SecondAppraisal-Delivery","in":"header","required":true,"description":"This delivery's id. A retry of the same delivery repeats it.","schema":{"type":"string"}},{"name":"webhook-id","in":"header","required":false,"description":"Standard Webhooks: sent only when your endpoint's signing secret is a Standard Webhooks one (`whsec_` and base64). The event's id (`evt_…`); a retry repeats it.","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":false,"description":"Standard Webhooks: sent only when your endpoint's signing secret is a Standard Webhooks one. Unix seconds, the same `t` as the signature header's.","schema":{"type":"string","pattern":"^\\d+$"}},{"name":"webhook-signature","in":"header","required":false,"description":"Standard Webhooks: sent only when your endpoint's signing secret is a Standard Webhooks one. `v1,<base64>` for each Standard Webhooks secret in force (during a rotation's overlap, the new one too), separated by spaces: HMAC-SHA256 keyed with the secret's base64-decoded bytes over `<webhook-id>.<webhook-timestamp>.<raw body>`. Any Standard Webhooks library verifies it; accept the delivery if any `v1` matches.","schema":{"type":"string","pattern":"^v1,[A-Za-z0-9+/]{43}=( v1,[A-Za-z0-9+/]{43}=)*$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"description":"A `review.completed` delivery: the full envelope to a full-payload endpoint, `ThinEvent` to a thin-payload one. This object and each object in it carry at least these fields; new fields may be added, so ignore any you don't recognise.","anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"The event id (`evt_…`). A retried delivery repeats it: use it to drop duplicates.","x-data-class":"public"},"object":{"type":"string","const":"event","x-data-class":"public"},"type":{"type":"string","const":"review.completed","x-data-class":"public"},"created_at":{"type":"string","format":"date-time","x-data-class":"public"},"livemode":{"description":"`true` for a live event, `false` for a sandbox one (from a test key's referral). Live events go to your live endpoints only, and sandbox referral events to your test endpoints only. The membership plan events don't carry it yet.","x-data-class":"public","type":"boolean"},"data":{"$ref":"#/components/schemas/WebhookReviewRecordData"}},"required":["id","object","type","created_at","data"],"not":{"properties":{"api_version":{}},"required":["api_version"]}},{"$ref":"#/components/schemas/ThinEvent"}]}}}},"responses":{"2XX":{"description":"Any 2xx acknowledges the delivery. Anything else, or no answer in 10 seconds, is retried with backoff."}},"x-data-class":"institution_confidential"}},"review.updated":{"post":{"operationId":"webhook.review.updated","summary":"A review record already complete or closed has a new version.","description":"Sent with `X-SecondAppraisal-Event: review.updated` and `User-Agent: SecondAppraisal-Webhooks/1.0`. Which body an endpoint is sent is fixed when the endpoint is created, and its `payloadVersion` (`FULL_V1` or `THIN_V2`, in the response that created it and in the endpoint list) says which. A full-payload endpoint, one created before v2 keys and signed credentials opened (the partner security platform's `issue` stage), or created while that stage couldn't be read, is sent the first form: the full envelope, whose `data` is this type's. A thin-payload endpoint, created from `issue` on, is sent the second: `ThinEvent`, the thin event the events feed lists. The headers are the same for both.","parameters":[{"name":"X-SecondAppraisal-Signature","in":"header","required":true,"description":"`t=<unix seconds>,v1=<hex>`: v1 is HMAC-SHA256 with your endpoint's signing secret over `<t>.<raw body>`. The key is the secret's text for a `whsec_gap_` secret, and its base64-decoded bytes after `whsec_` for a Standard Webhooks secret. Verify it over the exact bytes received, compare in constant time, and refuse an old `t`. During a secret rotation's overlap (1 to 168 hours) it is signed with the previous secret, until you promote the new one or the overlap ends; switch your verifier to the new secret then.","schema":{"type":"string","pattern":"^t=\\d+,v1=[0-9a-f]{64}$"}},{"name":"X-SecondAppraisal-Event","in":"header","required":true,"schema":{"type":"string","const":"review.updated"}},{"name":"X-SecondAppraisal-Delivery","in":"header","required":true,"description":"This delivery's id. A retry of the same delivery repeats it.","schema":{"type":"string"}},{"name":"webhook-id","in":"header","required":false,"description":"Standard Webhooks: sent only when your endpoint's signing secret is a Standard Webhooks one (`whsec_` and base64). The event's id (`evt_…`); a retry repeats it.","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":false,"description":"Standard Webhooks: sent only when your endpoint's signing secret is a Standard Webhooks one. Unix seconds, the same `t` as the signature header's.","schema":{"type":"string","pattern":"^\\d+$"}},{"name":"webhook-signature","in":"header","required":false,"description":"Standard Webhooks: sent only when your endpoint's signing secret is a Standard Webhooks one. `v1,<base64>` for each Standard Webhooks secret in force (during a rotation's overlap, the new one too), separated by spaces: HMAC-SHA256 keyed with the secret's base64-decoded bytes over `<webhook-id>.<webhook-timestamp>.<raw body>`. Any Standard Webhooks library verifies it; accept the delivery if any `v1` matches.","schema":{"type":"string","pattern":"^v1,[A-Za-z0-9+/]{43}=( v1,[A-Za-z0-9+/]{43}=)*$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"description":"A `review.updated` delivery: the full envelope to a full-payload endpoint, `ThinEvent` to a thin-payload one. This object and each object in it carry at least these fields; new fields may be added, so ignore any you don't recognise.","anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"The event id (`evt_…`). A retried delivery repeats it: use it to drop duplicates.","x-data-class":"public"},"object":{"type":"string","const":"event","x-data-class":"public"},"type":{"type":"string","const":"review.updated","x-data-class":"public"},"created_at":{"type":"string","format":"date-time","x-data-class":"public"},"livemode":{"description":"`true` for a live event, `false` for a sandbox one (from a test key's referral). Live events go to your live endpoints only, and sandbox referral events to your test endpoints only. The membership plan events don't carry it yet.","x-data-class":"public","type":"boolean"},"data":{"$ref":"#/components/schemas/WebhookReviewRecordData"}},"required":["id","object","type","created_at","data"],"not":{"properties":{"api_version":{}},"required":["api_version"]}},{"$ref":"#/components/schemas/ThinEvent"}]}}}},"responses":{"2XX":{"description":"Any 2xx acknowledges the delivery. Anything else, or no answer in 10 seconds, is retried with backoff."}},"x-data-class":"institution_confidential"}},"referral.closed":{"post":{"operationId":"webhook.referral.closed","summary":"The referral closed: its review record's new version gives the close reason.","description":"Sent with `X-SecondAppraisal-Event: referral.closed` and `User-Agent: SecondAppraisal-Webhooks/1.0`. Which body an endpoint is sent is fixed when the endpoint is created, and its `payloadVersion` (`FULL_V1` or `THIN_V2`, in the response that created it and in the endpoint list) says which. A full-payload endpoint, one created before v2 keys and signed credentials opened (the partner security platform's `issue` stage), or created while that stage couldn't be read, is sent the first form: the full envelope, whose `data` is this type's. A thin-payload endpoint, created from `issue` on, is sent the second: `ThinEvent`, the thin event the events feed lists. The headers are the same for both.","parameters":[{"name":"X-SecondAppraisal-Signature","in":"header","required":true,"description":"`t=<unix seconds>,v1=<hex>`: v1 is HMAC-SHA256 with your endpoint's signing secret over `<t>.<raw body>`. The key is the secret's text for a `whsec_gap_` secret, and its base64-decoded bytes after `whsec_` for a Standard Webhooks secret. Verify it over the exact bytes received, compare in constant time, and refuse an old `t`. During a secret rotation's overlap (1 to 168 hours) it is signed with the previous secret, until you promote the new one or the overlap ends; switch your verifier to the new secret then.","schema":{"type":"string","pattern":"^t=\\d+,v1=[0-9a-f]{64}$"}},{"name":"X-SecondAppraisal-Event","in":"header","required":true,"schema":{"type":"string","const":"referral.closed"}},{"name":"X-SecondAppraisal-Delivery","in":"header","required":true,"description":"This delivery's id. A retry of the same delivery repeats it.","schema":{"type":"string"}},{"name":"webhook-id","in":"header","required":false,"description":"Standard Webhooks: sent only when your endpoint's signing secret is a Standard Webhooks one (`whsec_` and base64). The event's id (`evt_…`); a retry repeats it.","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":false,"description":"Standard Webhooks: sent only when your endpoint's signing secret is a Standard Webhooks one. Unix seconds, the same `t` as the signature header's.","schema":{"type":"string","pattern":"^\\d+$"}},{"name":"webhook-signature","in":"header","required":false,"description":"Standard Webhooks: sent only when your endpoint's signing secret is a Standard Webhooks one. `v1,<base64>` for each Standard Webhooks secret in force (during a rotation's overlap, the new one too), separated by spaces: HMAC-SHA256 keyed with the secret's base64-decoded bytes over `<webhook-id>.<webhook-timestamp>.<raw body>`. Any Standard Webhooks library verifies it; accept the delivery if any `v1` matches.","schema":{"type":"string","pattern":"^v1,[A-Za-z0-9+/]{43}=( v1,[A-Za-z0-9+/]{43}=)*$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"description":"A `referral.closed` delivery: the full envelope to a full-payload endpoint, `ThinEvent` to a thin-payload one. This object and each object in it carry at least these fields; new fields may be added, so ignore any you don't recognise.","anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"The event id (`evt_…`). A retried delivery repeats it: use it to drop duplicates.","x-data-class":"public"},"object":{"type":"string","const":"event","x-data-class":"public"},"type":{"type":"string","const":"referral.closed","x-data-class":"public"},"created_at":{"type":"string","format":"date-time","x-data-class":"public"},"livemode":{"description":"`true` for a live event, `false` for a sandbox one (from a test key's referral). Live events go to your live endpoints only, and sandbox referral events to your test endpoints only. The membership plan events don't carry it yet.","x-data-class":"public","type":"boolean"},"data":{"$ref":"#/components/schemas/WebhookReviewRecordData"}},"required":["id","object","type","created_at","data"],"not":{"properties":{"api_version":{}},"required":["api_version"]}},{"$ref":"#/components/schemas/ThinEvent"}]}}}},"responses":{"2XX":{"description":"Any 2xx acknowledges the delivery. Anything else, or no answer in 10 seconds, is retried with backoff."}},"x-data-class":"institution_confidential"}},"charge.paid":{"post":{"operationId":"webhook.charge.paid","summary":"A charge for the referral was paid. A bank debit counts once it settles, not while it is processing.","description":"Sent with `X-SecondAppraisal-Event: charge.paid` and `User-Agent: SecondAppraisal-Webhooks/1.0`. Which body an endpoint is sent is fixed when the endpoint is created, and its `payloadVersion` (`FULL_V1` or `THIN_V2`, in the response that created it and in the endpoint list) says which. A full-payload endpoint, one created before v2 keys and signed credentials opened (the partner security platform's `issue` stage), or created while that stage couldn't be read, is sent the first form: the full envelope, whose `data` is this type's. A thin-payload endpoint, created from `issue` on, is sent the second: `ThinEvent`, the thin event the events feed lists. The headers are the same for both.","parameters":[{"name":"X-SecondAppraisal-Signature","in":"header","required":true,"description":"`t=<unix seconds>,v1=<hex>`: v1 is HMAC-SHA256 with your endpoint's signing secret over `<t>.<raw body>`. The key is the secret's text for a `whsec_gap_` secret, and its base64-decoded bytes after `whsec_` for a Standard Webhooks secret. Verify it over the exact bytes received, compare in constant time, and refuse an old `t`. During a secret rotation's overlap (1 to 168 hours) it is signed with the previous secret, until you promote the new one or the overlap ends; switch your verifier to the new secret then.","schema":{"type":"string","pattern":"^t=\\d+,v1=[0-9a-f]{64}$"}},{"name":"X-SecondAppraisal-Event","in":"header","required":true,"schema":{"type":"string","const":"charge.paid"}},{"name":"X-SecondAppraisal-Delivery","in":"header","required":true,"description":"This delivery's id. A retry of the same delivery repeats it.","schema":{"type":"string"}},{"name":"webhook-id","in":"header","required":false,"description":"Standard Webhooks: sent only when your endpoint's signing secret is a Standard Webhooks one (`whsec_` and base64). The event's id (`evt_…`); a retry repeats it.","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":false,"description":"Standard Webhooks: sent only when your endpoint's signing secret is a Standard Webhooks one. Unix seconds, the same `t` as the signature header's.","schema":{"type":"string","pattern":"^\\d+$"}},{"name":"webhook-signature","in":"header","required":false,"description":"Standard Webhooks: sent only when your endpoint's signing secret is a Standard Webhooks one. `v1,<base64>` for each Standard Webhooks secret in force (during a rotation's overlap, the new one too), separated by spaces: HMAC-SHA256 keyed with the secret's base64-decoded bytes over `<webhook-id>.<webhook-timestamp>.<raw body>`. Any Standard Webhooks library verifies it; accept the delivery if any `v1` matches.","schema":{"type":"string","pattern":"^v1,[A-Za-z0-9+/]{43}=( v1,[A-Za-z0-9+/]{43}=)*$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"description":"A `charge.paid` delivery: the full envelope to a full-payload endpoint, `ThinEvent` to a thin-payload one. This object and each object in it carry at least these fields; new fields may be added, so ignore any you don't recognise.","anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"The event id (`evt_…`). A retried delivery repeats it: use it to drop duplicates.","x-data-class":"public"},"object":{"type":"string","const":"event","x-data-class":"public"},"type":{"type":"string","const":"charge.paid","x-data-class":"public"},"created_at":{"type":"string","format":"date-time","x-data-class":"public"},"livemode":{"description":"`true` for a live event, `false` for a sandbox one (from a test key's referral). Live events go to your live endpoints only, and sandbox referral events to your test endpoints only. The membership plan events don't carry it yet.","x-data-class":"public","type":"boolean"},"data":{"type":"object","properties":{},"additionalProperties":{},"description":"The referral and the charge (`id`, `amount_cents`, `status`), as `charge.created` sends them. Provisional: the key set is not frozen yet, so read it defensively.","x-provisional":true}},"required":["id","object","type","created_at","data"],"not":{"properties":{"api_version":{}},"required":["api_version"]}},{"$ref":"#/components/schemas/ThinEvent"}]}}}},"responses":{"2XX":{"description":"Any 2xx acknowledges the delivery. Anything else, or no answer in 10 seconds, is retried with backoff."}},"x-data-class":"borrower_contact"}},"charge.failed":{"post":{"operationId":"webhook.charge.failed","summary":"A charge for the referral failed. We retry it, and tell your billing contacts each time.","description":"Sent with `X-SecondAppraisal-Event: charge.failed` and `User-Agent: SecondAppraisal-Webhooks/1.0`. Which body an endpoint is sent is fixed when the endpoint is created, and its `payloadVersion` (`FULL_V1` or `THIN_V2`, in the response that created it and in the endpoint list) says which. A full-payload endpoint, one created before v2 keys and signed credentials opened (the partner security platform's `issue` stage), or created while that stage couldn't be read, is sent the first form: the full envelope, whose `data` is this type's. A thin-payload endpoint, created from `issue` on, is sent the second: `ThinEvent`, the thin event the events feed lists. The headers are the same for both.","parameters":[{"name":"X-SecondAppraisal-Signature","in":"header","required":true,"description":"`t=<unix seconds>,v1=<hex>`: v1 is HMAC-SHA256 with your endpoint's signing secret over `<t>.<raw body>`. The key is the secret's text for a `whsec_gap_` secret, and its base64-decoded bytes after `whsec_` for a Standard Webhooks secret. Verify it over the exact bytes received, compare in constant time, and refuse an old `t`. During a secret rotation's overlap (1 to 168 hours) it is signed with the previous secret, until you promote the new one or the overlap ends; switch your verifier to the new secret then.","schema":{"type":"string","pattern":"^t=\\d+,v1=[0-9a-f]{64}$"}},{"name":"X-SecondAppraisal-Event","in":"header","required":true,"schema":{"type":"string","const":"charge.failed"}},{"name":"X-SecondAppraisal-Delivery","in":"header","required":true,"description":"This delivery's id. A retry of the same delivery repeats it.","schema":{"type":"string"}},{"name":"webhook-id","in":"header","required":false,"description":"Standard Webhooks: sent only when your endpoint's signing secret is a Standard Webhooks one (`whsec_` and base64). The event's id (`evt_…`); a retry repeats it.","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":false,"description":"Standard Webhooks: sent only when your endpoint's signing secret is a Standard Webhooks one. Unix seconds, the same `t` as the signature header's.","schema":{"type":"string","pattern":"^\\d+$"}},{"name":"webhook-signature","in":"header","required":false,"description":"Standard Webhooks: sent only when your endpoint's signing secret is a Standard Webhooks one. `v1,<base64>` for each Standard Webhooks secret in force (during a rotation's overlap, the new one too), separated by spaces: HMAC-SHA256 keyed with the secret's base64-decoded bytes over `<webhook-id>.<webhook-timestamp>.<raw body>`. Any Standard Webhooks library verifies it; accept the delivery if any `v1` matches.","schema":{"type":"string","pattern":"^v1,[A-Za-z0-9+/]{43}=( v1,[A-Za-z0-9+/]{43}=)*$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"description":"A `charge.failed` delivery: the full envelope to a full-payload endpoint, `ThinEvent` to a thin-payload one. This object and each object in it carry at least these fields; new fields may be added, so ignore any you don't recognise.","anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"The event id (`evt_…`). A retried delivery repeats it: use it to drop duplicates.","x-data-class":"public"},"object":{"type":"string","const":"event","x-data-class":"public"},"type":{"type":"string","const":"charge.failed","x-data-class":"public"},"created_at":{"type":"string","format":"date-time","x-data-class":"public"},"livemode":{"description":"`true` for a live event, `false` for a sandbox one (from a test key's referral). Live events go to your live endpoints only, and sandbox referral events to your test endpoints only. The membership plan events don't carry it yet.","x-data-class":"public","type":"boolean"},"data":{"type":"object","properties":{},"additionalProperties":{},"description":"The referral and the charge (`id`, `amount_cents`, `status`). No failure reason or card detail. Provisional: the key set is not frozen yet, so read it defensively.","x-provisional":true}},"required":["id","object","type","created_at","data"],"not":{"properties":{"api_version":{}},"required":["api_version"]}},{"$ref":"#/components/schemas/ThinEvent"}]}}}},"responses":{"2XX":{"description":"Any 2xx acknowledges the delivery. Anything else, or no answer in 10 seconds, is retried with backoff."}},"x-data-class":"borrower_contact"}},"charge.refunded":{"post":{"operationId":"webhook.charge.refunded","summary":"A charge for the referral was refunded, in full or in part.","description":"Sent with `X-SecondAppraisal-Event: charge.refunded` and `User-Agent: SecondAppraisal-Webhooks/1.0`. Which body an endpoint is sent is fixed when the endpoint is created, and its `payloadVersion` (`FULL_V1` or `THIN_V2`, in the response that created it and in the endpoint list) says which. A full-payload endpoint, one created before v2 keys and signed credentials opened (the partner security platform's `issue` stage), or created while that stage couldn't be read, is sent the first form: the full envelope, whose `data` is this type's. A thin-payload endpoint, created from `issue` on, is sent the second: `ThinEvent`, the thin event the events feed lists. The headers are the same for both.","parameters":[{"name":"X-SecondAppraisal-Signature","in":"header","required":true,"description":"`t=<unix seconds>,v1=<hex>`: v1 is HMAC-SHA256 with your endpoint's signing secret over `<t>.<raw body>`. The key is the secret's text for a `whsec_gap_` secret, and its base64-decoded bytes after `whsec_` for a Standard Webhooks secret. Verify it over the exact bytes received, compare in constant time, and refuse an old `t`. During a secret rotation's overlap (1 to 168 hours) it is signed with the previous secret, until you promote the new one or the overlap ends; switch your verifier to the new secret then.","schema":{"type":"string","pattern":"^t=\\d+,v1=[0-9a-f]{64}$"}},{"name":"X-SecondAppraisal-Event","in":"header","required":true,"schema":{"type":"string","const":"charge.refunded"}},{"name":"X-SecondAppraisal-Delivery","in":"header","required":true,"description":"This delivery's id. A retry of the same delivery repeats it.","schema":{"type":"string"}},{"name":"webhook-id","in":"header","required":false,"description":"Standard Webhooks: sent only when your endpoint's signing secret is a Standard Webhooks one (`whsec_` and base64). The event's id (`evt_…`); a retry repeats it.","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":false,"description":"Standard Webhooks: sent only when your endpoint's signing secret is a Standard Webhooks one. Unix seconds, the same `t` as the signature header's.","schema":{"type":"string","pattern":"^\\d+$"}},{"name":"webhook-signature","in":"header","required":false,"description":"Standard Webhooks: sent only when your endpoint's signing secret is a Standard Webhooks one. `v1,<base64>` for each Standard Webhooks secret in force (during a rotation's overlap, the new one too), separated by spaces: HMAC-SHA256 keyed with the secret's base64-decoded bytes over `<webhook-id>.<webhook-timestamp>.<raw body>`. Any Standard Webhooks library verifies it; accept the delivery if any `v1` matches.","schema":{"type":"string","pattern":"^v1,[A-Za-z0-9+/]{43}=( v1,[A-Za-z0-9+/]{43}=)*$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"description":"A `charge.refunded` delivery: the full envelope to a full-payload endpoint, `ThinEvent` to a thin-payload one. This object and each object in it carry at least these fields; new fields may be added, so ignore any you don't recognise.","anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"The event id (`evt_…`). A retried delivery repeats it: use it to drop duplicates.","x-data-class":"public"},"object":{"type":"string","const":"event","x-data-class":"public"},"type":{"type":"string","const":"charge.refunded","x-data-class":"public"},"created_at":{"type":"string","format":"date-time","x-data-class":"public"},"livemode":{"description":"`true` for a live event, `false` for a sandbox one (from a test key's referral). Live events go to your live endpoints only, and sandbox referral events to your test endpoints only. The membership plan events don't carry it yet.","x-data-class":"public","type":"boolean"},"data":{"type":"object","properties":{},"additionalProperties":{},"description":"The referral and the charge (`id`, `amount_cents`, `status`, `refunded_cents`). Provisional: the key set is not frozen yet, so read it defensively.","x-provisional":true}},"required":["id","object","type","created_at","data"],"not":{"properties":{"api_version":{}},"required":["api_version"]}},{"$ref":"#/components/schemas/ThinEvent"}]}}}},"responses":{"2XX":{"description":"Any 2xx acknowledges the delivery. Anything else, or no answer in 10 seconds, is retried with backoff."}},"x-data-class":"borrower_contact"}},"charge.voided":{"post":{"operationId":"webhook.charge.voided","summary":"A charge for the referral was voided. It will not be collected.","description":"Sent with `X-SecondAppraisal-Event: charge.voided` and `User-Agent: SecondAppraisal-Webhooks/1.0`. Which body an endpoint is sent is fixed when the endpoint is created, and its `payloadVersion` (`FULL_V1` or `THIN_V2`, in the response that created it and in the endpoint list) says which. A full-payload endpoint, one created before v2 keys and signed credentials opened (the partner security platform's `issue` stage), or created while that stage couldn't be read, is sent the first form: the full envelope, whose `data` is this type's. A thin-payload endpoint, created from `issue` on, is sent the second: `ThinEvent`, the thin event the events feed lists. The headers are the same for both.","parameters":[{"name":"X-SecondAppraisal-Signature","in":"header","required":true,"description":"`t=<unix seconds>,v1=<hex>`: v1 is HMAC-SHA256 with your endpoint's signing secret over `<t>.<raw body>`. The key is the secret's text for a `whsec_gap_` secret, and its base64-decoded bytes after `whsec_` for a Standard Webhooks secret. Verify it over the exact bytes received, compare in constant time, and refuse an old `t`. During a secret rotation's overlap (1 to 168 hours) it is signed with the previous secret, until you promote the new one or the overlap ends; switch your verifier to the new secret then.","schema":{"type":"string","pattern":"^t=\\d+,v1=[0-9a-f]{64}$"}},{"name":"X-SecondAppraisal-Event","in":"header","required":true,"schema":{"type":"string","const":"charge.voided"}},{"name":"X-SecondAppraisal-Delivery","in":"header","required":true,"description":"This delivery's id. A retry of the same delivery repeats it.","schema":{"type":"string"}},{"name":"webhook-id","in":"header","required":false,"description":"Standard Webhooks: sent only when your endpoint's signing secret is a Standard Webhooks one (`whsec_` and base64). The event's id (`evt_…`); a retry repeats it.","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":false,"description":"Standard Webhooks: sent only when your endpoint's signing secret is a Standard Webhooks one. Unix seconds, the same `t` as the signature header's.","schema":{"type":"string","pattern":"^\\d+$"}},{"name":"webhook-signature","in":"header","required":false,"description":"Standard Webhooks: sent only when your endpoint's signing secret is a Standard Webhooks one. `v1,<base64>` for each Standard Webhooks secret in force (during a rotation's overlap, the new one too), separated by spaces: HMAC-SHA256 keyed with the secret's base64-decoded bytes over `<webhook-id>.<webhook-timestamp>.<raw body>`. Any Standard Webhooks library verifies it; accept the delivery if any `v1` matches.","schema":{"type":"string","pattern":"^v1,[A-Za-z0-9+/]{43}=( v1,[A-Za-z0-9+/]{43}=)*$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"description":"A `charge.voided` delivery: the full envelope to a full-payload endpoint, `ThinEvent` to a thin-payload one. This object and each object in it carry at least these fields; new fields may be added, so ignore any you don't recognise.","anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"The event id (`evt_…`). A retried delivery repeats it: use it to drop duplicates.","x-data-class":"public"},"object":{"type":"string","const":"event","x-data-class":"public"},"type":{"type":"string","const":"charge.voided","x-data-class":"public"},"created_at":{"type":"string","format":"date-time","x-data-class":"public"},"livemode":{"description":"`true` for a live event, `false` for a sandbox one (from a test key's referral). Live events go to your live endpoints only, and sandbox referral events to your test endpoints only. The membership plan events don't carry it yet.","x-data-class":"public","type":"boolean"},"data":{"type":"object","properties":{},"additionalProperties":{},"description":"The referral and the charge (`id`, `amount_cents`, `status`). Provisional: the key set is not frozen yet, so read it defensively.","x-provisional":true}},"required":["id","object","type","created_at","data"],"not":{"properties":{"api_version":{}},"required":["api_version"]}},{"$ref":"#/components/schemas/ThinEvent"}]}}}},"responses":{"2XX":{"description":"Any 2xx acknowledges the delivery. Anything else, or no answer in 10 seconds, is retried with backoff."}},"x-data-class":"borrower_contact"}},"webhook.verification":{"post":{"operationId":"webhook.webhook.verification","summary":"Sent when you verify an endpoint: answer with its challenge.","description":"Sent with `X-SecondAppraisal-Event: webhook.verification` and `User-Agent: SecondAppraisal-Webhooks/1.0`, only when you ask for it on the API page, to that one endpoint. No endpoint subscribes to it, and the events feed never lists it. Which body an endpoint is sent follows its `payloadVersion` (`FULL_V1` or `THIN_V2`), as for every event: a full-payload endpoint is sent `WebhookVerificationEvent`, a thin-payload endpoint `WebhookVerificationThinEvent`. The headers are the same for both.","parameters":[{"name":"X-SecondAppraisal-Signature","in":"header","required":true,"description":"`t=<unix seconds>,v1=<hex>`: v1 is HMAC-SHA256 with your endpoint's signing secret over `<t>.<raw body>`. The key is the secret's text for a `whsec_gap_` secret, and its base64-decoded bytes after `whsec_` for a Standard Webhooks secret. Verify it over the exact bytes received, compare in constant time, and refuse an old `t`. During a secret rotation's overlap (1 to 168 hours) it is signed with the previous secret, until you promote the new one or the overlap ends; switch your verifier to the new secret then.","schema":{"type":"string","pattern":"^t=\\d+,v1=[0-9a-f]{64}$"}},{"name":"X-SecondAppraisal-Event","in":"header","required":true,"schema":{"type":"string","const":"webhook.verification"}},{"name":"X-SecondAppraisal-Delivery","in":"header","required":true,"description":"A one-time id (`whv_…`). Verification and test events are never retried.","schema":{"type":"string"}},{"name":"webhook-id","in":"header","required":false,"description":"Standard Webhooks: sent only when your endpoint's signing secret is a Standard Webhooks one (`whsec_` and base64). The event's id (`evt_…`), new for every send: verification and test events are never retried.","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":false,"description":"Standard Webhooks: sent only when your endpoint's signing secret is a Standard Webhooks one. Unix seconds, the same `t` as the signature header's.","schema":{"type":"string","pattern":"^\\d+$"}},{"name":"webhook-signature","in":"header","required":false,"description":"Standard Webhooks: sent only when your endpoint's signing secret is a Standard Webhooks one. `v1,<base64>` for each Standard Webhooks secret in force (during a rotation's overlap, the new one too), separated by spaces: HMAC-SHA256 keyed with the secret's base64-decoded bytes over `<webhook-id>.<webhook-timestamp>.<raw body>`. Any Standard Webhooks library verifies it; accept the delivery if any `v1` matches.","schema":{"type":"string","pattern":"^v1,[A-Za-z0-9+/]{43}=( v1,[A-Za-z0-9+/]{43}=)*$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"description":"A `webhook.verification` event: `WebhookVerificationEvent` to a full-payload endpoint, `WebhookVerificationThinEvent` to a thin-payload one. This object and each object in it carry at least these fields; new fields may be added, so ignore any you don't recognise.","anyOf":[{"type":"object","allOf":[{"$ref":"#/components/schemas/WebhookVerificationEvent"}],"not":{"properties":{"api_version":{}},"required":["api_version"]}},{"$ref":"#/components/schemas/WebhookVerificationThinEvent"}]}}}},"responses":{"2XX":{"description":"Answer within 10 seconds with any 2xx and exactly the body `{\"challenge\": \"<data.challenge>\"}` (whitespace aside), or exactly the challenge itself, to verify the endpoint. A body that only contains the challenge, such as your request echoed back, doesn't verify it, and any other answer leaves the endpoint off. A verification event is never retried: send a new challenge from the API page, or enter this one there from your receiver's log within 15 minutes."}},"x-data-class":"institution_confidential"}},"webhook.test":{"post":{"operationId":"webhook.webhook.test","summary":"Sent when you ask for a test event. It carries no referral or borrower data.","description":"Sent with `X-SecondAppraisal-Event: webhook.test` and `User-Agent: SecondAppraisal-Webhooks/1.0`, only when you ask for it on the API page, to that one endpoint. No endpoint subscribes to it, and the events feed never lists it. Which body an endpoint is sent follows its `payloadVersion` (`FULL_V1` or `THIN_V2`), as for every event: a full-payload endpoint is sent `WebhookTestEvent`, a thin-payload endpoint `WebhookTestThinEvent`. The headers are the same for both.","parameters":[{"name":"X-SecondAppraisal-Signature","in":"header","required":true,"description":"`t=<unix seconds>,v1=<hex>`: v1 is HMAC-SHA256 with your endpoint's signing secret over `<t>.<raw body>`. The key is the secret's text for a `whsec_gap_` secret, and its base64-decoded bytes after `whsec_` for a Standard Webhooks secret. Verify it over the exact bytes received, compare in constant time, and refuse an old `t`. During a secret rotation's overlap (1 to 168 hours) it is signed with the previous secret, until you promote the new one or the overlap ends; switch your verifier to the new secret then.","schema":{"type":"string","pattern":"^t=\\d+,v1=[0-9a-f]{64}$"}},{"name":"X-SecondAppraisal-Event","in":"header","required":true,"schema":{"type":"string","const":"webhook.test"}},{"name":"X-SecondAppraisal-Delivery","in":"header","required":true,"description":"A one-time id (`wht_…`). Verification and test events are never retried.","schema":{"type":"string"}},{"name":"webhook-id","in":"header","required":false,"description":"Standard Webhooks: sent only when your endpoint's signing secret is a Standard Webhooks one (`whsec_` and base64). The event's id (`evt_…`), new for every send: verification and test events are never retried.","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":false,"description":"Standard Webhooks: sent only when your endpoint's signing secret is a Standard Webhooks one. Unix seconds, the same `t` as the signature header's.","schema":{"type":"string","pattern":"^\\d+$"}},{"name":"webhook-signature","in":"header","required":false,"description":"Standard Webhooks: sent only when your endpoint's signing secret is a Standard Webhooks one. `v1,<base64>` for each Standard Webhooks secret in force (during a rotation's overlap, the new one too), separated by spaces: HMAC-SHA256 keyed with the secret's base64-decoded bytes over `<webhook-id>.<webhook-timestamp>.<raw body>`. Any Standard Webhooks library verifies it; accept the delivery if any `v1` matches.","schema":{"type":"string","pattern":"^v1,[A-Za-z0-9+/]{43}=( v1,[A-Za-z0-9+/]{43}=)*$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"description":"A `webhook.test` event: `WebhookTestEvent` to a full-payload endpoint, `WebhookTestThinEvent` to a thin-payload one. This object and each object in it carry at least these fields; new fields may be added, so ignore any you don't recognise.","anyOf":[{"type":"object","allOf":[{"$ref":"#/components/schemas/WebhookTestEvent"}],"not":{"properties":{"api_version":{}},"required":["api_version"]}},{"$ref":"#/components/schemas/WebhookTestThinEvent"}]}}}},"responses":{"2XX":{"description":"Any answer is shown on the API page with its status, and changes nothing. A test event is never retried, whatever you answer."}},"x-data-class":"institution_confidential"}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Your API key from the portal's API page: `Authorization: Bearer <key>`. `GET /api/gap/v1/me` answers any key, live or test, with what it is, what it may do and when it expires. A key, which the portal issues once keys open, is `sa_live_` or `sa_test_`, then 30 letters and digits and a 6-character checksum; a key whose checksum doesn't match gets 401 `missing_api_key` before any lookup, and so does a legacy `sa_gap_` key, which the API no longer accepts. A key holds only the permissions chosen when it was created, from a preset (Intake only, Intake + status, Reporting, Membership roster) or one by one: each operation names the permission it needs in `x-required-permission`, and a key without it gets 403 `permission_denied`. If keys can't be checked just now, the call gets 503 `credentials_unavailable`; retry after the seconds in `Retry-After`. Every key reaches the events feed, which lists each event type only to a key holding that type's permission, and an event's referral, beyond its id, only to a key holding `referrals:read`. Test keys (`sa_test_...`) work only with the membership plan operations, the disclosure script preview (`POST /api/gap/v1/referrals/disclosure-preview`), `GET /api/gap/v1/me` and the events feed's plan events until the referral sandbox opens: until then a referral or analytics call with one gets 403 `test_key_referrals_unavailable`. Once it opens, a test key reaches sandbox referrals only, and a live key never sees them. A test key expires at most 90 days after it is created, and a live key at most 365 days after; an expired key gets 401 `api_key_expired`. Each key may make 300 reads, 120 writes and 12 bulk calls a minute (`x-rate-class`); over that is 429 with `Retry-After`. A signed credential sends no bearer key: it signs each request instead (`signedRequest`). An institution can ask us to accept signed requests only: from then a call with an API key gets 401 `signed_requests_required`. A key, bearer or signed, can hold an IP allowlist: a call from an address outside it, as our edge saw it, gets 403 `ip_not_allowed`. A request that carries a `Signature-Input` header is read as a signed one, whatever else it carries, so a bearer call must carry none: with one, even a valid key's call gets 401 `signature_profile_invalid`. Such a call counts as failed authentication from your address, so past the limit it can be 429 `auth_failures_throttled`. Don't let a proxy, gateway or agent add an HTTP message signature of its own to your bearer calls."},"signedRequest":{"type":"apiKey","in":"header","name":"Signature","description":"A signed credential: the institution's own Ed25519 or ECDSA P-256 public key, registered in the portal as a JWK or a `BEGIN PUBLIC KEY` PEM (for P-256, a named-curve (prime256v1) SubjectPublicKeyInfo with an uncompressed point), signing every request with RFC 9421 HTTP Message Signatures and RFC 9530 Content-Digest (the gap-v2 profile). It holds the permissions chosen when it was registered, as a v2 key does, and expires as one does. A new credential is activated by one signed `POST /api/gap/v1/credentials/{id}/verify`; until then any other call gets 401 `credential_not_activated`. Each request carries `Signature-Input` and `Signature` (one signature, labelled `sa`), `X-SA-Environment` (`TEST` for a test credential, `PRODUCTION` for a live one) and no `Authorization` header: a request carrying both credentials is ambiguous, and is 401 `signature_profile_invalid` however valid either is. The signature covers `@method` and `@target-uri`, then `content-digest` and `idempotency-key` on POST and PATCH, `idempotency-key` on GET and HEAD whenever it is sent, then `x-sa-environment`. Its parameters are `created` (unix seconds), `nonce` (16 to 128 of `A-Z a-z 0-9 _ -`, new for every request), `keyid` (the credential's id), `alg` (`ed25519` or `ecdsa-p256-sha256`, the credential's own) and `tag=\"gap-v2\"`, in that order. `@target-uri` is `https://`, the host you called in lower case (`secondappraisal.com`, `gap.secondappraisal.com` or `lenders.secondappraisal.com`), then the path and query of the request URL as a WHATWG URL parser serializes it (`new URL()` in JavaScript), which is how we read every request: never the request line as your client wrote it. Percent-encode each query value with RFC 3986's unreserved characters only (a `'` is `%27`), percent-encode non-ASCII as its UTF-8 bytes, and send no empty `?` and no `.` or `..` path segment; a percent-escape you send is kept as sent, its hex digits' case included. On a signed request `Idempotency-Key` is 1 to 255 visible ASCII characters (`!` to `~`), no spaces. `Content-Digest` is `sha-256=:<base64>:` over the exact body bytes, a string's as UTF-8. An Ed25519 signature is its 64 bytes; a P-256 signature is the 64-byte r||s, never DER. Both are sent as `sa=:<base64>:`. `created` must be within 300 seconds before our clock and 30 after it. A nonce is used once per credential: it is spent when the signature has verified, the body has matched `Content-Digest`, the request has come from an address the credential's IP allowlist holds (when it holds one) and the credential was within its rate limit, whatever the request is then answered. A 403 `ip_not_allowed`, a 503 `credentials_unavailable` because the allowlist couldn't be decided, a 429 `rate_limited`, or a 503 `platform_standby` because the nonce itself couldn't be written, leaves it unspent. A retry is signed again, with a new nonce and the same `Idempotency-Key`. Refused before any credential is looked up: 401 `signature_profile_invalid`, `signature_expired` or `target_uri_not_allowed`. Refused the same way whatever failed: 401 `signature_invalid`, before any byte of the body is read, or once the signature verifies, for a body that doesn't match `Content-Digest`. Either counts as failed authentication from your address, a revoked credential's included, so past the limit it can be 429 `auth_failures_throttled`, and neither spends the nonce. Then, in order: 413 `payload_too_large` or 400 `invalid_json` for a body too large or too slow to arrive, which spends nothing either; 403 `ip_not_allowed` for an address outside the credential's IP allowlist, or 503 `credentials_unavailable` when the allowlist can't be decided, which spend nothing either; 429 `rate_limited`; 409 `signature_replay` for a nonce already used; 401 `api_key_expired`, `credential_not_activated` or `environment_mismatch`."}},"headers":{"X-Request-Id":{"description":"This request's id (`req_` and 32 hex characters). Every response the API itself produces carries it; quote it when you write to business@secondappraisal.com. The platform's 503 during a failover has none.","schema":{"type":"string","pattern":"^req_[0-9a-f]{32}$"}},"Cache-Control":{"description":"`private, no-store` on every response the API itself produces, except this document's, which is `public, max-age=3600`.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying: until the rate-limit window lets this key through again (429 `rate_limited`), until failed authentications from your address are back under their limit (429 `auth_failures_throttled`), until v2 keys can be checked again (503 `credentials_unavailable`), until the partner security stage can be read again (503 `request_refused`, on a live referral), until a failover has moved on (503 `platform_standby`), or before sending a roster again while another roster commit for your institution and mode is being applied (409 `roster_commit_in_progress`).","schema":{"type":"integer","minimum":0}},"RateLimit":{"description":"Sent on the responses to every key and signed credential. It is optional, so a client must work without it. What is left of each limit `RateLimit-Policy` names, in the form of the IETF RateLimit header fields draft (draft-ietf-httpapi-ratelimit-headers): the requests still available (`r`), and the seconds within which no more than those may be made (`t`). After a 429, wait as `Retry-After` says.","required":false,"schema":{"type":"string"}},"RateLimit-Policy":{"description":"Sent on the responses to every key and signed credential. It is optional, so a client must work without it. The limits this call's key is held to (`x-rate-class`), in the form of the IETF RateLimit header fields draft (draft-ietf-httpapi-ratelimit-headers): each limit by name, with its quota of requests (`q`) and its window in seconds (`w`).","required":false,"schema":{"type":"string"}},"Deprecation":{"description":"RFC 9745: when the operation was deprecated, as `@<unix seconds>`.","schema":{"type":"string"}},"Sunset":{"description":"RFC 8594: when the operation stops answering (an HTTP date).","schema":{"type":"string"}},"Link":{"description":"`rel=\"deprecation\"`: where the migration is described.","schema":{"type":"string"}}},"schemas":{"AnalyticsReport":{"type":"object","properties":{"object":{"type":"string","const":"gap.analytics","x-data-class":"public"},"filters":{"type":"object","properties":{"from":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The `from` you sent, as an instant.","x-data-class":"public"},"to":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The `to` you sent, as an instant.","x-data-class":"public"}},"required":["from","to"]},"funnel":{"type":"object","properties":{"submitted":{"type":"integer","x-data-class":"institution_confidential"},"awaiting_activation":{"type":"integer","x-data-class":"institution_confidential"},"active":{"type":"integer","x-data-class":"institution_confidential"},"settled":{"type":"integer","x-data-class":"institution_confidential"},"declined":{"type":"integer","x-data-class":"institution_confidential"},"unreachable":{"type":"integer","x-data-class":"institution_confidential"},"expired":{"type":"integer","x-data-class":"institution_confidential"},"cancelled":{"type":"integer","x-data-class":"institution_confidential"},"reporting_withdrawn":{"type":"integer","description":"Referrals whose borrower withdrew permission to report their progress to you: counted here and in `submitted`, never under a later status, in `activation_rate` or among the outcomes.","x-data-class":"institution_confidential"},"activation_rate":{"description":"Activated ÷ (activated + closed without activation), 0 to 1; null before any referral closes.","x-data-class":"institution_confidential","type":["number","null"]}},"required":["submitted","awaiting_activation","active","settled","declined","unreachable","expired","cancelled","reporting_withdrawn","activation_rate"]},"outcomes":{"type":"object","properties":{"settled_referrals":{"type":"integer","description":"The referrals in the range that have settled.","x-data-class":"institution_confidential"},"total_uplift_cents":{"type":"integer","x-data-class":"borrower_personal"},"avg_uplift_cents":{"x-data-class":"borrower_personal","type":["integer","null"]},"total_exposure_before_cents":{"description":"The settled referrals' estimated exposure before the review, summed over those with both exposure figures: each one's loan payoff minus the insurer's first offer. Your institution determines its GAP benefit under its own contract.","x-data-class":"borrower_personal","x-requires-permission":"referrals.contact:read","type":["integer","null"]},"total_exposure_after_cents":{"description":"Those referrals' estimated exposure at settlement, summed: each one's loan payoff minus the insurer's final settlement. Your institution determines its GAP benefit under its own contract.","x-data-class":"borrower_personal","x-requires-permission":"referrals.contact:read","type":["integer","null"]},"total_exposure_reduction_cents":{"description":"Estimated exposure reduced (loan payoff minus the insurer's figure) on those referrals: `total_exposure_before_cents` minus `total_exposure_after_cents`. Your institution determines its GAP benefit under its own contract.","x-data-class":"borrower_personal","x-requires-permission":"referrals.contact:read","type":["integer","null"]},"avg_exposure_reduction_cents":{"description":"The average estimated exposure reduced (loan payoff minus the insurer's figure) per settled referral with both exposure figures; null with none. Your institution determines its GAP benefit under its own contract.","x-data-class":"borrower_personal","x-requires-permission":"referrals.contact:read","type":["integer","null"]}},"required":["settled_referrals","total_uplift_cents","avg_uplift_cents","total_exposure_before_cents","total_exposure_after_cents","total_exposure_reduction_cents","avg_exposure_reduction_cents"]},"spend":{"type":"object","properties":{"fees_paid_cents":{"type":"integer","description":"Consultation fees committed on the referrals in the range: paid, invoiced or processing, plus what a partial refund kept.","x-data-class":"institution_confidential"},"fees_pending_cents":{"type":"integer","description":"Consultation fees on those referrals still waiting to be charged, such as an invoice institution's fees before the month's invoice run.","x-data-class":"institution_confidential"},"roi_multiple":{"description":"Exposure reduction ÷ fees paid; null without both.","x-data-class":"borrower_personal","x-requires-permission":"referrals.contact:read","type":["number","null"]},"net_savings_cents":{"x-data-class":"borrower_personal","x-requires-permission":"referrals.contact:read","type":["integer","null"]},"fees_on_settled_cents":{"description":"The committed consultation fees, counted as `fees_paid_cents` counts them, on the settled referrals whose exposure reduction is known (a payoff and a first offer on file): set against `outcomes.total_exposure_reduction_cents`, they give those consultations' own net savings. A fee still waiting to be charged is in `fees_pending_cents`. Which referrals count depends on the payoff, so this is null for a key without `referrals.contact:read`.","x-data-class":"borrower_personal","x-requires-permission":"referrals.contact:read","type":["integer","null"]}},"required":["fees_paid_cents","fees_pending_cents","roi_multiple","net_savings_cents","fees_on_settled_cents"]},"by_market":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"The state code or carrier name; `unknown` when the referral has none.","x-data-class":"institution_confidential"},"referrals":{"type":"integer","x-data-class":"institution_confidential"},"settled":{"type":"integer","x-data-class":"institution_confidential"},"uplift_cents":{"type":"integer","x-data-class":"borrower_personal"},"exposure_reduction_cents":{"description":"Estimated exposure reduced (loan payoff minus the insurer's figure) on the row's settled referrals with both exposure figures. Your institution determines its GAP benefit under its own contract.","x-data-class":"borrower_personal","x-requires-permission":"referrals.contact:read","type":["integer","null"]}},"required":["key","referrals","settled","uplift_cents","exposure_reduction_cents"]}},"by_carrier":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"The state code or carrier name; `unknown` when the referral has none.","x-data-class":"institution_confidential"},"referrals":{"type":"integer","x-data-class":"institution_confidential"},"settled":{"type":"integer","x-data-class":"institution_confidential"},"uplift_cents":{"type":"integer","x-data-class":"borrower_personal"},"exposure_reduction_cents":{"description":"Estimated exposure reduced (loan payoff minus the insurer's figure) on the row's settled referrals with both exposure figures. Your institution determines its GAP benefit under its own contract.","x-data-class":"borrower_personal","x-requires-permission":"referrals.contact:read","type":["integer","null"]}},"required":["key","referrals","settled","uplift_cents","exposure_reduction_cents"]}},"time_series":{"type":"array","items":{"type":"object","properties":{"month":{"type":"string","description":"The UTC month, YYYY-MM.","x-data-class":"public"},"submitted":{"type":"integer","x-data-class":"institution_confidential"},"activated":{"type":"integer","x-data-class":"institution_confidential"},"settled":{"type":"integer","x-data-class":"institution_confidential"},"uplift_cents":{"type":"integer","x-data-class":"borrower_personal"},"exposure_reduction_cents":{"description":"Estimated exposure reduced (loan payoff minus the insurer's figure) on the row's settled referrals with both exposure figures. Your institution determines its GAP benefit under its own contract.","x-data-class":"borrower_personal","x-requires-permission":"referrals.contact:read","type":["integer","null"]}},"required":["month","submitted","activated","settled","uplift_cents","exposure_reduction_cents"]}}},"required":["object","filters","funnel","outcomes","spend","by_market","by_carrier","time_series"],"description":"Your referral funnel, settled outcomes, spend and breakdowns by market and carrier: the numbers the portal's Analytics page shows."},"ApiKeyIntrospection":{"type":"object","properties":{"id":{"type":"string","description":"The key's id, the one the portal's API page lists it under.","x-data-class":"institution_confidential"},"object":{"type":"string","const":"gap.api_key","x-data-class":"public"},"prefix":{"type":"string","description":"The key's first characters, as the portal shows them: enough to tell your keys apart, never enough to use one. A signed credential's starts `pk:`, then the start of its public key's thumbprint.","x-data-class":"institution_confidential"},"mode":{"type":"string","enum":["live","test"],"description":"`live`, or `test` for a sandbox key. New values may be added: treat one you don't recognise as unknown, and don't fail.","x-data-class":"public"},"format":{"type":"string","enum":["legacy","v2"],"description":"`v2`: every key (`sa_live_` or `sa_test_`) and signed credential. `legacy`, for an `sa_gap_` key, is no longer sent: the API accepts v2 keys only. New values may be added: treat one you don't recognise as unknown, and don't fail.","x-data-class":"public"},"auth_method":{"type":"string","enum":["secret","public_key"],"description":"`secret`: the key is sent as a bearer token. `public_key`: a signed credential, whose requests are signed with its registered public key's private half. New values may be added: treat one you don't recognise as unknown, and don't fail.","x-data-class":"public"},"permissions":{"type":"array","items":{"type":"string","enum":["referrals:write","referrals:read","referrals.contact:read","reporting:read","plans:read","plans:write","members:activation-link","audit:read"]},"description":"What the key may do: the permissions chosen when it was created. `referrals.contact:read` and `members:activation-link` are field permissions: they open no operation, and a key without one reads null in each field whose `x-requires-permission` names it, in whatever its operations answer. New values may be added: treat one you don't recognise as unknown, and don't fail.","x-data-class":"institution_confidential"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the key stops working.","x-data-class":"institution_confidential"},"institution":{"type":"object","properties":{"id":{"type":"string","description":"Your institution's id.","x-data-class":"institution_confidential"},"status":{"type":"string","enum":["requested","active","suspended","terminated"],"description":"`active`; `requested` before approval; `suspended`, which can read but not write; `terminated`. New values may be added: treat one you don't recognise as unknown, and don't fail.","x-data-class":"public"}},"required":["id","status"]},"allowed_cidr_count":{"type":"integer","minimum":0,"description":"How many address ranges the key's IP allowlist holds; 0 when it has none.","x-data-class":"institution_confidential"}},"required":["id","object","prefix","mode","format","auth_method","permissions","expires_at","institution","allowed_cidr_count"],"description":"The API key that made the call: what it is, what it may do, and when it expires. Never the key itself."},"AuditLogEntry":{"type":"object","properties":{"id":{"type":"string","description":"The entry's id.","x-data-class":"institution_confidential"},"object":{"type":"string","const":"gap.audit_entry","x-data-class":"public"},"occurred_at":{"type":"string","format":"date-time","description":"When the read happened; for refusals folded into one entry, when the first of them did.","x-data-class":"institution_confidential"},"channel":{"type":"string","enum":["api","portal","staff"],"description":"`api`: a call to this API. `portal`: a page or action in your portal. `staff`: a read by SecondAppraisal staff. New values may be added: treat one you don't recognise as unknown, and don't fail.","x-data-class":"public"},"outcome":{"type":"string","enum":["ok","refused","failed_auth","error"],"description":"`ok`; `refused`, answered with a 4xx; `failed_auth`, an API call whose credential didn't authenticate; `error`, answered with a 5xx. New values may be added: treat one you don't recognise as unknown, and don't fail.","x-data-class":"public"},"actor":{"type":"object","properties":{"type":{"type":"string","enum":["member","api_key","secondappraisal_staff","view_as","unknown"],"description":"`member`: one of your portal seats. `api_key`: one of your API keys or signed credentials. `secondappraisal_staff`: our staff. `view_as`: a SecondAppraisal superadmin viewing your portal as one of your seats, never the seat itself. `unknown`: no credential or seat was found. New values may be added: treat one you don't recognise as unknown, and don't fail.","x-data-class":"public"},"label":{"type":"string","description":"Who read, in words: a seat's name or email (`Former team member` once the seat has left), `API key` and its prefix, `SecondAppraisal staff`, `SecondAppraisal superadmin view-as`, or `Unknown`.","x-data-class":"institution_confidential"},"api_key_prefix":{"description":"For `api_key`: the key's prefix, as `GET /api/gap/v1/me` and the portal show it. Null for every other type.","x-data-class":"institution_confidential","type":["string","null"]}},"required":["type","label","api_key_prefix"],"description":"Who made the read."},"operation":{"type":"string","description":"For an API call, its operation id (`listReferrals`); for a portal or staff read, the page or route it came through.","x-data-class":"institution_confidential"},"resource_type":{"description":"The kind of record read, where one was named: for an API call, the operation's tag (`referrals`, `plans`).","x-data-class":"institution_confidential","type":["string","null"]},"resource_id":{"description":"The id of the record read, where one was named.","x-data-class":"institution_confidential","type":["string","null"]},"status":{"description":"The HTTP status answered, where one was.","x-data-class":"public","type":["integer","null"]},"ip":{"description":"The caller's address, as our edge saw it. Null where none was kept, where many refusals from rotating addresses were folded together, and for every `secondappraisal_staff` and `view_as` entry.","x-data-class":"institution_confidential","type":["string","null"]},"occurrences":{"type":"integer","minimum":1,"description":"How many reads the entry stands for: refused and failed-authentication reads in one minute are folded into one entry.","x-data-class":"public"}},"required":["id","object","occurred_at","channel","outcome","actor","operation","resource_type","resource_id","status","ip","occurrences"],"description":"One read of your institution's data, as the access log we keep for you records it. Never a request body or header."},"AuditLogPage":{"type":"object","properties":{"object":{"type":"string","const":"list","x-data-class":"public"},"data":{"type":"array","items":{"$ref":"#/components/schemas/AuditLogEntry"}},"has_more":{"type":"boolean","x-data-class":"public"},"next_cursor":{"description":"Send as `starting_after` for the next page, with the same `from` and `to`; null on the last page.","x-data-class":"institution_confidential","type":["string","null"]}},"required":["object","data","has_more","next_cursor"]},"BulkRowAcknowledgementError":{"type":"object","properties":{"field":{"type":"string","description":"The row's field, `program`, `row` for the row as a whole, or `body` for a row that is not an object.","x-data-class":"public"},"message":{"type":"string","x-data-class":"public"},"code":{"description":"A field-error code (`unknown_field`, `invalid_type`, `required`, `prohibited_field`, …), or a refusal code such as `email_required_sms_disabled`, `script_version_stale`, `billing_required`, `idempotency_key_mode_conflict`, `idempotency_key_reused`, `state_not_served`, `state_not_launched` or `duplicate_referral`.","x-data-class":"public","type":"string"},"state":{"description":"On `state_not_served` and `state_not_launched`: the state judged.","x-data-class":"borrower_personal","type":"string"},"basis":{"description":"On `state_not_served` and `state_not_launched`: `garaged` when the state judged is `garaged_state`, `loss` when it is `loss_state`. New values may be added: treat one you don't recognise as unknown, and don't fail.","x-data-class":"public","type":"string","enum":["garaged","loss"]},"launch_states":{"description":"On `state_not_launched`: the states your launch covers, two-letter codes.","x-data-class":"institution_confidential","type":"array","items":{"type":"string"}}},"required":["field","message"]},"BulkRowError":{"type":"object","properties":{"field":{"type":"string","description":"The row's field, `program`, `row` for the row as a whole, or `body` for a row that is not an object.","x-data-class":"public"},"message":{"type":"string","x-data-class":"public"},"code":{"description":"A field-error code (`unknown_field`, `invalid_type`, `required`, `prohibited_field`, …), or a refusal code such as `email_required_sms_disabled`, `script_version_stale`, `billing_required`, `idempotency_key_mode_conflict`, `idempotency_key_reused`, `state_not_served`, `state_not_launched` or `duplicate_referral`.","x-data-class":"public","type":"string"},"existing_referral_id":{"description":"On `duplicate_referral`: your referral for the same loss. Never sent to a key that doesn't hold `referrals:read`.","x-data-class":"institution_confidential","type":"string"},"state":{"description":"On `state_not_served` and `state_not_launched`: the state judged.","x-data-class":"borrower_personal","type":"string"},"basis":{"description":"On `state_not_served` and `state_not_launched`: `garaged` when the state judged is `garaged_state`, `loss` when it is `loss_state`. New values may be added: treat one you don't recognise as unknown, and don't fail.","x-data-class":"public","type":"string","enum":["garaged","loss"]},"launch_states":{"description":"On `state_not_launched`: the states your launch covers, two-letter codes.","x-data-class":"institution_confidential","type":"array","items":{"type":"string"}}},"required":["field","message"]},"CredentialActivation":{"type":"object","properties":{"id":{"type":"string","description":"The signed credential's id.","x-data-class":"institution_confidential"},"object":{"type":"string","const":"gap.signed_credential","x-data-class":"public"},"mode":{"type":"string","enum":["live","test"],"description":"`live`, or `test` for a sandbox credential. New values may be added: treat one you don't recognise as unknown, and don't fail.","x-data-class":"public"},"alg":{"type":"string","enum":["ed25519","ecdsa-p256-sha256"],"description":"The algorithm its key was registered with, which every signature it makes must name: `ed25519` or `ecdsa-p256-sha256`. New values may be added: treat one you don't recognise as unknown, and don't fail.","x-data-class":"public"},"activated_at":{"type":"string","format":"date-time","description":"When the credential's first verification call succeeded. A later call answers the same time.","x-data-class":"institution_confidential"}},"required":["id","object","mode","alg","activated_at"],"description":"A signed credential, activated: it can sign any call its permissions reach."},"DisclosureInput":{"type":"object","properties":{"confirmed":{"type":"boolean","const":true,"description":"Must be `true`.","x-data-class":"institution_confidential"},"channel":{"type":"string","enum":["phone","in_person","email","video","other"],"description":"How the script was delivered.","x-data-class":"institution_confidential"},"attestor_name":{"type":"string","minLength":1,"maxLength":120,"description":"The name of the person on your staff who delivered the script.","x-data-class":"institution_confidential"},"delivered_on":{"description":"The date the script was delivered; omit for today. At most a day ahead (a timezone ahead of UTC) and no more than 90 days old. Spaces around it are ignored.","x-data-class":"institution_confidential","anyOf":[{"type":"string","format":"date"},{"type":"null"}]},"script_version":{"description":"The disclosure script version your staff delivered, as the script names it. The referral is stamped with it; omit it to attest the script in effect on the delivery day (today, when `delivered_on` is left out). Every institution moves to a new version together, on the date its 30-day notice names. Versions 1.0, 1.1, 1.2, 1.3, 1.4, 1.5 and 1.6 are no longer accepted, and neither is a version we never published or one whose date hadn't come on the day your staff delivered it: each is refused with 409 `script_version_stale` (a row-level error on bulk).","x-data-class":"institution_confidential","examples":["1.7"],"type":["string","null"]}},"required":["confirmed","channel","attestor_name"],"additionalProperties":false,"description":"Warm-handoff attestation. Accepted only with `consent_mode: \"warm_handoff\"`."},"DisclosurePreview":{"type":"object","properties":{"object":{"type":"string","const":"gap.disclosure_preview","x-data-class":"public"},"script_version":{"type":"string","description":"The script version this preview is. Send it as the attestation's `script_version`.","x-data-class":"public","examples":["1.7"]},"script_text":{"type":"string","description":"The script your staff read to the borrower, filled in for these program terms, with a blank line between paragraphs. Its last question keeps `{{BORROWER_EMAIL}}` where your staff say the borrower's email address, the one you send as `borrower_email` on create.","x-data-class":"institution_confidential"},"required_points":{"type":"array","items":{"type":"string"},"description":"The points your attestation certifies your staff covered, in the order the portal shows them.","x-data-class":"public"},"attestation_label":{"type":"string","description":"What the attestation certifies, word for word: the box your staff check in the portal, and what `confirmed: true` means.","x-data-class":"public"}},"required":["object","script_version","script_text","required_points","attestation_label"],"description":"The disclosure script a warm-handoff referral with these program terms shows, before it exists."},"DisclosurePreviewInput":{"type":"object","properties":{"program":{"description":"The program terms you'll send on create. Omit it, or send null, for your program's defaults.","x-data-class":"institution_confidential","anyOf":[{"$ref":"#/components/schemas/ReferralProgramInput"},{"type":"null"}]}},"additionalProperties":false,"description":"The program terms of the warm-handoff referral you're about to create."},"EventFeedPage":{"type":"object","properties":{"object":{"type":"string","const":"list","x-data-class":"public"},"data":{"type":"array","items":{"$ref":"#/components/schemas/ThinEvent"}},"has_more":{"type":"boolean","x-data-class":"public"},"next_cursor":{"type":"string","description":"Every page has one, the last and an empty one too: where your next poll resumes. Keep the latest and send it as `starting_after`; `has_more` says whether to fetch the next page now.","x-data-class":"institution_confidential"}},"required":["object","data","has_more","next_cursor"]},"FieldError":{"type":"object","properties":{"field":{"type":"string","description":"The field, in the API's own names: a dotted path inside the body (`program.subsidy_value`, `member.email`), or the query or path parameter's name. A rule across fields names the rule (`borrower_contact`). An error about the body as a whole is `body`: a body that is not an object, or an edit refused without naming one field.","x-data-class":"public"},"code":{"type":"string","enum":["unknown_field","unknown_parameter","duplicate_parameter","invalid_type","required","too_long","too_large","too_small","invalid_format","invalid_value","prohibited_field"],"description":"What is wrong with the field. Branch on this, not on `message`. New values may be added: treat one you don't recognise as unknown, and don't fail.","x-data-class":"public"},"message":{"type":"string","description":"A sentence a person can act on.","x-data-class":"public"},"pointer":{"description":"RFC 6901 JSON Pointer to the value in the request body (`/program/mode`); `\"\"`, the whole body, when `field` is `body`. Absent for query and path parameters, and for a rule across fields such as `borrower_contact`, which names no member of the body.","x-data-class":"public","type":"string"}},"required":["field","code","message"],"description":"One field that failed validation."},"OpenApiDocument":{"type":"object","properties":{"openapi":{"type":"string","x-data-class":"public"},"info":{"type":"object","properties":{"title":{"type":"string","x-data-class":"public"},"version":{"type":"string","x-data-class":"public"}},"required":["title","version"],"additionalProperties":{}}},"required":["openapi","info"],"additionalProperties":{},"description":"This document."},"PlanEnrollment":{"type":"object","properties":{"id":{"type":"string","x-data-class":"institution_confidential"},"vin":{"type":"string","x-data-class":"borrower_personal"},"status":{"type":"string","enum":["PENDING","ACTIVE","PAST_DUE","LAPSED","CANCELLED"],"description":"PENDING (direct-collect, awaiting the member's activation), ACTIVE, PAST_DUE, LAPSED or CANCELLED. New values may be added: treat one you don't recognise as unknown, and don't fail.","x-data-class":"public"},"billing_mode":{"type":"string","enum":["PARTNER_BILLED","DIRECT_COLLECT"],"description":"PARTNER_BILLED: you pay the wholesale price per vehicle-month and bill the member yourself. DIRECT_COLLECT: we charge the member's card your price and settle the difference with you monthly. New values may be added: treat one you don't recognise as unknown, and don't fail.","x-data-class":"institution_confidential"},"external_ref":{"x-data-class":"institution_confidential","type":["string","null"]},"vehicle":{"type":"object","properties":{"year":{"x-data-class":"borrower_personal","type":["integer","null"]},"make":{"x-data-class":"borrower_personal","type":["string","null"]},"model":{"x-data-class":"borrower_personal","type":["string","null"]},"garaged_state":{"x-data-class":"borrower_personal","type":["string","null"]}},"required":["year","make","model","garaged_state"]},"member":{"type":"object","properties":{"first_name":{"x-data-class":"borrower_personal","type":["string","null"]},"last_name":{"x-data-class":"borrower_personal","type":["string","null"]},"email":{"x-data-class":"borrower_contact","x-requires-permission":"referrals.contact:read","type":["string","null"]}},"required":["first_name","last_name","email"]},"member_price_cents":{"type":"integer","description":"0 for partner-billed rows.","x-data-class":"institution_confidential"},"wholesale_cents":{"x-data-class":"institution_confidential","type":["integer","null"]},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"x-data-class":"institution_confidential"},"eligible_from":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When this vehicle's membership started: at enrollment for partner-billed, at the member's activation for direct-collect, and at the change after a vehicle change. A total loss dated on or after that date (U.S. Eastern time) qualifies for the member consultation; one dated earlier doesn't. Null until the membership starts.","x-data-class":"institution_confidential"},"current_period_end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"x-data-class":"institution_confidential"},"cancel_at_period_end":{"type":"boolean","x-data-class":"institution_confidential"},"cancelled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"x-data-class":"institution_confidential"},"activation_url":{"description":"Direct-collect only, while PENDING: the co-branded page where the member activates. Anyone holding it can activate, so send it only to the member.","x-data-class":"credential","x-requires-permission":"members:activation-link","type":["string","null"]},"activation_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"x-data-class":"institution_confidential"},"test":{"type":"boolean","description":"Created through a test key.","x-data-class":"public"},"created_at":{"type":"string","format":"date-time","x-data-class":"institution_confidential"}},"required":["id","vin","status","billing_mode","external_ref","vehicle","member","member_price_cents","wholesale_cents","started_at","eligible_from","current_period_end","cancel_at_period_end","cancelled_at","activation_url","activation_expires_at","test","created_at"],"description":"A membership enrollment (snake_case). Ignore fields you don't know."},"PlanEnrollmentBulkInput":{"type":"object","properties":{"enrollments":{"minItems":1,"maxItems":500,"type":"array","items":{"$ref":"#/components/schemas/PlanEnrollmentBulkRow"},"description":"1 to 500 vehicles. Each row is validated and enrolled on its own.","x-data-class":"borrower_contact"}},"required":["enrollments"],"additionalProperties":false},"PlanEnrollmentBulkResult":{"type":"object","properties":{"received":{"type":"integer","x-data-class":"public"},"created":{"type":"integer","description":"Rows enrolled now (replays are not counted).","x-data-class":"public"},"results":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","description":"0-based index into `enrollments`.","x-data-class":"public"},"vin":{"type":"string","description":"The row's VIN as sent (normalized when valid).","x-data-class":"borrower_personal"},"ok":{"type":"boolean","x-data-class":"public"},"id":{"x-data-class":"institution_confidential","type":"string"},"status":{"x-data-class":"public","type":"string","enum":["PENDING","ACTIVE","PAST_DUE","LAPSED","CANCELLED"],"description":"New values may be added: treat one you don't recognise as unknown, and don't fail."},"idempotent_replay":{"x-data-class":"public","type":"boolean"},"code":{"description":"On a failed row: `validation_failed`, or the refusal code the single endpoint would answer.","x-data-class":"public","type":"string"},"message":{"x-data-class":"public","type":"string"},"field_errors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","x-data-class":"public"},"message":{"type":"string","x-data-class":"public"},"code":{"x-data-class":"public","type":"string"},"pointer":{"x-data-class":"public","type":"string"}},"required":["field","message"]}}},"required":["index","vin","ok"]}}},"required":["received","created","results"]},"PlanEnrollmentBulkRow":{"type":"object","properties":{"vin":{"type":"string","minLength":1,"description":"The 17-character VIN, case-insensitive. Checked before anything is enrolled: 17 characters, no I, O or Q, and a valid check digit (422 `vin_invalid`, or a field error).","x-data-class":"borrower_personal","examples":["1FTFW1ET5DFC10312"]},"external_ref":{"description":"Your own opaque reference, such as a case or file ID from your system; echoed in responses and webhooks. Never a loan, account or policy number (a credit union member number is an account number).","x-data-class":"institution_confidential","anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"garaged_state":{"description":"The two-letter state where the vehicle is garaged, case-insensitive. Required to enroll: a row without it is refused with 422 `state_required`, and a state where SecondAppraisal can't act as the appraiser with 422 `state_blocked`.","x-data-class":"borrower_personal","examples":["TX"],"type":["string","null"]},"member":{"x-data-class":"borrower_contact","anyOf":[{"$ref":"#/components/schemas/PlanMemberInput"},{"type":"null"}]},"vehicle":{"x-data-class":"borrower_personal","anyOf":[{"$ref":"#/components/schemas/PlanVehicleInput"},{"type":"null"}]},"consent_mode":{"description":"Case-insensitive.","x-data-class":"institution_confidential","anyOf":[{"type":"string","enum":["invitation","warm_handoff"]},{"type":"null"}]},"idempotency_key":{"description":"Replays this row like the single endpoint's Idempotency-Key header. A row without one is keyed `<header>:<index>` when the call sends an Idempotency-Key header.","x-data-class":"institution_confidential","anyOf":[{"type":"string","maxLength":255},{"type":"null"}]}},"required":["vin"],"additionalProperties":false,"description":"One vehicle in a bulk enrollment."},"PlanEnrollmentCancelInput":{"type":"object","properties":{"cancel":{"type":"boolean","const":true,"description":"Cancels the enrollment: at once for a partner-billed row, at period end for a direct-collect row with a subscription.","x-data-class":"public"}},"required":["cancel"],"additionalProperties":false,"description":"Cancel the enrollment. Nothing else may be sent with it."},"PlanEnrollmentCreateResult":{"allOf":[{"$ref":"#/components/schemas/PlanEnrollment"},{"type":"object","properties":{"idempotent_replay":{"type":"boolean","description":"True when this answers a replayed Idempotency-Key with the original enrollment.","x-data-class":"public"}},"required":["idempotent_replay"]}]},"PlanEnrollmentEditInput":{"type":"object","properties":{"external_ref":{"description":"Your own opaque reference, such as a case or file ID from your system; echoed in responses and webhooks. Never a loan, account or policy number (a credit union member number is an account number).","x-data-class":"institution_confidential","anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"member":{"description":"Null is the same as leaving `member` out.","x-data-class":"borrower_contact","anyOf":[{"$ref":"#/components/schemas/PlanMemberInput"},{"type":"null"}]},"cancel":{"description":"`false` or null is the same as leaving `cancel` out. To cancel, send `{ \"cancel\": true }` on its own.","x-data-class":"public","anyOf":[{"type":"boolean","const":false},{"type":"null"}]},"new_vin":{"description":"Null is the same as leaving `new_vin` out. To swap the vehicle, send the new VIN.","x-data-class":"public","type":"null"}},"additionalProperties":false,"description":"Edit the reference or the member's contact details. A body with nothing to apply is a 400; `member: null`, `cancel: false` or null and `new_vin: null` apply nothing."},"PlanEnrollmentInput":{"type":"object","properties":{"vin":{"type":"string","minLength":1,"description":"The 17-character VIN, case-insensitive. Checked before anything is enrolled: 17 characters, no I, O or Q, and a valid check digit (422 `vin_invalid`, or a field error).","x-data-class":"borrower_personal","examples":["1FTFW1ET5DFC10312"]},"external_ref":{"description":"Your own opaque reference, such as a case or file ID from your system; echoed in responses and webhooks. Never a loan, account or policy number (a credit union member number is an account number).","x-data-class":"institution_confidential","anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"garaged_state":{"description":"The two-letter state where the vehicle is garaged, case-insensitive. Required to enroll: a row without it is refused with 422 `state_required`, and a state where SecondAppraisal can't act as the appraiser with 422 `state_blocked`.","x-data-class":"borrower_personal","examples":["TX"],"type":["string","null"]},"member":{"x-data-class":"borrower_contact","anyOf":[{"$ref":"#/components/schemas/PlanMemberInput"},{"type":"null"}]},"vehicle":{"x-data-class":"borrower_personal","anyOf":[{"$ref":"#/components/schemas/PlanVehicleInput"},{"type":"null"}]},"consent_mode":{"description":"Case-insensitive.","x-data-class":"institution_confidential","anyOf":[{"type":"string","enum":["invitation","warm_handoff"]},{"type":"null"}]}},"required":["vin"],"additionalProperties":false,"description":"One vehicle to enroll. The VIN is the key, and the garaged state is required; everything else is optional. A vehicle with a live membership, your institution's included, and a vehicle we consulted on are answered 422 `vin_not_enrollable`, which doesn't say why."},"PlanEnrollmentList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PlanEnrollment"}},"next_cursor":{"description":"Pass as `cursor` for the next page; null on the last page.","x-data-class":"institution_confidential","type":["string","null"]}},"required":["data","next_cursor"]},"PlanEnrollmentPatchInput":{"anyOf":[{"$ref":"#/components/schemas/PlanEnrollmentCancelInput"},{"$ref":"#/components/schemas/PlanEnrollmentSwapInput"},{"$ref":"#/components/schemas/PlanEnrollmentEditInput"}],"description":"One of: `{ \"cancel\": true }` alone; a VIN swap (`new_vin`, with optional carry-over fields); or edits to `external_ref` and `member`."},"PlanEnrollmentSwapInput":{"type":"object","properties":{"new_vin":{"type":"string","minLength":1,"description":"The 17-character VIN, case-insensitive. Checked before anything is enrolled: 17 characters, no I, O or Q, and a valid check digit (422 `vin_invalid`, or a field error). The member moves to this vehicle, which is eligible from the time of the change; a loss on it dated before the change isn't included.","x-data-class":"borrower_personal"},"external_ref":{"description":"Your own opaque reference, such as a case or file ID from your system; echoed in responses and webhooks. Never a loan, account or policy number (a credit union member number is an account number).","x-data-class":"institution_confidential","anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"garaged_state":{"description":"The two-letter state where the vehicle is garaged, case-insensitive. Required to enroll: a row without it is refused with 422 `state_required`, and a state where SecondAppraisal can't act as the appraiser with 422 `state_blocked`.","x-data-class":"borrower_personal","examples":["TX"],"type":["string","null"]},"member":{"x-data-class":"borrower_contact","anyOf":[{"$ref":"#/components/schemas/PlanMemberInput"},{"type":"null"}]},"vehicle":{"x-data-class":"borrower_personal","anyOf":[{"$ref":"#/components/schemas/PlanVehicleInput"},{"type":"null"}]},"consent_mode":{"description":"Case-insensitive.","x-data-class":"institution_confidential","anyOf":[{"type":"string","enum":["invitation","warm_handoff"]},{"type":"null"}]},"cancel":{"description":"`false` or null is the same as leaving `cancel` out. To cancel, send `{ \"cancel\": true }` on its own.","x-data-class":"public","anyOf":[{"type":"boolean","const":false},{"type":"null"}]}},"required":["new_vin"],"additionalProperties":false,"description":"Move the member to another vehicle: the new VIN is enrolled and this enrollment closes. `garaged_state`, `external_ref` and each member field carry over unless sent; a paying direct-collect member's subscription moves to the new row."},"PlanEnrollmentSwapResult":{"allOf":[{"$ref":"#/components/schemas/PlanEnrollment"},{"type":"object","properties":{"swapped_from":{"type":"string","description":"The enrollment this one replaced.","x-data-class":"institution_confidential"}},"required":["swapped_from"]}]},"PlanLossNotice":{"type":"object","properties":{"id":{"type":"string","x-data-class":"institution_confidential"},"enrollment_id":{"type":"string","x-data-class":"institution_confidential"},"vin":{"type":"string","x-data-class":"borrower_personal"},"date_of_loss":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date of loss you reported, or null when none was.","x-data-class":"borrower_personal"},"reported_at":{"type":"string","format":"date-time","x-data-class":"institution_confidential"},"source":{"type":"string","enum":["api","portal","file","backfill"],"description":"How it reached us: this API, your portal's form, a file upload, or `backfill` for a notice sent before loss reporting opened. New values may be added: treat one you don't recognise as unknown, and don't fail.","x-data-class":"public"},"eligibility_status":{"type":"string","enum":["pending","eligible","denied"],"description":"`eligible`: the loss is included in the membership. `denied`: it isn't, with the reason. `pending`: no date of loss yet, so it can't be judged. New values may be added: treat one you don't recognise as unknown, and don't fail.","x-data-class":"public"},"denied_reason":{"anyOf":[{"type":"string","enum":["membership_not_live_on_dol","before_effective_at","date_of_loss_in_future","membership_not_started","not_included"]},{"type":"null"}],"description":"Why a denied loss isn't included, or null. `not_included` stands for any reason that concerns the member rather than your report or your enrollment. New values may be added: treat one you don't recognise as unknown, and don't fail.","x-data-class":"public"},"denied_message":{"description":"The reason in plain words, or null.","x-data-class":"public","type":["string","null"]},"reported_again_at":{"type":"array","items":{"type":"string","format":"date-time"},"description":"When the same loss was reported again. A repeat is shown once, on its first notice.","x-data-class":"institution_confidential"}},"required":["id","enrollment_id","vin","date_of_loss","reported_at","source","eligibility_status","denied_reason","denied_message","reported_again_at"],"description":"A total loss you reported, and whether it is included in the membership."},"PlanLossNoticeInput":{"type":"object","properties":{"vin":{"type":"string","minLength":1,"description":"The member vehicle's VIN, case-insensitive.","x-data-class":"borrower_personal"},"date_of_loss":{"description":"YYYY-MM-DD; at most a day ahead (a timezone ahead of UTC). Null, or leaving it out, records no date. Spaces around it are ignored.","x-data-class":"borrower_personal","anyOf":[{"type":"string","format":"date"},{"type":"null"}]},"claim_number":{"x-data-class":"borrower_personal","anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"carrier":{"description":"The member's insurer.","x-data-class":"borrower_personal","anyOf":[{"type":"string","maxLength":120},{"type":"null"}]}},"required":["vin"],"additionalProperties":false,"description":"A member vehicle was declared a total loss."},"PlanLossNoticeList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PlanLossNotice"}},"next_cursor":{"x-data-class":"institution_confidential","type":["string","null"]}},"required":["data","next_cursor"]},"PlanLossNoticeResult":{"type":"object","properties":{"enrollment_id":{"type":"string","x-data-class":"institution_confidential"},"status":{"type":"string","enum":["PENDING","ACTIVE","PAST_DUE","LAPSED","CANCELLED"],"x-data-class":"public","description":"New values may be added: treat one you don't recognise as unknown, and don't fail."},"eligible_from":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"x-data-class":"institution_confidential"},"recorded":{"type":"boolean","const":true,"x-data-class":"public"}},"required":["enrollment_id","status","eligible_from","recorded"]},"PlanMemberInput":{"type":"object","properties":{"first_name":{"x-data-class":"borrower_personal","anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"last_name":{"x-data-class":"borrower_personal","anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"email":{"description":"An email address of at most 254 characters, with no spaces, a single `@`, and a domain with a dot that has text on each side (`example.com`). Spaces around it are ignored. Stored in lowercase.","x-data-class":"borrower_contact","anyOf":[{"type":"string","maxLength":254},{"type":"null"}]},"phone":{"x-data-class":"borrower_contact","anyOf":[{"type":"string","maxLength":32},{"type":"null"}]}},"additionalProperties":false,"description":"The member's contact details. Every field is optional."},"PlanRedemption":{"type":"object","properties":{"id":{"type":"string","x-data-class":"institution_confidential"},"enrollment_id":{"type":"string","x-data-class":"institution_confidential"},"external_ref":{"x-data-class":"institution_confidential","type":["string","null"]},"referral_id":{"x-data-class":"institution_confidential","type":["string","null"]},"vin":{"type":"string","x-data-class":"borrower_personal"},"status":{"type":"string","enum":["PENDING","APPROVED","DENIED","COMPLETED","REPORTING_WITHDRAWN"],"description":"Where the redemption stands: `PENDING`, `APPROVED`, `DENIED` or `COMPLETED`. `REPORTING_WITHDRAWN` once the borrower withdrew permission to report the progress of the referral it names (`referral_id`), whatever happens after: the referral itself then reads `status: reporting_withdrawn`. New values may be added: show one you don't recognise as not yet known, and don't fail.","x-data-class":"public"},"date_of_loss":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"x-data-class":"borrower_personal"},"value_cents":{"type":"integer","x-data-class":"institution_confidential"},"initial_offer_cents":{"x-data-class":"borrower_personal","type":["integer","null"]},"final_settlement_cents":{"x-data-class":"borrower_personal","type":["integer","null"]},"uplift_cents":{"x-data-class":"borrower_personal","type":["integer","null"]},"settled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"x-data-class":"institution_confidential"},"created_at":{"type":"string","format":"date-time","x-data-class":"institution_confidential"},"reporting_withdrawn_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the borrower withdrew permission to report the progress of the referral this redemption names; null while they haven't, or it names none. From then on the redemption shows `status: REPORTING_WITHDRAWN`, and its outcome (`initial_offer_cents`, `final_settlement_cents`, `uplift_cents`) and `settled_at` are null.","x-data-class":"institution_confidential"}},"required":["id","enrollment_id","external_ref","referral_id","vin","status","date_of_loss","value_cents","initial_offer_cents","final_settlement_cents","uplift_cents","settled_at","created_at","reporting_withdrawn_at"],"description":"A member consultation drawn against your roster. Never the consultation's internals, and none of its progress once the borrower withdrew permission to report it."},"PlanRedemptionList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PlanRedemption"}},"next_cursor":{"x-data-class":"institution_confidential","type":["string","null"]}},"required":["data","next_cursor"]},"PlanRosterRejection":{"type":"object","properties":{"index":{"type":"integer","x-data-class":"public"},"vin":{"type":"string","x-data-class":"borrower_personal"},"field_errors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","x-data-class":"public"},"message":{"type":"string","x-data-class":"public"},"code":{"x-data-class":"public","type":"string"},"pointer":{"x-data-class":"public","type":"string"}},"required":["field","message"]}}},"required":["index","vin","field_errors"]},"PlanRosterSession":{"type":"object","properties":{"id":{"type":"string","description":"The session's id: the `{id}` of its other operations.","x-data-class":"institution_confidential"},"status":{"type":"string","enum":["open","committing","committed","expired","aborted"],"description":"open (taking chunks), committing (its commit is being applied), committed, expired (24 hours after it opened, with nothing applied) or aborted (by you, with nothing applied; or by our staff because its commit couldn't finish, keeping what it had applied, which `result` counts). New values may be added: treat one you don't recognise as unknown, and don't fail.","x-data-class":"public"},"test":{"type":"boolean","x-data-class":"public"},"expires_at":{"type":"string","format":"date-time","description":"When an uncommitted session expires: 24 hours after it opened.","x-data-class":"public"},"created_at":{"type":"string","format":"date-time","x-data-class":"public"},"received":{"type":"integer","description":"Rows received in its chunks so far, duplicates included.","x-data-class":"public"},"chunks":{"type":"integer","description":"Chunks received so far.","x-data-class":"public"},"committed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"x-data-class":"public"},"result":{"anyOf":[{"type":"object","properties":{"received":{"type":"integer","description":"Rows received, duplicates included.","x-data-class":"public"},"enrolled":{"type":"integer","x-data-class":"public"},"already_live":{"type":"integer","x-data-class":"public"},"refused":{"type":"integer","x-data-class":"public"},"cancelled":{"type":"integer","x-data-class":"public"}},"required":["received","enrolled","already_live","refused","cancelled"]},{"type":"null"}],"description":"What the commit did, as counts; null until it is committed. For a session our staff ended because its commit couldn't finish, what it had done by then. The enrollments it cancelled are the ones listed cancelled since the commit."},"would_cancel":{"x-data-class":"public","type":["integer","null"]},"live_count":{"x-data-class":"public","type":["integer","null"]}},"required":["id","status","test","expires_at","created_at","received","chunks","committed_at","result","would_cancel","live_count"]},"PlanRosterSessionChunkInput":{"type":"object","properties":{"chunk_index":{"type":"integer","minimum":0,"maximum":1999,"description":"The chunk's number: 0 for the first, then 1, 2 and so on, at most 1999. Re-sending a chunk with its number and the same body is a replay; another body under a number already received, or a number past the next one, is a 409 `roster_chunk_conflict`.","x-data-class":"public"},"enrollments":{"minItems":1,"maxItems":500,"type":"array","items":{"$ref":"#/components/schemas/PlanEnrollmentInput"},"description":"1 to 500 vehicles of your roster, in the shape roster sync takes. Any malformed row refuses the whole chunk (400 with `rejected`) and stores none of it.","x-data-class":"borrower_contact"}},"required":["chunk_index","enrollments"],"additionalProperties":false},"PlanRosterSessionChunkResult":{"type":"object","properties":{"session_id":{"type":"string","x-data-class":"institution_confidential"},"chunk_index":{"type":"integer","x-data-class":"public"},"rows":{"type":"integer","description":"The rows this chunk staged.","x-data-class":"public"},"received":{"type":"integer","description":"Rows the session has received in all, duplicates included.","x-data-class":"public"},"replayed":{"type":"boolean","description":"True when this chunk had already been received with the same body.","x-data-class":"public"}},"required":["session_id","chunk_index","rows","received","replayed"]},"PlanRosterSessionCommitInput":{"type":"object","properties":{"confirm_cancel_count":{"description":"Only when a roster would cancel more than 25 of your live enrollments in this key's mode and more than 20% of them, counting those roster syncs cancelled in the last 7 days: the exact number this roster cancels, the `cancel_count` the 409 `roster_cancel_unconfirmed` reported. Any other number is refused the same way, and nothing is changed.","x-data-class":"public","type":"integer","minimum":0,"maximum":10000000}},"additionalProperties":false},"PlanRosterSessionCommitResult":{"type":"object","properties":{"session":{"$ref":"#/components/schemas/PlanRosterSession"},"received":{"type":"integer","x-data-class":"public"},"enrolled":{"type":"array","items":{"type":"string"},"description":"VINs enrolled now.","x-data-class":"borrower_personal"},"already_live":{"type":"array","items":{"type":"string"},"description":"Your institution's VINs that were already live in this key's mode.","x-data-class":"borrower_personal"},"refused":{"type":"array","items":{"type":"object","properties":{"vin":{"type":"string","x-data-class":"borrower_personal"},"code":{"type":"string","description":"The refusal code the single endpoint would answer.","x-data-class":"public"},"message":{"type":"string","x-data-class":"public"}},"required":["vin","code","message"]}},"cancelled":{"type":"array","items":{"type":"string"},"description":"VINs cancelled because they were not in the roster.","x-data-class":"borrower_personal"}},"required":["session","received","enrolled","already_live","refused","cancelled"]},"PlanRosterSyncInput":{"type":"object","properties":{"enrollments":{"maxItems":500,"type":"array","items":{"$ref":"#/components/schemas/PlanEnrollmentInput"},"description":"Your full roster, at most 500 vehicles. An empty array cancels every live enrollment.","x-data-class":"borrower_contact"},"confirm_cancel_count":{"description":"Only when a roster would cancel more than 25 of your live enrollments in this key's mode and more than 20% of them, counting those roster syncs cancelled in the last 7 days: the exact number this roster cancels, the `cancel_count` the 409 `roster_cancel_unconfirmed` reported. Any other number is refused the same way, and nothing is changed.","x-data-class":"public","type":"integer","minimum":0,"maximum":10000000}},"required":["enrollments"],"additionalProperties":false},"PlanRosterSyncResult":{"type":"object","properties":{"received":{"type":"integer","x-data-class":"public"},"enrolled":{"type":"array","items":{"type":"string"},"description":"VINs enrolled now.","x-data-class":"borrower_personal"},"already_live":{"type":"array","items":{"type":"string"},"description":"Your institution's VINs that were already live in this key's mode.","x-data-class":"borrower_personal"},"refused":{"type":"array","items":{"type":"object","properties":{"vin":{"type":"string","x-data-class":"borrower_personal"},"code":{"type":"string","description":"The refusal code the single endpoint would answer.","x-data-class":"public"},"message":{"type":"string","x-data-class":"public"}},"required":["vin","code","message"]}},"cancelled":{"type":"array","items":{"type":"string"},"description":"VINs cancelled because they were not in the roster.","x-data-class":"borrower_personal"}},"required":["received","enrolled","already_live","refused","cancelled"]},"PlanStatement":{"type":"object","properties":{"id":{"type":"string","x-data-class":"institution_confidential"},"period_start":{"type":"string","format":"date","x-data-class":"institution_confidential"},"period_end":{"type":"string","format":"date","x-data-class":"institution_confidential"},"status":{"type":"string","enum":["ISSUED","SETTLED","VOID"],"x-data-class":"public","description":"New values may be added: treat one you don't recognise as unknown, and don't fail."},"vehicle_months":{"type":"number","x-data-class":"institution_confidential"},"active_vehicles_end":{"type":"integer","x-data-class":"institution_confidential"},"redemption_count":{"type":"integer","x-data-class":"institution_confidential"},"wholesale_cents":{"type":"integer","x-data-class":"institution_confidential"},"collected_cents":{"type":"integer","x-data-class":"institution_confidential"},"rev_share_cents":{"type":"integer","x-data-class":"institution_confidential"},"subsidy_cents":{"type":"integer","x-data-class":"institution_confidential"},"net_cents":{"type":"integer","description":"Positive: you owe us; negative: we owe you.","x-data-class":"institution_confidential"},"direction":{"type":"string","enum":["partner_owes","we_owe_partner","settled"],"x-data-class":"institution_confidential","description":"New values may be added: treat one you don't recognise as unknown, and don't fail."},"charge_id":{"x-data-class":"institution_confidential","type":["string","null"]},"transfer_id":{"x-data-class":"institution_confidential","type":["string","null"]},"lines":{"anyOf":[{"type":"array","items":{"type":"object","properties":{},"additionalProperties":{}}},{"type":"null"}],"description":"The statement's lines. Their fields are not frozen yet; ignore any you don't know.","x-data-class":"institution_confidential"},"line_count":{"description":"How many lines the statement has, each listed by `GET /api/gap/v1/plans/statements/{id}/lines`; `lines` is then null. Absent on a statement issued before its lines were listed that way: its `lines` carries them.","x-data-class":"institution_confidential","type":"integer"},"issued_at":{"type":"string","format":"date-time","x-data-class":"institution_confidential"},"settled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"x-data-class":"institution_confidential"}},"required":["id","period_start","period_end","status","vehicle_months","active_vehicles_end","redemption_count","wholesale_cents","collected_cents","rev_share_cents","subsidy_cents","net_cents","direction","charge_id","transfer_id","lines","issued_at","settled_at"],"description":"One calendar month's membership statement, in integer cents. `direction` says who owes whom: partner_owes (wholesale plus any member-fee subsidy, billed as one charge), we_owe_partner (the direct-collect spread above wholesale, remitted by transfer) or settled."},"PlanStatementLine":{"type":"object","properties":{"enrollment_id":{"type":"string","description":"The enrollment billed.","x-data-class":"institution_confidential"},"vin":{"x-data-class":"borrower_personal","type":["string","null"]},"external_ref":{"x-data-class":"institution_confidential","type":["string","null"]},"billing_mode":{"type":"string","enum":["PARTNER_BILLED","DIRECT_COLLECT"],"x-data-class":"institution_confidential","description":"New values may be added: treat one you don't recognise as unknown, and don't fail."},"tlas_mode":{"anyOf":[{"type":"string","enum":["BOUGHT","INCLUDED"]},{"type":"null"}],"description":"The vehicle's mode for the days billed, BOUGHT or INCLUDED; each mode is billed at its own rate. Null on a statement issued before its lines were listed (one without `line_count`). New values may be added: treat one you don't recognise as unknown, and don't fail.","x-data-class":"institution_confidential"},"line_kind":{"anyOf":[{"type":"string","enum":["monthly","term_prepaid"]},{"type":"null"}],"description":"monthly: vehicle-months for the period; term_prepaid: a prepaid term billed this period. Null on a statement issued before its lines were listed (one without `line_count`). New values may be added: treat one you don't recognise as unknown, and don't fail.","x-data-class":"institution_confidential"},"days_live":{"description":"The days of the period the vehicle was billed for, to four places. Null on a statement issued before its lines were listed (one without `line_count`).","x-data-class":"institution_confidential","type":["number","null"]},"vehicle_months":{"type":"number","description":"The vehicle-months billed, to four places.","x-data-class":"institution_confidential"},"rate_cents":{"type":"integer","description":"The wholesale fee per vehicle-month.","x-data-class":"institution_confidential"},"member_price_cents":{"type":"integer","description":"The member's monthly price; 0 for a partner-billed line.","x-data-class":"institution_confidential"},"amount_cents":{"description":"What the line adds to the statement's `net_cents`: the wholesale for a partner-billed line; the subsidy less your share for a direct-collect one. Null on a statement issued before its lines were listed (one without `line_count`).","x-data-class":"institution_confidential","type":["integer","null"]},"collected_cents":{"description":"Direct-collect only: what we collected from the member for the period. Null on a statement issued before its lines were listed (one without `line_count`).","x-data-class":"institution_confidential","type":["integer","null"]},"rev_share_cents":{"description":"Direct-collect only: your share earned (the price above wholesale), held and not-earned parts excluded. Null on a statement issued before its lines were listed (one without `line_count`).","x-data-class":"institution_confidential","type":["integer","null"]},"subsidy_cents":{"description":"Direct-collect only: what you owe when the member's price is below wholesale. Null on a statement issued before its lines were listed (one without `line_count`).","x-data-class":"institution_confidential","type":["integer","null"]},"rev_share_held_cents":{"description":"The part of your share held while the vehicle's state is checked; null when none is.","x-data-class":"institution_confidential","type":["integer","null"]},"rev_share_not_earned_cents":{"description":"The part of your share not earned: the vehicle's state was switched off; null when none is.","x-data-class":"institution_confidential","type":["integer","null"]}},"required":["enrollment_id","vin","external_ref","billing_mode","tlas_mode","line_kind","days_live","vehicle_months","rate_cents","member_price_cents","amount_cents","collected_cents","rev_share_cents","subsidy_cents","rev_share_held_cents","rev_share_not_earned_cents"],"description":"One line of a monthly statement: a vehicle billed, in integer cents."},"PlanStatementLineList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PlanStatementLine"}},"has_more":{"type":"boolean","description":"True when another page follows.","x-data-class":"public"},"next_cursor":{"description":"Pass as `starting_after` for the next page; null on the last page.","x-data-class":"institution_confidential","type":["string","null"]}},"required":["data","has_more","next_cursor"]},"PlanStatementList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PlanStatement"}}},"required":["data"]},"PlanVehicleInput":{"type":"object","properties":{"year":{"x-data-class":"borrower_personal","anyOf":[{"type":"integer","minimum":1901,"maximum":2099},{"type":"null"}]},"make":{"x-data-class":"borrower_personal","anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"model":{"x-data-class":"borrower_personal","anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"trim":{"x-data-class":"borrower_personal","anyOf":[{"type":"string","maxLength":80},{"type":"null"}]}},"additionalProperties":false,"description":"The vehicle's description. Every field is optional."},"Problem":{"type":"object","properties":{"error":{"type":"string","description":"The reason, in the wording the API has always used. Kept for existing clients; branch on `code`.","x-data-class":"public"},"code":{"type":"string","enum":["invalid_json","unsupported_media_type","payload_too_large","too_many_rows","prohibited_field","validation_failed","operation_not_open","idempotency_key_too_long","internal_error","missing_api_key","invalid_api_key","api_key_expired","key_not_scoped","test_key_referrals_unavailable","provider_terminated","provider_suspended","provider_not_active","rate_limited","auth_unavailable","permission_denied","credentials_unavailable","signed_requests_required","ip_not_allowed","auth_failures_throttled","signature_profile_invalid","signature_expired","target_uri_not_allowed","signature_invalid","environment_mismatch","credential_not_activated","signature_replay","public_key_in_use","edge_auth_required","platform_standby","membership_program_closed","membership_not_enabled","membership_rider_unsigned","membership_billing_mode_required","membership_billing_method_required","msa_required","billing_required","admin_of_record_unverified","email_required_sms_disabled","script_version_stale","duplicate_reference","invalid_cursor","not_found","referral_locked","referral_details_cleared","cancel_not_allowed","economics_locked","funding_lowered","nothing_to_update","idempotency_key_mode_conflict","state_not_served","state_not_launched","duplicate_referral","simulate_requires_test_key","invalid_transition","reporting_withdrawn","vin_already_live","vin_already_consulted","vin_not_enrollable","state_required","state_blocked","vin_invalid","invalid_customer_price","idempotency_key_reused","plan_not_enabled","not_live","not_a_member_vehicle","roster_cancel_unconfirmed","roster_commit_in_progress","roster_session_not_open","roster_chunk_conflict","request_refused"],"description":"Stable reason code. It never changes with the wording; `x-error-catalog` lists every code. New values may be added: treat a code you don't recognise by the response's HTTP status.","x-data-class":"public"},"type":{"type":"string","description":"RFC 9457 problem type: a URI naming the code. It identifies the problem; there is no need to fetch it.","x-data-class":"public"},"title":{"type":"string","description":"RFC 9457: a short summary of the code.","x-data-class":"public"},"status":{"type":"integer","minimum":400,"maximum":599,"description":"RFC 9457: the HTTP status, repeated.","x-data-class":"public"},"detail":{"type":"string","description":"RFC 9457: what went wrong with this request.","x-data-class":"public"},"instance":{"type":"string","description":"RFC 9457: the path that was called, without its query string.","x-data-class":"public"},"request_id":{"type":"string","description":"The request id, also sent as the `X-Request-Id` header. Quote it when you write to business@secondappraisal.com.","x-data-class":"public"},"field_errors":{"description":"On `validation_failed` and `prohibited_field`: each field that failed, and why.","x-data-class":"public","type":"array","items":{"$ref":"#/components/schemas/FieldError"}}},"required":["error","code","type","title","status","detail","instance","request_id"],"description":"RFC 9457 problem details, sent as `application/problem+json`, with the API's legacy `error` string and a stable `code` beside the standard members. Some operations add members of their own, named in their responses."},"ProgramReport":{"type":"object","properties":{"object":{"type":"string","const":"gap.program_report","x-data-class":"public"},"quarters":{"type":"array","items":{"$ref":"#/components/schemas/ProgramReportQuarter"},"description":"The last four calendar quarters in Mountain Time (America/Denver), oldest first, ending with the current one."}},"required":["object","quarters"],"description":"Your program, quarter by quarter: the numbers the portal's program report shows. Each quarter follows the referrals created in it, so its numbers settle as they move on."},"ProgramReportQuarter":{"type":"object","properties":{"quarter":{"type":"string","description":"The calendar quarter in Mountain Time (America/Denver), YYYY-Qn.","pattern":"^[0-9]{4}-Q[1-4]$","x-data-class":"public","examples":["2026-Q4"]},"from":{"type":"string","format":"date-time","description":"The quarter's first instant.","x-data-class":"public"},"to":{"type":"string","format":"date-time","description":"The next quarter's first instant: the bound is exclusive.","x-data-class":"public"},"referrals":{"type":"integer","description":"Referrals you created in the quarter. Every other number counts these referrals.","x-data-class":"institution_confidential"},"reached":{"type":"integer","description":"Referrals whose borrower we reached.","x-data-class":"institution_confidential"},"contacted":{"type":"integer","description":"Referrals with a first contact from us: the base of `median_hours_to_first_contact`.","x-data-class":"institution_confidential"},"median_hours_to_first_contact":{"description":"Median hours from the referral to our first contact; null with none.","x-data-class":"institution_confidential","type":["number","null"]},"activated":{"type":"integer","description":"Referrals whose borrower activated.","x-data-class":"institution_confidential"},"decided":{"type":"integer","description":"Referrals activated, or closed without activation: the base of `activation_rate`.","x-data-class":"institution_confidential"},"activation_rate":{"description":"`activated` ÷ `decided`, 0 to 1; null before any referral is decided.","x-data-class":"institution_confidential","type":["number","null"]},"median_days_to_activation":{"description":"Median days from the referral to activation; null with none.","x-data-class":"institution_confidential","type":["number","null"]},"reviews_completed":{"description":"Referrals whose review finished: a verdict reached the borrower, paid research was delivered, or the review was done elsewhere. Null until your program's review records are open, when the review-record operations stop answering `operation_not_open`.","x-data-class":"institution_confidential","type":["integer","null"]},"verdicts_delivered":{"description":"Reviews whose verdict reached the borrower: that we can help, or that the insurer's offer looks fair. The base of the undervaluation rate. Null until your program's review records are open, or when they can't be read.","x-data-class":"institution_confidential","type":["integer","null"]},"undervaluation_found":{"description":"Reviews whose verdict told the borrower we can help, counted once it reached them, even if they then declined or chose another appraiser. The undervaluation rate is `undervaluation_found` ÷ `verdicts_delivered`. Null until your program's review records are open, or when they can't be read.","x-data-class":"institution_confidential","type":["integer","null"]},"appraisals_invoked":{"description":"Completed reviews after which the appraisal clause was invoked, with us or with another appraiser. The appraisal invocation rate is `appraisals_invoked` ÷ `reviews_completed`. Null until your program's review records are open, and while we can't read the record of what happened with the insurer.","x-data-class":"institution_confidential","type":["integer","null"]},"settled":{"type":"integer","description":"Referrals settled.","x-data-class":"institution_confidential"},"settled_dated":{"type":"integer","description":"Settled referrals whose settlement is dated by the consultation's completion or its award letter: the base of `median_days_to_settlement` and `median_days_notice_to_settlement`. A settlement with neither, dated only by when we recorded it, is in `settled` but not here.","x-data-class":"institution_confidential"},"median_days_to_settlement":{"description":"Median days from activation to settlement, over `settled_dated`; null with none. A settlement dated only by when we recorded it is left out.","x-data-class":"institution_confidential","type":["number","null"]},"median_days_notice_to_settlement":{"description":"Median days from notice to settlement, over `settled_dated`, where notice is the payoff request when you sent one, else the referral; null with none.","x-data-class":"institution_confidential","type":["number","null"]},"uplift_cents":{"type":"integer","description":"The settled referrals' uplift over the insurer's first offer.","x-data-class":"borrower_personal"},"settled_with_uplift":{"type":"integer","description":"Settled referrals with the insurer's first offer on file: the base of `average_uplift_cents`.","x-data-class":"institution_confidential"},"average_uplift_cents":{"description":"The average uplift over the settled referrals with a first offer on file: the final settlement less the insurer's first offer. Null with none.","x-data-class":"borrower_personal","type":["integer","null"]},"exposure_reduction_cents":{"description":"The settled referrals' estimated exposure reduced (loan payoff minus the insurer's figure), from the ones with both a payoff and a first offer on file. Built on the loan payoff, so null for a key without `referrals.contact:read`. Your institution determines its GAP benefit under its own contract.","x-data-class":"borrower_personal","x-requires-permission":"referrals.contact:read","type":["integer","null"]},"reporting_withdrawn":{"type":"integer","description":"Referrals whose borrower withdrew permission to report their progress to you.","x-data-class":"institution_confidential"},"released":{"type":"integer","description":"Referrals released after the review window with no review delivered.","x-data-class":"institution_confidential"},"settled_before_contact":{"type":"integer","description":"Referrals our staff recorded as settled with the insurer before we reached the borrower. A referral whose borrower withdrew permission to report isn't counted, and neither is one whose borrower we reached or who activated afterwards. The count can go down when our staff correct a mark.","x-data-class":"institution_confidential"},"membership_charges_cents":{"type":"integer","description":"Your Total Loss Appraisal Support (TLAS) statement charges made in the quarter, committed as `fees_paid_cents` counts them. They belong to no referral, so this is the one number not following the quarter's referrals, and no consultation figure includes it. 0 for a sandbox key, and while your program has no TLAS vehicles.","x-data-class":"institution_confidential"}},"required":["quarter","from","to","referrals","reached","contacted","median_hours_to_first_contact","activated","decided","activation_rate","median_days_to_activation","reviews_completed","verdicts_delivered","undervaluation_found","appraisals_invoked","settled","settled_dated","median_days_to_settlement","median_days_notice_to_settlement","uplift_cents","settled_with_uplift","average_uplift_cents","exposure_reduction_cents","reporting_withdrawn","released","settled_before_contact","membership_charges_cents"],"description":"One calendar quarter of your program: the referrals you created in it, and what has become of them."},"Referral":{"type":"object","properties":{"id":{"type":"string","description":"The referral's id.","x-data-class":"institution_confidential"},"object":{"type":"string","const":"gap.referral","x-data-class":"public"},"status":{"type":"string","enum":["submitted","invited","handoff_pending","outreach_queued","contact_attempted","activated","in_progress","settled","closed","declined","unreachable","expired","cancelled","reporting_withdrawn"],"description":"Where the referral stands. `reporting_withdrawn` once the borrower withdrew permission to report its progress to you, whatever happens to it after: from then on it shows the fields you supplied and no progress. New values may be added: show one you don't recognise as not yet known, and don't fail.","x-data-class":"public"},"status_label":{"type":"string","description":"The status as the portal shows it.","x-data-class":"public"},"status_tone":{"type":"string","enum":["green","yellow","red","neutral"],"x-data-class":"public","description":"New values may be added: treat one you don't recognise as unknown, and don't fail."},"status_note":{"description":"A third-person note on a terminal status, such as why it closed.","x-data-class":"institution_confidential","type":["string","null"]},"external_ref":{"description":"Your own reference, as you sent it.","x-data-class":"institution_confidential","type":["string","null"]},"borrower":{"type":"object","properties":{"first_name":{"type":"string","x-data-class":"borrower_personal"},"last_name":{"type":"string","x-data-class":"borrower_personal"},"email":{"x-data-class":"borrower_contact","x-requires-permission":"referrals.contact:read","type":["string","null"]},"phone":{"description":"10 digits.","x-data-class":"borrower_contact","x-requires-permission":"referrals.contact:read","type":["string","null"]}},"required":["first_name","last_name","email","phone"]},"vehicle":{"type":"object","properties":{"vin":{"x-data-class":"borrower_personal","type":["string","null"]},"year":{"x-data-class":"borrower_personal","type":["integer","null"]},"make":{"x-data-class":"borrower_personal","type":["string","null"]},"model":{"x-data-class":"borrower_personal","type":["string","null"]}},"required":["vin","year","make","model"]},"claim":{"type":"object","properties":{"carrier":{"x-data-class":"borrower_personal","type":["string","null"]},"claim_number":{"x-data-class":"borrower_personal","type":["string","null"]},"loss_state":{"x-data-class":"borrower_personal","type":["string","null"]},"date_of_loss":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Midnight UTC on the date of loss.","x-data-class":"borrower_personal"},"initial_offer_cents":{"x-data-class":"borrower_personal","type":["integer","null"]}},"required":["carrier","claim_number","loss_state","date_of_loss","initial_offer_cents"]},"liability":{"type":"object","properties":{"loan_payoff_cents":{"x-data-class":"borrower_personal","x-requires-permission":"referrals.contact:read","type":["integer","null"]},"deductible_cents":{"description":"Deprecated: we stopped collecting the deductible in version 1.4.0. A referral made before then shows the deductible your institution sent until our retention schedule or an erasure clears it; any other referral shows null.","x-data-class":"borrower_personal","deprecated":true,"type":["integer","null"]}},"required":["loan_payoff_cents","deductible_cents"]},"deficiency_coverage":{"anyOf":[{"type":"string","enum":["none","this_institution","other","unknown"]},{"type":"null"}],"description":"Who covers the borrower's deficiency, as you sent it: `none`, `this_institution`, `other` or `unknown`. Null when you didn't say. When your own GAP covers the borrower (`deficiency_coverage: this_institution`), you pay our whole consultation fee for that referral, whatever your program's mode. We charge it once, when the amount of loss is determined (an award or a confirmed settlement), and the borrower pays none of it. Other costs, such as photo dispatch or a share of an umpire's fee, follow your program's rules for them. New values may be added: treat one you don't recognise as unknown, and don't fail.","x-data-class":"borrower_personal"},"program":{"type":"object","properties":{"mode":{"type":"string","enum":["provider_paid","split_pay","customer_paid","membership"],"x-data-class":"institution_confidential","description":"New values may be added: treat one you don't recognise as unknown, and don't fail."},"subsidy_type":{"anyOf":[{"type":"string","enum":["percent","fixed_cents"]},{"type":"null"}],"x-data-class":"institution_confidential","description":"New values may be added: treat one you don't recognise as unknown, and don't fail."},"subsidy_value":{"x-data-class":"institution_confidential","type":["integer","null"]},"price_cents":{"type":"integer","description":"Your price for this referral's consultation, in cents, fixed when the referral was submitted. `mode` and the subsidy terms decide how much of it you pay.","x-data-class":"institution_confidential"},"locked":{"description":"True once the borrower activated under these terms; they can no longer change. Null once reporting is withdrawn (`status: reporting_withdrawn`).","x-data-class":"institution_confidential","type":["boolean","null"]}},"required":["mode","subsidy_type","subsidy_value","price_cents","locked"]},"consent":{"type":"object","properties":{"mode":{"type":"string","enum":["invitation","warm_handoff"],"x-data-class":"institution_confidential","description":"New values may be added: treat one you don't recognise as unknown, and don't fail."},"disclosure_confirmed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When your staff delivered the warm-handoff disclosure: noon UTC on the day given (`delivered_on`, or the day entered in the portal), or the moment they attested if no day was given.","x-data-class":"institution_confidential"},"disclosure_channel":{"x-data-class":"institution_confidential","type":["string","null"]},"disclosure_attestor_name":{"x-data-class":"institution_confidential","x-requires-permission":"referrals.contact:read","type":["string","null"]}},"required":["mode","disclosure_confirmed_at","disclosure_channel","disclosure_attestor_name"]},"submitted_via":{"type":"string","description":"Where the referral came from: `api`, `dashboard` or `csv`.","x-data-class":"public"},"created_at":{"type":"string","format":"date-time","x-data-class":"institution_confidential"},"invited_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"x-data-class":"institution_confidential"},"invitation_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"x-data-class":"institution_confidential"},"activated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"x-data-class":"institution_confidential"},"appointed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the borrower appointed us as their appraiser, after our review recommended proceeding. Null until then, and once reporting is withdrawn. It returns to null if the borrower takes back telling us they sent the appointment, before an outcome is charged.","x-data-class":"institution_confidential"},"settled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"x-data-class":"institution_confidential"},"closed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"x-data-class":"institution_confidential"},"reporting_withdrawn_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the borrower withdrew permission to report this referral's progress to you; null while they haven't. From then on the referral shows `status: reporting_withdrawn` and no progress: its invited, expiry, activated, appointed, settled and closed times and `program.locked` are null.","x-data-class":"institution_confidential"}},"required":["id","object","status","status_label","status_tone","status_note","external_ref","borrower","vehicle","claim","liability","deficiency_coverage","program","consent","submitted_via","created_at","invited_at","invitation_expires_at","activated_at","appointed_at","settled_at","closed_at","reporting_withdrawn_at"],"description":"A referral as the API returns it: snake_case, grouped sub-objects. Ignore fields you don't know. SecondAppraisal works for the borrower in the review and any appraisal. The institution determines any GAP benefit under its own contract."},"ReferralAcknowledgement":{"type":"object","properties":{"id":{"type":"string","description":"The referral's id.","x-data-class":"institution_confidential"},"object":{"type":"string","const":"gap.referral","x-data-class":"public"},"status":{"type":"string","enum":["submitted","invited","handoff_pending","outreach_queued","contact_attempted","activated","in_progress","settled","closed","declined","unreachable","expired","cancelled","reporting_withdrawn"],"x-data-class":"public","description":"New values may be added: show one you don't recognise as not yet known, and don't fail."}},"required":["id","object","status"],"description":"What a write answers a key that doesn't hold `referrals:read`: the referral's id and status, never its data. A key that holds `referrals:read` reads the referral itself."},"ReferralBulkAcknowledgement":{"type":"object","properties":{"object":{"type":"string","const":"bulk_result","x-data-class":"public"},"created":{"type":"integer","description":"Rows created now (replays are not counted).","x-data-class":"public"},"failed":{"type":"integer","x-data-class":"public"},"results":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","description":"0-based index into `referrals`.","x-data-class":"public"},"ok":{"type":"boolean","x-data-class":"public"},"referral":{"$ref":"#/components/schemas/ReferralAcknowledgement"},"idempotent_replay":{"x-data-class":"public","type":"boolean"},"errors":{"type":"array","items":{"$ref":"#/components/schemas/BulkRowAcknowledgementError"}}},"required":["index","ok"]}}},"required":["object","created","failed","results"]},"ReferralBulkInput":{"type":"object","properties":{"referrals":{"minItems":1,"maxItems":500,"type":"array","items":{"$ref":"#/components/schemas/ReferralBulkRow"},"description":"1 to 500 referrals. Each row is validated and created on its own.","x-data-class":"borrower_contact"}},"required":["referrals"],"additionalProperties":false},"ReferralBulkResult":{"type":"object","properties":{"object":{"type":"string","const":"bulk_result","x-data-class":"public"},"created":{"type":"integer","description":"Rows created now (replays are not counted).","x-data-class":"public"},"failed":{"type":"integer","x-data-class":"public"},"results":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","description":"0-based index into `referrals`.","x-data-class":"public"},"ok":{"type":"boolean","x-data-class":"public"},"referral":{"$ref":"#/components/schemas/Referral"},"idempotent_replay":{"x-data-class":"public","type":"boolean"},"errors":{"type":"array","items":{"$ref":"#/components/schemas/BulkRowError"}}},"required":["index","ok"]}}},"required":["object","created","failed","results"]},"ReferralBulkRow":{"type":"object","properties":{"borrower_first_name":{"type":"string","minLength":1,"maxLength":80,"x-data-class":"borrower_personal","examples":["Jordan"]},"borrower_last_name":{"type":"string","minLength":1,"maxLength":80,"x-data-class":"borrower_personal","examples":["Reyes"]},"borrower_email":{"description":"An email address of at most 254 characters, with no spaces, a single `@`, and a domain with a dot that has text before it and at least two characters after it (`example.com`). Spaces around it are ignored. Stored in lowercase. At least one of `borrower_email` and `borrower_phone` is required. An invitation referral (the default `consent_mode`) needs an email while text invitations are off for its loss state: one without it is refused with 422 `email_required_sms_disabled`. A warm-handoff referral may be created phone-only, but its attestation under script 1.7 needs this address: the script's last question asks the borrower to confirm the address SecondAppraisal will email.","x-data-class":"borrower_contact","anyOf":[{"type":"string","maxLength":254},{"type":"null"}],"examples":["jordan.reyes@example.com"]},"borrower_phone":{"description":"A 10-digit US number; punctuation and a leading 1 are tolerated, and it is stored as 10 digits. An attestation under script 1.6, which asked about this number, still needs it.","x-data-class":"borrower_contact","examples":["(512) 555-0142"],"type":["string","null"]},"consent_mode":{"description":"`invitation` (the default): we send the borrower a co-branded activation link. `warm_handoff`: your staff delivered the disclosure script and the borrower agreed to be contacted; send the attestation as `disclosure`. Case-insensitive.","x-data-class":"institution_confidential","anyOf":[{"type":"string","enum":["invitation","warm_handoff"]},{"type":"null"}],"default":"invitation"},"vin":{"description":"11 to 17 letters and digits, never I, O or Q. Case-insensitive; stored in uppercase.","x-data-class":"borrower_personal","examples":["1FTFW1ET5DFC10312"],"type":["string","null"]},"vehicle_year":{"description":"A model year from 1950 to two years after the current year.","x-data-class":"borrower_personal","anyOf":[{"type":"integer","minimum":1950},{"type":"null"}],"examples":[2021]},"vehicle_make":{"x-data-class":"borrower_personal","anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"vehicle_model":{"x-data-class":"borrower_personal","anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"primary_carrier":{"description":"The borrower's insurer.","x-data-class":"borrower_personal","anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"claim_number":{"description":"The borrower's claim number with that insurer.","x-data-class":"borrower_personal","anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"loss_state":{"description":"The two-letter state of the loss, case-insensitive (`tx` is `TX`).","x-data-class":"borrower_personal","examples":["TX"],"type":["string","null"]},"garaged_state":{"description":"The two-letter USPS code of the state where the vehicle is garaged (a state or DC), case-insensitive. We judge this state when it is sent, else `loss_state`: a referral for a state we don't serve may be refused with 422 `state_not_served`.","x-data-class":"borrower_personal","examples":["TX"],"type":["string","null"]},"date_of_loss":{"description":"The date of the loss; at most a day ahead (a timezone ahead of UTC). Spaces around it are ignored.","x-data-class":"borrower_personal","anyOf":[{"type":"string","format":"date"},{"type":"null"}],"examples":["2026-06-15"]},"initial_offer_cents":{"description":"The insurer's initial ACV offer, in cents.","x-data-class":"borrower_personal","anyOf":[{"type":"integer","minimum":0,"maximum":1000000000},{"type":"null"}]},"loan_payoff_cents":{"description":"The outstanding loan payoff, in cents. It drives your exposure figures and stays editable after activation.","x-data-class":"borrower_personal","anyOf":[{"type":"integer","minimum":0,"maximum":1000000000},{"type":"null"}]},"deductible_cents":{"description":"Deprecated, and ignored from version 1.4.0: we no longer ask for the borrower's deductible. A value sent is accepted and discarded; it isn't stored and doesn't change a deductible on file. Leave it out: a later version removes it.","x-data-class":"borrower_personal","deprecated":true,"anyOf":[{"type":"integer","minimum":0,"maximum":1000000000},{"type":"null"}]},"deficiency_coverage":{"description":"Who covers the borrower's deficiency, what the loan payoff leaves after the insurer pays: `none`; `this_institution`, your own GAP; `other`, someone else's GAP; or `unknown`. Omit it, or send null, if you didn't ask. Case-insensitive. When your own GAP covers the borrower (`deficiency_coverage: this_institution`), you pay our whole consultation fee for that referral, whatever your program's mode. We charge it once, when the amount of loss is determined (an award or a confirmed settlement), and the borrower pays none of it. Other costs, such as photo dispatch or a share of an umpire's fee, follow your program's rules for them.","x-data-class":"borrower_personal","anyOf":[{"type":"string","enum":["none","this_institution","other","unknown"]},{"type":"null"}]},"external_ref":{"description":"Your own opaque reference, such as a case or file ID from your system; echoed in responses and webhooks. Never a loan, account or policy number (a credit union member number is an account number).","x-data-class":"institution_confidential","anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"examples":["CASE-4471"]},"program":{"description":"Per-referral program terms. Omit, or send null, to use your program defaults.","x-data-class":"institution_confidential","anyOf":[{"$ref":"#/components/schemas/ReferralProgramInput"},{"type":"null"}]},"disclosure":{"description":"Warm-handoff attestation, only with `consent_mode: \"warm_handoff\"`. With it the referral is created ready for our outreach; without it the referral waits for your attestation.","x-data-class":"institution_confidential","anyOf":[{"$ref":"#/components/schemas/DisclosureInput"},{"type":"null"}]},"claim_against":{"description":"Whose insurer is handling the claim: `own` (the borrower's own insurer), `other_driver` (another driver's insurer), or `unknown`. Case-insensitive. Leave it out when you don't know.","x-data-class":"borrower_personal","anyOf":[{"type":"string","enum":["own","other_driver","unknown"]},{"type":"null"}]},"cause_of_loss":{"description":"The cause of the loss, if you know it. `weather` is hail, wind or a storm; a flood is `flood`. Case-insensitive.","x-data-class":"borrower_personal","anyOf":[{"type":"string","enum":["collision","theft","fire","flood","weather","vandalism","animal","other"]},{"type":"null"}]},"trigger":{"description":"What led you to refer: `payoff_request` (an insurer asked you for the loan payoff), `loss_notice` (a notice of loss), `gap_claim` (the borrower filed a GAP claim), `borrower_request` (the borrower asked), or `other`. Case-insensitive.","x-data-class":"institution_confidential","anyOf":[{"type":"string","enum":["payoff_request","loss_notice","gap_claim","borrower_request","other"]},{"type":"null"}]},"payoff_requested_at":{"description":"When the insurer asked you for the loan payoff: a date (`2026-06-16`, read as midnight UTC) or an ISO 8601 timestamp with its UTC offset (`2026-06-16T15:04:00-06:00`). At most a day ahead.","x-data-class":"institution_confidential","examples":["2026-06-16T15:04:00-06:00"],"type":["string","null"]},"payoff_request_channel":{"description":"How that payoff request reached you. `web_portal` is your own online portal; `electronic_service` is a third-party payoff or letter-of-guarantee service the insurer used. Case-insensitive.","x-data-class":"institution_confidential","anyOf":[{"type":"string","enum":["phone","fax","email","mail","web_portal","electronic_service","other"]},{"type":"null"}]},"client_name":{"description":"For a GAP administrator: the lender or dealer whose borrower this is. At most 120 characters.","x-data-class":"institution_confidential","anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"requirement_basis":{"description":"Send it only when the borrower's contract lets you require the review. It is recorded and checked against your program's bases; messages to the borrower still ask rather than require.","x-data-class":"borrower_personal","anyOf":[{"$ref":"#/components/schemas/RequirementBasisInput"},{"type":"null"}]},"idempotency_key":{"description":"Makes this row safe to retry: a row with a key already used by your institution, in this key's mode, returns the original referral with `idempotent_replay: true`. A string of at most 255 characters; a longer key is refused, never cut. A live key can't send one that starts with `test:` (the row fails with `idempotency_key_mode_conflict`).","x-data-class":"institution_confidential","anyOf":[{"type":"string","maxLength":255},{"type":"null"}]}},"required":["borrower_first_name","borrower_last_name"],"additionalProperties":false,"description":"One referral in a bulk create."},"ReferralCancelInput":{"type":"object","properties":{"action":{"type":"string","const":"cancel","description":"Cancels the referral. Allowed only before the borrower activates (409 after).","x-data-class":"public"}},"required":["action"],"additionalProperties":false,"description":"Cancel the referral. Nothing else may be sent with it."},"ReferralCreateAcknowledgement":{"allOf":[{"$ref":"#/components/schemas/ReferralAcknowledgement"},{"type":"object","properties":{"idempotent_replay":{"type":"boolean","description":"True when this answers a replay of this same request under its Idempotency-Key.","x-data-class":"public"}},"required":["idempotent_replay"]}]},"ReferralCreateInput":{"type":"object","properties":{"borrower_first_name":{"type":"string","minLength":1,"maxLength":80,"x-data-class":"borrower_personal","examples":["Jordan"]},"borrower_last_name":{"type":"string","minLength":1,"maxLength":80,"x-data-class":"borrower_personal","examples":["Reyes"]},"borrower_email":{"description":"An email address of at most 254 characters, with no spaces, a single `@`, and a domain with a dot that has text before it and at least two characters after it (`example.com`). Spaces around it are ignored. Stored in lowercase. At least one of `borrower_email` and `borrower_phone` is required. An invitation referral (the default `consent_mode`) needs an email while text invitations are off for its loss state: one without it is refused with 422 `email_required_sms_disabled`. A warm-handoff referral may be created phone-only, but its attestation under script 1.7 needs this address: the script's last question asks the borrower to confirm the address SecondAppraisal will email.","x-data-class":"borrower_contact","anyOf":[{"type":"string","maxLength":254},{"type":"null"}],"examples":["jordan.reyes@example.com"]},"borrower_phone":{"description":"A 10-digit US number; punctuation and a leading 1 are tolerated, and it is stored as 10 digits. An attestation under script 1.6, which asked about this number, still needs it.","x-data-class":"borrower_contact","examples":["(512) 555-0142"],"type":["string","null"]},"consent_mode":{"description":"`invitation` (the default): we send the borrower a co-branded activation link. `warm_handoff`: your staff delivered the disclosure script and the borrower agreed to be contacted; send the attestation as `disclosure`. Case-insensitive.","x-data-class":"institution_confidential","anyOf":[{"type":"string","enum":["invitation","warm_handoff"]},{"type":"null"}],"default":"invitation"},"vin":{"description":"11 to 17 letters and digits, never I, O or Q. Case-insensitive; stored in uppercase.","x-data-class":"borrower_personal","examples":["1FTFW1ET5DFC10312"],"type":["string","null"]},"vehicle_year":{"description":"A model year from 1950 to two years after the current year.","x-data-class":"borrower_personal","anyOf":[{"type":"integer","minimum":1950},{"type":"null"}],"examples":[2021]},"vehicle_make":{"x-data-class":"borrower_personal","anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"vehicle_model":{"x-data-class":"borrower_personal","anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"primary_carrier":{"description":"The borrower's insurer.","x-data-class":"borrower_personal","anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"claim_number":{"description":"The borrower's claim number with that insurer.","x-data-class":"borrower_personal","anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"loss_state":{"description":"The two-letter state of the loss, case-insensitive (`tx` is `TX`).","x-data-class":"borrower_personal","examples":["TX"],"type":["string","null"]},"garaged_state":{"description":"The two-letter USPS code of the state where the vehicle is garaged (a state or DC), case-insensitive. We judge this state when it is sent, else `loss_state`: a referral for a state we don't serve may be refused with 422 `state_not_served`.","x-data-class":"borrower_personal","examples":["TX"],"type":["string","null"]},"date_of_loss":{"description":"The date of the loss; at most a day ahead (a timezone ahead of UTC). Spaces around it are ignored.","x-data-class":"borrower_personal","anyOf":[{"type":"string","format":"date"},{"type":"null"}],"examples":["2026-06-15"]},"initial_offer_cents":{"description":"The insurer's initial ACV offer, in cents.","x-data-class":"borrower_personal","anyOf":[{"type":"integer","minimum":0,"maximum":1000000000},{"type":"null"}]},"loan_payoff_cents":{"description":"The outstanding loan payoff, in cents. It drives your exposure figures and stays editable after activation.","x-data-class":"borrower_personal","anyOf":[{"type":"integer","minimum":0,"maximum":1000000000},{"type":"null"}]},"deductible_cents":{"description":"Deprecated, and ignored from version 1.4.0: we no longer ask for the borrower's deductible. A value sent is accepted and discarded; it isn't stored and doesn't change a deductible on file. Leave it out: a later version removes it.","x-data-class":"borrower_personal","deprecated":true,"anyOf":[{"type":"integer","minimum":0,"maximum":1000000000},{"type":"null"}]},"deficiency_coverage":{"description":"Who covers the borrower's deficiency, what the loan payoff leaves after the insurer pays: `none`; `this_institution`, your own GAP; `other`, someone else's GAP; or `unknown`. Omit it, or send null, if you didn't ask. Case-insensitive. When your own GAP covers the borrower (`deficiency_coverage: this_institution`), you pay our whole consultation fee for that referral, whatever your program's mode. We charge it once, when the amount of loss is determined (an award or a confirmed settlement), and the borrower pays none of it. Other costs, such as photo dispatch or a share of an umpire's fee, follow your program's rules for them.","x-data-class":"borrower_personal","anyOf":[{"type":"string","enum":["none","this_institution","other","unknown"]},{"type":"null"}]},"external_ref":{"description":"Your own opaque reference, such as a case or file ID from your system; echoed in responses and webhooks. Never a loan, account or policy number (a credit union member number is an account number).","x-data-class":"institution_confidential","anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"examples":["CASE-4471"]},"program":{"description":"Per-referral program terms. Omit, or send null, to use your program defaults.","x-data-class":"institution_confidential","anyOf":[{"$ref":"#/components/schemas/ReferralProgramInput"},{"type":"null"}]},"disclosure":{"description":"Warm-handoff attestation, only with `consent_mode: \"warm_handoff\"`. With it the referral is created ready for our outreach; without it the referral waits for your attestation.","x-data-class":"institution_confidential","anyOf":[{"$ref":"#/components/schemas/DisclosureInput"},{"type":"null"}]},"claim_against":{"description":"Whose insurer is handling the claim: `own` (the borrower's own insurer), `other_driver` (another driver's insurer), or `unknown`. Case-insensitive. Leave it out when you don't know.","x-data-class":"borrower_personal","anyOf":[{"type":"string","enum":["own","other_driver","unknown"]},{"type":"null"}]},"cause_of_loss":{"description":"The cause of the loss, if you know it. `weather` is hail, wind or a storm; a flood is `flood`. Case-insensitive.","x-data-class":"borrower_personal","anyOf":[{"type":"string","enum":["collision","theft","fire","flood","weather","vandalism","animal","other"]},{"type":"null"}]},"trigger":{"description":"What led you to refer: `payoff_request` (an insurer asked you for the loan payoff), `loss_notice` (a notice of loss), `gap_claim` (the borrower filed a GAP claim), `borrower_request` (the borrower asked), or `other`. Case-insensitive.","x-data-class":"institution_confidential","anyOf":[{"type":"string","enum":["payoff_request","loss_notice","gap_claim","borrower_request","other"]},{"type":"null"}]},"payoff_requested_at":{"description":"When the insurer asked you for the loan payoff: a date (`2026-06-16`, read as midnight UTC) or an ISO 8601 timestamp with its UTC offset (`2026-06-16T15:04:00-06:00`). At most a day ahead.","x-data-class":"institution_confidential","examples":["2026-06-16T15:04:00-06:00"],"type":["string","null"]},"payoff_request_channel":{"description":"How that payoff request reached you. `web_portal` is your own online portal; `electronic_service` is a third-party payoff or letter-of-guarantee service the insurer used. Case-insensitive.","x-data-class":"institution_confidential","anyOf":[{"type":"string","enum":["phone","fax","email","mail","web_portal","electronic_service","other"]},{"type":"null"}]},"client_name":{"description":"For a GAP administrator: the lender or dealer whose borrower this is. At most 120 characters.","x-data-class":"institution_confidential","anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"requirement_basis":{"description":"Send it only when the borrower's contract lets you require the review. It is recorded and checked against your program's bases; messages to the borrower still ask rather than require.","x-data-class":"borrower_personal","anyOf":[{"$ref":"#/components/schemas/RequirementBasisInput"},{"type":"null"}]}},"required":["borrower_first_name","borrower_last_name"],"additionalProperties":false,"description":"One borrower referral. Rules across fields: at least one of `borrower_email` and `borrower_phone`; a split-pay `program` needs both subsidy terms; `disclosure` only with a warm handoff."},"ReferralCreateResult":{"allOf":[{"$ref":"#/components/schemas/Referral"},{"type":"object","properties":{"idempotent_replay":{"type":"boolean","description":"True when this answers a replayed Idempotency-Key with the original referral.","x-data-class":"public"}},"required":["idempotent_replay"]}]},"ReferralDetail":{"allOf":[{"$ref":"#/components/schemas/Referral"},{"type":"object","properties":{"consultation_number":{"description":"Our consultation number, once the borrower activates.","x-data-class":"institution_confidential","type":["string","null"]},"days_in_appraisal":{"description":"Whole days from the `insurer_notified` milestone, when the insurer was notified that the borrower invoked the appraisal clause, until settlement, or until now if it hasn't settled. Null before that milestone.","x-data-class":"institution_confidential","type":["integer","null"]},"timeline":{"anyOf":[{"type":"object","properties":{"current_milestone":{"anyOf":[{"type":"string","enum":["referral_submitted","borrower_invited","disclosure_attested","outreach_in_progress","borrower_activated","valuation_report_received","insurance_details_received","photos_received","market_research","preliminary_estimate_ready","appraisal_report_complete","authorization_received","insurer_notified","insurer_acknowledged","insurer_appraiser_appointed","appraisals_exchanged","umpire_engaged","award_letter_issued","settlement_finalized","outcome_recorded"]},{"type":"null"}],"x-data-class":"public","description":"New values may be added: show one you don't recognise as not yet known, and don't fail."},"terminal":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","enum":["submitted","invited","handoff_pending","outreach_queued","contact_attempted","activated","in_progress","settled","closed","declined","unreachable","expired","cancelled"],"x-data-class":"public","description":"New values may be added: show one you don't recognise as not yet known, and don't fail."},"label":{"type":"string","x-data-class":"public"},"detail":{"type":"string","x-data-class":"public"}},"required":["status","label","detail"]},{"type":"null"}]},"phases":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","enum":["referral","setup","research","appraisal","settlement"],"x-data-class":"public","description":"New values may be added: treat one you don't recognise as unknown, and don't fail."},"label":{"type":"string","x-data-class":"public"},"state":{"type":"string","enum":["complete","current","upcoming","skipped"],"x-data-class":"public","description":"New values may be added: treat one you don't recognise as unknown, and don't fail."},"milestones":{"type":"array","items":{"$ref":"#/components/schemas/TimelineMilestone"}}},"required":["key","label","state","milestones"]}}},"required":["current_milestone","terminal","phases"]},{"type":"null"}],"description":"The provider-facing milestone timeline. Null once reporting is withdrawn (`status: reporting_withdrawn`)."},"financial":{"anyOf":[{"type":"object","properties":{"initial_offer_cents":{"x-data-class":"borrower_personal","type":["integer","null"]},"current_best_offer_cents":{"x-data-class":"borrower_personal","type":["integer","null"]},"appraised_value_cents":{"description":"The signed appraisal award's amount, once the award is signed; null until then.","x-data-class":"borrower_personal","type":["integer","null"]},"final_settlement_cents":{"x-data-class":"borrower_personal","type":["integer","null"]},"loan_payoff_cents":{"x-data-class":"borrower_personal","x-requires-permission":"referrals.contact:read","type":["integer","null"]},"deductible_cents":{"description":"Deprecated: we stopped collecting the deductible in version 1.4.0. A referral made before then shows the deductible your institution sent until our retention schedule or an erasure clears it; any other referral shows null.","x-data-class":"borrower_personal","deprecated":true,"type":["integer","null"]},"fees_paid_cents":{"description":"The consultation fees on this referral, counting any still waiting to be charged, such as an invoice institution's fee before the month's invoice run. Before it settles, they're the fees to date, as `figures_are_final` false says. Once it settles, they're the fees settlement recorded.","x-data-class":"institution_confidential","type":["integer","null"]},"gross_uplift_cents":{"x-data-class":"borrower_personal","type":["integer","null"]},"exposure_before_cents":{"description":"Estimated exposure before the review: the loan payoff minus the insurer's first offer, never below zero. Your institution determines its GAP benefit under its own contract.","x-data-class":"borrower_personal","x-requires-permission":"referrals.contact:read","type":["integer","null"]},"exposure_after_cents":{"description":"Estimated exposure now: the loan payoff minus the insurer's figure (the final settlement once there is one, else its best offer so far), never below zero. Your institution determines its GAP benefit under its own contract.","x-data-class":"borrower_personal","x-requires-permission":"referrals.contact:read","type":["integer","null"]},"exposure_reduction_cents":{"description":"Estimated exposure reduced (loan payoff minus the insurer's figure): `exposure_before_cents` minus `exposure_after_cents`. Your institution determines its GAP benefit under its own contract.","x-data-class":"borrower_personal","x-requires-permission":"referrals.contact:read","type":["integer","null"]},"net_savings_cents":{"x-data-class":"borrower_personal","x-requires-permission":"referrals.contact:read","type":["integer","null"]},"roi_multiple":{"x-data-class":"borrower_personal","x-requires-permission":"referrals.contact:read","type":["number","null"]},"figures_are_final":{"type":"boolean","x-data-class":"public"},"savings_statement":{"x-data-class":"borrower_personal","x-requires-permission":"referrals.contact:read","type":["string","null"]},"payoff_missing":{"type":"boolean","x-data-class":"public"}},"required":["initial_offer_cents","current_best_offer_cents","appraised_value_cents","final_settlement_cents","loan_payoff_cents","deductible_cents","fees_paid_cents","gross_uplift_cents","exposure_before_cents","exposure_after_cents","exposure_reduction_cents","net_savings_cents","roi_multiple","figures_are_final","savings_statement","payoff_missing"]},{"type":"null"}],"description":"The financial panel. Null once reporting is withdrawn (`status: reporting_withdrawn`)."}},"required":["consultation_number","days_in_appraisal","timeline","financial"]}],"description":"A referral with the provider-facing milestone timeline and the financial panel (offers, settlement, exposure before and after, net savings, ROI). SecondAppraisal works for the borrower in the review and any appraisal. The institution determines any GAP benefit under its own contract."},"ReferralList":{"type":"object","properties":{"object":{"type":"string","const":"list","x-data-class":"public"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Referral"}},"has_more":{"type":"boolean","x-data-class":"public"},"next_cursor":{"description":"Pass as `starting_after` for the next page; null on the last page. With `updated_after` it is never null: `has_more` says whether to fetch the next page now, and the last page's cursor is where your next poll resumes.","x-data-class":"institution_confidential","type":["string","null"]}},"required":["object","data","has_more","next_cursor"]},"ReferralPatchInput":{"anyOf":[{"$ref":"#/components/schemas/ReferralCancelInput"},{"$ref":"#/components/schemas/ReferralUpdateInput"}],"description":"Either `{ \"action\": \"cancel\" }` alone, or field edits."},"ReferralProgramEditInput":{"type":"object","properties":{"mode":{"description":"Who pays for the appraisal. Case-insensitive. Matched as sent: a value with spaces around it is refused.","x-data-class":"institution_confidential","type":"string","enum":["provider_paid","split_pay","customer_paid"]},"subsidy_type":{"description":"Split-pay only: how `subsidy_value` reads. Case-insensitive. Matched as sent: a value with spaces around it is refused.","x-data-class":"institution_confidential","anyOf":[{"type":"string","enum":["percent","fixed_cents"]},{"type":"null"}]},"subsidy_value":{"description":"Split-pay only: the percent of the fee you cover (1 to 100), or the cents you cover, per `subsidy_type`, at most 2,147,483,647. A split-pay referral needs both `subsidy_type` and a positive `subsidy_value`.","x-data-class":"institution_confidential","anyOf":[{"type":"integer","maximum":2147483647},{"type":"null"}]}},"additionalProperties":false,"description":"New program terms for a referral, as on create, except that `mode` and `subsidy_type` are matched as sent: a value with spaces around it is refused. A mode without subsidy terms inherits your default subsidy only when it is split-pay."},"ReferralProgramInput":{"type":"object","properties":{"mode":{"description":"Who pays for the appraisal. Case-insensitive.","x-data-class":"institution_confidential","type":"string","enum":["provider_paid","split_pay","customer_paid"]},"subsidy_type":{"description":"Split-pay only: how `subsidy_value` reads. Case-insensitive.","x-data-class":"institution_confidential","anyOf":[{"type":"string","enum":["percent","fixed_cents"]},{"type":"null"}]},"subsidy_value":{"description":"Split-pay only: the percent of the fee you cover (1 to 100), or the cents you cover, per `subsidy_type`, at most 2,147,483,647. A split-pay referral needs both `subsidy_type` and a positive `subsidy_value`.","x-data-class":"institution_confidential","anyOf":[{"type":"integer","maximum":2147483647},{"type":"null"}]}},"additionalProperties":false,"description":"Per-referral program terms, overriding your program defaults. A mode without subsidy terms inherits your default subsidy only when it is split-pay."},"ReferralSimulateInput":{"type":"object","properties":{"to":{"type":"string","enum":["invited","activated","in_progress","settled","closed","declined","unreachable","expired"],"description":"The status to move the sandbox referral to; a step off its lifecycle is a 409 `invalid_transition`.","x-data-class":"public"},"outcome":{"description":"With `to: \"settled\"` only, and required there: the figures to settle with. The uplift and the exposure figures are computed from them as for a live settlement.","x-data-class":"borrower_personal","type":"object","properties":{"appraised_value_cents":{"x-data-class":"borrower_personal","type":"integer","minimum":0,"maximum":1000000000},"final_settlement_cents":{"type":"integer","minimum":0,"maximum":1000000000,"x-data-class":"borrower_personal"}},"required":["final_settlement_cents"],"additionalProperties":false}},"required":["to"],"additionalProperties":false,"description":"One simulated step for a sandbox referral (test keys only)."},"ReferralUpdateInput":{"type":"object","properties":{"loan_payoff_cents":{"description":"Editable until we clear the referral's borrower details under the Data Handling and Retention Schedule (409 `referral_details_cleared` after). Null or \"\" clears it.","x-data-class":"borrower_personal","anyOf":[{"type":"integer","minimum":0,"maximum":1000000000},{"type":"null"}]},"deductible_cents":{"description":"Deprecated, and ignored from version 1.4.0: we no longer ask for the borrower's deductible. A value sent is accepted and discarded; it isn't stored and doesn't change a deductible on file. Leave it out: a later version removes it.","x-data-class":"borrower_personal","deprecated":true,"anyOf":[{"type":"integer","minimum":0,"maximum":1000000000},{"type":"null"}]},"borrower_first_name":{"description":"At most 80 characters, as on create. It can't be cleared.","x-data-class":"borrower_personal","type":"string","minLength":1,"maxLength":80},"borrower_last_name":{"description":"At most 80 characters, as on create. It can't be cleared.","x-data-class":"borrower_personal","type":"string","minLength":1,"maxLength":80},"borrower_email":{"description":"An email address of at most 254 characters, with no spaces, a single `@`, and a domain with a dot that has text before it and at least two characters after it (`example.com`). Spaces around it are ignored. Stored in lowercase. At least one of `borrower_email` and `borrower_phone` is required. An invitation referral (the default `consent_mode`) needs an email while text invitations are off for its loss state: one without it is refused with 422 `email_required_sms_disabled`. A warm-handoff referral may be created phone-only, but its attestation under script 1.7 needs this address: the script's last question asks the borrower to confirm the address SecondAppraisal will email.","x-data-class":"borrower_contact","anyOf":[{"type":"string","maxLength":254},{"type":"null"}],"examples":["jordan.reyes@example.com"]},"borrower_phone":{"description":"A 10-digit US number; punctuation and a leading 1 are tolerated, and it is stored as 10 digits. An attestation under script 1.6, which asked about this number, still needs it.","x-data-class":"borrower_contact","examples":["(512) 555-0142"],"type":["string","null"]},"vin":{"description":"11 to 17 letters and digits, never I, O or Q. Case-insensitive; stored in uppercase.","x-data-class":"borrower_personal","examples":["1FTFW1ET5DFC10312"],"type":["string","null"]},"vehicle_year":{"description":"A model year from 1950 to two years after the current year.","x-data-class":"borrower_personal","anyOf":[{"type":"integer","minimum":1950},{"type":"null"}],"examples":[2021]},"vehicle_make":{"x-data-class":"borrower_personal","anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"vehicle_model":{"x-data-class":"borrower_personal","anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"primary_carrier":{"x-data-class":"borrower_personal","anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"claim_number":{"x-data-class":"borrower_personal","anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"loss_state":{"description":"The two-letter state of the loss, case-insensitive (`tx` is `TX`).","x-data-class":"borrower_personal","examples":["TX"],"type":["string","null"]},"garaged_state":{"description":"The two-letter USPS code of the state where the vehicle is garaged (a state or DC), case-insensitive. We judge this state when it is sent, else `loss_state`: a referral for a state we don't serve may be refused with 422 `state_not_served`. Editable until the borrower activates; null or \"\" clears it.","x-data-class":"borrower_personal","examples":["TX"],"type":["string","null"]},"external_ref":{"description":"Your own opaque reference, such as a case or file ID from your system; echoed in responses and webhooks. Never a loan, account or policy number (a credit union member number is an account number).","x-data-class":"institution_confidential","anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"examples":["CASE-4471"]},"initial_offer_cents":{"description":"The insurer's initial ACV offer, in cents.","x-data-class":"borrower_personal","anyOf":[{"type":"integer","minimum":0,"maximum":1000000000},{"type":"null"}]},"program":{"description":"New program terms. They may raise your institution's share of the fee, never lower it (409 `funding_lowered`), and lock once the borrower activates under them (409 `economics_locked`); switching into provider-paid or split-pay needs a billing method (403 `billing_required`). Null is the same as leaving `program` out: the terms stay as they are.","x-data-class":"institution_confidential","anyOf":[{"$ref":"#/components/schemas/ReferralProgramEditInput"},{"type":"null"}]},"claim_against":{"description":"Whose insurer is handling the claim: `own` (the borrower's own insurer), `other_driver` (another driver's insurer), or `unknown`. Case-insensitive. Leave it out when you don't know. Editable until the borrower activates; null or \"\" clears it.","x-data-class":"borrower_personal","anyOf":[{"type":"string","enum":["own","other_driver","unknown"]},{"type":"null"}]},"cause_of_loss":{"description":"The cause of the loss, if you know it. `weather` is hail, wind or a storm; a flood is `flood`. Case-insensitive. Editable until the borrower activates; null or \"\" clears it.","x-data-class":"borrower_personal","anyOf":[{"type":"string","enum":["collision","theft","fire","flood","weather","vandalism","animal","other"]},{"type":"null"}]},"trigger":{"description":"What led you to refer: `payoff_request` (an insurer asked you for the loan payoff), `loss_notice` (a notice of loss), `gap_claim` (the borrower filed a GAP claim), `borrower_request` (the borrower asked), or `other`. Case-insensitive. Editable until the borrower activates; null or \"\" clears it.","x-data-class":"institution_confidential","anyOf":[{"type":"string","enum":["payoff_request","loss_notice","gap_claim","borrower_request","other"]},{"type":"null"}]},"payoff_requested_at":{"description":"When the insurer asked you for the loan payoff: a date (`2026-06-16`, read as midnight UTC) or an ISO 8601 timestamp with its UTC offset (`2026-06-16T15:04:00-06:00`). At most a day ahead. Editable until the borrower activates; null or \"\" clears it.","x-data-class":"institution_confidential","examples":["2026-06-16T15:04:00-06:00"],"type":["string","null"]},"payoff_request_channel":{"description":"How that payoff request reached you. `web_portal` is your own online portal; `electronic_service` is a third-party payoff or letter-of-guarantee service the insurer used. Case-insensitive. Editable until the borrower activates; null or \"\" clears it.","x-data-class":"institution_confidential","anyOf":[{"type":"string","enum":["phone","fax","email","mail","web_portal","electronic_service","other"]},{"type":"null"}]},"client_name":{"description":"For a GAP administrator: the lender or dealer whose borrower this is. At most 120 characters. Editable until the borrower activates; null or \"\" clears it.","x-data-class":"institution_confidential","anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"requirement_basis":{"description":"Send it only when the borrower's contract lets you require the review. It is recorded and checked against your program's bases; messages to the borrower still ask rather than require. Editable until the borrower activates; null or \"\" clears it.","x-data-class":"borrower_personal","anyOf":[{"$ref":"#/components/schemas/RequirementBasisInput"},{"type":"null"}]},"action":{"description":"Null is the same as leaving `action` out. To cancel, send `{ \"action\": \"cancel\" }` on its own.","x-data-class":"public","type":"null"}},"additionalProperties":false,"description":"Edit a referral. `loan_payoff_cents` stays editable after activation, and `deductible_cents` is accepted and ignored; every other field locks when the borrower activates (409 `referral_locked`). Null or \"\" clears an optional field other than the ignored `deductible_cents`. Only spaces clears `vehicle_make`, `vehicle_model`, `primary_carrier`, `claim_number` and `external_ref` too, and is refused for the cents, the year, the email, the phone, the VIN and the loss and garaged states. The borrower's names can't be cleared, and `program: null` changes nothing."},"RequirementBasisInput":{"type":"object","properties":{"basis_kind":{"description":"`contract`: a provision in the borrower's own contract. `carrier`: a GAP insurance policy's form, filed in the state, which needs `filed_form_ref`. Case-insensitive.","x-data-class":"institution_confidential","type":"string","enum":["contract","carrier"]},"contract_form_id":{"type":"string","description":"The contract form's identifier, as the form names itself. 1 to 64 characters: letters, digits, spaces and . , _ - / ( ) # &. Spaces around it are ignored.","x-data-class":"institution_confidential"},"contract_form_version":{"type":"string","description":"The form's version or edition: 1 to 64 characters, in the same characters as `contract_form_id`. Spaces around it are ignored.","x-data-class":"institution_confidential"},"contract_date":{"type":"string","description":"The date of the borrower's contract (YYYY-MM-DD); at most a day ahead. Spaces around it are ignored.","format":"date","x-data-class":"borrower_personal","examples":["2025-03-01"]},"product_type":{"description":"The product the contract is: a GAP waiver or GAP insurance. Case-insensitive. A loan without GAP can't be a requirement basis: `loan_without_gap`, which versions before 1.4.0 listed, is refused, whichever version a client was built on.","x-data-class":"institution_confidential","type":"string","enum":["gap_waiver","gap_insurance"]},"state":{"description":"The two-letter USPS code of the state whose law the contract follows (a state or DC), case-insensitive.","x-data-class":"borrower_personal","type":"string","examples":["TX"]},"a2_acknowledged":{"type":"boolean","description":"Whether the borrower acknowledged the signing disclosure in its own box (the program paper's Appendix A-2).","x-data-class":"borrower_personal"},"adopts_x5":{"type":"boolean","description":"Whether the contract adopts X.5 (no delay; no charges).","x-data-class":"institution_confidential"},"adopts_x6":{"type":"boolean","description":"Whether the contract adopts X.6 (no worse off).","x-data-class":"institution_confidential"},"filed_form_ref":{"description":"A `carrier` basis's filed form: its filing reference, as an identifier of at most 64 letters, digits, dots, hyphens and underscores. Never a URL. Spaces around it are ignored.","x-data-class":"institution_confidential","examples":["SERFF.TX-2024_0012"],"type":["string","null"]}},"required":["basis_kind","contract_form_id","contract_form_version","contract_date","product_type","state","a2_acknowledged","adopts_x5","adopts_x6"],"additionalProperties":false,"description":"The contract basis for requiring the review. Every member is required except `filed_form_ref`, which a `carrier` basis needs."},"ReviewRecord":{"type":"object","properties":{"object":{"type":"string","const":"gap.review_record","x-data-class":"public"},"id":{"type":"string","description":"The version's id.","x-data-class":"institution_confidential"},"referral_id":{"type":"string","description":"The referral's id.","x-data-class":"institution_confidential"},"version":{"type":"integer","minimum":1,"description":"The version's number: 1 for the record's first version, and one more for each after it.","x-data-class":"public"},"hash":{"type":"string","pattern":"^[0-9a-f]{64}$","description":"SHA-256, in lowercase hex, of `bundle`'s canonical JSON (RFC 8785): hash the bundle you read to check it. A version never changes, and a redacted one keeps its hash.","x-data-class":"institution_confidential"},"status":{"type":"string","enum":["PENDING","IN_REVIEW","REVIEWED_NO_UNDERVALUATION","REVIEWED_UNDERVALUATION_FOUND","RESEARCH_DELIVERED","REVIEWED_ELSEWHERE","DECLINED","UNREACHABLE","RELEASED","CANCELLED","REPORTING_WITHDRAWN"],"description":"The review's status as of this version. `PENDING`: referred, and the borrower hasn't engaged yet. `IN_REVIEW`: the borrower activated, and no review has reached them. `REVIEWED_NO_UNDERVALUATION`: we told the borrower the offer looks fair. `REVIEWED_UNDERVALUATION_FOUND`: we told the borrower we can help. `RESEARCH_DELIVERED`: our research reached the borrower, with no verdict. `REVIEWED_ELSEWHERE`: the borrower had the review done elsewhere. `DECLINED`: The borrower declined the review or the engagement, or told us 'No thanks' and received no review before the review window ended. It reports what the borrower told us, not any duty under your contract. `UNREACHABLE`: we couldn't reach the borrower, or the invitation expired. `RELEASED`: the review window ended with nothing delivered. `CANCELLED`: you cancelled the referral before the borrower activated. `REPORTING_WITHDRAWN`: the borrower asked us to stop reporting this referral's progress. New values may be added: show one you don't recognise as not yet known, and don't fail.","x-data-class":"public"},"created_at":{"type":"string","format":"date-time","description":"When the version was written.","x-data-class":"institution_confidential"},"redacted":{"type":"boolean","description":"True once the version's bundle has been removed: when its retention period ends, or when the borrower's data is erased at their request. Its id, version, hash and status stay.","x-data-class":"public"},"bundle":{"anyOf":[{"anyOf":[{"$ref":"#/components/schemas/ReviewRecordBundle"},{"$ref":"#/components/schemas/WithdrawnReviewRecordBundle"}]},{"type":"null"}],"description":"The record itself, or null when the version is redacted.","x-data-class":"borrower_personal"}},"required":["object","id","referral_id","version","hash","status","created_at","redacted","bundle"],"description":"One version of a referral's review record. Versions only grow: one is written each time the record changes, never edited afterwards, and cited by `{ id, version, hash }`."},"ReviewRecordBundle":{"type":"object","properties":{"schema":{"type":"string","const":"review-record.v1","description":"The bundle's format.","x-data-class":"public"},"referral_id":{"type":"string","description":"The referral's id.","x-data-class":"institution_confidential"},"status":{"type":"string","enum":["PENDING","IN_REVIEW","REVIEWED_NO_UNDERVALUATION","REVIEWED_UNDERVALUATION_FOUND","RESEARCH_DELIVERED","REVIEWED_ELSEWHERE","DECLINED","UNREACHABLE","RELEASED","CANCELLED"],"description":"The review's status as of this version, as the record's `status` gives it. New values may be added: show one you don't recognise as not yet known, and don't fail.","x-data-class":"public"},"review_completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the review completed: when our verdict, or our paid research, first reached the borrower, or when they had the review done elsewhere. Null until then; nothing after it moves it.","x-data-class":"institution_confidential"},"verdict":{"type":"object","properties":{"recommendation":{"anyOf":[{"type":"string","enum":["PROCEED","DECLINE"]},{"type":"null"}],"description":"The verdict that reached the borrower. `PROCEED`: we told them we can help. `DECLINE`: we told them the offer looks fair. Null until one reaches them: you never hear a verdict before the borrower does. New values may be added: treat one you don't recognise as unknown, and don't fail.","x-data-class":"public"},"delivered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When that verdict reached the borrower.","x-data-class":"institution_confidential"},"tier":{"anyOf":[{"type":"string","enum":["PRELIMINARY","FULL"]},{"type":"null"}],"description":"The review the verdict came from. `PRELIMINARY`: made before the valuation report, photos and receipts were all in. `FULL`: made with all of them. Null without a verdict. New values may be added: treat one you don't recognise as unknown, and don't fail.","x-data-class":"public"},"decline_reason":{"description":"With a `DECLINE`, why, when a reason was recorded: `OFFER_FAIR`, `GAIN_BELOW_THRESHOLD`, `NO_APPRAISAL_RIGHT`, `EVIDENCE_INSUFFICIENT`, `OUT_OF_SCOPE` or `OTHER`. Null otherwise.","x-data-class":"public","type":["string","null"]},"research_only":{"type":"boolean","description":"True when the borrower engaged us for research only, which carries no verdict.","x-data-class":"public"},"research_delivered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When our paid research reached the borrower.","x-data-class":"institution_confidential"},"full_fac_required_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When a full review became due: the borrower engaged us after a preliminary one.","x-data-class":"institution_confidential"},"full_fac_completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When that full review was completed.","x-data-class":"institution_confidential"},"re_review_requested_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When a change to the vehicle or the evidence sent the verdict back to be reviewed again.","x-data-class":"institution_confidential"}},"required":["recommendation","delivered_at","tier","decline_reason","research_only","research_delivered_at","full_fac_required_at","full_fac_completed_at","re_review_requested_at"]},"materiality":{"type":"object","properties":{"rule":{"type":"string","description":"The rule `we_can_help` follows: `D12` today. Other rules may be added: treat one you don't recognise as a rule you don't know, and read `we_can_help` as that rule's verdict.","x-data-class":"public","examples":["D12"]},"we_can_help":{"description":"Whether we can help, under that rule: true when our valuation clears the insurer's offer by enough to be worth an appraisal, false when it doesn't. Never a dollar figure. Null when it couldn't be judged (no confirmed offer, or no valid valuation range), and until a verdict reaches the borrower.","x-data-class":"borrower_personal","type":["boolean","null"]},"second_review_pending":{"type":"boolean","description":"True while a second reviewer still has to check the verdict.","x-data-class":"public"}},"required":["rule","we_can_help","second_review_pending"]},"window":{"type":"object","properties":{"valuation_received_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the valuation report for the review came in.","x-data-class":"institution_confidential"},"ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the review window ends: 11:59:59 PM Denver time on the earlier of 5 business days after the valuation report and 15 business days after the borrower was first told about the review. Null while no window runs.","x-data-class":"institution_confidential"}},"required":["valuation_received_at","ends_at"]},"release":{"type":"object","properties":{"released_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the review window ended with nothing delivered and we released the referral. It reports our review window only, not any duty under your contract. A review the borrower has started goes on.","x-data-class":"institution_confidential"},"notice_sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the release notice went to the borrower.","x-data-class":"institution_confidential"}},"required":["released_at","notice_sent_at"]},"outreach":{"type":"object","properties":{"consent_mode":{"type":"string","enum":["INVITATION","WARM_HANDOFF"],"description":"How the borrower came to us: `INVITATION` (we invited them) or `WARM_HANDOFF` (your staff handed them to us). New values may be added: treat one you don't recognise as unknown, and don't fail.","x-data-class":"institution_confidential"},"invited_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When we sent the invitation.","x-data-class":"institution_confidential"},"disclosure_confirmed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When your staff delivered the warm-handoff disclosure: noon UTC on the day given (`delivered_on`, or the day entered in the portal), or the moment they attested if no day was given.","x-data-class":"institution_confidential"},"first_contact_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When we first contacted the borrower.","x-data-class":"institution_confidential"},"contact_attempts":{"type":"integer","description":"How many times we tried to reach the borrower.","x-data-class":"institution_confidential"},"last_contact_attempt_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When we last tried.","x-data-class":"institution_confidential"},"reached_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When we reached the borrower.","x-data-class":"institution_confidential"},"activated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the borrower activated.","x-data-class":"institution_confidential"},"contact_stopped_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Deprecated: null for every referral from version 1.4.0.","x-data-class":"institution_confidential","deprecated":true}},"required":["consent_mode","invited_at","disclosure_confirmed_at","first_contact_at","contact_attempts","last_contact_attempt_at","reached_at","activated_at","contact_stopped_at"]},"refusal":{"type":"object","properties":{"recorded_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the borrower's \"no thanks\" was recorded.","x-data-class":"institution_confidential"},"scope":{"description":"What the refusal covers, as a code.","x-data-class":"public","type":["string","null"]},"method":{"description":"How the borrower gave it, as a code.","x-data-class":"public","type":["string","null"]},"text_version":{"description":"The version of the refusal text the borrower heard.","x-data-class":"public","type":["string","null"]}},"required":["recorded_at","scope","method","text_version"]},"reviewed_elsewhere_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When we recorded that the borrower had the review done elsewhere.","x-data-class":"institution_confidential"},"appraisal_right":{"type":"object","properties":{"claim_against":{"description":"Whose insurer is handling the claim: `own`, `other_driver` or `unknown`, as you or the borrower told us.","x-data-class":"borrower_personal","type":["string","null"]},"clause_invoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the policy's appraisal clause was invoked with the insurer.","x-data-class":"institution_confidential"},"clause_invoked_via":{"description":"How it was invoked, as a code.","x-data-class":"public","type":["string","null"]}},"required":["claim_against","clause_invoked_at","clause_invoked_via"]},"costs":{"type":"object","properties":{"engagement":{"anyOf":[{"type":"object","properties":{"basis":{"type":"string","enum":["SNAPSHOT","LEGACY"],"description":"`SNAPSHOT`: the funding terms fixed when the borrower activated. `LEGACY`: the program's original prices, for a referral without them. New values may be added: treat one you don't recognise as unknown, and don't fail.","x-data-class":"institution_confidential"},"payer":{"type":"string","enum":["PARTNER","BORROWER","SPLIT","MEMBERSHIP","NONE"],"description":"Who pays the engagement fee: `PARTNER` (you), `BORROWER`, `SPLIT` (both), `MEMBERSHIP` (a membership covers it) or `NONE` (there is no fee). New values may be added: treat one you don't recognise as unknown, and don't fail.","x-data-class":"institution_confidential"},"list_cents":{"type":"integer","description":"The engagement fee before anyone's part, in cents.","x-data-class":"institution_confidential"},"institution_cents":{"type":"integer","description":"Your part of it, in cents.","x-data-class":"institution_confidential"},"borrower_cents":{"type":"integer","description":"What the borrower is charged for it, in cents, after any discount.","x-data-class":"institution_confidential"}},"required":["basis","payer","list_cents","institution_cents","borrower_cents"]},{"type":"null"}],"description":"The engagement fee: who pays it, and each part. Null for a key without `reporting:read`.","x-data-class":"institution_confidential","x-requires-permission":"reporting:read"},"institution_charges":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","description":"The charges' kind.","x-data-class":"institution_confidential"},"status":{"type":"string","description":"Their status.","x-data-class":"institution_confidential"},"amount_cents":{"type":"integer","description":"Their total, in cents.","x-data-class":"institution_confidential"},"count":{"type":"integer","description":"How many there are.","x-data-class":"institution_confidential"}},"required":["kind","status","amount_cents","count"]}},{"type":"null"}],"description":"What we have charged you on this referral, summed by kind and status. Null for a key without `reporting:read`.","x-data-class":"institution_confidential","x-requires-permission":"reporting:read"}},"required":["engagement","institution_charges"]},"requirement":{"type":"object","properties":{"mode":{"type":"string","description":"The review requirement your program had when the borrower activated: `REQUEST` (also when none was set), `REVIEW` or `REVIEW_AND_APPRAISAL`. Messages to the borrower ask rather than require.","x-data-class":"institution_confidential"},"basis_attested":{"type":"boolean","description":"Whether you sent a `requirement_basis` with the referral.","x-data-class":"institution_confidential"},"basis_validated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When that basis matched one of your program's approved bases.","x-data-class":"institution_confidential"}},"required":["mode","basis_attested","basis_validated_at"]},"outcome":{"type":"object","properties":{"settled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the borrower's claim settled.","x-data-class":"institution_confidential"},"closed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the referral's record closed.","x-data-class":"institution_confidential"},"close_reason":{"anyOf":[{"type":"string","enum":["SETTLED","NO_MATERIAL_UNDERVALUATION","BORROWER_DECLINED","BORROWER_UNREACHABLE","INVITATION_EXPIRED","CANCELLED_BY_INSTITUTION","REVIEWED_ELSEWHERE","SETTLED_WITH_INSURER","OUT_OF_SCOPE","STATE_NOT_SERVED","NO_APPRAISAL_RIGHT","CLAIM_NOT_COVERED","NOT_COMPLETED","REPORTING_WITHDRAWN"]},{"type":"null"}],"description":"Why it closed: null while it is open. New values may be added: treat one you don't recognise as unknown, and don't fail.","x-data-class":"public"}},"required":["settled_at","closed_at","close_reason"]},"copy_versions":{"type":"object","properties":{"disclosure_script":{"description":"The version of the warm-handoff disclosure script your staff delivered.","x-data-class":"public","type":["string","null"]},"refusal_text":{"description":"The version of the refusal text the borrower heard.","x-data-class":"public","type":["string","null"]}},"required":["disclosure_script","refusal_text"]},"final_acceptance":{"description":"The borrower's Final Acceptance, once recorded. Absent until then.","type":"object","properties":{"accepted_at":{"type":"string","format":"date-time","description":"When the borrower signed the document accepting the insurer's valuation.","x-data-class":"institution_confidential"},"reported_by":{"description":"Who told us: `BORROWER` or `INSTITUTION`.","x-data-class":"public","type":["string","null"]},"basis":{"description":"The document: `WRITTEN_RELEASE`, `PROOF_OF_LOSS` or `SETTLEMENT_AGREEMENT`.","x-data-class":"public","type":["string","null"]}},"required":["accepted_at","reported_by","basis"]},"external_review":{"description":"The latest stage of what happened with the insurer after our review, once one is recorded. Absent until then.","type":"object","properties":{"stage":{"type":"string","description":"The latest stage after our review: `REVIEW`, `APPRAISAL_INVOKED`, `AWARD` or `APPRAISAL_PURSUED_ELSEWHERE`. More may be added.","x-data-class":"public"},"stage_at":{"type":"string","format":"date-time","description":"When that stage happened.","x-data-class":"institution_confidential"},"reimbursement_attested_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When you attested that the appraisal's costs are reimbursed, if you did.","x-data-class":"institution_confidential"}},"required":["stage","stage_at","reimbursement_attested_at"]}},"required":["schema","referral_id","status","review_completed_at","verdict","materiality","window","release","outreach","refusal","reviewed_elsewhere_at","appraisal_right","costs","requirement","outcome","copy_versions"],"description":"One version of a referral's review record (`review-record.v1`). It names no one and carries no contact detail, VIN, claim number or dollar range, and it shows a verdict only once the verdict reached the borrower. Every date is ISO 8601 in UTC, and every amount integer cents."},"ReviewRecordReference":{"type":"object","properties":{"id":{"type":"string","description":"The version's id.","x-data-class":"institution_confidential"},"version":{"type":"integer","minimum":1,"description":"The version's number: 1 for the record's first version, and one more for each after it.","x-data-class":"public"},"hash":{"type":"string","pattern":"^[0-9a-f]{64}$","description":"SHA-256, in lowercase hex, of the version's canonical JSON (RFC 8785). A version never changes, so the version you read later still matches it.","x-data-class":"institution_confidential"},"status":{"type":"string","enum":["PENDING","IN_REVIEW","REVIEWED_NO_UNDERVALUATION","REVIEWED_UNDERVALUATION_FOUND","RESEARCH_DELIVERED","REVIEWED_ELSEWHERE","DECLINED","UNREACHABLE","RELEASED","CANCELLED","REPORTING_WITHDRAWN"],"description":"The review's status as of this version. `PENDING`: referred, and the borrower hasn't engaged yet. `IN_REVIEW`: the borrower activated, and no review has reached them. `REVIEWED_NO_UNDERVALUATION`: we told the borrower the offer looks fair. `REVIEWED_UNDERVALUATION_FOUND`: we told the borrower we can help. `RESEARCH_DELIVERED`: our research reached the borrower, with no verdict. `REVIEWED_ELSEWHERE`: the borrower had the review done elsewhere. `DECLINED`: The borrower declined the review or the engagement, or told us 'No thanks' and received no review before the review window ended. It reports what the borrower told us, not any duty under your contract. `UNREACHABLE`: we couldn't reach the borrower, or the invitation expired. `RELEASED`: the review window ended with nothing delivered. `CANCELLED`: you cancelled the referral before the borrower activated. `REPORTING_WITHDRAWN`: the borrower asked us to stop reporting this referral's progress. New values may be added: show one you don't recognise as not yet known, and don't fail.","x-data-class":"public"},"created_at":{"type":"string","format":"date-time","description":"When the version was written.","x-data-class":"institution_confidential"}},"required":["id","version","hash","status","created_at"],"description":"The latest version of the referral's review record, cited as the review webhooks cite one."},"ReviewStatus":{"type":"object","properties":{"object":{"type":"string","const":"gap.review_status","x-data-class":"public"},"referral":{"type":"object","properties":{"id":{"type":"string","description":"The referral's id.","x-data-class":"institution_confidential"},"external_ref":{"description":"Your own reference, as you sent it.","x-data-class":"institution_confidential","type":["string","null"]}},"required":["id","external_ref"]},"record":{"anyOf":[{"$ref":"#/components/schemas/ReviewRecordReference"},{"type":"null"}],"description":"The latest version of the referral's review record. Null while it has none to show: before its first version is written, and from the borrower's request that we stop reporting the referral's progress until the version that records it.","x-data-class":"institution_confidential"},"close_reason":{"anyOf":[{"type":"string","enum":["SETTLED","NO_MATERIAL_UNDERVALUATION","BORROWER_DECLINED","BORROWER_UNREACHABLE","INVITATION_EXPIRED","CANCELLED_BY_INSTITUTION","REVIEWED_ELSEWHERE","SETTLED_WITH_INSURER","OUT_OF_SCOPE","STATE_NOT_SERVED","NO_APPRAISAL_RIGHT","CLAIM_NOT_COVERED","NOT_COMPLETED","REPORTING_WITHDRAWN"]},{"type":"null"}],"description":"Why the referral's record closed, as of that version: null while it is open, and whenever `record` is null. New values may be added: treat one you don't recognise as unknown, and don't fail.","x-data-class":"public"}},"required":["object","referral","record","close_reason"],"description":"One of your referrals the lookup matched, and its review status: the version its record stands at."},"ReviewStatusList":{"type":"object","properties":{"object":{"type":"string","const":"list","x-data-class":"public"},"data":{"type":"array","items":{"$ref":"#/components/schemas/ReviewStatus"}},"has_more":{"type":"boolean","description":"True when more than 100 of your referrals matched: the newest 100 are listed.","x-data-class":"public"}},"required":["object","data","has_more"],"description":"Your referrals the identifier matched, newest first, at most 100; an empty list when none did."},"ReviewStatusLookupInput":{"type":"object","properties":{"vin":{"description":"The vehicle's VIN: 11 to 17 letters and digits, never I, O or Q. Case-insensitive.","x-data-class":"borrower_personal","examples":["1FTFW1ET5DFC10312"],"type":["string","null"]},"claim_number":{"description":"The borrower's claim number with their insurer, as you sent it on the referral.","x-data-class":"borrower_personal","anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"external_ref":{"description":"Your own reference for the referral, as you sent it.","x-data-class":"institution_confidential","anyOf":[{"type":"string","maxLength":120},{"type":"null"}]}},"additionalProperties":false,"description":"Exactly one identifier, matched against your referrals: `vin`, or `claim_number` or `external_ref` as you sent it on the referral, spaces around it aside. One that is blank or null is not sent."},"SignatureCheckResult":{"type":"object","properties":{"object":{"type":"string","const":"gap.signature_check","x-data-class":"public"},"verified":{"type":"boolean","description":"Whether the request's signature verified with your test credential's public key over the signature base built from the request as received, whatever the other checks found. It is false for a keyid that names no test credential of yours, a revoked one, or one registered with another algorithm than the one the signature names.","x-data-class":"public"},"signature_base":{"description":"The signature base built from the request as received (RFC 9421 section 2.5), to compare byte for byte with the one you signed. Present whenever the request's signature follows the gap-v2 profile, whether or not it verified.","x-data-class":"institution_confidential","type":"string"},"code":{"description":"The first check that would refuse this request on any other operation, whether or not the signature verified, as the code it would be refused with. Absent when every check passes. New values may be added: treat one you don't recognise as unknown, and don't fail.","x-data-class":"public","type":"string","enum":["signature_profile_invalid","signature_expired","target_uri_not_allowed","signature_invalid","environment_mismatch","api_key_expired"]},"checks":{"description":"Each check's result, in the order the API makes them: `pass`, `fail`, or `not_checked` when an earlier step left nothing to check it with.","type":"object","properties":{"profile":{"type":"string","enum":["pass","fail","not_checked"],"description":"`Signature-Input`, `Signature`, the headers they cover and `X-SA-Environment` follow the gap-v2 profile. When this fails, nothing else is checked. New values may be added: treat one you don't recognise as unknown, and don't fail.","x-data-class":"public"},"window":{"type":"string","enum":["pass","fail","not_checked"],"description":"`created` is within 300 seconds before our clock and 30 after it. New values may be added: treat one you don't recognise as unknown, and don't fail.","x-data-class":"public"},"host":{"type":"string","enum":["pass","fail","not_checked"],"description":"The host you called is one a signed request may name. New values may be added: treat one you don't recognise as unknown, and don't fail.","x-data-class":"public"},"signature":{"type":"string","enum":["pass","fail","not_checked"],"description":"The signature verified with your test credential's public key over `signature_base`. A keyid that names no test credential of yours fails here the same way. New values may be added: treat one you don't recognise as unknown, and don't fail.","x-data-class":"public"},"content_digest":{"type":"string","enum":["pass","fail","not_checked"],"description":"`Content-Digest` matches the body as received. New values may be added: treat one you don't recognise as unknown, and don't fail.","x-data-class":"public"},"expiry":{"type":"string","enum":["pass","fail","not_checked"],"description":"The credential hasn't expired. Checked only once the signature verified. New values may be added: treat one you don't recognise as unknown, and don't fail.","x-data-class":"public"},"environment":{"type":"string","enum":["pass","fail","not_checked"],"description":"`X-SA-Environment` is `TEST`, as a test credential's must be. Checked only once the signature verified. New values may be added: treat one you don't recognise as unknown, and don't fail.","x-data-class":"public"}},"required":["profile","window","host","signature","content_digest","expiry","environment"]}},"required":["object","verified"],"description":"What a test credential's signed request looked like to the API: whether its signature verified, the base it was checked over, each check's result and the first that would refuse it."},"ThinEvent":{"type":"object","properties":{"id":{"type":"string","description":"The event id (`evt_…`), the same id its webhook delivery carries: use it to drop duplicates across the feed and your webhooks. It is not a position: page with `next_cursor`.","x-data-class":"public"},"object":{"type":"string","const":"event","x-data-class":"public"},"type":{"type":"string","enum":["referral.invited","referral.activated","referral.declined","consultation.status_changed","appraisal.completed","settlement.updated","charge.created","plan.enrollment.activated","plan.enrollment.past_due","plan.enrollment.cancelled","plan.benefit.redeemed","plan.benefit.completed","plan.statement.issued","review.completed","review.updated","referral.closed","charge.paid","charge.failed","charge.refunded","charge.voided"],"x-data-class":"public","description":"New values may be added: ignore a type you don't recognise."},"api_version":{"type":"string","const":"1.1","description":"The thin event's version: `1.1`.","x-data-class":"public"},"created_at":{"type":"string","format":"date-time","x-data-class":"public"},"livemode":{"description":"`true` for a live event, `false` for a sandbox one; a membership plan event has its enrollment's. A membership statement and its charge don't carry it: a live key lists them, and they go to your live endpoints.","x-data-class":"public","type":"boolean"},"account":{"type":"object","properties":{"id":{"type":"string","description":"Your institution's id.","x-data-class":"institution_confidential"}},"required":["id"],"description":"The institution the event belongs to."},"data":{"type":"object","properties":{},"additionalProperties":{},"description":"The thin body, by `type`: the referral's `id`, `status`, your `external_ref` and its timestamps under `referral`, or the enrollment's under `enrollment`; the milestone's `key`, `phase`, `previous` and `completed` list; the codes and ids the event adds (`channel`, `via`, `consultation_number`, `reason`, `redemption_id`); a charge's `id`, `status` and `statement_id`; a statement's `id`, period, `status` and times; a review event's `record` (`id`, `version`, `hash`, `status`) and `close_reason`. Never a borrower's contact details, a payoff, a VIN or an amount: fetch the referral or enrollment for those. On the events feed, a key without `referrals:read` gets the referral as its `id` only, so a `charge.created` it lists names its referral but not your reference, its status or its timestamps; a thin-payload webhook endpoint is sent the whole thin body. After an erasure an event carries only the id and `scrubbed: true`.","x-data-class":"institution_confidential"}},"required":["id","object","type","api_version","created_at","account","data"],"description":"One event, thin: what happened, to which record, and when. It is what the events feed lists and what a thin-payload webhook endpoint is sent (one created from the partner security platform's `issue` stage on), with the webhook's headers. New event types are added over time: a feed reader skips a type it doesn't recognise, and a webhook endpoint answers 2xx to a type it doesn't recognise, and ignores it."},"TimelineMilestone":{"type":"object","properties":{"key":{"type":"string","enum":["referral_submitted","borrower_invited","disclosure_attested","outreach_in_progress","borrower_activated","valuation_report_received","insurance_details_received","photos_received","market_research","preliminary_estimate_ready","appraisal_report_complete","authorization_received","insurer_notified","insurer_acknowledged","insurer_appraiser_appointed","appraisals_exchanged","umpire_engaged","award_letter_issued","settlement_finalized","outcome_recorded"],"x-data-class":"public","description":"New values may be added: show one you don't recognise as not yet known, and don't fail."},"label":{"type":"string","x-data-class":"public"},"detail":{"type":"string","x-data-class":"public"},"state":{"type":"string","enum":["complete","current","upcoming","skipped"],"x-data-class":"public","description":"New values may be added: treat one you don't recognise as unknown, and don't fail."},"at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the milestone completed, when known.","x-data-class":"institution_confidential"},"waiting_on":{"anyOf":[{"type":"string","enum":["borrower","secondappraisal","insurer"]},{"type":"null"}],"description":"Who the current milestone waits on. New values may be added: treat one you don't recognise as unknown, and don't fail.","x-data-class":"public"},"waiting_label":{"x-data-class":"public","type":["string","null"]},"delayed":{"type":"boolean","description":"True when the current milestone has run past its expected time.","x-data-class":"public"},"note":{"description":"A third-person fact line, such as the number of contact attempts.","x-data-class":"institution_confidential","type":["string","null"]}},"required":["key","label","detail","state","at","waiting_on","waiting_label","delayed","note"]},"WebhookEvent":{"type":"object","properties":{"id":{"type":"string","description":"The event id (`evt_…`). A retried delivery repeats it: use it to drop duplicates.","x-data-class":"public"},"object":{"type":"string","const":"event","x-data-class":"public"},"type":{"type":"string","enum":["referral.invited","referral.activated","referral.declined","consultation.status_changed","appraisal.completed","settlement.updated","charge.created","plan.enrollment.activated","plan.enrollment.past_due","plan.enrollment.cancelled","plan.benefit.redeemed","plan.benefit.completed","plan.statement.issued","review.completed","review.updated","referral.closed","charge.paid","charge.failed","charge.refunded","charge.voided"],"x-data-class":"public","description":"New values may be added: ignore a type you don't recognise."},"created_at":{"type":"string","format":"date-time","x-data-class":"public"},"livemode":{"description":"`true` for a live event, `false` for a sandbox one (from a test key's referral). Live events go to your live endpoints only, and sandbox referral events to your test endpoints only. The membership plan events don't carry it yet.","x-data-class":"public","type":"boolean"},"data":{"type":"object","properties":{},"additionalProperties":{},"description":"Depends on `type`.","x-data-class":"borrower_contact"}},"required":["id","object","type","created_at","data"],"description":"The full payload: the envelope a full-payload endpoint, one created before the partner security platform's `issue` stage or one created while that stage couldn't be read, is sent; a thin-payload endpoint, created from `issue` on, is sent `ThinEvent` instead, with the same headers. Every delivery is a POST. This object and each object in it carry at least these fields; new fields may be added, so ignore any you don't recognise. Verify `X-SecondAppraisal-Signature: t=<unix seconds>,v1=<hex>` first: v1 is HMAC-SHA256 with your endpoint's signing secret over `<t>.<raw body>`; compare in constant time and refuse an old `t`. The key is the secret's text for a `whsec_gap_` secret, and the base64-decoded bytes after `whsec_` for a Standard Webhooks secret, whose endpoint also gets `webhook-id`, `webhook-timestamp` and `webhook-signature`, which any Standard Webhooks library verifies. During a secret rotation's overlap, `X-SecondAppraisal-Signature` is signed with the previous secret until you promote the new one or the overlap ends, and `webhook-signature` carries a `v1` for each Standard Webhooks secret in force. Answer any 2xx to acknowledge; anything else is retried with backoff. New event types are added over time: answer 2xx to a type you don't recognise, and ignore it."},"WebhookReferral":{"type":"object","properties":{"id":{"type":"string","description":"The referral's id.","x-data-class":"institution_confidential"},"object":{"type":"string","const":"gap.referral","x-data-class":"public"},"status":{"type":"string","enum":["submitted","invited","handoff_pending","outreach_queued","contact_attempted","activated","in_progress","settled","closed","declined","unreachable","expired","cancelled","reporting_withdrawn"],"description":"Where the referral stands. `reporting_withdrawn` once the borrower withdrew permission to report its progress to you, whatever happens to it after: from then on it shows the fields you supplied and no progress. New values may be added: show one you don't recognise as not yet known, and don't fail.","x-data-class":"public"},"status_label":{"type":"string","description":"The status as the portal shows it.","x-data-class":"public"},"status_tone":{"type":"string","enum":["green","yellow","red","neutral"],"x-data-class":"public","description":"New values may be added: treat one you don't recognise as unknown, and don't fail."},"status_note":{"description":"A third-person note on a terminal status, such as why it closed.","x-data-class":"institution_confidential","type":["string","null"]},"external_ref":{"description":"Your own reference, as you sent it.","x-data-class":"institution_confidential","type":["string","null"]},"borrower":{"type":"object","properties":{"first_name":{"type":"string","x-data-class":"borrower_personal"},"last_name":{"type":"string","x-data-class":"borrower_personal"},"email":{"x-data-class":"borrower_contact","type":["string","null"]},"phone":{"description":"10 digits.","x-data-class":"borrower_contact","type":["string","null"]}},"required":["first_name","last_name","email","phone"]},"vehicle":{"type":"object","properties":{"vin":{"x-data-class":"borrower_personal","type":["string","null"]},"year":{"x-data-class":"borrower_personal","type":["integer","null"]},"make":{"x-data-class":"borrower_personal","type":["string","null"]},"model":{"x-data-class":"borrower_personal","type":["string","null"]}},"required":["vin","year","make","model"]},"claim":{"type":"object","properties":{"carrier":{"x-data-class":"borrower_personal","type":["string","null"]},"claim_number":{"x-data-class":"borrower_personal","type":["string","null"]},"loss_state":{"x-data-class":"borrower_personal","type":["string","null"]},"date_of_loss":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Midnight UTC on the date of loss.","x-data-class":"borrower_personal"},"initial_offer_cents":{"x-data-class":"borrower_personal","type":["integer","null"]}},"required":["carrier","claim_number","loss_state","date_of_loss","initial_offer_cents"]},"liability":{"type":"object","properties":{"loan_payoff_cents":{"x-data-class":"borrower_personal","type":["integer","null"]},"deductible_cents":{"description":"Deprecated: we stopped collecting the deductible in version 1.4.0. A referral made before then shows the deductible your institution sent until our retention schedule or an erasure clears it; any other referral shows null.","x-data-class":"borrower_personal","deprecated":true,"type":["integer","null"]}},"required":["loan_payoff_cents","deductible_cents"]},"program":{"type":"object","properties":{"mode":{"type":"string","enum":["provider_paid","split_pay","customer_paid","membership"],"x-data-class":"institution_confidential","description":"New values may be added: treat one you don't recognise as unknown, and don't fail."},"subsidy_type":{"anyOf":[{"type":"string","enum":["percent","fixed_cents"]},{"type":"null"}],"x-data-class":"institution_confidential","description":"New values may be added: treat one you don't recognise as unknown, and don't fail."},"subsidy_value":{"x-data-class":"institution_confidential","type":["integer","null"]},"price_cents":{"type":"integer","description":"Your price for this referral's consultation, in cents, fixed when the referral was submitted. `mode` and the subsidy terms decide how much of it you pay.","x-data-class":"institution_confidential"},"locked":{"description":"True once the borrower activated under these terms; they can no longer change. Null once reporting is withdrawn (`status: reporting_withdrawn`).","x-data-class":"institution_confidential","type":["boolean","null"]}},"required":["mode","subsidy_type","subsidy_value","price_cents","locked"]},"consent":{"type":"object","properties":{"mode":{"type":"string","enum":["invitation","warm_handoff"],"x-data-class":"institution_confidential","description":"New values may be added: treat one you don't recognise as unknown, and don't fail."},"disclosure_confirmed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When your staff delivered the warm-handoff disclosure: noon UTC on the day given (`delivered_on`, or the day entered in the portal), or the moment they attested if no day was given.","x-data-class":"institution_confidential"},"disclosure_channel":{"x-data-class":"institution_confidential","type":["string","null"]},"disclosure_attestor_name":{"x-data-class":"institution_confidential","type":["string","null"]}},"required":["mode","disclosure_confirmed_at","disclosure_channel","disclosure_attestor_name"]},"submitted_via":{"type":"string","description":"Where the referral came from: `api`, `dashboard` or `csv`.","x-data-class":"public"},"created_at":{"type":"string","format":"date-time","x-data-class":"institution_confidential"},"invited_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"x-data-class":"institution_confidential"},"invitation_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"x-data-class":"institution_confidential"},"activated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"x-data-class":"institution_confidential"},"settled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"x-data-class":"institution_confidential"},"closed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"x-data-class":"institution_confidential"}},"required":["id","object","status","status_label","status_tone","status_note","external_ref","borrower","vehicle","claim","liability","program","consent","submitted_via","created_at","invited_at","invitation_expires_at","activated_at","settled_at","closed_at"],"description":"A referral as a webhook carries it. This object and each object in it carry at least these fields; new fields may be added, so ignore any you don't recognise. The API's referral carries more: fetch it to read every field. Once the borrower withdraws permission to report the referral's progress, it carries `status: reporting_withdrawn` and no progress, as every read shows it."},"WebhookReferralActivatedData":{"type":"object","properties":{"referral":{"$ref":"#/components/schemas/WebhookReferral"},"consultation_number":{"description":"Our consultation number for the borrower.","x-data-class":"institution_confidential","type":["string","null"]},"via":{"type":"string","enum":["borrower_link","admin_assisted"],"description":"Whether the borrower activated through the link or with our team's help. New values may be added: treat one you don't recognise as unknown, and don't fail.","x-data-class":"public"}},"required":["referral","consultation_number","via"],"description":"The referral, its consultation number, and how the borrower activated. This object and each object in it carry at least these fields; new fields may be added, so ignore any you don't recognise."},"WebhookReferralData":{"type":"object","properties":{"referral":{"$ref":"#/components/schemas/WebhookReferral"}},"required":["referral"],"description":"The referral, as webhooks carry it. This object and each object in it carry at least these fields; new fields may be added, so ignore any you don't recognise."},"WebhookReferralInvitedData":{"type":"object","properties":{"referral":{"$ref":"#/components/schemas/WebhookReferral"},"channel":{"type":"string","enum":["email","sms"],"description":"How the invitation went out. New values may be added: treat one you don't recognise as unknown, and don't fail.","x-data-class":"public"}},"required":["referral","channel"],"description":"The referral, and how its invitation went out. This object and each object in it carry at least these fields; new fields may be added, so ignore any you don't recognise."},"WebhookReviewRecord":{"type":"object","properties":{"id":{"type":"string","description":"The version's id.","x-data-class":"institution_confidential"},"version":{"type":"integer","minimum":1,"description":"The version's number: 1 for the record's first version, and one more for each after it.","x-data-class":"public"},"hash":{"type":"string","pattern":"^[0-9a-f]{64}$","description":"SHA-256, in lowercase hex, of the version's canonical JSON (RFC 8785). A version never changes, so the version you read later still matches it.","x-data-class":"institution_confidential"},"status":{"type":"string","enum":["PENDING","IN_REVIEW","REVIEWED_NO_UNDERVALUATION","REVIEWED_UNDERVALUATION_FOUND","RESEARCH_DELIVERED","REVIEWED_ELSEWHERE","DECLINED","UNREACHABLE","RELEASED","CANCELLED","REPORTING_WITHDRAWN"],"description":"The review's status as of this version. `PENDING`: referred, and the borrower hasn't engaged yet. `IN_REVIEW`: the borrower activated, and no review has reached them. `REVIEWED_NO_UNDERVALUATION`: we told the borrower the offer looks fair. `REVIEWED_UNDERVALUATION_FOUND`: we told the borrower we can help. `RESEARCH_DELIVERED`: our research reached the borrower, with no verdict. `REVIEWED_ELSEWHERE`: the borrower had the review done elsewhere. `DECLINED`: The borrower declined the review or the engagement, or told us 'No thanks' and received no review before the review window ended. It reports what the borrower told us, not any duty under your contract. `UNREACHABLE`: we couldn't reach the borrower, or the invitation expired. `RELEASED`: the review window ended with nothing delivered. `CANCELLED`: you cancelled the referral before the borrower activated. `REPORTING_WITHDRAWN`: the borrower asked us to stop reporting this referral's progress. New values may be added: show one you don't recognise as not yet known, and don't fail.","x-data-class":"public"}},"required":["id","version","hash","status"],"description":"The version of the referral's review record that the event reports."},"WebhookReviewRecordData":{"type":"object","properties":{"referral":{"type":"object","properties":{"id":{"type":"string","description":"The referral's id.","x-data-class":"institution_confidential"},"external_ref":{"description":"Your own reference, as you sent it.","x-data-class":"institution_confidential","type":["string","null"]}},"required":["id","external_ref"]},"record":{"$ref":"#/components/schemas/WebhookReviewRecord"},"close_reason":{"anyOf":[{"type":"string","enum":["SETTLED","NO_MATERIAL_UNDERVALUATION","BORROWER_DECLINED","BORROWER_UNREACHABLE","INVITATION_EXPIRED","CANCELLED_BY_INSTITUTION","REVIEWED_ELSEWHERE","SETTLED_WITH_INSURER","OUT_OF_SCOPE","STATE_NOT_SERVED","NO_APPRAISAL_RIGHT","CLAIM_NOT_COVERED","NOT_COMPLETED","REPORTING_WITHDRAWN"]},{"type":"null"}],"description":"Why the referral's record closed: null while it is open, and again if it reopens. New values may be added: treat one you don't recognise as unknown, and don't fail.","x-data-class":"public"}},"required":["referral","record","close_reason"],"description":"The referral, and the version of its review record that the event reports. This object and each object in it carry at least these fields; new fields may be added, so ignore any you don't recognise. A version that completes the review and closes the referral sends both review.completed and referral.closed. Staged: none of these events is sent until review records open."},"WebhookSettlementData":{"type":"object","properties":{"referral":{"$ref":"#/components/schemas/WebhookReferral"},"outcome":{"type":"object","properties":{"initial_acv_cents":{"x-data-class":"borrower_personal","type":["integer","null"]},"appraised_value_cents":{"description":"The signed appraisal award's amount, once the award is signed; null until then.","x-data-class":"borrower_personal","type":["integer","null"]},"final_settlement_cents":{"x-data-class":"borrower_personal","type":["integer","null"]},"uplift_cents":{"x-data-class":"borrower_personal","type":["integer","null"]},"exposure_before_cents":{"description":"Estimated exposure before the review: the loan payoff minus the insurer's first offer, never below zero. Your institution determines its GAP benefit under its own contract.","x-data-class":"borrower_personal","type":["integer","null"]},"exposure_after_cents":{"description":"Estimated exposure at settlement: the loan payoff minus the insurer's final settlement, never below zero. Your institution determines its GAP benefit under its own contract.","x-data-class":"borrower_personal","type":["integer","null"]},"fees_paid_cents":{"description":"The consultation fees settlement recorded, counting any still waiting to be charged, such as an invoice institution's fee before the month's invoice run.","x-data-class":"institution_confidential","type":["integer","null"]},"settled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"x-data-class":"institution_confidential"}},"required":["initial_acv_cents","appraised_value_cents","final_settlement_cents","uplift_cents","exposure_before_cents","exposure_after_cents","fees_paid_cents","settled_at"]}},"required":["referral","outcome"],"description":"The referral, and the outcome its settlement recorded. This object and each object in it carry at least these fields; new fields may be added, so ignore any you don't recognise."},"WebhookTestData":{"type":"object","properties":{"endpoint_id":{"type":"string","description":"The endpoint the test event was sent to, as the API page lists it.","x-data-class":"institution_confidential"}},"required":["endpoint_id"],"description":"A test event's data: the endpoint's id, and no referral or borrower data. This object and each object in it carry at least these fields; new fields may be added, so ignore any you don't recognise."},"WebhookTestEvent":{"type":"object","properties":{"id":{"type":"string","description":"The event id (`evt_…`), new for every send: a verification or test event is never retried.","x-data-class":"public"},"object":{"type":"string","const":"event","x-data-class":"public"},"type":{"type":"string","const":"webhook.test","x-data-class":"public"},"created_at":{"type":"string","format":"date-time","x-data-class":"public"},"livemode":{"type":"boolean","description":"`true` for a live endpoint, `false` for a test one.","x-data-class":"public"},"data":{"$ref":"#/components/schemas/WebhookTestData"}},"required":["id","object","type","created_at","livemode","data"],"description":"A test event, sent when you ask for one on the API page. The full payload, as a full-payload endpoint is sent it. This object and each object in it carry at least these fields; new fields may be added, so ignore any you don't recognise."},"WebhookTestThinEvent":{"type":"object","properties":{"id":{"type":"string","description":"The event id (`evt_…`), new for every send: a verification or test event is never retried.","x-data-class":"public"},"object":{"type":"string","const":"event","x-data-class":"public"},"type":{"type":"string","const":"webhook.test","x-data-class":"public"},"api_version":{"type":"string","const":"1.1","description":"The thin event's version: `1.1`.","x-data-class":"public"},"created_at":{"type":"string","format":"date-time","x-data-class":"public"},"livemode":{"type":"boolean","description":"`true` for a live endpoint, `false` for a test one.","x-data-class":"public"},"account":{"type":"object","properties":{"id":{"type":"string","description":"Your institution's id.","x-data-class":"institution_confidential"}},"required":["id"],"description":"The institution the endpoint belongs to."},"data":{"$ref":"#/components/schemas/WebhookTestData"}},"required":["id","object","type","api_version","created_at","livemode","account","data"],"description":"A test event, sent when you ask for one on the API page. The thin payload, as a thin-payload endpoint is sent it. This object and each object in it carry at least these fields; new fields may be added, so ignore any you don't recognise."},"WebhookVerificationData":{"type":"object","properties":{"challenge":{"type":"string","pattern":"^whc_[A-Za-z0-9_-]{43}$","description":"The challenge: `whc_` and 43 base64url characters, new for every send. Answer with it, or enter it on the API page within 15 minutes.","x-data-class":"institution_confidential"},"endpoint_id":{"type":"string","description":"The endpoint being verified, as the API page lists it.","x-data-class":"institution_confidential"},"expires_at":{"type":"string","format":"date-time","description":"When the challenge stops being accepted: 15 minutes after it was sent.","x-data-class":"public"}},"required":["challenge","endpoint_id","expires_at"],"description":"A verification challenge's data: the challenge, the endpoint it verifies and when it expires. This object and each object in it carry at least these fields; new fields may be added, so ignore any you don't recognise."},"WebhookVerificationEvent":{"type":"object","properties":{"id":{"type":"string","description":"The event id (`evt_…`), new for every send: a verification or test event is never retried.","x-data-class":"public"},"object":{"type":"string","const":"event","x-data-class":"public"},"type":{"type":"string","const":"webhook.verification","x-data-class":"public"},"created_at":{"type":"string","format":"date-time","x-data-class":"public"},"livemode":{"type":"boolean","description":"`true` for a live endpoint, `false` for a test one.","x-data-class":"public"},"data":{"$ref":"#/components/schemas/WebhookVerificationData"}},"required":["id","object","type","created_at","livemode","data"],"description":"A verification challenge, sent when you verify an endpoint: answer with its challenge. The full payload, as a full-payload endpoint is sent it. This object and each object in it carry at least these fields; new fields may be added, so ignore any you don't recognise."},"WebhookVerificationThinEvent":{"type":"object","properties":{"id":{"type":"string","description":"The event id (`evt_…`), new for every send: a verification or test event is never retried.","x-data-class":"public"},"object":{"type":"string","const":"event","x-data-class":"public"},"type":{"type":"string","const":"webhook.verification","x-data-class":"public"},"api_version":{"type":"string","const":"1.1","description":"The thin event's version: `1.1`.","x-data-class":"public"},"created_at":{"type":"string","format":"date-time","x-data-class":"public"},"livemode":{"type":"boolean","description":"`true` for a live endpoint, `false` for a test one.","x-data-class":"public"},"account":{"type":"object","properties":{"id":{"type":"string","description":"Your institution's id.","x-data-class":"institution_confidential"}},"required":["id"],"description":"The institution the endpoint belongs to."},"data":{"$ref":"#/components/schemas/WebhookVerificationData"}},"required":["id","object","type","api_version","created_at","livemode","account","data"],"description":"A verification challenge, sent when you verify an endpoint: answer with its challenge. The thin payload, as a thin-payload endpoint is sent it. This object and each object in it carry at least these fields; new fields may be added, so ignore any you don't recognise."},"WithdrawnReviewRecordBundle":{"type":"object","properties":{"schema":{"type":"string","const":"review-record.v1","description":"The bundle's format.","x-data-class":"public"},"referral_id":{"type":"string","description":"The referral's id.","x-data-class":"institution_confidential"},"status":{"type":"string","const":"REPORTING_WITHDRAWN","x-data-class":"public"},"close_reason":{"type":"string","const":"REPORTING_WITHDRAWN","x-data-class":"public"},"reporting_withdrawn_at":{"type":"string","format":"date-time","description":"When the borrower asked us to stop reporting this referral's progress to you.","x-data-class":"institution_confidential"}},"required":["schema","referral_id","status","close_reason","reporting_withdrawn_at"],"description":"A version written after the borrower asked us to stop reporting the referral's progress: it says only that, and when. The versions before it stay readable by number."}}},"x-error-catalog":{"invalid_json":{"status":400,"title":"Invalid JSON","description":"The body is missing, or is not valid JSON in UTF-8.","type":"https://secondappraisal.com/developers/errors/invalid_json"},"unsupported_media_type":{"status":415,"title":"Unsupported media type","description":"A request body must be sent with `Content-Type: application/json`.","type":"https://secondappraisal.com/developers/errors/unsupported_media_type"},"payload_too_large":{"status":413,"title":"Payload too large","description":"The body is larger than the operation accepts: 65,536 bytes for one object, 1,048,576 bytes for a bulk call. Split the batch.","type":"https://secondappraisal.com/developers/errors/payload_too_large"},"too_many_rows":{"status":413,"title":"Too many rows","description":"A bulk call carries at most 500 rows. Split the batch.","type":"https://secondappraisal.com/developers/errors/too_many_rows"},"prohibited_field":{"status":400,"title":"Prohibited field","description":"The body names a field a referral must never carry: an SSN or tax id, a date of birth, an account, loan, member, card or routing number, a credit score or report, income or salary (matched on the field's name, at the top level and inside `program` and `disclosure`). `field_errors` names each one. Nothing else in the body is checked until they are gone, nothing is written, and the values are never stored, logged or sent back. Remove the fields and send the request again.","type":"https://secondappraisal.com/developers/errors/prohibited_field"},"validation_failed":{"status":400,"title":"Validation failed","description":"One or more fields, query parameters or path parameters failed validation. `field_errors` names each one and why.","type":"https://secondappraisal.com/developers/errors/validation_failed"},"operation_not_open":{"status":404,"title":"Operation not open yet","description":"The operation is staged: documented, and served once the switch its `x-availability.opens_with` names opens (`referral_sandbox`: when the referral sandbox opens; `partner_events`: when the partner security platform opens the events feed; `signed_credentials`: when signed credentials open; `review_record`: when review records open; `roster_sync_sessions`: when roster-sync sessions open for institutions; `access_review`: when access reviews open). Until then every call answers 404 with this code, before the key is checked, and nothing is written. Retry once it is open; until then, use the operations that are available.","type":"https://secondappraisal.com/developers/errors/operation_not_open"},"idempotency_key_too_long":{"status":400,"title":"Idempotency-Key too long","description":"The `Idempotency-Key` header is at most 255 characters (251 on a bulk enrollment call, which appends each row's index). Longer keys are refused rather than cut, so two keys can never collide.","type":"https://secondappraisal.com/developers/errors/idempotency_key_too_long"},"internal_error":{"status":500,"title":"Internal error","description":"Something failed on our side. A retry with the same Idempotency-Key is safe; if it persists, send the `request_id` to business@secondappraisal.com.","type":"https://secondappraisal.com/developers/errors/internal_error"},"missing_api_key":{"status":401,"title":"Missing API key","description":"Send your API key as `Authorization: Bearer <key>`: a v2 key, `sa_live_...` or `sa_test_...`, the only format the API accepts. A key whose checksum doesn't match, because it was mistyped or cut short, is refused this way too, before any lookup, and so is a legacy `sa_gap_...` key.","type":"https://secondappraisal.com/developers/errors/missing_api_key"},"invalid_api_key":{"status":401,"title":"Invalid API key","description":"The key is not one we issued, or it was revoked.","type":"https://secondappraisal.com/developers/errors/invalid_api_key"},"api_key_expired":{"status":401,"title":"API key expired","description":"The key is past its expiry. A test key (`sa_test_...`) expires at most 90 days after it is created, and a live key (`sa_live_...`) at most 365 days after. Create a new key in the portal. A signed credential expires as a v2 key does, counted from its registration, and is answered this way only once its signature verifies.","type":"https://secondappraisal.com/developers/errors/api_key_expired"},"key_not_scoped":{"status":403,"title":"Key not scoped for this surface","description":"No longer sent. It answered a legacy key (`sa_gap_...`) whose scopes didn't include the operation's surface; the API now accepts v2 keys only, and a key without the permission an operation needs gets `permission_denied`.","type":"https://secondappraisal.com/developers/errors/key_not_scoped"},"test_key_referrals_unavailable":{"status":403,"title":"Test keys can't reach referrals yet","description":"Test keys (`sa_test_...`) can't reach the referral and analytics operations until the referral sandbox opens; until then they work only with the membership plan operations and the disclosure script preview, so use a live key for referral and analytics calls. Once it opens, a test key reads and writes sandbox referrals only, which reach no borrower and are never billed, and a live key never sees them.","type":"https://secondappraisal.com/developers/errors/test_key_referrals_unavailable"},"provider_terminated":{"status":403,"title":"Account terminated","description":"This institution's account has been terminated.","type":"https://secondappraisal.com/developers/errors/provider_terminated"},"provider_suspended":{"status":403,"title":"Account suspended","description":"A suspended account can read but not write. Contact business@secondappraisal.com to reinstate it.","type":"https://secondappraisal.com/developers/errors/provider_suspended"},"provider_not_active":{"status":403,"title":"Account not active","description":"An account that is not yet active can read but not write.","type":"https://secondappraisal.com/developers/errors/provider_not_active"},"rate_limited":{"status":429,"title":"Rate limit exceeded","description":"Each key may make 300 reads, 120 writes and 12 bulk calls a minute, and the signature check (`POST /api/gap/v1/signature-check`), which takes no key, answers 60 calls a minute from one address our edge vouches for (for IPv6, from its /64). Wait the number of seconds in `Retry-After`.","type":"https://secondappraisal.com/developers/errors/rate_limited"},"auth_unavailable":{"status":500,"title":"Key check unavailable","description":"We couldn't check the API key just now. Retry shortly.","type":"https://secondappraisal.com/developers/errors/auth_unavailable"},"permission_denied":{"status":403,"title":"Permission denied","description":"The v2 key (`sa_live_...` or `sa_test_...`) doesn't hold the permission this operation needs, which `x-required-permission` names; `error` names it too. A v2 key holds only the permissions chosen when it was created. Create a key with the permission in the portal.","type":"https://secondappraisal.com/developers/errors/permission_denied"},"credentials_unavailable":{"status":503,"title":"Credentials unavailable","description":"We couldn't check the API key or signed credential just now, so the call was refused. It wasn't counted against the key's rate limit, nothing was written to the key, and a signed request's nonce wasn't spent. Retry after the seconds in `Retry-After`; if it persists, send the `request_id` to business@secondappraisal.com.","type":"https://secondappraisal.com/developers/errors/credentials_unavailable"},"signed_requests_required":{"status":401,"title":"Signed requests required","description":"Your institution accepts signed requests only, so a call made with an API key (`Authorization: Bearer ...`) is refused, whatever the key may do. Sign the request with a signed credential (`signedRequest`) instead. If you need API keys accepted again, contact business@secondappraisal.com.","type":"https://secondappraisal.com/developers/errors/signed_requests_required"},"ip_not_allowed":{"status":403,"title":"Address not allowed","description":"The key holds an IP allowlist, and this request came from an address outside it: the address our edge saw, never one a header names. Send the request from an address the allowlist holds, or change the key's allowlist in the portal. A request refused this way isn't counted against the key's rate limit, and a signed request's nonce isn't spent.","type":"https://secondappraisal.com/developers/errors/ip_not_allowed"},"auth_failures_throttled":{"status":429,"title":"Too many failed authentications","description":"Too many requests from your address (for IPv6, from its /64) failed authentication in the last minute, so this one is answered this way instead of with its 401: its key is missing or unknown, or it is a signed request that didn't verify or whose body doesn't match its `Content-Digest`. A signed request that doesn't verify can be, a revoked signed credential's included, since nothing about it is proven until it verifies. A bearer request whose key is valid, revoked or expired never is, unless it also carries `Signature-Input`, which makes it a signed request (401 `signature_profile_invalid` beside a bearer key); nor is a signed request that verified and whose body matched. Nor is one from an address many callers can share (a proxy or CDN range, a private network, carrier-grade NAT). Check the key or the signature, then retry after the seconds in `Retry-After`.","type":"https://secondappraisal.com/developers/errors/auth_failures_throttled"},"signature_profile_invalid":{"status":401,"title":"Signature doesn't follow the profile","description":"The signature headers don't follow the gap-v2 profile: one signature labelled `sa` in `Signature-Input` and `Signature`; covering `@method` and `@target-uri`, then `content-digest` and `idempotency-key` on POST and PATCH (on GET and HEAD, `idempotency-key` exactly when it is sent), then `x-sa-environment`; with the parameters `created`, `nonce`, `keyid`, `alg` (`ed25519` or `ecdsa-p256-sha256`) and `tag=\"gap-v2\"`, in that order; a 64-byte signature; an `Idempotency-Key` of 1 to 255 visible ASCII characters (`!` to `~`, no spaces); `X-SA-Environment` of `TEST` or `PRODUCTION`; and no `Authorization` header beside them. Nothing about the credential was checked.","type":"https://secondappraisal.com/developers/errors/signature_profile_invalid"},"signature_expired":{"status":401,"title":"Signature outside its window","description":"The signature's `created` is more than 300 seconds before our clock, or more than 30 seconds after it. Sign each request when you send it; if every request is refused this way, check your clock.","type":"https://secondappraisal.com/developers/errors/signature_expired"},"target_uri_not_allowed":{"status":401,"title":"Host not accepted for signed requests","description":"The signed request was sent to a host that doesn't take signed requests. Send it to a public hostname (`secondappraisal.com`, `gap.secondappraisal.com` or `lenders.secondappraisal.com`), and sign that host in `@target-uri`.","type":"https://secondappraisal.com/developers/errors/target_uri_not_allowed"},"signature_invalid":{"status":401,"title":"Signature invalid","description":"The signature didn't verify. The answer is the same whatever failed: `keyid` names no signed credential of ours, or a revoked one; `alg` isn't the algorithm its key was registered with; the body doesn't match `Content-Digest`; or the signature isn't the credential's over the signature base built from the request as received. Rebuild the base from the exact request you sent, with `@target-uri` as a WHATWG URL parser serializes it (a `'` in a query is `%27`, an empty `?` is dropped), and check your signature with your public key.","type":"https://secondappraisal.com/developers/errors/signature_invalid"},"environment_mismatch":{"status":401,"title":"Wrong environment","description":"`X-SA-Environment` isn't the key's: `TEST` for a test key or credential, `PRODUCTION` for a live one. A signed request always sends it, and is checked once its signature verifies; a request with an API key may leave it out, and is checked when it sends it.","type":"https://secondappraisal.com/developers/errors/environment_mismatch"},"credential_not_activated":{"status":401,"title":"Credential not activated","description":"The signature verified, but the signed credential hasn't been activated yet. Activate it first with a signed `POST /api/gap/v1/credentials/{id}/verify`, the one call an unactivated credential can make.","type":"https://secondappraisal.com/developers/errors/credential_not_activated"},"signature_replay":{"status":409,"title":"Signature replayed","description":"A request with this signature's `nonce` was already received for this credential with a signature that verified, so this one was refused before it was read further. A nonce is spent when its signature has verified, its body has matched `Content-Digest`, it came from an address the credential's IP allowlist holds (when it holds one) and the credential was within its rate limit, whatever that request is then answered; a request refused 403 `ip_not_allowed`, 503 `credentials_unavailable` because the allowlist couldn't be decided, 429 `rate_limited`, or 503 `platform_standby` because the nonce itself couldn't be written, hasn't spent it. Sign every request, a retry too, with a new nonce, and keep the same `Idempotency-Key` for a retry.","type":"https://secondappraisal.com/developers/errors/signature_replay"},"public_key_in_use":{"status":409,"title":"Public key in use","description":"The signature verified, but another signed credential has already activated this public key, so this one can't be activated with it. A public key is active for one credential at most, and once activated it is never activated again. Generate a new key pair, register its public key in the portal and activate that credential. A replacement refused this way can be revoked in the portal, and the credential it replaced then replaced again with the new key.","type":"https://secondappraisal.com/developers/errors/public_key_in_use"},"edge_auth_required":{"status":403,"title":"Edge authentication required","description":"The request reached our platform directly instead of through SecondAppraisal's edge, so it was refused before anything was read or written. Send it to the public hostname (`secondappraisal.com` or `gap.secondappraisal.com`), never to a platform address.","type":"https://secondappraisal.com/developers/errors/edge_auth_required"},"platform_standby":{"status":503,"title":"Platform on standby","description":"Answering the request needed a write the platform couldn't make just then: our standby, during a failover, makes no writes (nothing was written), and the primary pauses writes for a few seconds during a planned switchover. Send the same request again after the seconds in `Retry-After`, with the same `Idempotency-Key` where the operation takes one. A signed request is signed anew, with a new nonce: whether this one's nonce was spent depends on which write was refused.","type":"https://secondappraisal.com/developers/errors/platform_standby"},"membership_program_closed":{"status":404,"title":"Membership closed to institutions","description":"Total Loss Appraisal Support (TLAS) is not open to institutions yet; every plan operation answers 404 until it is.","type":"https://secondappraisal.com/developers/errors/membership_program_closed"},"membership_not_enabled":{"status":403,"title":"Membership not enabled","description":"The SecondAppraisal team has not turned on Total Loss Appraisal Support for this institution yet.","type":"https://secondappraisal.com/developers/errors/membership_not_enabled"},"membership_rider_unsigned":{"status":403,"title":"Membership rider unsigned","description":"Sign the updated partner agreement, which includes Schedule 2 for Total Loss Appraisal Support, on the Agreement page before enrolling vehicles.","type":"https://secondappraisal.com/developers/errors/membership_rider_unsigned"},"membership_billing_mode_required":{"status":403,"title":"Membership billing mode required","description":"Choose partner-billed or direct-collect billing in Settings before enrolling vehicles.","type":"https://secondappraisal.com/developers/errors/membership_billing_mode_required"},"membership_billing_method_required":{"status":403,"title":"Billing method required","description":"Partner-billed membership fees are invoiced monthly, so add a card on file or invoice terms before enrolling vehicles.","type":"https://secondappraisal.com/developers/errors/membership_billing_method_required"},"msa_required":{"status":403,"title":"Agreement not executed","description":"Referrals can be submitted once the Master Service Agreement is executed (the Agreement step in onboarding).","type":"https://secondappraisal.com/developers/errors/msa_required"},"billing_required":{"status":403,"title":"Billing method required","description":"Provider-paid and split-pay referrals need a billing method (the Billing step in onboarding). Customer-paid referrals don't.","type":"https://secondappraisal.com/developers/errors/billing_required"},"admin_of_record_unverified":{"status":403,"title":"Administrator of Record not verified","description":"Live referrals need your institution's Administrator of Record verified by SecondAppraisal first, by a callback to a seat that is still an active Admin. Until then a live key's referral create and bulk call are refused, with nothing written. Referrals with a test key are never refused this way. Contact business@secondappraisal.com to arrange the verification.","type":"https://secondappraisal.com/developers/errors/admin_of_record_unverified"},"email_required_sms_disabled":{"status":422,"title":"Borrower email required","description":"Text invitations are off for the loss state, so an invitation referral needs `borrower_email`. A warm-handoff referral may be phone-only.","type":"https://secondappraisal.com/developers/errors/email_required_sms_disabled"},"script_version_stale":{"status":409,"title":"Disclosure script not published","description":"The `disclosure.script_version` names no disclosure script we published, one we no longer accept, or one whose notice date hadn't come on the day it was delivered. The versions an attestation may name are 1.7. Versions 1.0, 1.1, 1.2, 1.3, 1.4, 1.5 and 1.6 are refused. Deliver the current script to the borrower, then attest.","type":"https://secondappraisal.com/developers/errors/script_version_stale"},"duplicate_reference":{"status":409,"title":"Duplicate referral","description":"A referral with this reference already exists.","type":"https://secondappraisal.com/developers/errors/duplicate_reference"},"invalid_cursor":{"status":400,"title":"Invalid cursor","description":"`starting_after` must be the id of one of your own referrals.","type":"https://secondappraisal.com/developers/errors/invalid_cursor"},"not_found":{"status":404,"title":"Not found","description":"No record with this id belongs to your institution (in this key's mode).","type":"https://secondappraisal.com/developers/errors/not_found"},"referral_locked":{"status":409,"title":"Referral locked","description":"Borrower, vehicle, claim and program fields lock once the borrower activates. `loan_payoff_cents` stays editable.","type":"https://secondappraisal.com/developers/errors/referral_locked"},"referral_details_cleared":{"status":409,"title":"Referral details cleared","description":"We cleared this referral's borrower details under the Data Handling and Retention Schedule, so it can't be changed: an edit or a cancel is refused, and nothing is written.","type":"https://secondappraisal.com/developers/errors/referral_details_cleared"},"cancel_not_allowed":{"status":409,"title":"Cancel not allowed","description":"A referral can be cancelled only before the borrower activates.","type":"https://secondappraisal.com/developers/errors/cancel_not_allowed"},"economics_locked":{"status":409,"title":"Program terms locked","description":"The program terms locked when the borrower activated under them.","type":"https://secondappraisal.com/developers/errors/economics_locked"},"funding_lowered":{"status":409,"title":"Funding can't be lowered","description":"Before the borrower activates, a change to a referral's program terms may raise your institution's share of the fee, never lower it.","type":"https://secondappraisal.com/developers/errors/funding_lowered"},"nothing_to_update":{"status":400,"title":"Nothing to update","description":"The body names no field this operation can change.","type":"https://secondappraisal.com/developers/errors/nothing_to_update"},"idempotency_key_mode_conflict":{"status":409,"title":"Idempotency-Key used in the other mode","description":"This Idempotency-Key belongs to the other mode (live or test). Keys are per mode: the same key sent with a live key and a test key makes two records. But a key already held by a record of the other mode can't replay it, and a live key can't send a key that starts with `test:`, which names a test key's request. Nothing is written; send a new key.","type":"https://secondappraisal.com/developers/errors/idempotency_key_mode_conflict"},"state_not_served":{"status":422,"title":"State not served","description":"We can't act as the appraiser for a vehicle in this state. The state judged is `garaged_state` when it is sent, else `loss_state`: the problem names it in `state`, and `basis` says which (`garaged` or `loss`). A referral with neither state is accepted.","type":"https://secondappraisal.com/developers/errors/state_not_served"},"state_not_launched":{"status":422,"title":"State not in your launch","description":"Your institution's launch covers only the states we confirmed with you. The state judged is `garaged_state` when it is sent, else `loss_state`: the problem names it in `state`, `basis` says which (`garaged` or `loss`), and `launch_states` lists the states your launch covers. A referral with neither state is accepted. To add a state, contact business@secondappraisal.com.","type":"https://secondappraisal.com/developers/errors/state_not_launched"},"duplicate_referral":{"status":409,"title":"Loss already referred","description":"Your institution already referred this loss (the same VIN and date of loss, or the same carrier and claim number) in this key's mode, and that referral is not cancelled. `existing_referral_id` names it.","type":"https://secondappraisal.com/developers/errors/duplicate_referral"},"simulate_requires_test_key":{"status":403,"title":"Test key required","description":"A simulation moves sandbox referrals only, so it needs a test key (`sa_test_...`).","type":"https://secondappraisal.com/developers/errors/simulate_requires_test_key"},"invalid_transition":{"status":409,"title":"Invalid transition","description":"The referral's status doesn't allow this step: a simulation moves a sandbox referral only along its lifecycle, and an attestation is accepted only while the referral waits for one.","type":"https://secondappraisal.com/developers/errors/invalid_transition"},"reporting_withdrawn":{"status":409,"title":"Reporting withdrawn","description":"The borrower withdrew permission to report this referral's progress to you, so it can't be changed: an edit, a cancel, an attestation and a simulation are each refused, before anything else about the request is checked against the referral. Nothing is written. Reading the referral shows `status: reporting_withdrawn` and the fields you supplied.","type":"https://secondappraisal.com/developers/errors/reporting_withdrawn"},"vin_already_live":{"status":409,"title":"VIN already enrolled","description":"Not sent from version 1.4.0, when a vehicle with a live membership, your institution's included, is answered 422 `vin_not_enrollable`. Before then: the vehicle already had a live membership.","type":"https://secondappraisal.com/developers/errors/vin_already_live"},"vin_already_consulted":{"status":422,"title":"VIN already consulted","description":"Not sent from version 1.4.0, when such a vehicle is answered 422 `vin_not_enrollable`. Before then: the vehicle was the subject of a total-loss consultation with SecondAppraisal, so it couldn't be enrolled.","type":"https://secondappraisal.com/developers/errors/vin_already_consulted"},"vin_not_enrollable":{"status":422,"title":"Vehicle can't be enrolled","description":"We can't add the vehicle, and the answer doesn't say why. It is the answer for a vehicle with a live membership, your institution's included, and for a vehicle that was the subject of a total-loss consultation with SecondAppraisal; a malformed VIN, a missing or unserved garaged state and your program's own refusals are answered first, with their own codes. Nothing is written. If you think this is wrong, contact business@secondappraisal.com with the response's `request_id`.","type":"https://secondappraisal.com/developers/errors/vin_not_enrollable"},"state_required":{"status":422,"title":"Garaged state required","description":"Send `garaged_state` so we can confirm we can serve the vehicle there.","type":"https://secondappraisal.com/developers/errors/state_required"},"state_blocked":{"status":422,"title":"State not served","description":"We can't act as the appraiser in the vehicle's garaged state yet.","type":"https://secondappraisal.com/developers/errors/state_blocked"},"vin_invalid":{"status":422,"title":"Invalid VIN","description":"The VIN failed the checks SecondAppraisal applies before enrolling a vehicle (17 characters, no I, O or Q, a valid check digit).","type":"https://secondappraisal.com/developers/errors/vin_invalid"},"invalid_customer_price":{"status":422,"title":"Invalid member price","description":"A direct-collect member price must not be above the retail price.","type":"https://secondappraisal.com/developers/errors/invalid_customer_price"},"idempotency_key_reused":{"status":422,"title":"Idempotency-Key reused","description":"This key was already used for a different request: for an enrollment, another VIN, or the same VIN with any other field that differs from the first (the garaged state, `external_ref`, the member, the vehicle or the consent mode); for a referral, a body that differs from the first. Send a new key with a new request.","type":"https://secondappraisal.com/developers/errors/idempotency_key_reused"},"plan_not_enabled":{"status":403,"title":"Membership not enabled","description":"Total Loss Appraisal Support is not enabled for this institution's billing setup.","type":"https://secondappraisal.com/developers/errors/plan_not_enabled"},"not_live":{"status":409,"title":"Enrollment not live","description":"The enrollment has already ended.","type":"https://secondappraisal.com/developers/errors/not_live"},"not_a_member_vehicle":{"status":404,"title":"Not a member vehicle","description":"No live membership for this VIN under your institution.","type":"https://secondappraisal.com/developers/errors/not_a_member_vehicle"},"roster_cancel_unconfirmed":{"status":409,"title":"Roster cancellations not confirmed","description":"The roster would cancel more than 25 of your live enrollments in this key's mode and more than 20% of them, counting the enrollments roster syncs cancelled in the last 7 days: they count with the roster's own cancellations, and the 20% is of the live enrollments plus them, so a run of smaller syncs is judged as one. Nothing was changed: no enrollment was made or ended. `detail` states how many this roster would cancel, how many are live (not counting enrollments already ending at period end) and, when there were any, how many roster syncs cancelled in the last 7 days; a session's commit also sends the first two as `cancel_count` and `live_count`. If the roster is right, send it again with `confirm_cancel_count` set to the number this roster would cancel; if it isn't, fix it.","type":"https://secondappraisal.com/developers/errors/roster_cancel_unconfirmed"},"roster_commit_in_progress":{"status":409,"title":"Roster commit in progress","description":"Another roster commit for your institution in this key's mode is being applied, so this roster can't be applied now: a roster session's commit, or another roster sync call that held it for longer than this call waits (a few seconds). Nothing was changed. Retry after the seconds in `Retry-After`; a session's large commit can take several minutes, and GET reads that session until it is committed.","type":"https://secondappraisal.com/developers/errors/roster_commit_in_progress"},"roster_session_not_open":{"status":409,"title":"Roster session not open","description":"The roster session no longer takes chunks, a commit or an abort: it expired (24 hours after it opened), was aborted, is being committed or was committed. An expired session, or one you aborted, applied nothing; one our staff ended because its commit couldn't finish keeps what it had applied, which its `result` counts. Nothing was changed. Read the session with GET; to send a roster again, open a new session.","type":"https://secondappraisal.com/developers/errors/roster_session_not_open"},"roster_chunk_conflict":{"status":409,"title":"Roster chunk conflict","description":"A chunk number already received came with different rows, or the number skips one (chunks are numbered from 0 and sent in order). Nothing was changed. A chunk re-sent with its number and the same rows is a replay, not a conflict.","type":"https://secondappraisal.com/developers/errors/roster_chunk_conflict"},"request_refused":{"status":400,"title":"Request refused","description":"A refusal with no more specific code. The response's `status` is the HTTP status it was sent with, and `error` gives the reason; if it is unclear, send the `request_id` to business@secondappraisal.com.","type":"https://secondappraisal.com/developers/errors/request_refused"}},"x-data-classes":{"public":"A value with no meaning outside the API: a status name, a label, a count, an object type, or a timestamp of a public event.","institution_confidential":"The institution's own business records with SecondAppraisal: its references, record ids, program terms, prices and fees, statements and aggregate reports.","borrower_personal":"Facts about one borrower or member: their name, vehicle and VIN, insurance carrier and claim number, loss state and date, and the amounts of their loss, loan and settlement.","borrower_contact":"How to reach one borrower or member: an email address or a phone number.","credential":"A value that grants access by itself, such as a member's activation link."}}