Skip to main content

Standards

Requests

The below information is required on all requests.

Headers

Headers required on all requests to Hammer API.

ParameterRequiredDescription
AuthorizationTrueBearer token generated for the Identity endpoint
Ocp-Apim-Subscription-KeyTrueAPI 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.

NameData TypeDefinition
StatusCodeIntegerHTTP status code
MessageStringBrief message about the status of the request
DataObjectThe data returned from the API
ErrorsArray of ErrorsError Object
TraceIdStringId for each API transaction that can be used for tracking & debugging
HasErrorsBooleanIndicates if there are errors related to the request

Error Response

Data returned to a unsuccessful API call.

NameData TypeDefinition
StatusCodeIntegerHTTP status code
MessageStringBrief message about the status of the request
TraceIdStringId for each API transaction that can be used for tracking & debugging
ErrorsArray of ErrorsError Object
HasErrorsBooleanIndicates if there are errors related to the request

Error Object

NameData TypeDefinition
CodeStringStoneX Error code
FieldStringField name from the request that caused the error
ReasonStringDescription of the issue

Standard Errors

CodeReason
ERR.1000Field Can Not Be Empty
ERR.1001Invalid Entity Number
ERR.1002Invalid Rep Code
ERR.1003Access Denied
ERR.1004Currently Update Unavailable
ERR.1005Invalid City
ERR.1006Invalid Country
ERR.1007Invalid Postal Code
ERR.1008Invalid State Province
ERR.1009Invalid Email
ERR.1010Maximum Characters Exceeded
ERR.1011Invalid Phone Number
ERR.1012Invalid Birth Date
ERR.1013Invalid Phone Region Code
ERR.1014Duplicate Value Found
ERR.1015Invalid Value
ERR.1016Invalid Pattern
ERR.1017Phone Number Required
ERR.1020Delete Feature Unavailable
ERR.1021Update Feature Unavailable
ERR.1022File Size Exceeded
ERR.1023Invalid File Type
ERR.1024Invalid Street
ERR.1025Maximum Limit Exceeded
ERR.1026Invalid Account Number
ERR.1072State/Province Required Only For US Or CA
ERR.4000Property Not Defined

Standard Data Format

Date Format

AttributesData TypeLengthDescription
birthDateString10yyyy-MM-dd

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.

Updating an attribute
{
"accountNumber": "87654321",
"subNumber": "252",
"main": {
"repCode": "JC01"
},
"PrimaryOwner": {
"name1": "John",
"name2": "David",
"name3": "Doe",
"name4": "JR"
}
}
Deleting an attribute value
{
"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"
}
]
}
delete

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.

Array Object
{
"caisCustomerType": ["ACC", "ONB"]
}