Skip to main content

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

FieldTypeRequiredDescription
game_idstringYesGame identifier (UUID)
titlestringYesOffer title
descriptionstringYesOffer description
pricestringYesPrice in USD (format: 66.32, max 19 chars, pattern: ^[0-9]{1,16}(\.[0-9]{1,2})?$)
old_pricestring|nullNoPrevious price for showing discounts (format: 66.32, max 19 chars, pattern: ^[0-9]{1,16}(\.[0-9]{1,2})?$)
delivery_methodstringYesDelivery method: manual or auto
delivery_timestringYesEstimated delivery time. Values: 5m, 20m, 1h, 5h, 12h, 1d, 2d, 3d, 7d, 14d, 28d
qty_totalintegerYesTotal number of accounts available
qty_minintegerYesMinimum purchase quantity
attributesarrayYesArray of attribute objects
attributes[].idstringYesAttribute identifier
attributes[].option_idstringYesSelected option identifier for this attribute
accountsarrayYesArray of account objects
accounts[].loginstringYesAccount login/username
accounts[].passwordstringYesAccount password
accounts[].email_loginstring|nullNoEmail login (if email access is included)
accounts[].email_passwordstring|nullNoEmail password (if email access is included)
accounts[].descriptionstring|nullNoAdditional 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

FieldTypeDescription
idstringCreated offer identifier (UUID)

Account Offer Notes

  • The qty_total should match the number of accounts in the accounts array
  • All accounts must have login and password fields
  • Email credentials (email_login, email_password) are optional
  • The offer will be created in draft status 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

FieldTypeRequiredDescription
game_idstringYesGame identifier (UUID)
game_currency_idstringYesCurrency identifier (UUID) - obtained from /v1/games/{id}/currency
titlestringYesOffer title
descriptionstringYesOffer description
pricestringYesPrice in USD (format: 66.32, max 19 chars, pattern: ^[0-9]{1,16}(\.[0-9]{1,2})?$)
old_pricestring|nullNoPrevious price for showing discounts (format: 66.32, max 19 chars, pattern: ^[0-9]{1,16}(\.[0-9]{1,2})?$)
delivery_timestringYesEstimated delivery time. Values: 5m, 20m, 1h, 5h, 12h, 1d, 2d, 3d, 7d, 14d, 28d
qty_totalintegerYesTotal quantity of currency available
qty_minintegerYesMinimum purchase quantity
attributesarrayYesArray of attribute objects
attributes[].idstringYesAttribute identifier
attributes[].option_idstringYesSelected 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

FieldTypeDescription
idstringCreated 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_id which must be obtained from the Game Currencies endpoint
  • The qty_total represents the total amount of currency available (e.g., 10000 gold)
  • The qty_min is the minimum amount a buyer can purchase
  • Currency offers don't have a delivery_method field
  • The offer will be created in draft status 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

FieldTypeRequiredDescription
game_idstringYesGame identifier (UUID)
titlestringYesOffer title
descriptionstringYesOffer description
pricestringYesPrice in USD (format: 66.32, max 19 chars, pattern: ^[0-9]{1,16}(\.[0-9]{1,2})?$)
old_pricestring|nullNoPrevious price for showing discounts (format: 66.32, max 19 chars, pattern: ^[0-9]{1,16}(\.[0-9]{1,2})?$)
delivery_methodstringYesDelivery method: manual or auto
delivery_timestringNoEstimated delivery time. Values: 5m, 20m, 1h, 5h, 12h, 1d, 2d, 3d, 7d, 14d, 28d
qty_totalintegerYesTotal quantity of items available
qty_minintegerYesMinimum purchase quantity
attributesarrayYesArray of attribute objects
attributes[].idstringYesAttribute identifier
attributes[].option_idstringYesSelected option identifier for this attribute
itemsarrayYesArray of account objects
items[].delivery_infostringYesItem 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

FieldTypeDescription
idstringCreated offer identifier (UUID)

Item Offer Notes

  • Item offers don't require individual item data like account offers
  • The qty_total represents the total stock available for this item if manual delivery selected
  • The qty_total should match the number of accounts in the items array if auto delivery selected
  • The delivery_time is required for manual delivery only
  • The offer will be created in draft status 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"
}
]
}