API access requirements

API access requirements

The following document walks you through the access and authentication requirements for the SC//Reliantâ„¢ platform API.

Prerequisites

To access the SC//Reliant platform API, the following conditions must be met.

  • You must have a user account on SC//Reliant Platform Manager with API access turned on. For more information, see Turning on API access for a user account.
  • You must have access to manage the resources the API actions interact with. For more information, see Managing user permissions.
  • You must have your API authentication token, API secret key, and customer code. We walk you through the generation and retrieval of your API authentication token and secret key in this document.

RESTful API HTTP headers

To access the SC//Reliant platform's RESTful API, each request should use an HTTP header with the following parameters to establish an HTTPS connection.

HTTP headerDescriptionValue
AcceptThe accepted media type.application/vnd.reliantsec-v1+json
Content-TypeThe format of the request and response body.application/json
X-Auth-TokenThe authentication token to use. This token can be generated by editing your user profile in SC//Reliant Platform Manager.For more information, see Generating an API authentication token.
X-Auth-SignatureThe hexadecimal signature used for authentication.For more information, see Creating an authentication signature.
X-TimestampThe timestamp of the request, using the ISO-8601 format.2024-10-23T16:16:40.300Z
X-CustomerThe customer code.sit

Example

The following is an example of the HTTP headers that must be present when making API calls.

Accept: application/vnd.reliantsec-v1+json
Content-Type: application/json
X-Auth-Token: skXg3ed2C8zEXAMPLE
X-Auth-Signature: 027fbe71cf716f81558d2c0ac369f6287dd12fa4d73db1EXAMPLE
X-Timestamp: 2024-10-23T16:16:40.300Z
X-Customer: sit

Generating an API authentication token

When authenticating to the SC//Reliant platform API, you require an API authentication token. The following steps walk you through generating and retrieving your API authentication token.

  1. Access and log in to the SC//Reliant Platform Manager at https://platform.reliant.io/.
  2. From the left navigation menu, choose Users.
  3. Use the Search to locate your user account. You can search by name, username, or email address.
  4. After locating your user account detail page, choose Edit.
  5. Next to the API Authentication Token field, choose Generate New Token.

Generating an API secret key

When authenticating to the SC//Reliant platform API, you require an API secret key to generate your authentication signature. The following steps walk you through generating and retrieving your API secret key.

  1. Access and log in to the SC//Reliant Platform Manager at https://platform.reliant.io/.
  2. From the left navigation menu, choose Users.
  3. Use the Search to locate your user account. You can search by name, username, or email address.
  4. After locating your user account detail page, choose Edit.
  5. Next to the API Secret Key field, choose Generate New Secret Key.

Creating an authentication signature (X-Auth-Signature)

The authentication signature is a hexadecimal HMAC-SHA256 digest, created with your API secret key, of the request path and the timestamp separated by a space, for example /api/locations 2026-10-17T14:28:25Z. Use the path only. Don't include the server name or the query string, even when the request has one. Use exactly the same timestamp string in the X-Timestamp header.

The timestamp must include a time zone, and it must be within 15 minutes of the SC//Reliant platform's clock, ahead or behind. A request with a timestamp outside that window is rejected with 401 Unauthorized, even if the signature is otherwise correct. Create a new signature for each request, and keep the clock on the computer that sends the requests synchronized with an NTP server, such as pool.ntp.org.

The following example is written in Ruby, and displays how to generate an API authentication signature to access Store ID 314. You must replace the SECRET_KEY value with your API secret key.

require 'time'
require 'openssl'
SECRET_KEY = "my secret key"
OpenSSL::HMAC.hexdigest(OpenSSL::Digest::SHA256.new, SECRET_KEY, "/api/stores/314 #{DateTime.now.iso8601}")