API Response Codes and Retry Mechanism

Response Codes

Response CodeDescription
200Success (no action needed.)
400Bad request, typically due to missing customer ID, verification ID not found, or invalid enum value.
422Invalid SSN length (must be 9 digits for SSN lookup). Invalid bank account number length (must be at least 5 digits.)
404No device found for a specific sessionKey (typically for devices API.)
401Check your API authorization credentials.
500Internal server error. Retry using the details in the retry mechanism section below. Also, reach out to Sardine support to let us know.
504Timeout error when fetching data from a third-party. Retry using the details in the retry mechanism section below. Also, reach out to Sardine support to let us know.

Retry Reasons

Sardine recommends retrying your API call if you encounter a 5xx response status code or, if the request times out.

Some reason codes returned in the /v1/customers API response (customer.reasonCodes[] field), that indicate a part of the risk assessment could not be completed, might also require a request retry. You should review with your Fraud and Compliance teams which use cases would require a retry.

Some recommended reason codes to consider for retry are the following sanctions-screening-related codes:

  • SVTO
  • SSFD
  • SVER

Retry Mechanism

You should retry using Exponential Backoff and Jitter up to 3 times.

The following is the pseudo code for calculating wait time for the retry:

var baseIntervalMs = 300;
var maxRandomIntervalMs = 100;

func getWaitTimeMs() {
  if (retryCount > 3) {
    return "no retry"
  }
  return (baseIntervalMs * 2^retryCount) + randomNumberBetween(0, maxRandomIntervalMs);
}

Was this page helpful?