Authentication
Every request to the Partner API must be authenticated using HMAC-SHA256 request signing. This ensures that requests are both authentic and have not been tampered with in transit.
Required Headers
| Header | Description |
|---|---|
X-API-Key | Your organization API key |
X-Timestamp | Current Unix timestamp in seconds (e.g., 1711000000) |
X-Nonce | A unique string per request (UUID v4 recommended) |
X-Signature | HMAC-SHA256 hex signature of the request |
Signature Construction
The signature is computed by building a dot-separated message string and signing it with your API key secret:
message = "{timestamp}.{nonce}.{method}.{path}.{body}"
signature = HMAC-SHA256(apiKeySecret, message).hexDigest()
The message components, joined with dots (.):
- timestamp — Unix timestamp in seconds (same value as
X-Timestampheader) - nonce — The same value sent in the
X-Nonceheader - method — The HTTP method in uppercase (e.g.,
GET,POST) - path — The full request path (e.g.,
/v2/partners/products/tickets) - body — The raw JSON request body string. For GET requests with no body, use an empty string
""
The resulting HMAC digest must be encoded as lowercase hex.
Examples
API_KEY="your-api-key"
API_SECRET="your-api-secret"
TIMESTAMP=$(date +%s)
NONCE=$(uuidgen | tr '[:upper:]' '[:lower:]')
METHOD="GET"
REQ_PATH="/v2/partners/products/tickets"
BODY=""
MESSAGE="${TIMESTAMP}.${NONCE}.${METHOD}.${REQ_PATH}.${BODY}"
SIGNATURE=$(echo -n "${MESSAGE}" | \
openssl dgst -sha256 -hmac "${API_SECRET}" | \
awk '{print $2}')
curl -X GET "https://api.vignetim.com${REQ_PATH}" \
-H "Content-Type: application/json" \
-H "X-API-Key: ${API_KEY}" \
-H "X-Timestamp: ${TIMESTAMP}" \
-H "X-Nonce: ${NONCE}" \
-H "X-Signature: ${SIGNATURE}"Important Notes
- The
X-Timestampmust be within 5 minutes (300 seconds) of the server time. Requests with stale timestamps will be rejected with a401error. - Each
X-Noncevalue must be unique and can only be used once. Reusing a nonce will result in a401error. - Always use the raw, unformatted JSON body string for signature computation. Do not pretty-print or re-serialize the body before signing.
- The signature must be lowercase hex-encoded. Do not use base64.