Error Handling

View as MarkdownOpen in Claude

Client Registration – Create New Account

[POST] OR [PATCH] gw/api/v1/accounts

When making requests to our API, you will receive HTTP status codes that indicate the outcome of your request. However, it’s important to understand that a status code of 200 doesn’t always mean your request was successful.

HTTP Status Codes

  1. 200: Your request reached the server and was processed
  2. Non-200 Codes: Your request did not pass gateway validation (e.g., 400, 401, 404, 500)

200 OK

A 200 status code simply means your request successfully reached our application and was processed. However, the actual outcome can be one of two types:

Success Response (200): This indicates that your request not only reached the server but also passed all validation checks and was successfully processed.

Error Response (200 with Error): This indicates that while your request successfully reached the application (passing gateway validation), it failed some business logic or validation check within the application itself.

  • The status within response will return ERROR
  • Error detail will be included within error.value

Sample Response

{
"requestId": 464041722,
"dateSubmitted": "20250805143508 UTC",
"fileData": {
"data": {
"execution": {
"executedAt": "20250805143509 UTC",
"client": "Test client for account I19565014",
"clientMasterAccount": "I1111111",
"processFile": "II1111111-08-05_103508896_853839.json"
},
"application": {
"customer": "Jane F Tester",
"externalId": "testUser12345",
"status": "Error",
"error": [
{
"value": "Unable to determine client IB entity. Kindly provide valid Residence country and Legal Residence Country."
}
}
]
}
},
"name": "II1111111-103509392_144127.json.report"
}
}

Understanding this distinction is crucial because:

  1. You cannot rely solely on the HTTP status code to determine if your operation succeeded
  2. Your code should always check the response body’s structure and status field
  3. Gateway errors (non-200) indicate problems with your request format, authentication, or server availability
  4. Application errors (200 with error status) indicate problems with the data or business logic

Error Library

200 with Error

customer

