Skip to main content

Create a new offer

configures automated price adjustments for an offerconfigures automated price adjustments for an offerconfigures automated price adjustments for an offeThe following API allow you to create a new offer/auction on Driffle.

POST /offer

Headers

NameValue
Content-Typeapplication/json
AuthorizationBearer <token>

Response

Required arguments​

ParamParam TypeTypeRequiredDescription
productbody{ productId: number }YesProductId for which offer needs to be created
yourPricebodyNumberNo (Either yourPrice or retailPrice is required)Selling price. Commission will be applied to this price.
retailPricebodyNumberNo (Either yourPrice or retailPrice is required)Retail Price or Buy Box Price. Commission is subtracted from this price.

Optional arguments​

Case - Declared Stock​

warning
  1. Either keys or declaredStock number should be provided in the request.
  2. Either yourPrice or retailPrice should be provided in the request.
ParamParam TypeTypeRequiredDescription
productbody{ productId: number }YesProductId for which offer needs to be created
yourPricebodyNumberNo (Either yourPrice or retailPrice is required)Selling price. Commission will be applied to this price.
retailPricebodyNumberNo (Either yourPrice or retailPrice is required)Retail Price or Buy Box Price. Commission is subtracted from this price.
cogsbodyNumberNoCost of purchasing a single key
keysbodyarray<KeyUploadType>, see KeyUploadTypeNoList of Keys to be uploaded - optional
declaredStockbodyNumberNoNumber of keys to sell through declared stock feature - optional
wholesalebody{"enabled":true,"tiers":[{"level":1,"discount":10},{"level":2,"discount":15}]}NoSpecifies wholesale enable status and tier-based discounts by purchase quantity.
Wholesale Pricing Feature
automatePriceOptionsbody{"lowerPriceLimit":8.99,"upperPriceLimit":12.99,"priceChangeFactor":0.05,"priceChangeInterval":3600,"automatePriceStatus":"enable"}Noconfigures automated price adjustments for an offer Automate Pricing

Case - Direct Topup webhook​

ParamParam TypeTypeRequiredDescription
productbody{ productId: number }YesProductId for which offer needs to be created
yourPricebodyNumberNo (Either yourPrice or retailPrice is required)Selling price. Commission will be applied to this price.
retailPricebodyNumberNo (Either yourPrice or retailPrice is required)Retail Price or Buy Box Price. Commission is subtracted from this price.
cogsbodyNumberNoCost of purchasing a single key
declaredStockbodyNumberYesNumber of direct topup allowed for sell
automatePriceOptionsbody{"lowerPriceLimit":8.99,"upperPriceLimit":12.99,"priceChangeFactor":0.05,"priceChangeInterval":3600,"automatePriceStatus":"enable"}Noconfigures automated price adjustments for an offer Automate Pricing

Case - Pre-Order Product​

warning
Declared stock is now available for pre-order products.

For more details, see the Pre-Order-Declare-Stock documentation.

ParamParam TypeTypeRequiredDescription
productbody{ productId: number }YesProductId for which offer needs to be created
yourPricebodyNumberNo (Either yourPrice or retailPrice is required)Selling price. Commission will be applied to this price.
retailPricebodyNumberNo (Either yourPrice or retailPrice is required)Retail Price or Buy Box Price. Commission is subtracted from this price.
cogsbodyNumberNoCost of purchasing a single key
keysbodyarray<KeyUploadType>, see KeyUploadTypeNoList of Keys to be uploaded - optional
auctionedKeysbodyNumberYesMaximum number of orders you can accept for a product (Only in preReleased products)

KeyUploadType​

ParamTypeRequiredDescription
keystringYesKey in plain text or In case of image keys, Send a base64 encoded string. For more info Read RFC 2397.
namestringYes, in case of image keyName of key
typestringYesKey format. supported values: text, image
{
"message": "string",
"statusCode": 200,
"offer": {
"offerId": 0,
"productId": 0,
"yourPrice": 0,
"finalSellingPrice": 0,
"availableStock": 0
}
}

POST https://services.driffle.com/api/seller/legacy/offer

Parameters

NameInTypeRequiredDescription
AuthorizationheaderstringYesAuthorization token in Bearer <token> format. Example: Bearer dvakycjgw8liyd278y

Request body (application/json)

Option 1

FieldTypeRequiredDescription
productobjectYes
product.productIdnumberYes
yourPricenumberNo
retailPricenumberNo
cogsnumberNoMinimum: 0
keysarray of objectNo
keys[].keystringYes
keys[].namestringNoOptional
keys[].typestringYesAllowed: text, image
auctionedKeysnumberNoMaximum number of keys to auction for Pre-order. Note: Only applicable with pre-order products. Minimum: 1. Maximum: 2000. Default: null. Nullable

Option 2

FieldTypeRequiredDescription
productobjectYes
product.productIdnumberYes
yourPricenumberYes
retailPricenumberNo
cogsnumberNoMinimum: 0
keysarray of objectNo
keys[].keystringYes
keys[].namestringNoOptional
keys[].typestringYesAllowed: text, image
declaredStocknumberNoTotal Number of Keys to auction From Declared Stock. Minimum: 0. Maximum: 100000. Default: null. Nullable

Responses (application/json)

Default Response

FieldTypeRequiredDescription
messagestringNo
statusCodenumberNo
offerobjectNo
offer.offerIdnumberNoId of the newly created offer
offer.productIdnumberNoProduct ID, for which offer is created
offer.yourPricenumberNoYour price. Commission is calculated on this price
offer.finalSellingPricenumberNoPrice after commission. Buyers will see this price
offer.availableStocknumberNoTotal available keys in stock

Sample request

POST /api/seller/legacy/offer HTTP/1.1
Host: services.driffle.com
Authorization: text
Content-Type: application/json
Accept: */*
Content-Length: 139

{
"product": {
"productId": 1
},
"yourPrice": 1,
"retailPrice": 1,
"cogs": 1,
"keys": [
{
"key": "text",
"name": "text",
"type": "text"
}
],
"auctionedKeys": null
}

Test it →

Sample response (200)

{
"message": "text",
"statusCode": 1,
"offer": {
"offerId": 1,
"productId": 1,
"yourPrice": 1,
"finalSellingPrice": 1,
"availableStock": 1
}
}

Last updated 7 January 2026