Create Offers
This guide covers creating different types of offers: account offers, currency offers, and item offers.
Create Account Offer
Create a new account offer for selling game accounts.
Endpoint
POST /v1/offers/accounts
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
game_id | string | Yes | Game identifier (UUID) |
title | string | Yes | Offer title |
description | string | Yes | Offer description |
price | string | Yes | Price in USD (format: 66.32, max 19 chars, pattern: ^[0-9]{1,16}(\.[0-9]{1,2})?$) |
old_price | string|null | No | Previous price for showing discounts (format: 66.32, max 19 chars, pattern: ^[0-9]{1,16}(\.[0-9]{1,2})?$) |
delivery_method | string | Yes | Delivery method: manual or auto |
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 |
attributes[].id | string | Yes | Attribute identifier |
attributes[].option_id | string | Yes | Selected option identifier for this attribute |
accounts | array | Yes | Array of account objects |
accounts[].login | string | Yes | Account login/username |
accounts[].password | string | Yes | Account password |
accounts[].email_login | string|null | No | Email login (if email access is included) |
accounts[].email_password | string|null | No | Email password (if email access is included) |
accounts[].description | string|null | No | Additional description for this account |
Request Example
curl -X POST "https://sellerapi.ggchest.com/v1/offers/accounts" \
-H "X-API-KEY: your-api-key-here" \
-H "Content-Type: application/json" \
-d '{
"game_id": "550e8400-e29b-41d4-a716-446655440000",
"title": "World of Warcraft Level 60 Account",
"description": "Premium account with rare mounts and achievements. Fully verified and secure.",
"price": "99.99",
"delivery_method": "auto",
"delivery_time": null,
"qty_total": 5,
"qty_min": 1,
"attributes": [
{
"id": "aa0e8400-e29b-41d4-a716-446655440020",
"option_id": "bb0e8400-e29b-41d4-a716-446655440021"
},
{
"id": "aa0e8400-e29b-41d4-a716-446655440024",
"option_id": "bb0e8400-e29b-41d4-a716-446655440025"
}
],
"accounts": [
{
"login": "player123",
"password": "SecurePassword123!",
"email_login": "[email protected]",
"email_password": "EmailPass123",
"description": "Account with rare mount collection"
},
{
"login": "player456",
"password": "AnotherSecurePass456!",
"email_login": null,
"email_password": null,
"description": "High-level character account"
}
]
}'
Response Example
{
"id": "cc0e8400-e29b-41d4-a716-446655440030"
}
Response Fields
| Field | Type | Description |
|---|---|---|
id | string | Created offer identifier (UUID) |
Account Offer Notes
- The
qty_totalshould match the number of accounts in theaccountsarray - All accounts must have
loginandpasswordfields - Email credentials (
email_login,email_password) are optional - The offer will be created in
draftstatus by default. Use the activate endpoint to make it active - Price format must be a valid decimal number with up to 2 decimal places (e.g.,
99.99,100,0.50)
Account Offer Error Responses
400 Bad Request
Returned when required fields are missing or 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 create offers.
{
"message": "Forbidden"
}
422 Unprocessable Entity
Returned when the request is valid but cannot be processed (e.g., invalid game ID, attribute mismatch).
{
"message": "Unprocessable Entity",
"errors": [
{
"property": "game_id",
"message": "Game not found"
}
]
}
Create Currency Offer
Create a new currency offer for selling in-game currency (gold, coins, etc.).
Endpoint
POST /v1/offers/currency
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
game_id | string | Yes | Game identifier (UUID) |
game_currency_id | string | Yes | Currency identifier (UUID) - obtained from /v1/games/{id}/currency |
title | string | Yes | Offer title |
description | string | Yes | Offer description |
price | string | Yes | Price in USD (format: 66.32, max 19 chars, pattern: ^[0-9]{1,16}(\.[0-9]{1,2})?$) |
old_price | string|null | No | Previous price for showing discounts (format: 66.32, max 19 chars, pattern: ^[0-9]{1,16}(\.[0-9]{1,2})?$) |
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 |
attributes[].id | string | Yes | Attribute identifier |
attributes[].option_id | string | Yes | Selected option identifier for this attribute |
Request Example
curl -X POST "https://sellerapi.ggchest.com/v1/offers/currency" \
-H "X-API-KEY: your-api-key-here" \
-H "Content-Type: application/json" \
-d '{
"game_id": "550e8400-e29b-41d4-a716-446655440000",
"game_currency_id": "880e8400-e29b-41d4-a716-446655440010",
"title": "100,000 Gold",
"description": "Fast and secure gold delivery. Instant transfer available.",
"price": "29.99",
"delivery_time": "5m",
"qty_total": 10000,
"qty_min": 100,
"attributes": [
{
"id": "aa0e8400-e29b-41d4-a716-446655440020",
"option_id": "bb0e8400-e29b-41d4-a716-446655440021"
}
]
}'
Response Example
{
"id": "cc0e8400-e29b-41d4-a716-446655440050"
}
Response Fields
| Field | Type | Description |
|---|---|---|
id | string | Created offer identifier (UUID) |
Complete Example: Getting Currency First
async function createCurrencyOfferWithValidation(gameId, currencyName, offerData) {
// Step 1: Get available currencies for this game
const currenciesResponse = await fetch(
`https://sellerapi.ggchest.com/v1/games/${gameId}/currency`,
{
headers: {
'X-API-KEY': 'your-api-key-here'
}
}
);
const currencies = await currenciesResponse.json();
// Step 2: Find the currency by name
const currency = currencies.find(c => c.name === currencyName);
if (!currency) {
throw new Error(`Currency "${currencyName}" not found for this game`);
}
// Step 3: Get available attributes
const attributesResponse = await fetch(
`https://sellerapi.ggchest.com/v1/games/${gameId}/currency/attributes`,
{
headers: {
'X-API-KEY': 'your-api-key-here'
}
}
);
const availableAttributes = await attributesResponse.json();
// Step 4: Create the offer with currency ID
const response = await fetch(
'https://sellerapi.ggchest.com/v1/offers/currency',
{
method: 'POST',
headers: {
'X-API-KEY': 'your-api-key-here',
'Content-Type': 'application/json'
},
body: JSON.stringify({
...offerData,
game_id: gameId,
game_currency_id: currency.id,
attributes: offerData.attributes || []
})
}
);
if (!response.ok) {
const error = await response.json();
throw new Error(`Failed to create offer: ${JSON.stringify(error)}`);
}
return await response.json();
}
// Usage
const offer = await createCurrencyOfferWithValidation(
'550e8400-e29b-41d4-a716-446655440000',
'Gold',
{
title: '100,000 Gold',
description: 'Fast and secure gold delivery',
price: '29.99',
delivery_time: '5m',
qty_total: 10000,
qty_min: 100,
attributes: [
{
id: 'aa0e8400-e29b-41d4-a716-446655440020',
option_id: 'bb0e8400-e29b-41d4-a716-446655440021'
}
]
}
);
Currency Offer Notes
- Currency offers require a
game_currency_idwhich must be obtained from the Game Currencies endpoint - The
qty_totalrepresents the total amount of currency available (e.g., 10000 gold) - The
qty_minis the minimum amount a buyer can purchase - Currency offers don't have a
delivery_methodfield - The offer will be created in
draftstatus by default. Use the activate endpoint to make it active - Price format must be a valid decimal number with up to 2 decimal places (e.g.,
29.99,100,0.50)
Currency Offer Error Responses
400 Bad Request
Returned when required fields are missing or invalid.
{
"message": "Bad request",
"errors": [
{
"property": "game_currency_id",
"message": "Game currency ID is required"
}
]
}
403 Forbidden
Returned when you don't have permission to create offers.
{
"message": "Forbidden"
}
422 Unprocessable Entity
Returned when the request is valid but cannot be processed (e.g., invalid game ID, invalid currency ID, attribute mismatch).
{
"message": "Unprocessable Entity",
"errors": [
{
"property": "game_currency_id",
"message": "Currency not found for this game"
}
]
}
Create Item Offer
Create a new item offer for selling in-game items or virtual goods.
Endpoint
POST /v1/offers/items
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
game_id | string | Yes | Game identifier (UUID) |
title | string | Yes | Offer title |
description | string | Yes | Offer description |
price | string | Yes | Price in USD (format: 66.32, max 19 chars, pattern: ^[0-9]{1,16}(\.[0-9]{1,2})?$) |
old_price | string|null | No | Previous price for showing discounts (format: 66.32, max 19 chars, pattern: ^[0-9]{1,16}(\.[0-9]{1,2})?$) |
delivery_method | string | Yes | Delivery method: manual or auto |
delivery_time | string | No | 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 |
attributes[].id | string | Yes | Attribute identifier |
attributes[].option_id | string | Yes | Selected option identifier for this attribute |
items | array | Yes | Array of account objects |
items[].delivery_info | string | Yes | Item to delivery e.g. code |
Request Example
curl -X POST "https://sellerapi.ggchest.com/v1/offers/items" \
-H "X-API-KEY: your-api-key-here" \
-H "Content-Type: application/json" \
-d '{
"game_id": "550e8400-e29b-41d4-a716-446655440000",
"title": "Legendary Sword +10",
"description": "Fully upgraded legendary sword with maximum stats. Perfect for end-game content.",
"price": "49.99",
"delivery_method": "auto",
"qty_total": 100,
"qty_min": 1,
"attributes": [
{
"id": "aa0e8400-e29b-41d4-a716-446655440020",
"option_id": "bb0e8400-e29b-41d4-a716-446655440021"
},
{
"id": "aa0e8400-e29b-41d4-a716-446655440050",
"option_id": "bb0e8400-e29b-41d4-a716-446655440051"
}
]
}'
Response Example
{
"id": "cc0e8400-e29b-41d4-a716-446655440040"
}
Response Fields
| Field | Type | Description |
|---|---|---|
id | string | Created offer identifier (UUID) |
Item Offer Notes
- Item offers don't require individual item data like account offers
- The
qty_totalrepresents the total stock available for this item if manual delivery selected - The
qty_totalshould match the number of accounts in theitemsarray if auto delivery selected - The
delivery_timeis required for manual delivery only - The offer will be created in
draftstatus by default. Use the activate endpoint to make it active - Price format must be a valid decimal number with up to 2 decimal places (e.g.,
49.99,100,0.50)
Item Offer Error Responses
400 Bad Request
Returned when required fields are missing or 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 create offers.
{
"message": "Forbidden"
}
422 Unprocessable Entity
Returned when the request is valid but cannot be processed (e.g., invalid game ID, attribute mismatch).
{
"message": "Unprocessable Entity",
"errors": [
{
"property": "attributes",
"message": "Invalid attribute option combination"
}
]
}