squarefi-bff-api-module 1.36.98 → 1.36.99
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/api/frontend.js
CHANGED
|
@@ -152,7 +152,7 @@ export const frontend = {
|
|
|
152
152
|
getAll: ({ wallet_id }) => apiClientV1Frontend.getRequest(`/frontend/wallets/${wallet_id}/kyc-rails`),
|
|
153
153
|
getById: ({ wallet_id, rail_id }) => apiClientV1Frontend.getRequest(`/frontend/wallets/${wallet_id}/kyc-rails/${rail_id}`),
|
|
154
154
|
// No `data` without `accepted_terms`, so both clients keep the old request (the fetch one sends no body). On a
|
|
155
|
-
// rail with terms an empty list is a refusal,
|
|
155
|
+
// rail with terms an empty list is a refusal, and so is no list where the rail requires its terms (SFI-2865).
|
|
156
156
|
submit: ({ wallet_id, rail_id, accepted_terms, }) => apiClientV1Frontend.postRequest(`/frontend/wallets/${wallet_id}/kyc-rails/${rail_id}`, accepted_terms == null ? undefined : { data: { accepted_terms } }),
|
|
157
157
|
confirmTerms: ({ wallet_id, rail_id, }) => apiClientV1Frontend.postRequest(`/frontend/wallets/${wallet_id}/kyc-rails/${rail_id}/terms-and-conditions`),
|
|
158
158
|
},
|
|
@@ -196,7 +196,6 @@ export const frontend = {
|
|
|
196
196
|
params,
|
|
197
197
|
paramsSerializer: KYC_FORMS_ARRAY_PARAMS,
|
|
198
198
|
}),
|
|
199
|
-
// `accepted_terms`: all document ids of `form.terms` (`[]` if none); missing ones come back in `details.terms`.
|
|
200
199
|
submit: ({ entity_id, rails, programs, wallet_id, locale, ...data }) => apiClientV1Frontend.postRequest(`/frontend/kyc/entities/${entity_id}/forms/submit`, { data, params: { rails, programs, wallet_id, locale }, paramsSerializer: KYC_FORMS_ARRAY_PARAMS }),
|
|
201
200
|
},
|
|
202
201
|
verification: {
|
|
@@ -10473,6 +10473,125 @@ export interface paths {
|
|
|
10473
10473
|
patch?: never;
|
|
10474
10474
|
trace?: never;
|
|
10475
10475
|
};
|
|
10476
|
+
"/frontend/promo-codes/redeem": {
|
|
10477
|
+
parameters: {
|
|
10478
|
+
query?: never;
|
|
10479
|
+
header?: never;
|
|
10480
|
+
path?: never;
|
|
10481
|
+
cookie?: never;
|
|
10482
|
+
};
|
|
10483
|
+
get?: never;
|
|
10484
|
+
put?: never;
|
|
10485
|
+
/**
|
|
10486
|
+
* Apply a promo code
|
|
10487
|
+
* @description Moves the user to the user group (tariff) of the tenant's promo code, records the redemption and counts one use of the code. If a step fails, the earlier ones are undone and the request fails.
|
|
10488
|
+
* A user applies the same code once; another code can be applied later and moves the user again.
|
|
10489
|
+
* A code of another tenant, or a deleted one, is reported as not found.
|
|
10490
|
+
*
|
|
10491
|
+
*/
|
|
10492
|
+
post: {
|
|
10493
|
+
parameters: {
|
|
10494
|
+
query?: never;
|
|
10495
|
+
header?: never;
|
|
10496
|
+
path?: never;
|
|
10497
|
+
cookie?: never;
|
|
10498
|
+
};
|
|
10499
|
+
requestBody: {
|
|
10500
|
+
content: {
|
|
10501
|
+
"application/json": {
|
|
10502
|
+
/**
|
|
10503
|
+
* @description The promo code; case does not matter, surrounding spaces are trimmed. 3–32 characters `A–Z`, `0–9`, `-`, `_`.
|
|
10504
|
+
* @example summer-26
|
|
10505
|
+
*/
|
|
10506
|
+
code: string;
|
|
10507
|
+
};
|
|
10508
|
+
};
|
|
10509
|
+
};
|
|
10510
|
+
responses: {
|
|
10511
|
+
/** @description The code was applied. */
|
|
10512
|
+
200: {
|
|
10513
|
+
headers: {
|
|
10514
|
+
[name: string]: unknown;
|
|
10515
|
+
};
|
|
10516
|
+
content: {
|
|
10517
|
+
/** @example {
|
|
10518
|
+
* "success": true,
|
|
10519
|
+
* "data": {
|
|
10520
|
+
* "code": "SUMMER-26",
|
|
10521
|
+
* "user_group": {
|
|
10522
|
+
* "id": "4b1c0a52-7d0e-4f0b-9a55-2f4f3c6a1e10",
|
|
10523
|
+
* "name": "Partners"
|
|
10524
|
+
* },
|
|
10525
|
+
* "redeemed_at": "2026-10-26T13:05:00.000Z"
|
|
10526
|
+
* }
|
|
10527
|
+
* } */
|
|
10528
|
+
"application/json": {
|
|
10529
|
+
/** @example true */
|
|
10530
|
+
success: boolean;
|
|
10531
|
+
data: components["schemas"]["PromoCodeRedemption"];
|
|
10532
|
+
};
|
|
10533
|
+
};
|
|
10534
|
+
};
|
|
10535
|
+
/** @description No `code`, or a code of the wrong format (`VALIDATION_ERROR`). */
|
|
10536
|
+
400: {
|
|
10537
|
+
headers: {
|
|
10538
|
+
[name: string]: unknown;
|
|
10539
|
+
};
|
|
10540
|
+
content: {
|
|
10541
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
10542
|
+
};
|
|
10543
|
+
};
|
|
10544
|
+
401: components["responses"]["UnauthorizedError"];
|
|
10545
|
+
/** @description The tenant has no such promo code, or it was deleted (`PROMO_CODE_NOT_FOUND`). */
|
|
10546
|
+
404: {
|
|
10547
|
+
headers: {
|
|
10548
|
+
[name: string]: unknown;
|
|
10549
|
+
};
|
|
10550
|
+
content: {
|
|
10551
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
10552
|
+
};
|
|
10553
|
+
};
|
|
10554
|
+
/** @description The code cannot be applied:
|
|
10555
|
+
* - `PROMO_CODE_NOT_ACTIVE` — `error.details.reason` says why: `PAUSED` (paused by the operator), `EXPIRED` (past its expiry), `EXHAUSTED` (no uses left), `NO_GROUP` (its user group was deleted);
|
|
10556
|
+
* - `PROMO_CODE_ALREADY_REDEEMED` — the user has applied this code before;
|
|
10557
|
+
* - `PROMO_CODE_GROUP_ALREADY_ASSIGNED` — the user is already in the code's user group (a user without a group of their own is in the tenant's default group);
|
|
10558
|
+
* - `OPERATION_IN_PROGRESS` or `CONFLICT` — another application for the user, or many for the code, ran at the same moment; retry.
|
|
10559
|
+
* */
|
|
10560
|
+
409: {
|
|
10561
|
+
headers: {
|
|
10562
|
+
[name: string]: unknown;
|
|
10563
|
+
};
|
|
10564
|
+
content: {
|
|
10565
|
+
/** @example {
|
|
10566
|
+
* "success": false,
|
|
10567
|
+
* "error": {
|
|
10568
|
+
* "code": "PROMO_CODE_NOT_ACTIVE",
|
|
10569
|
+
* "message": "This promo code has been used up",
|
|
10570
|
+
* "details": {
|
|
10571
|
+
* "reason": "EXHAUSTED"
|
|
10572
|
+
* }
|
|
10573
|
+
* }
|
|
10574
|
+
* } */
|
|
10575
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
10576
|
+
};
|
|
10577
|
+
};
|
|
10578
|
+
/** @description More than 10 failed attempts in an hour (`RATE_LIMIT_EXCEEDED`); a successful redemption does not count. Retry after the window ends. */
|
|
10579
|
+
429: {
|
|
10580
|
+
headers: {
|
|
10581
|
+
[name: string]: unknown;
|
|
10582
|
+
};
|
|
10583
|
+
content: {
|
|
10584
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
10585
|
+
};
|
|
10586
|
+
};
|
|
10587
|
+
};
|
|
10588
|
+
};
|
|
10589
|
+
delete?: never;
|
|
10590
|
+
options?: never;
|
|
10591
|
+
head?: never;
|
|
10592
|
+
patch?: never;
|
|
10593
|
+
trace?: never;
|
|
10594
|
+
};
|
|
10476
10595
|
"/frontend/reference/currencies": {
|
|
10477
10596
|
parameters: {
|
|
10478
10597
|
query?: never;
|
|
@@ -15900,11 +16019,9 @@ export interface paths {
|
|
|
15900
16019
|
* (`wallet_rail.terms_confirmed`, the documents in `wallet_rail.terms_and_conditions`), and a vendor that takes
|
|
15901
16020
|
* an acceptance date is sent the same time; an account the vendor already holds may keep the date it recorded
|
|
15902
16021
|
* first. Without `accepted_terms` (or without a body, or `null`) the submission goes as before and the terms are
|
|
15903
|
-
* accepted later with `POST …/terms-and-conditions
|
|
15904
|
-
*
|
|
15905
|
-
*
|
|
15906
|
-
* form for, once the form is accepted and the entity is `APPROVED`, when the form was sent by a wallet `admin` or `owner` and the wallet has no application
|
|
15907
|
-
* on the rail yet; the route stays for a rail CORE could not submit and for a resubmission.
|
|
16022
|
+
* accepted later with `POST …/terms-and-conditions` — except on a rail that requires the terms with the
|
|
16023
|
+
* submission (set per rail by the operator): there it is refused (`400 TERMS_NOT_ACCEPTED`). Always send
|
|
16024
|
+
* `accepted_terms` to a rail with terms.
|
|
15908
16025
|
*
|
|
15909
16026
|
* Refused unless the rail has an onboarding implementation (retired rails never do), takes submissions,
|
|
15910
16027
|
* fits the entity type, and the entity's KYC is `APPROVED` — an entity still under review
|
|
@@ -15931,7 +16048,8 @@ export interface paths {
|
|
|
15931
16048
|
content: {
|
|
15932
16049
|
"application/json": {
|
|
15933
16050
|
/** @description Ids of the rail's `terms_and_conditions` the client accepted with this submission. On a rail with
|
|
15934
|
-
* terms an empty list is a refusal (`400 TERMS_NOT_ACCEPTED`), not an absence of the field
|
|
16051
|
+
* terms an empty list is a refusal (`400 TERMS_NOT_ACCEPTED`), not an absence of the field; on a
|
|
16052
|
+
* rail that requires the terms, so is the absence.
|
|
15935
16053
|
* */
|
|
15936
16054
|
accepted_terms?: string[] | null;
|
|
15937
16055
|
};
|
|
@@ -15956,7 +16074,8 @@ export interface paths {
|
|
|
15956
16074
|
* tenant of the KYC forms flow, the KYC entity misses saved values of required fields of the rail's form
|
|
15957
16075
|
* (a draft does not count): `details.fields` lists their keys, open
|
|
15958
16076
|
* `GET /frontend/kyc/entities/{entity_id}/forms?rails={rail_id}` and fill them; `TERMS_NOT_ACCEPTED` —
|
|
15959
|
-
* `accepted_terms` misses an active terms document of the rail,
|
|
16077
|
+
* `accepted_terms` misses an active terms document of the rail, or is absent on a rail that requires the
|
|
16078
|
+
* terms; nothing was submitted
|
|
15960
16079
|
* */
|
|
15961
16080
|
400: {
|
|
15962
16081
|
headers: {
|
|
@@ -16451,7 +16570,7 @@ export interface paths {
|
|
|
16451
16570
|
};
|
|
16452
16571
|
/**
|
|
16453
16572
|
* The form of an entity for a set of purposes
|
|
16454
|
-
* @description Built on every call from the tenant's requirement profiles and the entity. Without `rails` and `programs` it is the base form. With one rail it is that rail's form: the base profile, the tenant's rail profile and the vendor's minimum merged: a field required by any of them is required, `review` wins over `auto`, and a field is shown when any of them shows it (one asking it without a condition — the vendor's minimum always — shows it always); profiles whose conditions read each other in a circle answer `409 KYC_FORM_CONDITIONS_CYCLE`. Sections are the groups to draw, `visible_when` the show logic, `required_by` the purposes a field is required for, the locks (`saved`, `from_document`, `pending`, `status`) what the client cannot change, `schema_version` what to echo back. Fields that come from the identity document (names, date of birth, citizenship, the document number and dates) are left out until the document is verified; the document itself is asked: its type `gov_id_type` (`PASSPORT`, `ID_CARD`, `RESIDENCE_PERMIT`, `DRIVERS` — the codes `…/owners/{owner_id}/document` takes as `type` too), issuing country `gov_id_country` and photos `gov_id_front` and `gov_id_back` (shown unless a passport) — saved, and no longer asked, once it is verified; `state: complete` on a rail form means
|
|
16573
|
+
* @description Built on every call from the tenant's requirement profiles and the entity. Without `rails` and `programs` it is the base form. With one rail it is that rail's form: the base profile, the tenant's rail profile and the vendor's minimum merged: a field required by any of them is required, `review` wins over `auto`, and a field is shown when any of them shows it (one asking it without a condition — the vendor's minimum always — shows it always); profiles whose conditions read each other in a circle answer `409 KYC_FORM_CONDITIONS_CYCLE`. Sections are the groups to draw, `visible_when` the show logic, `required_by` the purposes a field is required for, the locks (`saved`, `from_document`, `pending`, `status`) what the client cannot change, `schema_version` what to echo back. Fields that come from the identity document (names, date of birth, citizenship, the document number and dates) are left out until the document is verified; the document itself is asked: its type `gov_id_type` (`PASSPORT`, `ID_CARD`, `RESIDENCE_PERMIT`, `DRIVERS` — the codes `…/owners/{owner_id}/document` takes as `type` too), issuing country `gov_id_country` and photos `gov_id_front` and `gov_id_back` (shown unless a passport) — saved, and no longer asked, once it is verified; `state: complete` on a rail form means nothing is left to ask and the client goes straight to the rail's terms. With one program and `wallet_id` it is the form before a card: the level the program's vendor demands (`minimal`: name, email, phone; `basic`: plus date of birth, citizenship, gender, identity document type and number, residential address; `declared` / `full`: plus the identity document and the face, verified after the form) merged with the tenant's binding for the program, without the base form; what the personal entity already holds is locked `saved`, so `state: complete` means the card can be asked for at once. Several rails and programs at once is the multi form: the base form, every rail and every program merged, each field once with `required_by` naming the purposes. Access: the owner of the entity, or an owner / admin of a wallet it is linked to.
|
|
16455
16574
|
*/
|
|
16456
16575
|
get: {
|
|
16457
16576
|
parameters: {
|
|
@@ -16460,7 +16579,7 @@ export interface paths {
|
|
|
16460
16579
|
rails?: components["parameters"]["KycFormsRails"];
|
|
16461
16580
|
/** @description `issuing_programs.id` of the tenant the form is for, as a native query array: `programs[]=a&programs[]=b` or `programs=a&programs=b`. One program alone: the form before a card of that program (`scope: card`). Together with `rails` or several at once: the multi form. Only a personal entity has card forms (`400 FORM_TARGET_UNSUPPORTED` on a business entity); `wallet_id` is required whenever programs are named. A program the tenant does not have is `404 NOT_FOUND`. */
|
|
16462
16581
|
programs?: components["parameters"]["KycFormsPrograms"];
|
|
16463
|
-
/** @description The wallet the
|
|
16582
|
+
/** @description The wallet the card is for — required when `programs` are named (`400 INVALID_REQUEST` without it), ignored otherwise. The entity's owner must be an active member of it (any role; the cardholder is theirs), and so must the caller when it is someone else, else `403 ACCESS_DENIED`. The form is built for this wallet, and the draft and the submission carry it. Not a uuid: `400 VALIDATION_ERROR`. */
|
|
16464
16583
|
wallet_id?: components["parameters"]["KycFormsWalletId"];
|
|
16465
16584
|
/** @description Language of the texts (labels, hints, options, section titles, general messages); takes precedence over `Accept-Language`. A language outside the tenant's list is served in English. */
|
|
16466
16585
|
locale?: components["parameters"]["KycFormsLocale"];
|
|
@@ -16486,7 +16605,7 @@ export interface paths {
|
|
|
16486
16605
|
"application/json": components["schemas"]["KycFormsFormResponse"];
|
|
16487
16606
|
};
|
|
16488
16607
|
};
|
|
16489
|
-
/** @description `VALIDATION_ERROR` — `entity_id`, `wallet_id` or an id in `rails` / `programs` is not a uuid (a message only); `FORM_TARGET_UNSUPPORTED` — a card program named on a business entity; `INVALID_REQUEST` — `wallet_id` missing for a form over card programs; `
|
|
16608
|
+
/** @description `VALIDATION_ERROR` — `entity_id`, `wallet_id` or an id in `rails` / `programs` is not a uuid (a message only); `FORM_TARGET_UNSUPPORTED` — a card program named on a business entity; `INVALID_REQUEST` — `wallet_id` missing for a form over card programs; `KYC_BASE_BINDING_MISSING` — the tenant has no base form for this client type; `KYC_FORMS_NOT_ENABLED` — the tenant still runs KYC through the BFF */
|
|
16490
16609
|
400: {
|
|
16491
16610
|
headers: {
|
|
16492
16611
|
[name: string]: unknown;
|
|
@@ -16527,7 +16646,7 @@ export interface paths {
|
|
|
16527
16646
|
get?: never;
|
|
16528
16647
|
/**
|
|
16529
16648
|
* Save the draft of a form
|
|
16530
|
-
* @description The form is the one `rails` and `programs` name, as for `GET …/forms`. Replaces the draft as a whole with the given values of open fields. Types are checked, rules and requiredness are not — except that owner shares over 100% in total and a value whose condition reads an empty required source are refused here too. Nothing is written to the KYC entity. The
|
|
16649
|
+
* @description The form is the one `rails` and `programs` name, as for `GET …/forms`. Replaces the draft as a whole with the given values of open fields. Types are checked, rules and requiredness are not — except that owner shares over 100% in total and a value whose condition reads an empty required source are refused here too. Nothing is written to the KYC entity. The first draft of a business form moves the application to `PENDING`. The entity's owner, or an owner or admin of a linked wallet.
|
|
16531
16650
|
*/
|
|
16532
16651
|
put: {
|
|
16533
16652
|
parameters: {
|
|
@@ -16536,7 +16655,7 @@ export interface paths {
|
|
|
16536
16655
|
rails?: components["parameters"]["KycFormsRails"];
|
|
16537
16656
|
/** @description `issuing_programs.id` of the tenant the form is for, as a native query array: `programs[]=a&programs[]=b` or `programs=a&programs=b`. One program alone: the form before a card of that program (`scope: card`). Together with `rails` or several at once: the multi form. Only a personal entity has card forms (`400 FORM_TARGET_UNSUPPORTED` on a business entity); `wallet_id` is required whenever programs are named. A program the tenant does not have is `404 NOT_FOUND`. */
|
|
16538
16657
|
programs?: components["parameters"]["KycFormsPrograms"];
|
|
16539
|
-
/** @description The wallet the
|
|
16658
|
+
/** @description The wallet the card is for — required when `programs` are named (`400 INVALID_REQUEST` without it), ignored otherwise. The entity's owner must be an active member of it (any role; the cardholder is theirs), and so must the caller when it is someone else, else `403 ACCESS_DENIED`. The form is built for this wallet, and the draft and the submission carry it. Not a uuid: `400 VALIDATION_ERROR`. */
|
|
16540
16659
|
wallet_id?: components["parameters"]["KycFormsWalletId"];
|
|
16541
16660
|
/** @description Language of the texts (labels, hints, options, section titles, general messages); takes precedence over `Accept-Language`. A language outside the tenant's list is served in English. */
|
|
16542
16661
|
locale?: components["parameters"]["KycFormsLocale"];
|
|
@@ -16578,7 +16697,7 @@ export interface paths {
|
|
|
16578
16697
|
"application/json": components["schemas"]["ErrorResponse"];
|
|
16579
16698
|
};
|
|
16580
16699
|
};
|
|
16581
|
-
/** @description `FORM_LOCKED` — the form is read-only by the application status, or its last submission waits on the verification or the review; `FORM_OUTDATED` — `schema_version` is not the one the form has now
|
|
16700
|
+
/** @description `FORM_LOCKED` — the form is read-only by the application status, or its last submission waits on the verification or the review; `FORM_OUTDATED` — `schema_version` is not the one the form has now, reload it (`GET …/forms`) and send again; `KYC_FORM_CONDITIONS_CYCLE` — the tenant's form settings show fields on conditions that read each other in a circle */
|
|
16582
16701
|
409: {
|
|
16583
16702
|
headers: {
|
|
16584
16703
|
[name: string]: unknown;
|
|
@@ -16616,7 +16735,7 @@ export interface paths {
|
|
|
16616
16735
|
rails?: components["parameters"]["KycFormsRails"];
|
|
16617
16736
|
/** @description `issuing_programs.id` of the tenant the form is for, as a native query array: `programs[]=a&programs[]=b` or `programs=a&programs=b`. One program alone: the form before a card of that program (`scope: card`). Together with `rails` or several at once: the multi form. Only a personal entity has card forms (`400 FORM_TARGET_UNSUPPORTED` on a business entity); `wallet_id` is required whenever programs are named. A program the tenant does not have is `404 NOT_FOUND`. */
|
|
16618
16737
|
programs?: components["parameters"]["KycFormsPrograms"];
|
|
16619
|
-
/** @description The wallet the
|
|
16738
|
+
/** @description The wallet the card is for — required when `programs` are named (`400 INVALID_REQUEST` without it), ignored otherwise. The entity's owner must be an active member of it (any role; the cardholder is theirs), and so must the caller when it is someone else, else `403 ACCESS_DENIED`. The form is built for this wallet, and the draft and the submission carry it. Not a uuid: `400 VALIDATION_ERROR`. */
|
|
16620
16739
|
wallet_id?: components["parameters"]["KycFormsWalletId"];
|
|
16621
16740
|
/** @description Language of the texts (labels, hints, options, section titles, general messages); takes precedence over `Accept-Language`. A language outside the tenant's list is served in English. */
|
|
16622
16741
|
locale?: components["parameters"]["KycFormsLocale"];
|
|
@@ -16724,7 +16843,7 @@ export interface paths {
|
|
|
16724
16843
|
rails?: components["parameters"]["KycFormsRails"];
|
|
16725
16844
|
/** @description `issuing_programs.id` of the tenant the form is for, as a native query array: `programs[]=a&programs[]=b` or `programs=a&programs=b`. One program alone: the form before a card of that program (`scope: card`). Together with `rails` or several at once: the multi form. Only a personal entity has card forms (`400 FORM_TARGET_UNSUPPORTED` on a business entity); `wallet_id` is required whenever programs are named. A program the tenant does not have is `404 NOT_FOUND`. */
|
|
16726
16845
|
programs?: components["parameters"]["KycFormsPrograms"];
|
|
16727
|
-
/** @description The wallet the
|
|
16846
|
+
/** @description The wallet the card is for — required when `programs` are named (`400 INVALID_REQUEST` without it), ignored otherwise. The entity's owner must be an active member of it (any role; the cardholder is theirs), and so must the caller when it is someone else, else `403 ACCESS_DENIED`. The form is built for this wallet, and the draft and the submission carry it. Not a uuid: `400 VALIDATION_ERROR`. */
|
|
16728
16847
|
wallet_id?: components["parameters"]["KycFormsWalletId"];
|
|
16729
16848
|
};
|
|
16730
16849
|
header?: never;
|
|
@@ -16792,7 +16911,7 @@ export interface paths {
|
|
|
16792
16911
|
put?: never;
|
|
16793
16912
|
/**
|
|
16794
16913
|
* Send a form
|
|
16795
|
-
* @description The form is the one `rails` and `programs` name. The full check of every open field (all errors in one `VALIDATION_ERROR`)
|
|
16914
|
+
* @description The form is the one `rails` and `programs` name. The full check of every open field (all errors in one `VALIDATION_ERROR`), then a submission: `awaiting_verification` when the identity document and face are still needed, `applied` when every profile of the form writes the answers into the KYC entity at once, `in_review` when compliance decides (any profile of the form in review mode). Answers `200` with the form in its new state. One submission of a form at a time. A rail form does not change the application status; once its submission is approved, the rail is submitted through the wallet's existing `POST /frontend/wallets/{wallet_id}/kyc-rails/{rail_id}`. A card form is `auto` unless a profile of it says otherwise and never changes the application status; once applied, the cardholder is created through `POST /frontend/issuing/cardholders` with `user_data_id`. A multi form moves the application like the base form it includes; once applied, every rail and program of the set is satisfied from the shared data. The entity's owner, or an owner or admin of a linked wallet.
|
|
16796
16915
|
*/
|
|
16797
16916
|
post: {
|
|
16798
16917
|
parameters: {
|
|
@@ -16801,7 +16920,7 @@ export interface paths {
|
|
|
16801
16920
|
rails?: components["parameters"]["KycFormsRails"];
|
|
16802
16921
|
/** @description `issuing_programs.id` of the tenant the form is for, as a native query array: `programs[]=a&programs[]=b` or `programs=a&programs=b`. One program alone: the form before a card of that program (`scope: card`). Together with `rails` or several at once: the multi form. Only a personal entity has card forms (`400 FORM_TARGET_UNSUPPORTED` on a business entity); `wallet_id` is required whenever programs are named. A program the tenant does not have is `404 NOT_FOUND`. */
|
|
16803
16922
|
programs?: components["parameters"]["KycFormsPrograms"];
|
|
16804
|
-
/** @description The wallet the
|
|
16923
|
+
/** @description The wallet the card is for — required when `programs` are named (`400 INVALID_REQUEST` without it), ignored otherwise. The entity's owner must be an active member of it (any role; the cardholder is theirs), and so must the caller when it is someone else, else `403 ACCESS_DENIED`. The form is built for this wallet, and the draft and the submission carry it. Not a uuid: `400 VALIDATION_ERROR`. */
|
|
16805
16924
|
wallet_id?: components["parameters"]["KycFormsWalletId"];
|
|
16806
16925
|
/** @description Language of the texts (labels, hints, options, section titles, general messages); takes precedence over `Accept-Language`. A language outside the tenant's list is served in English. */
|
|
16807
16926
|
locale?: components["parameters"]["KycFormsLocale"];
|
|
@@ -16818,7 +16937,7 @@ export interface paths {
|
|
|
16818
16937
|
};
|
|
16819
16938
|
requestBody: {
|
|
16820
16939
|
content: {
|
|
16821
|
-
"application/json": components["schemas"]["
|
|
16940
|
+
"application/json": components["schemas"]["KycFormsAnswersRequest"];
|
|
16822
16941
|
};
|
|
16823
16942
|
};
|
|
16824
16943
|
responses: {
|
|
@@ -16831,7 +16950,7 @@ export interface paths {
|
|
|
16831
16950
|
"application/json": components["schemas"]["KycFormsFormResponse"];
|
|
16832
16951
|
};
|
|
16833
16952
|
};
|
|
16834
|
-
400: components["responses"]["
|
|
16953
|
+
400: components["responses"]["KycFormsFieldErrors"];
|
|
16835
16954
|
401: components["responses"]["UnauthorizedError"];
|
|
16836
16955
|
403: components["responses"]["KycFormsAccessDenied"];
|
|
16837
16956
|
/** @description `NOT_FOUND` — the entity does not exist or belongs to another tenant, or a rail / program of the query does not exist for the tenant */
|
|
@@ -16843,7 +16962,7 @@ export interface paths {
|
|
|
16843
16962
|
"application/json": components["schemas"]["ErrorResponse"];
|
|
16844
16963
|
};
|
|
16845
16964
|
};
|
|
16846
|
-
/** @description `FORM_LOCKED` — the form is read-only by the application status, or its last submission waits on the verification or the review; `FORM_OUTDATED` — `schema_version` is not the one the form has now
|
|
16965
|
+
/** @description `FORM_LOCKED` — the form is read-only by the application status, or its last submission waits on the verification or the review; `FORM_OUTDATED` — `schema_version` is not the one the form has now, reload it (`GET …/forms`) and send again; `OPERATION_IN_PROGRESS` — a submission of this form is already running; `KYC_FORM_CONDITIONS_CYCLE` — the tenant's form settings show fields on conditions that read each other in a circle */
|
|
16847
16966
|
409: {
|
|
16848
16967
|
headers: {
|
|
16849
16968
|
[name: string]: unknown;
|
|
@@ -19984,6 +20103,25 @@ export interface components {
|
|
|
19984
20103
|
category: "TRANSACTIONS" | "COMPLIANCE" | "ANNOUNCEMENTS" | "SYSTEM" | "SECURITY";
|
|
19985
20104
|
enabled: boolean;
|
|
19986
20105
|
};
|
|
20106
|
+
PromoCodeRedemption: {
|
|
20107
|
+
/**
|
|
20108
|
+
* @description The code as stored — upper case.
|
|
20109
|
+
* @example SUMMER-26
|
|
20110
|
+
*/
|
|
20111
|
+
code: string;
|
|
20112
|
+
/** @description The user group (tariff) the user is in now. */
|
|
20113
|
+
user_group: {
|
|
20114
|
+
/** Format: uuid */
|
|
20115
|
+
id: string;
|
|
20116
|
+
/** @example Partners */
|
|
20117
|
+
name: string;
|
|
20118
|
+
};
|
|
20119
|
+
/**
|
|
20120
|
+
* Format: date-time
|
|
20121
|
+
* @description When the code was applied.
|
|
20122
|
+
*/
|
|
20123
|
+
redeemed_at: string;
|
|
20124
|
+
};
|
|
19987
20125
|
ReferralLevelRate: {
|
|
19988
20126
|
/** @example TRANSFER_CARD_SUBACCOUNT */
|
|
19989
20127
|
order_type?: string;
|
|
@@ -20635,23 +20773,6 @@ export interface components {
|
|
|
20635
20773
|
add_label: string;
|
|
20636
20774
|
};
|
|
20637
20775
|
};
|
|
20638
|
-
/** @description The terms of one rail of the form: a rail the form names, or the rail of one of its card programs — one group per rail, the programs that go through it listed with it. Draw one checkbox per group that accepts all of its `items`; send their ids in `accepted_terms` of `POST …/forms/submit`. */
|
|
20639
|
-
KycFormsTerms: {
|
|
20640
|
-
/** Format: uuid */
|
|
20641
|
-
rail_id: string;
|
|
20642
|
-
/** @description The card programs of the form that go through this rail; empty when only the rail itself is named. */
|
|
20643
|
-
program_ids: string[];
|
|
20644
|
-
/** @description The rail's active terms documents in display order; empty when the rail has none — nothing to accept. */
|
|
20645
|
-
items: {
|
|
20646
|
-
/** Format: uuid */
|
|
20647
|
-
id: string;
|
|
20648
|
-
/** @example Cardholder Agreement */
|
|
20649
|
-
title: string;
|
|
20650
|
-
description: string | null;
|
|
20651
|
-
/** @example https://example.com/terms.pdf */
|
|
20652
|
-
link: string | null;
|
|
20653
|
-
}[];
|
|
20654
|
-
};
|
|
20655
20776
|
KycFormsForm: {
|
|
20656
20777
|
/**
|
|
20657
20778
|
* @description What the form is for: the base form, a rail, a card program (`card`), or one form over several rails and programs (`multi`).
|
|
@@ -20664,7 +20785,7 @@ export interface components {
|
|
|
20664
20785
|
programs: string[];
|
|
20665
20786
|
/**
|
|
20666
20787
|
* Format: uuid
|
|
20667
|
-
* @description The wallet the form is built for: the `wallet_id` of the query for a form over card programs
|
|
20788
|
+
* @description The wallet the form is built for: the `wallet_id` of the query for a form over card programs; for any other form the entity's first linked wallet (main wallet first), null when the entity is linked to none. The draft and the submission carry it.
|
|
20668
20789
|
*/
|
|
20669
20790
|
wallet_id: string | null;
|
|
20670
20791
|
/** @enum {string} */
|
|
@@ -20675,7 +20796,7 @@ export interface components {
|
|
|
20675
20796
|
*/
|
|
20676
20797
|
locale: string;
|
|
20677
20798
|
/**
|
|
20678
|
-
* @description Hash of the form composition (keys, requiredness, conditions, list item fields
|
|
20799
|
+
* @description Hash of the form composition (keys, requiredness, conditions, list item fields; not the texts); echo it back in the draft and the submission. It can change between the load and the send: `409 FORM_OUTDATED`.
|
|
20679
20800
|
* @example b3f1c2a9
|
|
20680
20801
|
*/
|
|
20681
20802
|
schema_version: string;
|
|
@@ -20704,31 +20825,6 @@ export interface components {
|
|
|
20704
20825
|
description: string | null;
|
|
20705
20826
|
fields: components["schemas"]["KycFormsField"][];
|
|
20706
20827
|
}[];
|
|
20707
|
-
/**
|
|
20708
|
-
* @description The terms the client accepts with the form, one group per rail of the form: the rails named first, then the rail of each card program. Empty for the base form; a program without a rail adds none. The documents are those in force now: a change after the load answers the submission `409 FORM_OUTDATED`.
|
|
20709
|
-
* @example [
|
|
20710
|
-
* {
|
|
20711
|
-
* "rail_id": "a38b9a0c-5d1e-4f2a-8b3c-4d5e6f708192",
|
|
20712
|
-
* "program_ids": [
|
|
20713
|
-
* "d94ef320-1a2b-4c3d-8e4f-5a6b7c8d9e0f"
|
|
20714
|
-
* ],
|
|
20715
|
-
* "items": [
|
|
20716
|
-
* {
|
|
20717
|
-
* "id": "0c1d2e3f-4a5b-4c6d-8e7f-90a1b2c3d4e5",
|
|
20718
|
-
* "title": "Cardholder Agreement",
|
|
20719
|
-
* "description": null,
|
|
20720
|
-
* "link": "https://example.com/terms.pdf"
|
|
20721
|
-
* }
|
|
20722
|
-
* ]
|
|
20723
|
-
* },
|
|
20724
|
-
* {
|
|
20725
|
-
* "rail_id": "c1d7fac1-2b3c-4d5e-9f60-718293a4b5c6",
|
|
20726
|
-
* "program_ids": [],
|
|
20727
|
-
* "items": []
|
|
20728
|
-
* }
|
|
20729
|
-
* ]
|
|
20730
|
-
*/
|
|
20731
|
-
terms: components["schemas"]["KycFormsTerms"][];
|
|
20732
20828
|
};
|
|
20733
20829
|
KycFormsFormResponse: {
|
|
20734
20830
|
/** @example true */
|
|
@@ -20774,16 +20870,6 @@ export interface components {
|
|
|
20774
20870
|
[key: string]: components["schemas"]["KycFormsAnswerValue"];
|
|
20775
20871
|
};
|
|
20776
20872
|
};
|
|
20777
|
-
KycFormsSubmitRequest: components["schemas"]["KycFormsAnswersRequest"] & {
|
|
20778
|
-
/**
|
|
20779
|
-
* @description The ids of every terms document of the form (`form.terms[].items[].id`) — the client ticked the checkbox of each group. Required in full when the form has any: one left out answers `400 KYC_TERMS_NOT_ACCEPTED`, an id that is not a uuid or not of this form `400 VALIDATION_ERROR`. A form without terms documents is sent without it. The terms are checked after the fields: while a field is wrong, only the `VALIDATION_ERROR` comes back.
|
|
20780
|
-
* @default []
|
|
20781
|
-
* @example [
|
|
20782
|
-
* "0c1d2e3f-4a5b-4c6d-8e7f-90a1b2c3d4e5"
|
|
20783
|
-
* ]
|
|
20784
|
-
*/
|
|
20785
|
-
accepted_terms: string[];
|
|
20786
|
-
};
|
|
20787
20873
|
KycFormsDraftSaved: {
|
|
20788
20874
|
/** @example true */
|
|
20789
20875
|
success: boolean;
|
|
@@ -21091,18 +21177,11 @@ export interface components {
|
|
|
21091
21177
|
}[];
|
|
21092
21178
|
};
|
|
21093
21179
|
};
|
|
21094
|
-
/** @description The structured payload of an error that carries one (absent otherwise — an invalid uuid or a malformed body is a message only). `VALIDATION_ERROR`: `fields` is a map from the field key to its messages (a list item field is `beneficial_owners[0].role`, the list as a whole `beneficial_owners`). `FORM_FIELD_NOT_ALLOWED`, `KYC_FORM_CONDITIONS_CYCLE`: `fields` is a list of keys.
|
|
21180
|
+
/** @description The structured payload of an error that carries one (absent otherwise — an invalid uuid or a malformed body is a message only). `VALIDATION_ERROR`: `fields` is a map from the field key to its messages (a list item field is `beneficial_owners[0].role`, the list as a whole `beneficial_owners`). `FORM_FIELD_NOT_ALLOWED`, `KYC_FORM_CONDITIONS_CYCLE`: `fields` is a list of keys. */
|
|
21095
21181
|
KycFormsErrorDetails: {
|
|
21096
|
-
fields
|
|
21182
|
+
fields: {
|
|
21097
21183
|
[key: string]: string[];
|
|
21098
21184
|
} | string[];
|
|
21099
|
-
/**
|
|
21100
|
-
* @description The ids of the terms documents of the form left out of `accepted_terms`.
|
|
21101
|
-
* @example [
|
|
21102
|
-
* "0c1d2e3f-4a5b-4c6d-8e7f-90a1b2c3d4e5"
|
|
21103
|
-
* ]
|
|
21104
|
-
*/
|
|
21105
|
-
terms?: string[];
|
|
21106
21185
|
};
|
|
21107
21186
|
/** @description The error envelope of the KYC forms: `ErrorResponse` with the `details` of the field errors spelled out. */
|
|
21108
21187
|
KycFormsErrorResponse: components["schemas"]["ErrorResponse"] & {
|
|
@@ -21189,7 +21268,7 @@ export interface components {
|
|
|
21189
21268
|
"application/json": components["schemas"]["ErrorResponse"];
|
|
21190
21269
|
};
|
|
21191
21270
|
};
|
|
21192
|
-
/** @description `VALIDATION_ERROR` — field errors in `details.fields[key] = [message]` (on a business form the owner list the KYC tables refuse, and owner shares adding up to more than 100%, come back under `beneficial_owners`; a value sent for a field whose condition reads a source left empty or wrong comes back as the error of the source, e.g. `beneficial_owners[0].role`), or a message only for a malformed body (`schema_version` missing or longer than 64, `values` not an object) and a path id that is not a uuid; `FORM_FIELD_NOT_ALLOWED` — a key the form does not accept (unknown, locked, hidden, a file field), `details.fields = [key]`, the whole request refused; `FORM_TARGET_UNSUPPORTED` — a card program named on a business entity; `INVALID_REQUEST` — `wallet_id` missing for a form over card programs; `
|
|
21271
|
+
/** @description `VALIDATION_ERROR` — field errors in `details.fields[key] = [message]` (on a business form the owner list the KYC tables refuse, and owner shares adding up to more than 100%, come back under `beneficial_owners`; a value sent for a field whose condition reads a source left empty or wrong comes back as the error of the source, e.g. `beneficial_owners[0].role`), or a message only for a malformed body (`schema_version` missing or longer than 64, `values` not an object) and a path id that is not a uuid; `FORM_FIELD_NOT_ALLOWED` — a key the form does not accept (unknown, locked, hidden, a file field), `details.fields = [key]`, the whole request refused; `FORM_TARGET_UNSUPPORTED` — a card program named on a business entity; `INVALID_REQUEST` — `wallet_id` missing for a form over card programs; `KYC_BASE_BINDING_MISSING` — the tenant has no base form for this client type; `KYC_FORMS_NOT_ENABLED` — the tenant is not on the forms flow */
|
|
21193
21272
|
KycFormsFieldErrors: {
|
|
21194
21273
|
headers: {
|
|
21195
21274
|
[name: string]: unknown;
|
|
@@ -21198,15 +21277,6 @@ export interface components {
|
|
|
21198
21277
|
"application/json": components["schemas"]["KycFormsErrorResponse"];
|
|
21199
21278
|
};
|
|
21200
21279
|
};
|
|
21201
|
-
/** @description `VALIDATION_ERROR` — field errors in `details.fields[key] = [message]` (on a business form the owner list the KYC tables refuse, and owner shares adding up to more than 100%, come back under `beneficial_owners`; a value sent for a field whose condition reads a source left empty or wrong comes back as the error of the source, e.g. `beneficial_owners[0].role`), or a message only for a malformed body (`schema_version` missing or longer than 64, `values` not an object, `accepted_terms` not a list of at most 200 uuids), an id in `accepted_terms` that is not a terms document of this form, and a path id that is not a uuid; `KYC_TERMS_NOT_ACCEPTED` — `accepted_terms` leaves out a terms document of the form, `details.terms` lists the ids left out, nothing is written; `FORM_FIELD_NOT_ALLOWED` — a key the form does not accept (unknown, locked, hidden, a file field), `details.fields = [key]`, the whole request refused; `FORM_TARGET_UNSUPPORTED` — a card program named on a business entity; `INVALID_REQUEST` — `wallet_id` missing for a form over card programs; `KYC_FORM_WALLET_NOT_LINKED` — `wallet_id` of a form over rails is not a wallet of this entity; `KYC_BASE_BINDING_MISSING` — the tenant has no base form for this client type; `KYC_FORMS_NOT_ENABLED` — the tenant is not on the forms flow */
|
|
21202
|
-
KycFormsSubmitErrors: {
|
|
21203
|
-
headers: {
|
|
21204
|
-
[name: string]: unknown;
|
|
21205
|
-
};
|
|
21206
|
-
content: {
|
|
21207
|
-
"application/json": components["schemas"]["KycFormsErrorResponse"];
|
|
21208
|
-
};
|
|
21209
|
-
};
|
|
21210
21280
|
/** @description `KYC_FORM_CONDITIONS_CYCLE` — the tenant's form settings show fields on conditions that read each other in a circle (`details.fields` lists the keys); nothing the client can fix, report it to support */
|
|
21211
21281
|
KycFormsConditionsCycle: {
|
|
21212
21282
|
headers: {
|
|
@@ -21313,7 +21383,7 @@ export interface components {
|
|
|
21313
21383
|
KycFormsRails: string[];
|
|
21314
21384
|
/** @description `issuing_programs.id` of the tenant the form is for, as a native query array: `programs[]=a&programs[]=b` or `programs=a&programs=b`. One program alone: the form before a card of that program (`scope: card`). Together with `rails` or several at once: the multi form. Only a personal entity has card forms (`400 FORM_TARGET_UNSUPPORTED` on a business entity); `wallet_id` is required whenever programs are named. A program the tenant does not have is `404 NOT_FOUND`. */
|
|
21315
21385
|
KycFormsPrograms: string[];
|
|
21316
|
-
/** @description The wallet the
|
|
21386
|
+
/** @description The wallet the card is for — required when `programs` are named (`400 INVALID_REQUEST` without it), ignored otherwise. The entity's owner must be an active member of it (any role; the cardholder is theirs), and so must the caller when it is someone else, else `403 ACCESS_DENIED`. The form is built for this wallet, and the draft and the submission carry it. Not a uuid: `400 VALIDATION_ERROR`. */
|
|
21317
21387
|
KycFormsWalletId: string;
|
|
21318
21388
|
/** @description The wallet the rails and the card programs are read for. Optional: without it the first linked wallet (main wallet first) that the entity's owner and the caller are both members of is used; when there is none — no linked wallet, or none the two share — the answer has `wallet_id: null` and empty `rails` and `programs`. With it, the entity's owner must be an active member of the wallet, and so must the caller when it is someone else, else `403 ACCESS_DENIED`. */
|
|
21319
21389
|
KycFormsTargetsWalletId: string;
|
|
@@ -1046,6 +1046,7 @@ export interface components {
|
|
|
1046
1046
|
schemas: {
|
|
1047
1047
|
InviteDto: {
|
|
1048
1048
|
invite_code?: string;
|
|
1049
|
+
promo_code?: string;
|
|
1049
1050
|
referrer?: string;
|
|
1050
1051
|
};
|
|
1051
1052
|
UserDataRefEntity: {
|
|
@@ -1126,6 +1127,7 @@ export interface components {
|
|
|
1126
1127
|
};
|
|
1127
1128
|
SignUpByTypeDto: {
|
|
1128
1129
|
invite_code?: string;
|
|
1130
|
+
promo_code?: string;
|
|
1129
1131
|
referrer?: string;
|
|
1130
1132
|
/** @enum {string} */
|
|
1131
1133
|
type: "email" | "phone";
|
|
@@ -1166,6 +1168,7 @@ export interface components {
|
|
|
1166
1168
|
auth_date: string;
|
|
1167
1169
|
hash: string;
|
|
1168
1170
|
invite_code?: string;
|
|
1171
|
+
promo_code?: string;
|
|
1169
1172
|
referrer?: string;
|
|
1170
1173
|
};
|
|
1171
1174
|
TelegramSignInByTgIdDto: {
|
|
@@ -1174,12 +1177,14 @@ export interface components {
|
|
|
1174
1177
|
};
|
|
1175
1178
|
SignInByEmailDto: {
|
|
1176
1179
|
invite_code?: string;
|
|
1180
|
+
promo_code?: string;
|
|
1177
1181
|
referrer?: string;
|
|
1178
1182
|
email: string;
|
|
1179
1183
|
redirect_url?: string;
|
|
1180
1184
|
};
|
|
1181
1185
|
SignInByPhoneDto: {
|
|
1182
1186
|
invite_code?: string;
|
|
1187
|
+
promo_code?: string;
|
|
1183
1188
|
referrer?: string;
|
|
1184
1189
|
phone: string;
|
|
1185
1190
|
};
|
|
@@ -4211,7 +4216,7 @@ export interface operations {
|
|
|
4211
4216
|
"application/json": components["schemas"]["WalletKycRailTypeDto"];
|
|
4212
4217
|
};
|
|
4213
4218
|
};
|
|
4214
|
-
/** @description KYC verification already processed */
|
|
4219
|
+
/** @description KYC verification already processed; or TERMS_NOT_ACCEPTED — the rail requires its terms with the submission (kyc_rails.terms_required), submit it with CORE POST /frontend/wallets/{wallet_id}/kyc-rails/{rail_id} and accepted_terms */
|
|
4215
4220
|
400: {
|
|
4216
4221
|
headers: {
|
|
4217
4222
|
[name: string]: unknown;
|
|
@@ -919,8 +919,6 @@ export declare namespace API {
|
|
|
919
919
|
export type Form = Schemas['KycFormsForm'];
|
|
920
920
|
export type FormScope = Form['scope'];
|
|
921
921
|
export type FormSection = Form['sections'][number];
|
|
922
|
-
export type Terms = Schemas['KycFormsTerms'];
|
|
923
|
-
export type TermsItem = Terms['items'][number];
|
|
924
922
|
export type FormState = Schemas['KycFormsFormState'];
|
|
925
923
|
export type Field = Schemas['KycFormsField'];
|
|
926
924
|
export type FieldType = Field['type'];
|