Rest API
All endpoints are available on https://api.freestuffbot.xyz/v2
Auth
You should already have an API key. If not please check out the Getting Started page.
Your API key should be present in the Authorization
header on every request to the API.
Prefix your API key with the word Bearer
.
Assuming your API key is "ABCDEFGHIJKLMNOPQRSTUVWXYZ", this is how your header should look like:
Authorization: Bearer ABCDEFGHIJKLMNOPQRSTUVWXYZ
List of endpoints
Endpoints are grouped into "Static" and "Content". If you are on the free tier you only have access to endpoints in the "static" group. Upgrade to get access to content endpoints.
Static
All schemas returned by endpoints in this category are defined following the https://json-schema.org/ specification.
GEThttps://api.freestuffbot.xyz/v2/ping
Parameters
LocationKeyTypeDescriptionheaderAuthorizationstringYour Bearer token
Responses
204
No Content
(none)
Headers(none)
GEThttps://api.freestuffbot.xyz/v2/static/schemas
Parameters
LocationKeyTypeDescriptionheaderAuthorizationstringYour Bearer token
Responses
200
OK
{
"type": "fsb:static:apiv2:schema_list",
"list": [
{
"name": "Product",
"urn": "fsb:schema:apiv2:product",
"active": true,
"latestVersion": "9999-99-99"
}
]
}
Headers(none)
GEThttps://api.freestuffbot.xyz/v2/static/schemas/:urn
Parameters
LocationKeyTypeDescriptionheaderAuthorizationstringYour Bearer token
Responses
200
OK
{
"type": "fsb:static:apiv2:schema",
"schema": {
"type": "object",
"properties": {}
}
}
Headers(none)
404
Not Found
{
"type": "fsb:problem:name-here",
"title": "error name",
"detail": "error message"
}
Headers(none)
GEThttps://api.freestuffbot.xyz/v2/static/problems
Parameters
LocationKeyTypeDescriptionheaderAuthorizationstringYour Bearer token
Responses
200
OK
{
"type": "fsb:static:apiv2:problem_list",
"list": [
{
"urn": "fsb:problem:example",
"status": 400,
"title": "Example error"
}
]
}
Headers(none)
GEThttps://api.freestuffbot.xyz/v2/static/events
Parameters
LocationKeyTypeDescriptionheaderAuthorizationstringYour Bearer token
Responses
200
OK
{
"type": "fsb:static:apiv2:event_list",
"list": [
{
"urn": "fsb:event:example",
"description": "Human readable description of the event",
"payloadDescription": "Human readable description of the event payload",
"payloadSchema": {
"type": "object",
"properties": {}
}
}
]
}
Headers(none)
Content
The endpoints in this category are only available to users in the "full" tier or above.
GEThttps://api.freestuffbot.xyz/v2/products
Parameters
LocationKeyTypeDescriptionheaderAuthorizationstringYour Bearer tokenheaderIf-None-Match?stringA previously received ETag value. Recommended but not required.querylimit?intLimit how many products are returned at oncequeryoffset?intOffset the results. Used with limit parameter for pagination.queryresolve?booleanIf set to true will return full products instead of partial ones. The ETag hash will also be computed over the entire product data and not just their ids.querytype?ChannelFilter: Only list products with the given typequerykind?ProductKindFilter: Only list products with the given kindquerystore?ProductStoreFilter: Only list products with the given store
Responses
200
OK
{
"products": [
{
"id": 123456,
"kind": "game",
"until": 0,
"type": "keep",
"flags": 0,
"store": "steam"
}
],
"count": 1
}
HeadersETag=<hash:string>โ see developer.mozilla.org/docs/Web/HTTP/Headers/ETag - will be a weak hash if resolve is false, strong hash if resolve is true. The hash will always include all products valid for your query, even if cut off through pagination. In other words, you will receive the same hash for different "offset" and "limit" values.
304
Not Modified
null
Headers(none)
400
Bad Request
{
"type": "fsb:problem:name-here",
"title": "error name",
"detail": "error message"
}
Headers(none)
404
Not Found
{
"type": "fsb:problem:name-here",
"title": "error name",
"detail": "error message"
}
Headers(none)
GEThttps://api.freestuffbot.xyz/v2/products/:id
Parameters
LocationKeyTypeDescriptionroute:idstringThe id of the product you're looking upheaderAuthorizationstringYour Bearer tokenheaderIf-None-Match?stringA previously received ETag value. Recommended but not required.
Responses
200
OK
{
"TODO": true
}
HeadersETag=<hash:string>โ see developer.mozilla.org/docs/Web/HTTP/Headers/ETag
304
Not Modified
null
Headers(none)
400
Bad Request
{
"type": "fsb:problem:name-here",
"title": "error name",
"detail": "error message"
}
Headers(none)
404
Not Found
{
"type": "fsb:problem:name-here",
"title": "error name",
"detail": "error message"
}
Headers(none)
502
Bad Gateway
{
"type": "fsb:problem:name-here",
"title": "error name",
"detail": "error message"
}
Headers(none)
Table of Contents