Getting Started
This documentation helps you to set up your own connection to Favour Toys. We created this API to service our customers as good as possible.
The API is only available by request. You can send an e-mail to your account manager to ask for an API Key to connect to our API.
Authorization
Authorization to our API is only available by API key. This key will be provided to you by one or our account managers. Without a key there is no possibility to connect to our API.
Authorization can be done to send the Api Token you received as a header parameter within your request. to our API. The API Token should be send using the header parameter "Authorization : [YOUR API TOKEN]"
Sample request
Curl
curl "https://api.favourtoys.com"
-X GET
-H "Authorization: [YOUR API TOKEN]"
API Status (GET)
To make sure you have a good connection with our API we provided a method that will help you to find the current status of your API Key but also the status of the connection with our database.
You can send a status request to our api. This request will give you the information you need to self service a status of your connection. The request can be send to /status and it will give you the following information.
| requests_today | This is a counter for the total of requests that where used through the current api key |
|---|---|
| db_connection | Status of the connection to our inventory Database. This is either "Active" or "Not Active". |
| item_count | You have a connection to our database and this database will give you the best information about our inventory stock. To give you an overview of all items available to you we count all items and provide you with a total number. This can help you with your requests |
| key_status | This status is provided to inform you about the status of the used API key. |
Sample request
Curl
curl "https://api.favourtoys.com/status"
-X GET
-H "Authorization: [YOUR API TOKEN]"
Sample response
JSON
{
"requests_today": 2,
"db_connection": "Active",
"item_count": 100,
"key_status": "Active"
}
Retrieve Item List (GET)
We can help you retrieve an Item list for all items available through our API.
Information in this list is all basic information about an Item. Availability, name and sku. The information in this list helps you to get a view off all products and to retrieve a singel item.
| per_page | Maximum items per page. Available options are 200, 500, 1000 |
|---|
Sample request
Curl
curl "https://api.favourtoys.com/items"
-X GET
-H "Authorization: [YOUR API TOKEN]"
Sample response
JSON
[
{
"Product_type": "D",
"Name": "Chivalry 2 STEAM Special Edition (ROW)",
"SKU": "P250009",
"Availability": 0
},
{
"Product_type": "D",
"Name": "Chivalry 2 STEAM King's Edition Content (EU/ROW)",
"SKU": "P250008",
"Availability": 0
}
]
Retrieve Item (GET)
Using this endpoint you can get detailed information about a single Item.
| sku | The SKU of the item you want to retrieve |
|---|
Sample request
Curl
curl "https://api.favourtoys.com/items/[SKU]"
-X GET
-H "Authorization: [YOUR API TOKEN]"
Sample response
JSON
[
{
"Product_Group": "Test",
"Platform": "STEAM",
"Readable_Inlay_Language": "Digital Code",
"Combined_product": "No",
"Product_type": "D",
"Name": "Test Product",
"Part_of_DLC": "false",
"Price": "1.50",
"Inlay_Language": "Digital Code",
"Release_Date": "1970-01-01",
"Inactive": "false",
"SKU": "A123000",
"Availability": "45",
"Currency": "EUR"
}
]
Download codes (POST)
With this endpoint you can download codes from the database. Remember, downloading codes from our database means you purchase them.
| sku | The SKU of the item you want to download codes for. |
|---|---|
| quantity | The amount of codes you want to download. (max 1.000 per request) |
Sample request
Curl
curl "https://api.favourtoys.com/items"
-X POST
-H "Authorization: [YOUR API TOKEN]"
Sample response
JSON
{
"result": {
"sales_price": 1.5,
"codes": [
"wgj1TIsD",
"uL8DzJB9",
"sPaMK2IZ",
"9anytZq7",
"FoDfcTS9"
],
"item_name": "Test Product",
"code_count": 5,
"item_sku": "A123000",
"status": "success"
},
"code": 3000
}
Download items as CSV
With this endpoint you can download a CSV file with all items. The CSV is provided using a Base64.
| No parameters available. |
Sample request
Curl
curl "https://api.favourtoys.com/inventory"
-X GET
-H "Authorization: [YOUR API TOKEN]"
Sample response
JSON
{
"file": "UHJ5ndWFnZSxDb21ifb2Zf2VfRGF0ZSxJbmFjdGl2ZSxTS1UsQ3VycmVuY3kKLCwsTmVlLEQsIkNoaXZhbHJ5IDIgU1RFQU0gU3BlY2lhbCBFZGl0aW9uIChST1cpIixmYWxzZSwsLCxmYWxzZSxQMjUwMDA5LEVVUgosLCxOZWUsRCwiQ2hpdmFscnkgMiBTVEVBTSBLaW5nJ3MgRWRpdGlvbiBDb250ZW50IChFVS9ST1cpIixmYWxzZSwsLCxmYWxzZSxQMjUwMDA4LEVVUgosLCxKYSxELCJDaGl2YWxyeSAyIFNURUFNIEtpbmdzIEVkaXRpb24gKFJPVykiLGZhbHNlLCwsLGZhbHNlLFAyNTAwNTUsRVVSCiwsLE5lZSxELCJIZWxsIExldCBMb29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