Add item to cart
curl --request POST \
--url https://api.mannco.store/cart/add \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"assetId": "987654321"
}
'import requests
url = "https://api.mannco.store/cart/add"
payload = { "assetId": "987654321" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({assetId: '987654321'})
};
fetch('https://api.mannco.store/cart/add', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"err": false,
"success": true,
"content": {
"cart": [
{
"cartId": 43,
"assetId": "987654321",
"count": 1,
"item_id": 5678,
"price": 15000
}
]
}
}{
"err": true,
"success": false,
"content": "Error message"
}{
"err": true,
"success": false,
"content": "forbidden"
}{
"err": true,
"success": false,
"content": "Internal server error"
}Cart
Add item to cart
Adds a single item to the cart by its asset ID. The item must be for sale (state = 1) and not owned by you. The price is stored at add time.
Permission: Connected + API.
POST
/
cart
/
add
Add item to cart
curl --request POST \
--url https://api.mannco.store/cart/add \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"assetId": "987654321"
}
'import requests
url = "https://api.mannco.store/cart/add"
payload = { "assetId": "987654321" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({assetId: '987654321'})
};
fetch('https://api.mannco.store/cart/add', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"err": false,
"success": true,
"content": {
"cart": [
{
"cartId": 43,
"assetId": "987654321",
"count": 1,
"item_id": 5678,
"price": 15000
}
]
}
}{
"err": true,
"success": false,
"content": "Error message"
}{
"err": true,
"success": false,
"content": "forbidden"
}{
"err": true,
"success": false,
"content": "Internal server error"
}Authorizations
JWT obtained from POST /user/login
Body
application/json
Steam asset ID of the item to add
Response
Added
Standard Mannco.store response envelope. err and success flag the outcome; the payload (or error message) is always under content.