Skip to main content
POST
/
v1
/
auth
/
register
/
address
Update Physical Address
curl --request POST \
  --url https://api.example.com/v1/auth/register/address \
  --header 'Content-Type: application/json' \
  --data '
{
  "onboardingId": "<string>",
  "addressLine1": "<string>",
  "addressLine2": "<string>",
  "city": "<string>",
  "zip": "<string>",
  "usState": "<string>",
  "isSameMailingAddress": true
}
'
{
  "accessToken": "<string>",
  "onboardingId": "<string>",
  "user": {}
}

Documentation Index

Fetch the complete documentation index at: https://docs.baanx.com/llms.txt

Use this file to discover all available pages before exploring further.

Overview

Submit user’s physical residential address. This is required for KYC verification and compliance purposes. For US residents, you can optionally specify a separate mailing address. For non-US residents, mailing address must be the same as physical address.

Request

Body

onboardingId
string
required
Onboarding ID from previous step
addressLine1
string
required
Primary address lineExample: 23 Werrington Bridge Rd
addressLine2
string
Secondary address line (optional)Example: Milking Nook
city
string
required
City nameExample: Peterborough
zip
string
required
Postal/ZIP codeExample: PE6 7PP
usState
string
US state postal abbreviationRequired only if: countryOfResidence = USExample: CA
isSameMailingAddress
boolean
required
Whether mailing address is same as physicalMust be true unless: countryOfResidence = USExample: true

Response

accessToken
string
Access token (only if registration complete)Returned when isSameMailingAddress = true OR non-US residentExample: US_100a99cf-f4d3-4fa1-c321-2e9833440ebb
onboardingId
string
Updated onboarding ID
user
object
Updated user object with address

Code Examples

const response = await fetch('https://dev.api.baanx.com/v1/auth/register/address', {
  method: 'POST',
  headers: {
    'x-client-key': 'your-client-key',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    onboardingId: sessionStorage.getItem('onboardingId'),
    addressLine1: '23 Werrington Bridge Rd',
    addressLine2: 'Milking Nook',
    city: 'Peterborough',
    zip: 'PE6 7PP',
    isSameMailingAddress: true
  })
});

const { accessToken, user } = await response.json();

if (accessToken) {
  // Registration complete
  localStorage.setItem('access_token', accessToken);
  console.log('Registration complete!');
} else {
  // US resident - need mailing address
  console.log('Proceed to mailing address step');
}
If accessToken is returned, registration is complete. Otherwise, proceed to mailing address step (US only).

Next Steps

Update Mailing Address

Add mailing address (US residents only)