Get Product Commission
Gets the commission on a single product.
Supported arguments
The following arguments are supported by this API:
POST /product/commission
Headers
| Name | Value |
|---|---|
| Content-Type | application/json |
| Authorization | Bearer <token> |
Params
| Param | Param Tpe | Type | Required | Description |
|---|---|---|---|---|
| productId | body | Number | Yes | The ID of the product |
| sellingPrice | body | Number | Yes | "Retail Price" / "Selling Price" is the price after commission. Buyers will see this price |
Response
- 200
- 400
- 401
- 403
- 500
{
"statusCode": 200,
"message": "string",
"data": {
"commission": {
"amount": "number"
"currency": "string"
},
"sellingPrice": {
"amount": "number"
"currency": "string"
},
"youGetPrice": {
"amount": "number"
"currency": "string"
},
}
}
{
"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/product/commission
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Authorization | header | string | Yes | Authorization token in Bearer <token> format. Example: Bearer dvakycjgw8liyd278y |
Request body (application/json)
| Field | Type | Required | Description |
|---|---|---|---|
productId | number | Yes | |
sellingPrice | number | Yes |
Responses (application/json)
- 200
- 400
- 401
- 403
- 500
Default Response
| Field | Type | Required | Description |
|---|---|---|---|
message | string | No | |
status | number | No | |
data | object | No | |
data.commission | object | No | |
data.commission.amount | number | No | |
data.commission.currency | string | No | |
data.sellingPrice | object | No | |
data.sellingPrice.amount | number | No | |
data.sellingPrice.currency | string | No | |
data.youGetPrice | object | No | |
data.youGetPrice.amount | number | No | |
data.youGetPrice.currency | string | No |
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/product/commission HTTP/1.1
Host: services.driffle.com
Authorization: text
Content-Type: application/json
Accept: */*
Content-Length: 32
{
"productId": 1,
"sellingPrice": 1
}
Sample response (200)
{
"message": "text",
"status": 1,
"data": {
"commission": {
"amount": 1,
"currency": "text"
},
"sellingPrice": {
"amount": 1,
"currency": "text"
},
"youGetPrice": {
"amount": 1,
"currency": "text"
}
}
}
Last updated 5 June 2024