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 |
Ocp-Apim-Subscription-Key | True | API Subscription key provided by StoneX |
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": "200",
"message": "Request successful.",
"data": {
"accountNumber": "12345678"
},
"errors": [],
"traceId": "00-3d26bba6a17ea0ebc3b27ce0a063bd46-927d908fbab488ba-00"
"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": "There was an error",
"errors": [],
"traceId": "00-a815f1d6b014a8c783ef0b760fb22266-b4486709100107ec-00",
"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.200",
"field": "accountNumber",
"reason": "MISSING REQUIRED VALUE"
}
Standard Errors
Code | Reason |
---|---|
ERR.1000 | Field Can Not Be Empty |
ERR.4000 | Backend error |
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": "87654321",
"subNumber": "252",
"main": {
"repCode": "JC01"
},
"PrimaryOwner": {
"name1": "John",
"name2": "David",
"name3": "Doe",
"name4": "JR"
}
}
{
"accountNumber": "87654321",
"subNumber":"252",
"main": {
"repCode": "JC01"
},
"PrimaryOwner": {
"name4": "*"
}
}
Updates in Arrays
1. Array with Identifiers
The specific values sent will be updated within the object containing the identifier.
{
"associatedParties": [
{
"customerId": "321658432136584634",
"role": "secondary",
"name1": "John"
},
{
"customerId": "465846984321635413",
"role": "secondary",
"name1": "Kelly"
}
]
}
Updates the specific one value in the array
{
"associatedParties": [
{
"customerId": "465846984321635413",
"role": "secondary",
"name1": "Kelly"
}
]
}
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.
{
"caisCustomerType": ["ACC", "ONB"]
}