Error MessageExplanation
”Unsupported value. Property:‘sourceType’, value:‘SOW-IND-inheritance”,Enter first letter for Inheritance as capital. Refer to https://www.interactivebrokers.com/campus/ibkr-api-page/web-api-account-management/#customer-26
”SourcesOfWealth must include SOW-IND-Income when EmploymentType is EMPLOYED”Sources Of Wealth must include Income from employment as the individual is employed.
”Total Percentage from SourcesOfWealth used to fund the account is 10%. It MUST add to 100%.”If Sources of wealth doesn’t constitute to 100%, this error is thrown
”Investment Experience is missing.”If ‘investmentExperience’ is missing in payload, this error is thrown
”Financial information is missing.”If ‘financialInformation’ is missing in payload, this error is thrown
Source(s) of Wealth is missing.If sourcesOfWealth are missing, this error is thrown
”Regulatory Information is missing.”If ‘regulatoryInformation’ are missing, this error is thrown
”Investment Objectives are Mandatory.”If ‘investment objectives’ are missing, this error is thrown
”Unrecognized property:‘isUsTaxResident’“,If ‘usTaxresident’ are missing, this error is thrown
”Unrecognized property:‘hasExpirationDate’“,If ‘hasExpirationDate’ is missing in POI document
”Unsupported value. Property:‘customerType’, value:‘INDIVIDUAL‘“Enter customer type = ‘Individual‘
“Unsupported value. Property:‘knowledgeLevel’, value:‘LMT‘“Enter knowledgelevel= ‘Limited‘
“Unsupported value. Property:‘knowledgeLevel’, value:‘NO KnowledgeEnter knowledgeLevel= ‘Limited’, ‘Good’ or ‘Extensive‘
“Unsupported value. Property:‘assetClass’, value:‘opt’“,Enter assetClass should be in capital ‘OPT‘
“Issuing country in Identification node for Account Holder is missing.”Enter Issuing country in Identification node (Issuing country of the ID document)
“Valid identification is missing for Account Holder. Please provide valid identification such as SSN, SIN, Passport, National Card, Alien Card, or Driver’s License or Tax Id.”Provide valid ID. Refer to: this
Invalid value for Total Assets in financialInformation node. Total Assets must be a positive value.Invalid value provided for totalAssets
Exception for accounts Incorrect Investment Objective specified. occurred.If investmentObjectives is invalid/does not match an accepted value this error is thrown. See details here.
Incorrect Asset Class specified.If assetClass attribute inside the investmentExperience is invalid or missing, the following is thrown.
Asset Experience is missing.If assetClass is absent from JSON, this error is thrown
Knowledge level is missing for asset class BOND in AssetExperience node.If knowledgeLevel in assetExperience is missing or blank the following error is thrown
Years trading is missing for asset class BOND in AssetExperience node.If yearsTrading in assetExperience is missing or blank this error is thrown
Trades per year is missing for asset class BOND in AssetExperience node.If tradesPerYear in assetExperience is missing or blank this error is thrown
SourcesOfWealth must include SOW-IND-Income when employmentType is EMPLOYED.If employmentType is Employed, then one SOW type must be “Income”
Description is missing for Source Type SOW-IND-Other.If the description is missing for the “Other” SoW type, this error is thrown
Source Type for sourceOfWealth is either missing or is invalid.If the sourceType for the sourcesOfWealth is missing or an invalid value this error is thrown
At least one sourceOfWealth must be used to fund the account.If there are no sourceofWealth nodes or if they are all set to false for funding the account, this error is thrown
Percentage is required ONLY when SourceOfWealth is used to fund the account.If percentage is included (other than 0) for an SoW that is not being used to fund the account, this error is thrown
Exception for accounts * Financial Criteria checks for Capabilities failed: {financial=Liquid Net Worth must be greater than USD 20,000.} occurred.If the liquidNetWorth value is less than 20,000 then this error is thrown
Exception for accounts * Financial Criteria checks for Capabilities failed: {est_net_worth=Your Liquid Net Worth cannot be larger than Net Worth} occurred.If the netWorth is less than the liquid net worth this error is thrown
Invalid values for Net Worth, Liquid Net Worth and Annual Net Income in FinancialInformation node.If netWorth, liquidNetWorth, or annualNetIncome are missing from financialInformation node this error is thrown
NOT valid – nullIf an invalid character is entered in the attributes in financialInformation node the following is thrown (including a letter, comma, space instead of only numbers)
Customer Type null or invalid (not INDIVIDUAL, UGMA, UTMA, JOINT, TRUST or ORG)If the type attribute in the customer node is blank or an invalid value this error is thrown
Attribute prefix at the Customer level is missing.If the prefix value is blank or missing this error is thrown
NullPointerException
Code is either invalid or is missing in Regulatory Details.If the code attribute in regulatoryDetail is invalid or blank this error is thrown
String index out of range: 0If an attribute is blank this error is thrown. Example status is blank within regulatoryDetail.
Total Percentage from SourcesOfWealth used to fund the account is 95%. It MUST add to 100%.If SOW percentage doesnt add to exactly 100%, this error is thrown
All usernames starting with the prefix, <insertPrefixHere> are already taken. Please use a different prefix.Indicate that all valid combinations (000 – 999) have been taken for that specific prefix. Please fix the prefix included within customer and users node and resubmit.
Following US Indicia checks came back positive.For Non-US Applicants, US Indicia check will come back positive IF any of the below conditions are met: ‘United States’ OR ‘USA’ is provided within countryOfBirth IssuingCountry (Identification) Citizenship, Citizenship2, Citizenship3 (Identification) country (mailingAddress OR Residence) phone – Country of permanent or mailing address in AML/account opening documentation different from the country code in box 9 of the W8BEN – Address (permanent or mailing address) where the customer has not claimed tax residency – Address in Guernsey, Jersey, Gibraltar, or Isle of Man but the customer did not indicate tax residency there
”Unsupported value. Property:‘customerType’, value:‘individual

AssociatedIndividual

