v2
You are reading v1 & v2. v1 and v2 are deprecated. They keep working and are still supported, but new integrations should use v3.

Update an existing user

Take note to send only valid website locales. See the list of supported locales in the model V1\System\WebsiteLocale below.

PATCH/api/v2/user

Send two credentials: your own, and the customer's.

How authentication works
Either
Authorization: BearerorUser-Authorization: Bearer

Language

Environment

Credentials

Your credential, or the customer's

Choose an environment first.

cURL request
curl -X PATCH https://api.btcdirect.eu/api/v2/user \  -H "Authorization: Bearer $BTCD_PARTNER_TOKEN" \  -H "Content-Type: application/json" \  -d '{    "emailCode": 152367,    "email": "info@example.com",    "chamberOfCommerce": 152367,    "businessName": "BTC Direct",    "businessCountry": "GB",    "amld5QuestionAnswers": {      "kyc-amld5-annual-net-income": "From 10.000 to 30.000",      "kyc-amld5-employment-status": "Employed",      "kyc-amld5-main-source-income": "Salary",      "kyc-amld5-why-account-created": "Investing",      "kyc-amld5-which-industry": "Cryptocurrency, (Online) gambling & casino",      "kyc-amld5-annual-net-profit": "Above 250.000"    },    "phoneNumber": "+31612345678",    "dateOfBirth": "1984-12-27",    "firstName": "John",    "lastName": "Doe",    "country": "DE",    "address": "Street",    "addressNo": "12a",    "postalCode": "1234AB",    "city": "Amsterdam",    "websiteCountry": "NL",    "websiteLanguage": "NL",    "isBusiness": false,    "privacyAgreement": false,    "identityDocument": [      {        "documentType": "IdentityCard",        "documentSide": "Front",        "data": "iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAVP3pUWHRSYXcgcHJvZmlsZSB0eXBlIGV4aWYAAHjavZpnchw5EoX/4xR7BLiEOQ5sxN5gj7/fq27Ka1bSTKw4wyabxSogzTMJuvOff1/3L/6Zxeyy1VZ6KZ5/ueceB180//r3eg0+P58//oX356/ed5++jLwmXtPrB+W8f2vwvn3+hZrf78+v33d1vb6I7X2jjye/b5j05MgX7+va+0Ypvt4P7+9df//eyF9s5+P/k57b2fum336fK8HYxv1SdPGkkDyfo56SWEFqafBa+BwSb/PZ+DryOlJK+cexcz8L3s9i58f7/fR1KJwv7wvKNzF6vx/sx7F7IvTlisLnJ3/1g7o/wvh97O7d7d7z2t3IhUgV997Ux1aer7hwEsr0/Frho/K/8XV9PjofjS0uHrXJ5uRjudBDJNo35LDDCDec53WFxRJzPLHyGuMi1nqvpRp7XE9Ssj7CjTX1tB05immRNfKR4qe1hOe5/XneCo0n78CVMXCzwG989+F+9OaffHy60b0q3RB8+xQr1hVV0yxDmdNnriIF4b5jak98nw/3Rd34LxKbyKA9YW5scPj5usW08Lm20pPnxHXms/O"      }    ],    "newsletterSubscription": false  }'
Choose an environment to run this.

Response

User information updated successfully.
{  "email": "email@domain.com",  "firstName": "John",  "lastName": "Doe",  "phoneNumber": "",  "country": "NL",  "isBusiness": false,  "registrationDate": "2019-01-01T14:13:55Z",  "activationDate": "2019-01-02T12:43:25Z"}

Request

emailCodestring

Verification code, used to verify the e-mail address.

emailstringrequired

Email address of the user.

Exampleinfo@example.com

chamberOfCommercestring

Chamber of Commerce number.

businessNamestring

Name of the business.

ExampleBTC Direct

businessCountrystring

ISO 3166-1 alpha-2 country code of the country where the business is registered.

ExampleGB

amld5QuestionAnswersstring[]

The user's anwers to the AMLD5 questions.

phoneNumberstring

Phone number of the user, in the format +countrycodenumber (no dashes, spaces or other special characters).

Example+31612345678

dateOfBirthstring

Date of birth of the user, in the ISO 8601 format (YYYY-MM-DD).

Example1984-12-27

firstNamestring

First name of the user.

ExampleJohn

lastNamestring

Last name of the user.

ExampleDoe

countrystringrequired

ISO 3166-1 alpha-2 country code of the user.

ExampleDE

addressstring

Streetname of the users address.

ExampleStreet

addressNostring

Housenumber of the users address.

Example12a

postalCodestring

Postalcode of the users address.

Example1234AB

citystring

City of the users address.

ExampleAmsterdam

websiteCountrystring

ISO 3166-1 alpha-2 country code of the user.

ExampleNL

websiteLanguagestring

ISO 3166-1 alpha-2 language code of the user.

ExampleNL

isBusinessboolean

Determines whether a user is a business user or not.

privacyAgreementboolean

Determines whether a user has agreed to the privacy agreement.

identityDocumentobject[]

Identity document of the user.

newsletterSubscriptionboolean

Determines whether a user will be subscribed to the BTC Direct newsletter.

Responses

200User information updated successfully.
400A list of possible errors for this endpoint.

Body of the success response

emailstring

Email address of the user.

Exampleemail@domain.com

firstNamestring

First name of the user.

ExampleJohn

lastNamestring

Last name of the user.

ExampleDoe

phoneNumberstring

Phone number of the user.

Example

countrystring

Country or preferred language.

ExampleNL

isBusinessboolean

Determines if this account is a business account or not.

registrationDatestring

Registration date of the user.

Example2019-01-01T14:13:55Z

activationDatestring

The date and time the user account was activated.

Example2019-01-02T12:43:25Z

Every failure answers with a message and a code. Switch on the code — messages are written for people and can change.