Items
Items are what players can purchase and wear for their in-game account - they can be restricted based on if the user has an active subscription. On this page we'll dive into the different item endpoints you can use to manage items programmatically.
The item model
The item model contains all the information about the items that players can interact with.
Properties
- Name
id- Type
- integer
- Description
Unique identifier for the item.
- Name
currency- Type
- object
- Description
The currency associated with the item.
- Name
item_type- Type
- object
- Description
The item type associated with the item type.
- Name
name- Type
- string
- Description
Name for the item.
- Name
cost- Type
- integer
- Description
Cost for the item.
- Name
icon_url- Type
- string
- Description
Icon URL for the item.
- Name
paper_url- Type
- nullable string
- Description
Paper URL for the item.
- Name
no_eye_url- Type
- nullable string
- Description
No Eye URL for the item.
- Name
is_clearance- Type
- boolean
- Description
Determines if the item is a clearance item for it's catalog.
- Name
is_coin_code_item- Type
- boolean
- Description
Determines if the item is a coin code item.
- Name
is_member_item- Type
- boolean
- Description
Determines if the item is a member item.
- Name
has_purchased- Type
- boolean
- Description
Determines if the current authenticated player has purchased the item.
Retrieve a catalog's items
This endpoint allows you to retrieve a paginated list of all the items that are associated with a catalog.
Request
curl https://prod-app.themeparkshark.com/api/catalogs/1/items \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
Response
{
"data": [
{
"id": 1,
"currency": {
"id": 1,
"name": "Coins",
"singular_name": "Coin",
"icon_url": "https://assets.themeparkshark.com/mobile/production/assets/image.png"
},
"item_type": {
"id": 1,
"name": "Head item",
"image_url": "https://assets.themeparkshark.com/mobile/production/assets/image.png"
},
"name": "Future Hat",
"cost": 100,
"has_purchasd": true,
"icon_url": "https://assets.themeparkshark.com/mobile/production/assets/image.png",
"no_eye_url": "https://assets.themeparkshark.com/mobile/production/assets/image.png",
"paper_url": "https://assets.themeparkshark.com/mobile/production/assets/image.png",
"is_clearance": false,
"is_member_item": true
},
{
"id": 2,
// ...
}
],
"links": {
"first": "https://prod-app.themeparkshark.com/api/catalogs/1/items?page=1"
"last": null,
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"path": "https://prod-app.themeparkshark.com/api/catalogs/1/items",
"per_page": 15,
"to": 6
}
}
Purchase an item
This endpoint allows you to purchase an item for your in-game account. To purchase an item, you must provide the item id.
Required attributes
- Name
item_id- Type
- integer
- Description
The item to purchase.
Request
curl https://prod-app.themeparkshark.com/api/items/1/purchase \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
Response
{
"data": {
"id": 1,
"currency": {
"id": 1,
"name": "Coins",
"singular_name": "Coin"
},
"name": "Lollipop",
"cost": 100
}
}
Redeem an item
This endpoint allows you to redeem an item for your in-game account that is available at the player's current park. To redeem an item, you must provide the item id.
Required attributes
- Name
item_id- Type
- integer
- Description
The item to purchase.
Request
curl https://prod-app.themeparkshark.com/api/items/1/redeem \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
Response
{
"data": {
"id": 1,
"name": "Lollipop"
}
}
