Requests with same request ID Initial POST request
We will create a new account for a person by making the following API call.
Create account
POST
https://account-api.sandbox.tuumplatform.com/api/v4/persons/ID-3419/accounts
Below is an example request body of the API call for creating an account.
JSON
Copy {
"accountTypeCode": "CURRENCY",
"personName": "Eleanor Rigby",
"customerGroupCode": "GROUP_A",
"priceListTypeCode": "STANDARD",
"residencyCountryCode": "GB",
"currencyCode": "GBP"
}
cURL
Copy curl 'https://account-api.sandbox.tuumplatform.com/api/v4/persons/ID-3419/accounts' \
-H 'x-auth-token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHBpcnlEVGltZSI6IjIwMjMtMDgtMDRUMTE6MjM6MjUiLCJyb2xlcyI6WyJBRE1JTiJdLCJuYW1lIjoiSm9obiBPZmZpY2VyIiwiZW1wbG95ZWVJZCI6IjEiLCJ0ZW5hbnRDb2RlIjoiTUIiLCJleHAiOjE2OTExNDgyMDV9.1lnY03GWnnGdki0uJlkNNSMydwiWv_jsdII10PKPUkA' \
-H 'x-request-id: eb1d4135-bca1-4612-aa83-29637830fe37' \
-H 'Content-Type: application/json' \
-d '{
"accountTypeCode": "CURRENCY",
"personName": "Eleanor Rigby",
"customerGroupCode": "GROUP_A",
"priceListTypeCode": "STANDARD",
"residencyCountryCode": "GB",
"currencyCode": "GBP"
}'
As a result, a new account with accountId: ID-1292
was created and activated .
Response
Copy {
"errors": null,
"validationErrors": null,
"data": {
"accountId": "ID-1292",
"personId": "ID-3419",
"accountTypeCode": "CURRENCY",
"activationDate": "2023-08-04",
"accountName": null,
"personName": "Eleanor Rigby",
"statusCode": "ACTIVE",
"iban": "GB76XXXX04030000001011",
"bic": "LHVBGB2LXXX",
"defaultCurrencyCode": "GBP",
"tenantCode": "MB",
"residencyCode": "GB",
"customerGroupCode": "GROUP_A",
"personTypeCode": null,
"intraOrgCode": null,
"accountTypeSetupCode": "STANDARD",
"serviceProviderCode": "TUUM",
"interestMethodAssignmentCode": null,
"accountClassCode": null,
"balances": [
{
"balanceId": "ID-1221",
"accountId": "ID-1292",
"currencyCode": "GBP",
"balanceAmount": 0.00,
"reservedAmount": 0.00,
"overdraftLimitAmount": 0.00,
"defaultCurrencyCode": "GBP",
"availableBalanceInDefaultCcy": 0.00,
"negativeBalanceStartDate": null,
"availableBalanceAmount": 0.00
}
],
"masterAccountId": null,
"accountNumbers": [
{
"accountNumber": {
"value": "00001011",
"type": "BBAN"
},
"countryCode": "GB",
"financialInstitutionId": {
"value": "040300",
"type": "SORT_CODE"
},
"defaultCurrencyCode": "GBP",
"accountNumberId": "ID-1147",
"accountId": "ID-1292",
"financialInstitutionIdTypeCode": null,
"statusCode": "ENABLED"
}
],
"taxResidencyCountryCode": "GB",
"jurisdictionCountryCode": "GB"
}
}
Duplicated POST request
We will make the API call again without changing the request ID and using the same request data .
The response we received is identical to the initial call, confirming the creation of the account with the ID-1292
. No new account was created .
Response
Copy {
"errors": null,
"validationErrors": null,
"data": {
"accountId": "ID-1292",
"personId": "ID-3419",
"accountTypeCode": "CURRENCY",
"activationDate": "2023-08-04",
"accountName": null,
"personName": "Eleanor Rigby",
"statusCode": "ACTIVE",
"iban": "GB76XXXX04030000001011",
"bic": "LHVBGB2LXXX",
"defaultCurrencyCode": "GBP",
"tenantCode": "MB",
"residencyCode": "GB",
"customerGroupCode": "GROUP_A",
"personTypeCode": null,
"intraOrgCode": null,
"accountTypeSetupCode": "STANDARD",
"serviceProviderCode": "TUUM",
"interestMethodAssignmentCode": null,
"accountClassCode": null,
"balances": [
{
"balanceId": "ID-1221",
"accountId": "ID-1292",
"currencyCode": "GBP",
"balanceAmount": 0.00,
"reservedAmount": 0.00,
"overdraftLimitAmount": 0.00,
"defaultCurrencyCode": "GBP",
"availableBalanceInDefaultCcy": 0.00,
"negativeBalanceStartDate": null,
"availableBalanceAmount": 0.00
}
],
"masterAccountId": null,
"accountNumbers": [
{
"accountNumber": {
"value": "00001011",
"type": "BBAN"
},
"countryCode": "GB",
"financialInstitutionId": {
"value": "040300",
"type": "SORT_CODE"
},
"defaultCurrencyCode": "GBP",
"accountNumberId": "ID-1147",
"accountId": "ID-1292",
"financialInstitutionIdTypeCode": null,
"statusCode": "ENABLED"
}
],
"taxResidencyCountryCode": "GB",
"jurisdictionCountryCode": "GB"
}
}
Duplicated POST request with changed data
We will repeat the API call using the same request ID but with updated request data . We will change the currency from GBP to USD.
Below is an example request body for creating an account with the updated currency.
JSON
Copy {
"accountTypeCode": "CURRENCY",
"personName": "Eleanor Rigby",
"customerGroupCode": "GROUP_A",
"priceListTypeCode": "STANDARD",
"residencyCountryCode": "GB",
"currencyCode": "USD"
}
cURL
Copy curl 'https://account-api.sandbox.tuumplatform.com/api/v4/persons/ID-3419/accounts' \
-H 'x-auth-token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHBpcnlEVGltZSI6IjIwMjMtMDgtMDRUMTE6MjM6MjUiLCJyb2xlcyI6WyJBRE1JTiJdLCJuYW1lIjoiSm9obiBPZmZpY2VyIiwiZW1wbG95ZWVJZCI6IjEiLCJ0ZW5hbnRDb2RlIjoiTUIiLCJleHAiOjE2OTExNDgyMDV9.1lnY03GWnnGdki0uJlkNNSMydwiWv_jsdII10PKPUkA' \
-H 'x-request-id: eb1d4135-bca1-4612-aa83-29637830fe37' \
-H 'Content-Type: application/json' \
-d '{
"accountTypeCode": "CURRENCY",
"personName": "Eleanor Rigby",
"customerGroupCode": "GROUP_A",
"priceListTypeCode": "STANDARD",
"residencyCountryCode": "GB",
"currencyCode": "USD"
}'
As a result, no new account is created . However, the account currency on the existing account ID-1292
is updated to USD as requested.
Response
Copy {
"errors": null,
"validationErrors": null,
"data": {
"accountId": "ID-1292",
"personId": "ID-3419",
"accountTypeCode": "CURRENCY",
"activationDate": "2023-08-04",
"accountName": null,
"personName": "Eleanor Rigby",
"statusCode": "ACTIVE",
"iban": "GB76XXXX04030000001011",
"bic": "LHVBGB2LXXX",
"defaultCurrencyCode": "GBP",
"tenantCode": "MB",
"residencyCode": "GB",
"customerGroupCode": "GROUP_A",
"personTypeCode": null,
"intraOrgCode": null,
"accountTypeSetupCode": "STANDARD",
"serviceProviderCode": "TUUM",
"interestMethodAssignmentCode": null,
"accountClassCode": null,
"balances": [
{
"balanceId": "ID-1221",
"accountId": "ID-1292",
"currencyCode": "GBP",
"balanceAmount": 0.00,
"reservedAmount": 0.00,
"overdraftLimitAmount": 0.00,
"defaultCurrencyCode": "GBP",
"availableBalanceInDefaultCcy": 0.00,
"negativeBalanceStartDate": null,
"availableBalanceAmount": 0.00
}
],
"masterAccountId": null,
"accountNumbers": [
{
"accountNumber": {
"value": "00001011",
"type": "BBAN"
},
"countryCode": "GB",
"financialInstitutionId": {
"value": "040300",
"type": "SORT_CODE"
},
"defaultCurrencyCode": "GBP",
"accountNumberId": "ID-1147",
"accountId": "ID-1292",
"financialInstitutionIdTypeCode": null,
"statusCode": "ENABLED"
}
],
"taxResidencyCountryCode": "GB",
"jurisdictionCountryCode": "GB"
}
}
Summary for using the same request ID
If you make multiple POST calls to the same API endpoint using the same value for the x-request-id
header parameter, all subsequent calls will receive the same response as the initial call . This principle also holds even if you use different data in the request body of a repeated request.