Update Offers
Update existing offers. Each offer type has its own update endpoint.
Update Account Offer
Update an existing account offer.
Endpoint
PUT /v1/offers/accounts/{id}
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Offer ID (UUID) |
Request Body
Send the full offer data with your changes.
| Field | Type | Required | Description |
|---|---|---|---|
title | string | Yes | Offer title |
description | string | Yes | Offer description |
price | string | Yes | Price in USD (format: 66.32) |
old_price | string|null | No | Previous price for showing discounts (format: 66.32) |
delivery_time | string | Yes | Estimated delivery time. Values: 5m, 20m, 1h, 5h, 12h, 1d, 2d, 3d, 7d, 14d, 28d |
qty_total | integer | Yes | Total number of accounts available |
qty_min | integer | Yes | Minimum purchase quantity |
attributes | array | Yes | Array of attribute objects |
accounts | array | Yes | Array of account objects (to add new accounts, set id to null) |
Request Example
curl -X PUT "https://sellerapi.ggchest.com/v1/offers/accounts/cc0e8400-e29b-41d4-a716-446655440030" \
-H "X-API-KEY: your-api-key-here" \
-H "Content-Type: application/json" \
-d '{
"title": "Updated Account Title",
"description": "Premium account with rare mounts.",
"price": "89.99",
"old_price": null,
"delivery_time": "5m",
"qty_total": 10,
"qty_min": 1,
"attributes": [],
"accounts": []
}'
Update Item Offer
Update an existing item offer.
Endpoint
PUT /v1/offers/items/{id}
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Offer ID (UUID) |
Request Body
Send the full offer data with your changes.
| Field | Type | Required | Description |
|---|---|---|---|
title | string | Yes | Offer title |
description | string | Yes | Offer description |
price | string | Yes | Price in USD (format: 66.32) |
old_price | string|null | No | Previous price for showing discounts (format: 66.32) |
delivery_time | string | Yes | Estimated delivery time. Values: 5m, 20m, 1h, 5h, 12h, 1d, 2d, 3d, 7d, 14d, 28d |
qty_total | integer | Yes | Total quantity of items available |
qty_min | integer | Yes | Minimum purchase quantity |
attributes | array | Yes | Array of attribute objects |
Request Example
curl -X PUT "https://sellerapi.ggchest.com/v1/offers/items/cc0e8400-e29b-41d4-a716-446655440040" \
-H "X-API-KEY: your-api-key-here" \
-H "Content-Type: application/json" \
-d '{
"title": "Legendary Sword +10",
"description": "Fully upgraded legendary sword.",
"price": "39.99",
"old_price": null,
"delivery_time": "5m",
"qty_total": 150,
"qty_min": 1,
"attributes": []
}'
Update Currency Offer
Update an existing currency offer.
Endpoint
PUT /v1/offers/currency/{id}
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Offer ID (UUID) |
Request Body
All fields are required except old_price. Send the full offer data with your changes.
| Field | Type | Required | Description |
|---|---|---|---|
title | string | Yes | Offer title |
description | string | Yes | Offer description |
price | string | Yes | Price in USD (format: 66.32) |
old_price | string|null | No | Previous price for showing discounts (format: 66.32) |
delivery_time | string | Yes | Estimated delivery time. Values: 5m, 20m, 1h, 5h, 12h, 1d, 2d, 3d, 7d, 14d, 28d |
qty_total | integer | Yes | Total quantity of currency available |
qty_min | integer | Yes | Minimum purchase quantity |
attributes | array | Yes | Array of attribute objects |
Request Example
curl -X PUT "https://sellerapi.ggchest.com/v1/offers/currency/cc0e8400-e29b-41d4-a716-446655440050" \
-H "X-API-KEY: your-api-key-here" \
-H "Content-Type: application/json" \
-d '{
"title": "100,000 Gold",
"description": "Fast and secure gold delivery.",
"price": "24.99",
"old_price": null,
"delivery_time": "5m",
"qty_total": 15000,
"qty_min": 100,
"attributes": []
}'
Response
All update endpoints return a 200 OK status on success with no response body.
Adding New Accounts to an Account Offer
async function addAccountsToOffer(offerId, newAccounts) {
// First, get the current offer
const getResponse = await fetch(
`https://sellerapi.ggchest.com/v1/offers/${offerId}`,
{
headers: {
'X-API-KEY': 'your-api-key-here'
}
}
);
const currentOffer = await getResponse.json();
// Merge existing accounts with new ones
const allAccounts = [
...(currentOffer.extra_properties.accounts || []),
...newAccounts.map(acc => ({
id: null, // null means new account
login: acc.login,
password: acc.password,
email_login: acc.email_login || null,
email_password: acc.email_password || null,
description: acc.description || null
}))
];
// Update the offer
const updateResponse = await fetch(
`https://sellerapi.ggchest.com/v1/offers/accounts/${offerId}`,
{
method: 'PUT',
headers: {
'X-API-KEY': 'your-api-key-here',
'Content-Type': 'application/json'
},
body: JSON.stringify({
qty_total: allAccounts.length,
accounts: allAccounts
})
}
);
return updateResponse.ok;
}
Error Responses
400 Bad Request
Returned when the request data is invalid.
{
"message": "Bad request",
"errors": [
{
"property": "price",
"message": "Price must match pattern ^[0-9]{1,16}(\\.[0-9]{1,2})?$"
}
]
}
403 Forbidden
Returned when you don't have permission to update this offer.
{
"message": "Forbidden"
}
404 Not Found
Returned when the offer ID is invalid or the offer doesn't exist.
{
"message": "Page not found"
}
422 Unprocessable Entity
Returned when the request is valid but cannot be processed.
{
"message": "Unprocessable Entity",
"errors": [
{
"property": "attributes",
"message": "Invalid attribute option combination"
}
]
}
Notes
- All fields except
old_priceare required; send the full offer payload with your changes - The
delivery_methodfield cannot be updated after offer creation - For account offers, to add new accounts, include them in the
accountsarray withid: null - To update existing accounts, include them with their existing
id - Price format must be a valid decimal number with up to 2 decimal places (e.g.,
89.99,100,0.50)