Standards
Requests
The below information is required on all requests.
Headers
Headers required on all requests to Hammer API.
| Parameter | Required | Description |
|---|---|---|
Authorization | True | Bearer token generated for the Identity endpoint |
Responses
This API suite will return a standardized response for all Endpoints containing the below information.
Success Response
Data returned to a successful API call.
- Schema
- Example
| Name | Data Type | Definition |
|---|---|---|
StatusCode | Integer | HTTP status code |
Message | String | Brief message about the status of the request |
Data | Object | The data returned from the API |
Errors | Array of Errors | Error Object |
TraceId | String | Id for each API transaction that can be used for tracking & debugging |
HasErrors | Boolean | Indicates if there are errors related to the request |
{
"statusCode": 202,
"message": "Request Accepted",
"data": {
"accountNumber": "10003396"
},
"errors": [],
"traceId": "00-f14451ee28c45bf17b6d442777650f9c-f92e75022831c04c-01",
"hasErrors": false
}
Error Response
Data returned to a unsuccessful API call.
- Schema
- Example
| Name | Data Type | Definition |
|---|---|---|
StatusCode | Integer | HTTP status code |
Message | String | Brief message about the status of the request |
TraceId | String | Id for each API transaction that can be used for tracking & debugging |
Errors | Array of Errors | Error Object |
HasErrors | Boolean | Indicates if there are errors related to the request |
{
"statusCode": 400,
"message": "Request invalid.",
"errors": [
{
.....
}
],
"traceId": "00-051e892da3f7608f66f4e16501099edf-d3bfd7ce9dc2bb28-01",
"hasErrors": true
}
Error Object
- Schema
- Example
| Name | Data Type | Definition |
|---|---|---|
Code | String | StoneX Error code |
Field | String | Field name from the request that caused the error |
Reason | String | Description of the issue |
{
"code": "ERR.1000",
"field": "REGISTRATIONTYPE",
"reason": "Field Can Not Be Empty"
}
Standard Errors
| Code | Reason |
|---|---|
| ERR.1000 | Field Can Not Be Empty |
| ERR.1001 | Invalid Entity Number |
| ERR.1002 | Invalid Rep Code |
| ERR.1003 | Access Denied |
| ERR.1004 | Currently Update Unavailable |
| ERR.1005 | Invalid City |
| ERR.1006 | Invalid Country |
| ERR.1007 | Invalid Postal Code |
| ERR.1008 | Invalid State Province |
| ERR.1009 | Invalid Email |
| ERR.1010 | Maximum Characters Exceeded |
| ERR.1011 | Invalid Phone Number |
| ERR.1012 | Invalid Birth Date |
| ERR.1013 | Invalid Phone Region Code |
| ERR.1014 | Duplicate Value Found |
| ERR.1015 | Invalid Value |
| ERR.1016 | Invalid Pattern |
| ERR.1017 | Phone Number Required |
| ERR.1020 | Delete Feature Unavailable |
| ERR.1021 | Update Feature Unavailable |
| ERR.1022 | File Size Exceeded |
| ERR.1023 | Invalid File Type |
| ERR.1024 | Invalid Street |
| ERR.1025 | Maximum Limit Exceeded |
| ERR.1026 | Invalid Account Number |
| ERR.1072 | State/Province Required Only For US Or CA |
| ERR.4000 | Property Not Defined |
Standard Data Format
Date Format
- Schema
- Example
| Attributes | Data Type | Length | Description |
|---|---|---|---|
birthDate | String | 10 | yyyy-MM-dd |
"primaryOwner": {
"birthDate": "1980-05-25"
}
Update Requests
Clients can make updates or changes in following ways:
Updates in Single Attributes
Value in a single attribute can be updated and can be deleted using the* sign.
{
"accountNumber": "10003382",
"entityNumber": "301",
"main": {
"repCode": "JC01"
},
"primaryOwner": {
"firstname": "John",
"middlename": "Davidd",
"lastname": "Doe"
}
}
{
"accountNumber": "87654321",
"entityNumber":"301",
"main": {
"repCode": "JC01"
},
"primaryOwner": {
"lastname": "Henry"
}
}
Updates in Arrays
1. Array with Identifiers
The specific values sent will be updated within the object containing the identifier.
{
"associatedParties": [
{
"birthDate": "1983-12-13",
"firstName": "Johnny",
"lastName": "Doe",
"taxIdNumber": "123456789"
},
{
"birthDate": "1984-10-13",
"firstName": "Ben",
"lastName": "Harry",
"taxIdNumber": "987654321"
}
]
}
Updates the specific one value in the array
{
"associatedParties": [
{
"birthDate": "1983-12-13",
"firstName": "Johnny",
"lastName": "Doe",
"taxIdNumber": "123456789"
}
]
}
An identifier must be used to remove an entire data block of a "key-value" pair from the object, and also, the"delete" = "True"
needs to be used to complete the deleting process.
2. Array without Identifiers
Array value will be replaced with the new array provided in the request.
{
"caisInformation": {
"CustomerType": ["Trust", "Foreign"]
}