Shop Inventory
Inventory of each webshop can be managed by API note that inventory is shared between the quickshop and the webshop of a specific brand.
List all inventory
This endpoint allows you to fetch the current inventory of a shop.
Required headers
- Name
Authorization
- Type
- string
- Description
The token itself as a bearer token.
Abilities
- Name
shops.inventory.get
- Type
- string
- Description
The scope required to access this endpoint.
Route parameters
- Name
identifier
- Type
- string
- Description
The identifier of the shop.
Request
curl -X GET https://api.walletapp.co/shops/:identifier/inventory
-H "Content-Type: application/json"
-H "Accept: application/json"
-H "Authorization: Bearer <your_token>"
Response
{
"message": "Request successful",
"products": [
{
"brand_id": "<shop_identifier>",
"product_id": "<product_id>",
"price": 0,
"points": 0,
"order": 1,
"title": "<product_title>",
"stock": 0,
"use_stock": 0
}
...
],
"coupons": [],
"online_offers": []
}
Add an inventory item
This endpoint allows you to add items to the current inventory.
Required headers
- Name
Authorization
- Type
- string
- Description
The token itself as a bearer token.
Abilities
- Name
shops.inventory.store
- Type
- string
- Description
The scope required to access this endpoint.
Route parameters
- Name
identifier
- Type
- string|Required
- Description
The identifier of the brand.
Body parameters
- Name
product_type
- Type
- string|Required
- Description
The type of the product that you are about to add. Possible values are:
sponsor_offer
,product
,coupon
.
- Name
product_id
- Type
- string|Required
- Description
The identifier of the product.
- Name
order
- Type
- integer
- Description
The order in which the product is displayed in the shop. works with integers, example if you want it in the first position provide:
1
.
- Name
price
- Type
- float
- Description
The specific price you want to sell the product for in this shop. Does not apply to
sponsor offers
.
- Name
points
- Type
- integer
- Description
The specific amount of points you want to sell the product for. Does not apply to
sponsor offers
.
Request
curl -X POST https://api.walletapp.co/shops/:identifier/inventory
-H "Content-Type: application/json"
-H "Accept: application/json"
-H "Authorization: Bearer <your_token>"
- d '{
"product_type": "sponsor_offer",
"product_id": "<UUID>",
"order": 1,
"price": 0,
"points": 0
}'
Response
{
"message": "Request successful",
"data": "Product added to the shops inventory"
}
Update an inventory item
This endpoint allows you to update items that are in the current inventory.
Required headers
- Name
Authorization
- Type
- string
- Description
The token itself as a bearer token.
Abilities
- Name
shops.inventory.update
- Type
- string
- Description
The scope required to access this endpoint.
Route parameters
- Name
identifier
- Type
- string|Required
- Description
The identifier of the brand.
Body parameters
- Name
product_type
- Type
- string|Required
- Description
The type of the product that you are about to add. Possible values are:
sponsor_offer
,product
,coupon
.
- Name
product_id
- Type
- string|Required
- Description
The identifier of the product.
- Name
order
- Type
- integer
- Description
The order in which the product is displayed in the shop. works with integers, example if you want it in the first position provide:
1
.
- Name
price
- Type
- float
- Description
The specific price you want to sell the product for in this shop. Does not apply to
sponsor offers
.
- Name
points
- Type
- integer
- Description
The specific amount of points you want to sell the product for. Does not apply to
sponsor offers
.
Request
curl -X PUT https://api.walletapp.co/shops/:identifier/inventory
-H "Content-Type: application/json"
-H "Accept: application/json"
-H "Authorization: Bearer <your_token>"
- d '{
"product_type": "sponsor_offer",
"product_id": "<UUID>",
"order": 1,
"price": 0,
"points": 0
}'
Response
{
"message": "Request successful",
"data": "Product inventory item updated"
}
Remove an inventory item
This endpoint allows you to remove items that are in the current inventory.
Required headers
- Name
Authorization
- Type
- string
- Description
The token itself as a bearer token.
Abilities
- Name
shops.inventory.delete
- Type
- string
- Description
The scope required to access this endpoint.
Route parameters
- Name
identifier
- Type
- string|Required
- Description
The identifier of the brand.
Body parameters
- Name
product_type
- Type
- string|Required
- Description
The type of the product that you are about to add. Possible values are:
sponsor_offer
,product
,coupon
.
- Name
product_id
- Type
- string|Required
- Description
The identifier of the product.
Request
curl -X DELETE https://api.walletapp.co/shops/:identifier/inventory
-H "Content-Type: application/json"
-H "Accept: application/json"
-H "Authorization: Bearer <your_token>"
- d '{
"product_type": "sponsor_offer",
"product_id": "<UUID>"
}'
Response
{
"message": "Request successful",
"data": "Product removed from inventory"
}