TrayiStats Logo
TrayiStats Supply API v1.0 • Live Data Platform

The Source of Truth for Supply Chain Data

Integrate TrayiStats Supply API to access real-time survey inventory, global market intelligence, and supplier data directly within your stack.

<50ms Latency
OAuth / Key Auth
Multi-Locale
99.99% Uptime
quick_start.sh
# Fetch active surveys
curl -X GET \
  "https://surveys-sandbox.trayistats.com/supply/api/available-surveys" \
  -H "access-key: YOUR_API_KEY"
● 200 OKResponse: application/json

Why Choose TrayiStats?

Built for organizations that demand speed, reliability, and scalability, TrayiStats simplifies the complexity of global market research and survey management. Our platform enables seamless API integration, intelligent traffic routing, real-time reporting, and secure data processing.

Key Enterprise Capabilities

High-performance platform designed for enterprise-scale operations.
Reliable APIs with low-latency sub-100ms response times.
Real-time survey inventory and dynamic traffic management.
Global market coverage with localization support.
Secure, scalable, and highly available multi-region architecture.
Comprehensive reporting, analytics, and reconciliation tools.

Environments

Base URLs for the TrayiStats Supply API. Use the Sandbox environment for testing and integration before moving to live Production.

Sandbox Endpoint

Testing Sandbox
https://surveys-sandbox.trayistats.com/supply/api

Production Endpoint

Live Production
{BaseUrl}/supply/api

Production base URL placeholder. Custom subdomain assigned upon account setup.

Access Key Provisioning via Email

All API requests require a valid access-key header. Your unique Access Key and Hashing Credentials are provided directly via official email by the TrayiStats team upon account onboarding.

Best Practices

Survey & Attribute API Refresh Behavior

Understanding the refresh behavior and parameter requirements of each API endpoint is essential for efficient integration and optimal system performance.

Qualification Parameters

Format: URL Query Parameters

Qualifications are passed as query parameters using the format Q{AttributeID}={Value}.

Single Select: Q417=65

Multi Select: Q418=3677,3678 (Comma-separated)

Open Ended: Q101=25

Constraint: Panel ID, Transition ID, or Session ID must not exceed 64 characters.

Available Surveys API

Refresh Interval: 15 minutes

The Available Surveys API is refreshed automatically every 15 minutes. This ensures that API consumers receive an up-to-date list containing only active surveys, while paused or inactive surveys are excluded from the response.

Integration Recommendation: Poll this endpoint at 15-minute intervals to maintain synchronization with the system's refresh cycle and ensure respondents are directed only to active projects.

Survey Attributes API

Refresh Behavior: Lifecycle-based

The Survey Attributes API provides attribute data when a survey is created or updated. This data remains consistent throughout the survey's lifecycle and does not change unless the survey is explicitly modified.

Integration Recommendation: Retrieve survey attributes once when a new survey becomes available, or when you detect a change in the survey's lastUpdated timestamp. Frequent polling is unnecessary.

Attributes API

Refresh Behavior: Static metadata

The Attributes API functions as a metadata reference and is independent of survey availability. Attribute definitions (such as demographic questions and response options) do not change based on survey status or activity.

Integration Recommendation: Cache attribute metadata locally. This endpoint requires minimal refresh calls—typically only when adding support for new locales or when notified of metadata updates.

API Reference

The TrayiStats Supply API allows you to programmatically manage surveys, retrieve country lists, and access survey attributes.

Available Surveys

v1.0.0

Retrieves a list of all surveys currently live and available for the authenticated supply partner. This endpoint supports pagination and filtering by country and language.

GEThttps://surveys-sandbox.trayistats.com/supply/api/available-surveys

Headers

ParameterData TypeRequirement
access-keystringRequired

A valid API access key is required for live endpoint access.

Survey Object

SurveyResponse
Field NameTypeDescription
surveyIdstringUnique identifier for the survey opportunity.
titlenumberInternal title or ID of the survey.
completeGoalnumberTotal number of completes desired.
loinumberEstimated Length of Interview in minutes.
irnumberHistorical Incidence Rate (0-100).
costnumberCost Per Interview (CPI) in USD.
countryLocaleIdnumberIdentifier for the country and locale.
launchedAtstringTimestamp of survey launch (ISO 8601).
lastUpdatedstringTimestamp of the last update (ISO 8601).
deduplicationStatusnumberDeduplication setting status.
AssociatedClientIdstringUnique identifier for the associated client.
linkstringThe survey entry link with placeholders.

