Read account requirements
Use GET /v2/accounts/requirements to get the fields and documents a bank needs, and turn the form into a create request.
API version: v2.
Each bank asks for different data. GET /v2/accounts/requirements returns the form for one option. The form lists the fields, the documents and, for a business, the people (parties) to declare. Read it before you open the account, so the create call succeeds the first time.
A money example. Ada's 1,200.00 USD invoice needs a USD account. The default USD option for a GB individual asks for 13 fields (names, date of birth, email, phone, gender, citizenship, tax residence and a full address) and 2 documents (an identity document and a proof of address). You collect those once, and the account opens without a second round.
Ask for the form
Always send customer_type, currency, bank_code and country. The create call picks the bank from the country inside your data, while this call picks it from the country parameter. Unless you send both bank_code and country, you can get the form of a different bank. Send customer_id too, to see what is already on file:
Here is the response, trimmed to 3 fields and 2 suggestions (checked in sandbox):
Turn the form into a request
| The form says | Put it in the create body |
|---|---|
a field with scope root | data.root.<name>. A dotted name is nested: permanent_address.city becomes "permanent_address": {"city": "…"} |
a field with scope party[*] | every entry of data.parties[] (directors, owners, signers of a business) |
new_party_fields | the fields for a person who is not on the customer record (no id) |
a document with scope root | one entry in data.documents[], of any one of the listed types |
a document with scope party[*] | that party's own documents[] |
new_document_fields | the keys a new upload carries: document_type, content (base64; JPEG, PNG or PDF; at most 2 MB, and in sandbox under 500 KB for all of one request's files), issuing_country, and number, issued_date, expiration_date for identity documents |
required: true and no condition | always send it |
applies_when | send it only when the condition is true for this customer, for example only for US citizens |
options | the only accepted values |
write_only: true | a secret, such as a tax number. The API never returns it |
is_predefined: true, or the field is in suggestions.fields | already on the customer record. Leave it out and Gravv fills it, or send it to override |
suggestions.documents.<type> | a document of that type is on file |
token_options | the networks you can send as network |
min_parties, max_parties | how many people a business must declare. null means none needed |
has_existing_ref: true | the bank already knows this customer, so send no data.root |
existing_application | an application is already open at this bank, so fix that one instead |
These parts of the form are not yet live: a document with a required_when condition, a metadata object on a document, a predefined object, and the autofill_tax_form question. They exist only on a build that has not reached production. In production, every document carries required (true, or false when the bank fills a tax form itself). Sandbox already returns the new shape for some forms.
Rules the form does not show
data.root. Send customer_id, customer_type, currency, account_type, category, label, bank_code, network and wallet_id at the top level. The API refuses network or wallet_id inside data.root.customer_type and the routing country. Send the routing country in data.root, as citizenship_country for a person or incorporation_country for a business. Gravv chooses the bank from your request before it fills in any missing fields.date_of_birth, email, phone, gender, legal_name, registration_number, business_description, business_type and industry. A filled-in citizenship_country or tax_residence_country is the customer's address country, so send them when they differ. Gravv does not fill in the address, so send permanent_address yourself.{"id": "<document id>"} instead of content.registration_type defaults from customer_type. Send it only for a joint or minor account.gender accepts female or male on these forms. If you created the customer with other, the form suggests other but refuses it. Ask the customer which value to send.dob or ssn. Send the name the form gives. Sending both returns alias_conflict.Errors
| Response | Why | Fix |
|---|---|---|
400 Customer Type is required (and 1 other field; see details) with details.customer_type and details.currency | Both are required | Send them |
400 no account option is available for the requested combination (…), with UNSUPPORTED_COMBINATION in details | No option serves the values you sent, including a bank_code that does not serve that country or currency | Copy bank_code, currency and country from one option in capabilities |
400 bank_code=<code> is not a bank we offer accounts at; … (UNKNOWN_BANK) | The bank_code does not exist | Copy bank_code from capabilities |
400 Category "virtual" is not supported; valid values: main, sub_account | Only main and sub_account can be opened | Send one of them, or leave category out |
400 invalid request payload: unknown field "limit" | Unknown query parameter | Send only the documented ones |
| A business form for an individual customer | The requirements call does not check customer_type against the record | Send the customer's own type. The create call refuses a mismatch |
No suggestions although you sent customer_id | The customer lookup failed | Retry. The form itself is correct |
Next
Open the account with the data you collected.