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
| Name | Value |
|---|---|
| Content-Type | application/json |
| Authorization | Bearer <token> |
Response
Required arguments
| Param | Param Type | Type | Required | Description |
|---|---|---|---|---|
| product | body | { productId: number } | Yes | ProductId for which offer needs to be created |
| yourPrice | body | Number | No (Either yourPrice or retailPrice is required) | Selling price. Commission will be applied to this price. |
| retailPrice | body | Number | No (Either yourPrice or retailPrice is required) | Retail Price or Buy Box Price. Commission is subtracted from this price. |
Optional arguments
Case - Declared Stock
warning
- Either keys or declaredStock number should be provided in the request.
- Either yourPrice or retailPrice should be provided in the request.
| Param | Param Type | Type | Required | Description |
|---|---|---|---|---|
| product | body | { productId: number } | Yes | ProductId for which offer needs to be created |
| yourPrice | body | Number | No (Either yourPrice or retailPrice is required) | Selling price. Commission will be applied to this price. |
| retailPrice | body | Number | No (Either yourPrice or retailPrice is required) | Retail Price or Buy Box Price. Commission is subtracted from this price. |
| cogs | body | Number | No | Cost of purchasing a single key |
| keys | body | array<KeyUploadType>, see KeyUploadType | No | List of Keys to be uploaded - optional |
| declaredStock | body | Number | No | Number of keys to sell through declared stock feature - optional |
| wholesale | body | {"enabled":true,"tiers":[{"level":1,"discount":10},{"level":2,"discount":15}]} | No | Specifies wholesale enable status and tier-based discounts by purchase quantity. Wholesale Pricing Feature |
| automatePriceOptions | body | {"lowerPriceLimit":8.99,"upperPriceLimit":12.99,"priceChangeFactor":0.05,"priceChangeInterval":3600,"automatePriceStatus":"enable"} | No | configures automated price adjustments for an offer Automate Pricing |
Case - Direct Topup webhook
| Param | Param Type | Type | Required | Description |
|---|---|---|---|---|
| product | body | { productId: number } | Yes | ProductId for which offer needs to be created |
| yourPrice | body | Number | No (Either yourPrice or retailPrice is required) | Selling price. Commission will be applied to this price. |
| retailPrice | body | Number | No (Either yourPrice or retailPrice is required) | Retail Price or Buy Box Price. Commission is subtracted from this price. |
| cogs | body | Number | No | Cost of purchasing a single key |
| declaredStock | body | Number | Yes | Number of direct topup allowed for sell |
| automatePriceOptions | body | {"lowerPriceLimit":8.99,"upperPriceLimit":12.99,"priceChangeFactor":0.05,"priceChangeInterval":3600,"automatePriceStatus":"enable"} | No | configures 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.
| Param | Param Type | Type | Required | Description |
|---|---|---|---|---|
| product | body | { productId: number } | Yes | ProductId for which offer needs to be created |
| yourPrice | body | Number | No (Either yourPrice or retailPrice is required) | Selling price. Commission will be applied to this price. |
| retailPrice | body | Number | No (Either yourPrice or retailPrice is required) | Retail Price or Buy Box Price. Commission is subtracted from this price. |
| cogs | body | Number | No | Cost of purchasing a single key |
| keys | body | array<KeyUploadType>, see KeyUploadType | No | List of Keys to be uploaded - optional |
| auctionedKeys | body | Number | Yes | Maximum number of orders you can accept for a product (Only in preReleased products) |
KeyUploadType
| Param | Type | Required | Description |
|---|---|---|---|
| key | string | Yes | Key in plain text or In case of image keys, Send a base64 encoded string. For more info Read RFC 2397. |
| name | string | Yes, in case of image key | Name of key |
| type | string | Yes | Key format. supported values: text, image |
- 200
- 400
- 401
- 403
- 500
{
"message": "string",
"statusCode": 200,
"offer": {
"offerId": 0,
"productId": 0,
"yourPrice": 0,
"finalSellingPrice": 0,
"availableStock": 0
}
}
{
"message": "Bad Request. Wrong/Invalid params format.",
"statusCode": 400
}
{
"message": "UnAuthorized request. Invalid/Expired token",
"statusCode": 401
}
{
"message": "Forbidden Request. Action not allowed or Rate Limit exhausted.",
"statusCode": 403
}
{
"message": "Internal Server Error",
"statusCode": 500
}
POST https://services.driffle.com/api/seller/legacy/offer
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Authorization | header | string | Yes | Authorization token in Bearer <token> format. Example: Bearer dvakycjgw8liyd278y |
Request body (application/json)
Option 1
| Field | Type | Required | Description |
|---|---|---|---|
product | object | Yes | |
product.productId | number | Yes | |
yourPrice | number | No | |
retailPrice | number | No | |
cogs | number | No | Minimum: 0 |
keys | array of object | No | |
keys[].key | string | Yes | |
keys[].name | string | No | Optional |
keys[].type | string | Yes | Allowed: text, image |
auctionedKeys | number | No | Maximum number of keys to auction for Pre-order. Note: Only applicable with pre-order products. Minimum: 1. Maximum: 2000. Default: null. Nullable |
Option 2
| Field | Type | Required | Description |
|---|---|---|---|
product | object | Yes | |
product.productId | number | Yes | |
yourPrice | number | Yes | |
retailPrice | number | No | |
cogs | number | No | Minimum: 0 |
keys | array of object | No | |
keys[].key | string | Yes | |
keys[].name | string | No | Optional |
keys[].type | string | Yes | Allowed: text, image |
declaredStock | number | No | Total Number of Keys to auction From Declared Stock. Minimum: 0. Maximum: 100000. Default: null. Nullable |
Responses (application/json)
- 200
- 400
- 401
- 403
- 500
Default Response
| Field | Type | Required | Description |
|---|---|---|---|
message | string | No | |
statusCode | number | No | |
offer | object | No | |
offer.offerId | number | No | Id of the newly created offer |
offer.productId | number | No | Product ID, for which offer is created |
offer.yourPrice | number | No | Your price. Commission is calculated on this price |
offer.finalSellingPrice | number | No | Price after commission. Buyers will see this price |
offer.availableStock | number | No | Total available keys in stock |
Bad Request. Wrong/Invalid params format.
| Field | Type | Required | Description |
|---|---|---|---|
message | string | No | Response message |
statusCode | number | No | Response status code |
UnAuthorized request. Invalid/Expired token
| Field | Type | Required | Description |
|---|---|---|---|
message | string | No | Response message |
statusCode | number | No | Response status code |
Forbidden Request. Action not allowed or Rate Limit exhausted.
| Field | Type | Required | Description |
|---|---|---|---|
message | string | No | Response message |
statusCode | number | No | Response status code |
Server Error.
| Field | Type | Required | Description |
|---|---|---|---|
message | string | No | Response message |
statusCode | number | No | Response status code |
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
}
Sample response (200)
{
"message": "text",
"statusCode": 1,
"offer": {
"offerId": 1,
"productId": 1,
"yourPrice": 1,
"finalSellingPrice": 1,
"availableStock": 1
}
}
Last updated 7 January 2026