Response Status Codes

200 OK

Request was successful and returns valid survey payload.

400 Bad Request

Invalid query parameters or malformed request format.

401 Unauthorized

API Access Key is missing, expired, or unauthorized.

429 Too Many Requests

Rate limit exceeded. Retry after cooling period.

Example Response

Key
Value
GENERATED CURL
RESPONSE200 OK
{
  "success": "boolean",
  "data": {
    "Total": "number",
    "Items": [
      {
        "surveyId": "string | null",
        "title": "number",
        "completeGoal": "number",
        "CompleteRequired": "number",
        "loi": "number",
        "ir": "number",
        "cost": "number (decimal)",
        "countryLocaleId": "number",
        "launchedAt": "string (ISO 8601 datetime)",
        "lastUpdated": "string (ISO 8601 datetime)",
        "deduplicationStatus": "number",
        "AssociatedClientId": "string",
        "IsPulledSurvey": "number",
        "link": "string"
      }
    ]
  }
}

Get Survey by ID

v1.0.0

Retrieve detailed configuration, question structure, and aggregate statistics for a specific survey using its unique identifier. This endpoint includes metadata about response rates.

GEThttps://surveys-sandbox.trayistats.com/supply/api/survey

Path Parameters

ParameterTypeDescription
surveyId
required
stringThe unique identifier of the survey you want to retrieve. Example: srv_12345

Survey Object

SurveyResponse
Field NameTypeDescription
surveyIdstringUnique identifier for the survey opportunity.
titlenumberInternal title or ID of the survey.
completeGoalnumberTotal number of completes desired.
loinumberEstimated Length of Interview in minutes.
irnumberHistorical Incidence Rate (0-100).
costnumberCost Per Interview (CPI) in USD.
countryLocaleIdnumberIdentifier for the country and locale.
launchedAtstringTimestamp of survey launch (ISO 8601).
lastUpdatedstringTimestamp of the last update (ISO 8601).
deduplicationStatusnumberDeduplication setting status.
AssociatedClientIdstringUnique identifier for the associated client.
linkstringThe survey entry link with placeholders.

Response Status Codes

200 OK

Returns a Survey Object.

404 Not Found

If the survey with the provided surveyId does not exist.

Example Request

Key
Value
GENERATED CURL
RESPONSE200 OK
{
  "success": "boolean",
  "data": {
    "Total": "number",
    "Items": [
      {
        "surveyId": "string | null",
        "title": "number",
        "completeGoal": "number",
        "CompleteRequired": "number",
        "loi": "number",
        "ir": "number",
        "cost": "number (decimal)",
        "countryLocaleId": "number",
        "launchedAt": "string (ISO 8601 datetime)",
        "lastUpdated": "string (ISO 8601 datetime)",
        "deduplicationStatus": "number",
        "AssociatedClientId": "string",
        "IsPulledSurvey": "number",
        "link": "string"
      }
    ]
  }
}

Survey Attributes

v1

Retrieves a list of specific attributes associated with a survey based on the provided ID. This endpoint allows you to filter attributes by active status and limit the number of results returned for pagination purposes.

GEThttps://surveys-sandbox.trayistats.com/supply/api/survey-attributes

Query Parameters

NameTypeDescription
surveyIdrequiredstringThe unique identifier of the survey.

Attribute Object

Returns an array of objects with the following schema:

attributeId
number
Unique identifier for the survey attribute.
options
array
Array of selected option IDs or value range strings (e.g. [1, 2], ["18-99"]).

Request

Key
Value
GENERATED CURL
RESPONSE200 OK
{
  "success": true,
  "data": {
    "Total": 3,
    "Items": [
      {
        "attributeId": 1,
        "options": [
          1,
          2
        ]
      },
      {
        "attributeId": 2,
        "options": [
          "18-99"
        ]
      },
      {
        "attributeId": 6,
        "options": [
          90859,
          90860,
          90861,
          90862,
          90863,
          90859,
          90860,
          90861,
          90862,
          90863
        ]
      }
    ]
  }
}

