Skip to main content

Icon Management

Attach and manage icons for your offers. Icons help make your offers more attractive and visible to buyers.

Attach Icon to Offer​

Upload and attach an icon image to a specific offer.

Endpoint​

POST /v1/offers/{id}/icon

Path Parameters​

ParameterTypeRequiredDescription
idstringYesOffer ID (UUID)

Request Body​

The request must be sent as multipart/form-data.

FieldTypeRequiredDescription
iconfileYesImage file to upload

Request Example​

curl -X POST "https://sellerapi.ggchest.com/v1/offers/cc0e8400-e29b-41d4-a716-446655440030/icon" \
-H "X-API-KEY: your-api-key-here" \
-F "icon=@/path/to/icon.png"

Response Example​

{
"file_id": "ff0e8400-e29b-41d4-a716-446655440060",
"path": "https://cdn.ggchest.com/offers/icons/ff0e8400-e29b-41d4-a716-446655440060.png"
}

Response Fields​

FieldTypeDescription
file_idstringIcon file identifier (UUID)
pathstringURL to the uploaded icon image

Delete Offer Icon​

Remove an icon from an offer.

Endpoint​

DELETE /v1/offers/{offerId}/icon/{iconId}

Path Parameters​

ParameterTypeRequiredDescription
offerIdstringYesOffer ID (UUID)
iconIdstringYesIcon ID (UUID) - obtained from the attach response

Request Example​

curl -X DELETE "https://sellerapi.ggchest.com/v1/offers/cc0e8400-e29b-41d4-a716-446655440030/icon/ff0e8400-e29b-41d4-a716-446655440060" \
-H "X-API-KEY: your-api-key-here"

Response​

Returns 200 OK on success with no response body.

Complete Example: Replace Offer Icon​

async function replaceOfferIcon(offerId, newIconFile) {
// Step 1: Get current offer to check if it has an icon
const getResponse = await fetch(
`https://sellerapi.ggchest.com/v1/offers/${offerId}`,
{
headers: {
'X-API-KEY': 'your-api-key-here'
}
}
);
const offer = await getResponse.json();

// Step 2: Delete old icon if it exists
if (offer.icon && offer.icon.id) {
await deleteOfferIcon(offerId, offer.icon.id);
}

// Step 3: Upload new icon
const result = await attachIconToOffer(offerId, newIconFile);
return result;
}

Error Responses​

400 Bad Request​

Returned when the file is missing or invalid.

{
"message": "Bad request"
}

403 Forbidden​

Returned when you don't have permission to manage icons for this offer.

{
"message": "Forbidden"
}

404 Not Found​

Returned when the offer ID or icon ID is invalid.

{
"message": "Page not found"
}

Notes​

  • Supported image formats: PNG, JPG, JPEG, GIF, WebP
  • Recommended icon size: 512x512 pixels or larger
  • Maximum file size: Check with support for current limits
  • Icons are automatically resized and optimized by the platform
  • Each offer can have one icon at a time. Uploading a new icon replaces the existing one
  • Icons help improve offer visibility and conversion rates