Update entities documentation - #254
Conversation
There was a problem hiding this comment.
Pull request overview
Updates entity documentation to match current API schemas and responses.
Changes:
- Expanded account, card, transaction, and user fields and enums.
- Clarified currency-pair formats and PII visibility.
- Reworked user verification documentation.
Suppressed comments (2)
_entities.md:524
- The GET /me response sample in
_users.mdstill omits the fields added here (fullName,identityCountry, top-level/per-currencyavailable, top-levelpending, andotp.email.update). That page presents the sample as the endpoint response, so the API reference remains internally inconsistent; update the endpoint sample too.
fullName | The user's full name.
identityCountry | The country of the user's identity document, as determined during identity verification.
_entities.md:565
- The description says the verification is present when the user "must complete" CDD, but
optionalis listed as a valid status. That makes the meaning of the optional state contradictory; describe it as applicable when the questionnaire may be completed, and reserve "must" for therequiredstatus.
customerDueDiligence | optional, required | n/a | Present when the user must complete the Customer Due Diligence (CDD) questionnaire. Whether it is `required` or `optional` depends on the user's CDD status.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| Pairs between currencies in a fixed legacy set are encoded as the two codes concatenated together — for example, the currency pair "BTCUSD" represents moving from bitcoin to US dollars. | ||
| All other pairs are encoded as the two codes separated by a hyphen, in the format `FROM-TO` — for example, "SOL-USD". |
There was a problem hiding this comment.
Reworded to characterize the set (currencies supported early in Uphold's history, e.g. BTC, ETH, EUR, USD), matching the Tickers page, and clarified it applies to both the pair response field and request paths. The full list is internal backend configuration — enumerating it here would go stale.
| requirements | An array of requirement codes that must be fulfilled before the transaction can be committed. May include `user-subject-to-extended-travel-rule`. Absent when no requirements apply. | ||
| requirementsDetails | An object with additional details about each requirement. See [Requirements Details](#requirements-details). Absent when no requirements apply. | ||
| status | The current status of the transaction. Possible values are `pending`, `processing`, `cancelled`, `failed` and `completed`. | ||
| status | The current status of the transaction. Possible values are `cancelled`, `completed`, `failed`, `on-hold`, `processing` and `waiting`. |
There was a problem hiding this comment.
The create-flow line in _transactions.md is actually accurate: an uncommitted transaction (quote) is returned with the transient pending status, which only persisted transactions' statuses replace after commit. Added a note to the status enum here to reconcile the two.
| label | The display name of the account as chosen by the user. | ||
| provider | The provider that services the account. Possible values are `bank-gateway`, `credit-card-gateway`, `lhv`, `tradeview` and `uphold`. | ||
| status | The current status of the account. Possible values are `blocked`, `expired`, `failed`, `ok`, `pending` and `restricted`. In API responses, `blocked` is surfaced as `failed` and `restricted` as `pending`. | ||
| type | The type of the account. Possible values are `bank`, `card` and `exchange`. For `bank` accounts, responses return the account's network — `ach`, `fps`, `sepa`, `swift` or `wire` — as the `type`. The values `ach`, `fps` and `sepa` are deprecated as account types, but are still accepted when filtering accounts by type. |
There was a problem hiding this comment.
The Accounts page is updated accordingly in #253 — the automated review runs against master in isolation, so it can't see the sibling PR.
| | | `staking`: Indicates whether the card is a staking card, which holds staked assets. | ||
| | | `starred`: Indicates whether the card is `starred` or not. | ||
| | | <code class="notice">DEPRECATED</code> `position`: The card's current position. | ||
| | | <code class="notice">DEPRECATED</code> `position`: Always `0`. Kept for backwards compatibility. |
There was a problem hiding this comment.
Those samples are fixed in #253 (all settings.position values are now 0) — the automated review runs against master in isolation, so it can't see the sibling PR.
ecff7af to
3469edf
Compare
Description
Fixes drift between the entity object schemas and the current API responses, verified against
uphold/backendmaster.Account Object
status: all six enum values (wasok/failed), with the response remapping noted (blockedsurfaces asfailed,restrictedaspending).type: actual values arebank,cardandexchange; bank accounts surface their network (ach/fps/sepa/swift/wire) as thetypein responses;ach/fps/separemain accepted as deprecated filter values.provider,errorsandinstitutionproperties.Authentication Method Object
typenow includessms; fixed a copy-pasted description ("associated with the account").Card Object
settingsnow documentsprotectedandstaking;positionis always0(kept for backward compatibility only); sample updated.Currency Pair Object
BTCUSD), hyphenatedFROM-TOfor everything else (SOL-USD).Transaction Object
status: removed the nonexistentpending, addedon-holdandwaiting.type: full enum (addsexternal,special,transfer,unstake,voucher).completedAt/failedAt; noted thatmessageand origin/destinationdescriptionare only returned to applications with PII access.AccountId,accountTypeandaddress.User Object
settings.otp.vmc(no longer exists); addedsettings.otp.email.update.enabled,settings.theme, top-levelfullNameandidentityCountry; balances sample now shows top-levelavailable/pendingand per-currencyavailable.restrictedstatus description (the "unable to login" sentence describedblocked).User Verifications
usTaxPayer→usTaxpayer.status(plus optionalreasonetc.), present only when there is something to communicate.identityhas noretrystatus;emailalso returnspendingfor pending email changes; CDD requirement is driven by the user's CDD status, not European nationality;termsnever carries anupdatedreason in API output.livenessCheck,proofOfAddress) follow the same structure.Notes for reviewers
authentication-method,citizenships,earlyW9Form,placeOfBirth,taxResidence, …) were deliberately covered by the aside rather than given table rows — their semantics are not obvious enough from the resolver to document tersely.identityreasons are open-ended (passthrough codes from providers), so they are listed as "various" rather than enumerated.Related issues
Follow-up to #250 (documentation audit against
uphold/backendmaster).Impacted areas
Entities page of the API reference (schemas referenced by most other pages).
Steps to reproduce or test
Development
Every enum and field was traced to the backend models, masks and resolvers (
account/card/transaction/usermodels,user-verifications-resolver.js, handlers' private masks).QA
Render the page and cross-check a live
GET /v0/meandGET /v0/me/accountsresponse against the updated tables.Checklist
Breaking Changeif it applies.package.json.Deploy notes
N/A — no files added or removed, so no slate index changes are needed.
🤖 Generated with Claude Code