/v2/accounts/{id}

POST

Update a sub-account owned by the authenticating user. On success, returns the updated account entity.

The API responses shown below are static. If you want to try out the API please login, or register for an API key

API parameters

Required
NameInTypeDescriptionEnumDefault
X-Auth-Token header string Authentication token.
id path string Account UUID.
Optional
NameInTypeDescriptionEnumDefault
account_name formData string Account name.
legal_entity_type formData string Legal entity. company
individual
brand formData string The value of this field is used for white labeling the Currencycloud user interface.
your_reference formData string User-generated reference code.
status formData string Status of the account. enabled
enabled_no_trading
disabled
enabled
street formData string First line of address.
city formData string City.
state_or_province formData string State or province.
postal_code formData string Postal code.
country formData string Two-letter country code.
spread_table formData string The name of the spread table assigned to the account. no_markup
api_trading formData boolean Whether trading via the Currencycloud API is to be enabled on the account. 1
online_trading formData boolean Whether online trading is to be enabled on the account. 1
phone_trading formData boolean Whether phone trading is to be enabled on the account. 1
identification_type formData string A legal document that verifies the identity of the account owner. none
drivers_license
social_security_number
green_card
passport
visa
matricula_consular
registro_federal_de_contribuyentes
credential_de_elector
social_insurance_number
citizenship_papers
drivers_license_canadian
existing_credit_card_details
employer_identification_number
national_id
others
incorporation_number
identification_value formData string A unique reference code for the identification document, such as a passport number.
curl -X POST  --header "X-Auth-Token: XXXX-XXXXX-XXXX"  https://devapi.currencycloud.com/v2/accounts/{id}

Response

{
    "id": "6c2ec4fc-f825-438b-bb77-e7696de6fc4c",
    "account_name": "My Example Account",
    "brand": "currencycloud",
    "your_reference": null,
    "status": "enabled",
    "street": "My Example Street",
    "city": "My Example City",
    "state_or_province": null,
    "country": "GB",
    "postal_code": "Example Code",
    "spread_table": "fxcg_rfx_default",
    "legal_entity_type": "company",
    "created_at": "2018-04-27T13:04:33+00:00",
    "updated_at": "2018-04-27T13:04:33+00:00",
    "identification_type": null,
    "identification_value": null,
    "short_reference": "180427-00018",
    "api_trading": true,
    "online_trading": true,
    "phone_trading": true,
    "process_third_party_funds": false,
    "settlement_type": "net"
}
Error Codes
HTTP Status Code Description Params
400 at_least_one_parameter At least one parameter should be present: account_name, brand, your_reference, status, street, city, country, postal_code, spread_table
id_is_not_valid_uuid id should be in UUID format
account_name_is_too_long account_name can not be longer than 150 character(s) { "maxlength" => 150 }
brand_is_too_long brand can not be longer than 100 character(s) { "maxlength" => 255 }
brand_not_found Brand non_existing_brand wasn't found { "brand" => "non_existing_brand" }
brand_account_not_broker Account doesn't have broker permissions { "brand" => "wrong_brand" }
your_reference_is_too_long your_reference can not be longer than 25 character(s) { "maxlength" => 25 }
legal_entity_type_not_in_range legal_entity_type should be in range: individual, company { "range" => "individual, company" }
status_not_in_range status should be in range: enabled, disabled, enabled_no_trading { "range" => "enabled, disabled, enabled_no_trading" }
street_is_too_long street can not be longer than 150 character(s) { "maxlength" => 150 }
city_is_too_long city can not be longer than 100 character(s) { "maxlength" => 100 }
postal_code_is_too_long postal_code can not be longer than 20 character(s) { "maxlength" => 20 }
country_is_too_long country can not be longer than 2 character(s) { "maxlength" => 2 }
spread_table_is_too_long spread_table can not be longer than 100 character(s) { "maxlength" => 100 }
identification_type_is_missing identification_type is missing
identification_type_is_invalid identification_type is invalid
identification_value_is_missing identification_value is missing
identification_value_is_invalid identification_value is invalid
401 invalid_supplied_credentials Authentication failed with the supplied credentials
429 too_many_requests Too many requests have been made to the api. Please refer to the Developer Center for more information
500 internal_server_error Internal server error
503 service_unavailable Service is temporary unavailable
Was this page helpful?
Yes
No