List all countries

v1.0

Returns a list of all supported countries where supply data is available. The response includes the ISO code and default locale for each country.

GEThttps://surveys-sandbox.trayistats.com/supply/api/country

The Country Object

HTTP 200 OK

Each item in the response array represents a supported country entity.

FieldTypeDescription
idstringUnique identifier for the country/locale entity.
localeNamestringDisplay name of the language/locale (e.g., 'Hindi', 'English').
localeCodestringLocale identifier code (e.g., 'Hindi-IN', 'English-US').
countryNamestring | nullOptionalCommon name of the country (e.g., 'India', 'USA'). Can be null for certain entries.

Response Status Codes

200 OK

Request was successful and returns a list of countries.

401 Unauthorized

API Key is missing or invalid.

Example Request

Key
Value
GENERATED CURL
RESPONSE200 OK
{
  "success": true,
  "data": {
    "Total": "number",
    "Items": [
      {
        "id": "string",
        "localeName": "string",
        "localeCode": "string",
        "countryName": "string"
      }
    ]
  }
}

Attributes Endpoint

v1.0

Manage and retrieve product attributes for various locales. This endpoint allows you to sync your internal product definitions with our global supply chain standards.

GEThttps://surveys-sandbox.trayistats.com/supply/api/attributes

Query Parameters

ParameterTypeRequired
countryLocaleIdstringRequired

The country locale identifier (e.g., 4). Determines the language and specific attribute availability.

Attribute Item Object

AttributeItem
Field NameTypeDescription
namestringInternal identifier name for the attribute (e.g., STANDARD_GENDER, STATE). Used to map the attribute to a known profiling category.
idnumberUnique numeric ID of the attribute. This is the AttributeID used in qualification parameters (e.g., Q1=, Q2=).
textstringThe question text displayed to the respondent (e.g., "What is your gender?").
typestringInput type of the attribute. Possible values: radio, dropdown, multi-punch, range, open-ended.
optionsarrayList of valid answer options for this attribute. Empty array for range and open-ended types.
options[].idnumberUnique ID of the option. This value is passed as the qualification answer (e.g., Q1=1 for Male).
options[].textstringHuman-readable label of the option shown to the respondent (e.g., "Male", "Female", "CALIFORNIA").

Common Errors

400Bad Request

Invalid countryLocaleId provided.

401Unauthorized

Authentication token is missing or invalid.

Example Request

200 OK

Response

Key
Value
GENERATED CURL
RESPONSE200 OK
{
  "success": true,
  "data": {
    "Total": 938,
    "Items": [
      {
        "name": "STANDARD_GENDER",
        "id": 1,
        "text": "What is your gender ?",
        "type": "radio",
        "options": [
          {
            "id": 1,
            "text": "Male"
          },
          {
            "id": 2,
            "text": "Female"
          }
        ]
      }
    ]
  }
}

Survey Stats

v1.0.0

Get performance metrics and conversion statistics for a specific survey. This includes both vendor-specific and global completion counts.

GEThttps://surveys-sandbox.trayistats.com/supply/api/survey-stats

Query Parameters

ParameterData TypeRequirement
SurveyIdstringRequired

Stats Object

SurveyStatsResponse
Field NameTypeDescription
vendorCompletesnumberTotal number of completes achieved through the vendor.
globalCompletesnumberTotal number of completes achieved globally.
vendorConversionnumberConversion rate for the vendor (%)
globalConversionnumberGlobal conversion rate for the survey (%)

Response Status Codes

200 OK

Request was successful and returns valid survey payload.

400 Bad Request

Invalid query parameters or malformed request format.

401 Unauthorized

API Access Key is missing, expired, or unauthorized.

429 Too Many Requests

Rate limit exceeded. Retry after cooling period.

Request

Key
Value
GENERATED CURL
RESPONSE200 OK
{
  "success": true,
  "data": {
    "success": true,
    "Total": 1,
    "Items": [
      {
        "vendorCompletes": 21,
        "globalCompletes": 68,
        "vendorConversion": 0,
        "globalConversion": 4.25
      }
    ]
  }
}

Security

Secure your integration by implementing exit link verification and rotate keys regularly.