API v1 Requests

You are here:

Version 1.0 of the uamplified API supports GET requests (HTTP/1.1) submitted via HTTPS. All requests must also include the Content-Type header which must bet set to application/json. Please see Endpoints below for the API url to use.

Example:

curl -X "GET" "https://customer.request.st/api/" -H "Content-Type: application/json"

 

Authentication

All API requests requires you to submit an Authorization header where you supply your products API key using a Bearer Token. (RFC6750)

Authorization: Bearer YourProductsAPIKey

 

Remember that you will always receive results related to the product API key you are using!

 

API URL

All requests must be sent to your request.st hosted website using the /api/ endpoint. If you do not use domain mapping, this is the address that ends with .request.st.

 

Endpoints

In order to query product related data, we append different endpoints to our custom API url, depending on what type of data we require.

In version 1.0 the API supports the following endpoints:

endpoint Structure Description
get/product /api/get/product/ Get the current data related to the product the API key you are using belongs to.
get/requests /api/get/requests/ Get the current data related to the products Listen module and the requests associated with this product.
get/request /api/get/request/{id}/ Get the current data for a specific request that belongs to this product. You can also select to query and include comments associated with this request.
get/updates /api/get/updates/ Get the current data related to the products Talk module and the updates associated with this product.
get/update /api/get/update/{id}/ Get the current data for a specific update that belongs to this product.
get/campaigns /api/get/campaigns/ Get the current data related to the products Launch module and the campaigns associated with this product.
get/campaign /api/get/campaign/{id}/ Get the current data for a specific campaign that belongs to this product.

 

GET Product

/api/get/product/

Requests the current data available for the product. Will return a JSON encoded product object.

Query Arguments

No queries can be made against a product.

 

GET Requests

/api/get/requests/

Requests the listen module data along with the latest product requests. Will return a JSON encoded listen module object.

Query Arguments

The following arguments can be passed along to filter the requests.

Variable Type Description
status string Option to filter results by status. Either one particular status ID or a comma separated list of IDs.
category string Option to filter results by category. Either one particular category term ID or a comma separated list of term IDs.
number int The number of items to return. Defaults to 5. Maximum 25.
page int Page number for pagination. Minimum 1.
showzero int Option to filter out requests that do not have any votes. Manly used when selecting to order by votes. By default all requests are shown (1) but you can set this to zero to hide requests without votes.
orderby string The order items are returned. Available options: “date” (default), “comment_count” sort by comment count, “votes” sort by votes.
order string Sort order. Either “ASC” for Ascending or “DESC” for Descending (default).

Example: Get the last 10 requests submitted for a product.

curl --request GET \
  --url https://company.request.st/api/get/listen/?number=10 \
  --header 'Authorization: Bearer YourProductAPIKey' \
  --header 'Content-Type: application/json'

 

GET Request

/api/get/request/{ID}/

You can request to get a specific request object directly via the request endpoint along with the requests ID.

Query Arguments

By default, only the request object is returned, but you can also request to have comments included by nominating what type of comment objects to include.

Variable Type Description
comments int Use 1 to include all types of comments, 2 to include only public comments or 3 to include only internal comments.
number int The number of comments to return. Defaults to 5. Maximum 25.
page int Page number for pagination. Minimum 1.
orderby string The order comments are returned. Available options: “date” (default).
order string Sort order. Either “ASC” for Ascending or “DESC” for Descending (default).

Example: Get the last 5 internal comments for the request with the ID 123.

curl --request GET \
  --url https://company.request.st/api/get/request/123/?comments=3&number=5 \
  --header 'Authorization: Bearer YourProductAPIKey' \
  --header 'Content-Type: application/json'

 

GET Updates

/api/get/updates/

Get the current available data for the talk module for the product, along with current updates. Will return a JSON encoded talk module object.

Query Arguments

The following arguments can be passed along to filter updates.

Variable Type Description
type string Option to filter updates by type. Either “release” for releases or “announcement” for announcements. If not set, all types will be returned.
number int The number of updates to return. Defaults to 5. Maximum 25.
page int Page number for pagination. Minimum 1.
orderby string The order updates are returned. Available options: “date” (default).
order string Sort order. Either “ASC” for Ascending or “DESC” for Descending (default).

Example: Get the latest announcement for a product.

curl --request GET \
  --url https://company.request.st/api/get/talk/?number=1&type=announcement \
  --header 'Authorization: Bearer YourProductAPIKey' \
  --header 'Content-Type: application/json'

 

GET Update

/api/get/update/{ID}/

As an update published in the Talk module can be either an announcement or a release, they are both referred to as an “update” in the API. By providing the updates unique ID, you can request the update object directly.

Query Arguments

No queries can be made against an update.

 

GET Campaigns

/api/get/campaigns/

Requests the listen module data along with the latest product campaigns. Will return a JSON encoded launch module object.

Query Arguments

The following arguments can be passed along to filter campaigns.

Variable Type Description
number int The number of items to return. Defaults to 5. Maximum 25.
page int Page number for pagination. Minimum 1.
orderby string The order items are returned. Available options: “date” (default), “ending” sort by campaign end date (if one exists), “popular” sort by popularity (engagement/reach).
order string Sort order. Either “ASC” for Ascending or “DESC” for Descending (default).

Example: Get the second page of campaigns for a product (assuming we have over 5).

curl --request GET \
  --url https://company.request.st/api/get/launch/?page=2 \
  --header 'Authorization: Bearer YourProductAPIKey' \
  --header 'Content-Type: application/json'

 

GET Campaign

/api/get/campaign/{ID}/

You can request to get a specific campaign object directly via the campaign endpoint along with the campaign ID.

Query Arguments

By default, only the campaign object is returned, but you can also request to have the leaderboard included by nominating what type of leaderboard objects to include.

Variable Type Description
board int Use 0 to show entries with no referrals only, 1 to show only those with one referral or more, or 2 for all (default)
number int The number of entries to return. Defaults to 5. Maximum 25.
page int Page number for pagination. Minimum 1.
orderby string The order comments are returned. Available options: “referrals” (default) or “date” to sort by the date each user signed up for the campaign.
order string Sort order. Either “ASC” for Ascending or “DESC” for Descending (default).

Example: Get the top 5 leaderboard positions for the campaign with the ID 123.

curl --request GET \
  --url https://company.request.st/api/get/campaign/123/?board=1 \
  --header 'Authorization: Bearer YourProductAPIKey' \
  --header 'Content-Type: application/json'
Was this article helpful?
Dislike 0