Error MessageExplanation
Must be at least 18 to open accountIndividual must be at least 18 years old to open account.
Marital Status Type for Individual is missingIf Marital Status is missing, then this error is thrown
Employment Type for Individual is missing.If employmentType is missing, blank or invalid the error is thrown
American SSN is invalid.If the ssn attribute in Identification node is blank or invalid this error is thrown
SSN or EIN must be provided for transfersif ssn attribute is missing from extPostisionTransfer node this error is thrown
Customer <externalID> – State code <stateCode> is not validIf the state in any node is invalid this error is thrown
Name in Native Language is missing for Account HolderName in Native Language is missing for Account Holder.
Details in NativeName Node must be provided in Native Language for Account Holder.Values in nativeName node provided in English
Name of Individual is missing for Account HolderMissing Name node
Middle Name in English Language for Account Holder is missing.Middle name is included in nativeName and missing in Name node
Date of Birth format for Account Holder is invalid. Expected format is yyyy-mm-dd.Error will be thrown if DOB is any value other than yyyy-mm-dd.Following formats are validated for all the test cases listed below.97-12-24 (Invalid Year format)24-12-1997 (Invalid order)1997/12/24 (Invalid separator)1997-12-24T07:00:00.000Z (Time stamp included)1997-02-29 (29th in non-leap year)1997-13-24 (Invalid Month)1997-12-24a (Characters in date)1990-12-32 (Invalid day)1990-8-8 0000-00-001990-12-12
Employer country and residence country details is mandatory for Account Holder.Country of employment is different from the country of residenceAddress and emplcountryRescountryDetail is missing from employmentDetails node.
PO Box not accepted as residential addressWe validate street1 and street2 to ensure that PO Box is not being provided within residenceAddress. Refer to validations.
Mobile Number <insertNumber> is invalid.Phone Number provided is invalid. We use Google API to validate the Phone Number. The API allows for country code to be passed along with the phone number, details are outlined Phone. Google Phone Library to version 8.12.2 (https://github.com/google/libphonenumber).
Foreign Tax Id must be atleast 6 alphanumeric characters in Formw8BEN for Account HolderforeignTaxId within w8Ben needs to be greater than 6 characters.
part29aCountry is a Non treaty Country in Formw8BEN for Account Holderpart29aCountry within w8Ben does not have a tax treaty with the United States. N/A is acceptable for part29aCountry AND treatyCountry. United States Treaty Countries (part29aCountry): https://www.irs.gov/businesses/international-businesses/united-states-income-tax-treaties-a-to-zCanada Treaty Countries (treatyCountry): https://www.canada.ca/en/department-finance/programs/tax-policy/tax-treaties/in-force.htmlAustralia Treaty Countries (treatyCountry): https://treasury.gov.au/tax-treaties/income-tax-treaties
Residential and Employer Address for Individual are same.If "employmentType":"EMPLOYED" or employerAddress cannot be the same as residenceAddress OR mailingAddress otherwise you will receive an error. If the applicant works remotely, please provide the Legal Address of the Employer. "employmentType": "SELFEMPLOYED" THEN employerAddress can be the same as Residence OR mailingAddress.
Employer country and residence country details is mandatory for Account HolderWhen the country included within residenceAddress node is different from the country included within employerAddress node, THEN emplCountryResCountryDetails is required within the <employmentDetails> node.
Unable to determine client IB entity. Kindly provide valid Residence country and Legal Residence Country.Advisor/broker cannot open an account for the applicant due to the legalResidenceCountry or country within <residence> of the applicant. United States: Available to U.S. based IB-LLC advisors/brokers only. Canada: Available to IB-CAN advisors/brokers only. Hong Kong: Available to IB-HK advisors/brokers only. Australia: Available to IB-AU advisors/brokers only. Japan: Available to IBLLC advisors/brokers that are FSA Registered only. United Kingdom: Available to IB-UK advisors/brokers only. Singapore: Available to IB-SG advisors/brokers only. EEA: Available to IB-IE or IB-CE advisors/brokers only. EEA Countries: Austria, Czech Republic, Germany, Italy, Malta, Romania, Belgium, Denmark, Greece, LatviaNetherlands, Slovakia, Bulgaria, Estonia, Hungary, Liechtenstein Norway Slovenia, Croatia,Finland, Iceland, Lithuania, Poland, Spain, Cyprus
Prohibited Country listed Residence / Employer Address / Mailing Address.[residence/employer address/ mailing Address] <countryCode> for Account Holder is prohibited.
Description for Occupation is missing for Account Holder with externalId ..Error triggered if ‘other’ is provided as employerBusiness OR occupation AND description is missing. See employmentDetails
Customer externalId- Country non-existent [name = States]The error was triggered because invalid country provided. For country, IBKR requires 3 Digit ISO Code.
The country of legal residence [United States] is not accepted for clients of this advisor
Employment Type [Employed] for Account Holder is invalidEmployment type must be in Capital letters. For eg: “employmentType”: “EMPLOYED"
"The residential country [Australia] or country of legal residence [Australia] is not accepted as clients of advisor with IB entity IBLLC-US.”Australian accounts must be created under IB-AU brokers
”Country in Employer address Node for Account Holder is missing.”If ‘Country’ Employer address is missing, this error is thrown
”City in Residence Node for Account Holder is missing.”If ‘City’ in Residence node is missing, this error is thrown
”Unrecognized property:‘residence’“,If ‘residenceAddress’ is missing in payload, this error is thrown
”Unrecognized property:‘hasSameMailAddress’“,If ‘sameMailAddress’ is missing in payload, this error is thrown
”Employment Type for Account Holder is missing.”If ‘employmentType’ is missing in payload, this error is thrown
”value”: “Mobile Number 0022960414 is invalid.”If mobile number is Invalid
”Date of Birth format for Account Holder is invalid. Expected format is yyyy-mm-dd.”DOB must be in yyyy-mm-dd Format
”Employment Type [Retired] for Account Holder is invalid.”Employment type must be in Capital letters. For eg: “employmentType”: “RETIRED”

accounts

Error MessageExplanation
”Fee template called [Test template] not found for master [account ID]“FEE_TEMPLATE_NOT_FOUND response will be returned IF no fee template is applied OR if fee configuration applied is not defined by template. Eg: You can add fee template as ‘No fees’ if no fee template exists.
Create account where “Australian Accounts are not allowed under IBLLC-US Advisors”Australian accounts must be created under IB-AU brokers
”Canadian legal resident client cannot be client of this advisor as FA is not based in Canada”Canadian accounts must be opened under FA based in Canada
Error “product”: “STK”Enter assetclass as ‘Stock‘
“Unsupported value. Property:‘assetClass’, value:‘BONDS’“,Enter assetclass as ‘Bond’
Account base currency is either missing or is invalid.If the baseCurrency in the account is invalid or missing this error is thrown
Fee details type is mandatory and should be in the list of acceptable values.If type attribute is missing from the automatedFeesDetails node then this error is thrown
Error processing advisor wrap fees: {type=required}If node automatedFeesDetails in advisorWrapFees node is missing this error is thrown
Advisors must specify the fees scheme for the acctAdvisors may charge their clients for services rendered either through automatic billing, electronic invoice or direct billing. You determine the advisor fees at the time of the client’s registration, and may modify these at any time in Account Management. The fee will be specified within the Accounts Node using advisorWrapFees OR Fees.
Advisors must specify the fees scheme for the account.For advisor clients, fee schema needs to be defined within advisorWrapFees OR feeTemplateName. Details can be found here.

users

Error MessageExplanation
Create account where city is missing.
Already ProcessedexternalId must be unique for each request. If the externalId has already been processed; you will receive error “Already Processed” Please resubmit the request using a new unique externalId. /getResponseFile can be used to pull application details based on externalId.
”External User Id 46781USR in User node is already in use. Please provide a different id.”If External ID has already been used, this error is thrown. Please create and update a new external ID

documents

Error MessageExplanation
Unrecognized property:‘isAuthorizedToSignOnBehalfOfOwnerIf inocrrect format entered. Enter “authorizedToSignOnBehalfOfOwner” as object in payload
”Valid MIFIR Document Type for United Kingdom : National ID”If invalid MIFIR ID is submitted this error thrown.
”Foreign Tax Id in W8Ben node for Account Holder should match TIN in TaxResidencyForeign Tax Id and TIN number must be the same
Prohibited Country Questionnaire is mandatory for Account HolderTriggered if countryOfBirth is a ‘Prohibited Country’and prohibitedCountryQuestionnaire is missing.
Prohibited Country Questionnaire is mandatory for Account HolderIf citizenship, citizenship2, citizenship3 or countryOfBirth is prohibited country then prohibitedCountryQuestionnaire is required.
Unable to process documents::java.sql.SQLIntegrityConstraintViolationException: ORA-02291: integrity constraint (IBCUST.TOSEND_FKDOCUMENTID) violated – parent key not foundfileName within Documents exceeds 20 characters.
Proof of Identity Type (Form 8001) is either missing or is incorrectproofOfIdentityType within Documents is not valid or is missing. The data is space and case sensitive.
Proof of Address Type (Form 8002) is either missing or is incorrectproofOfAddressType within Documents is not valid or is missing. The data is space and case sensitive.
Signature not accepted.signedBy within Documents must match the submitted: first name middle initial (if applicable) last name suffix (if applicable). The data is case and space sensitive.
I/O error file processingThis error is triggered when the fileName included in the documents section of the application is not submitted to IBKR. Resubmit the form to IBKR using DocumentSubmission
File has a different SHA-1 check sum in the archived originalThis error is triggered when the sha1Checksum stored in the database is different from the sha1Checksum that is stored in the database. Error is triggered when an outdated document is submitted. Instructions to pull forms can be found here. Instructions to resubmit forms can be found here.
Local Tax Form is missing for TaxAuthority AUSTRALIA_TA Local Tax Form is missing for TaxAuthority CANADA_TAThis error is triggered when Canada or Australia permissions are requested AND localTaxForms is missing from w8Ben.
Expiration Date for Identification Document (Form 8001) is missing.Expiration Date for Proof of Identity document is required of proofOfIdentityType is Passport OR Drivers License

Non-200 Codes

Your request did not pass gateway validation (e.g., 400, 401, 404, 500)

Error MessageExplanation
Contains non ASCII character.Only ASCII Characters are supported. Error will be thrown if Non-ASCII characters are included.
Invalid payload for security policy: SIGNED_JWTTriggered for one of two reasons: 1. Request includes Non-ASCII Characters. 2. JWT is wrapped within JSON structure. We expect JWT Token directly. Meaning, it should be application/jwt instead of application/json.