POST api/v1/offers/cancel
Cancel specific offers or all offers matching certain criteria.
i. Request Example
{
"offerIds": [1001, 1002],
"isAll": false,
"parameters": {
"keywords": "gold",
"listingStatus": "active",
"productType": "currency",
"gameId": 1,
"serverId": 10,
"factionId": 5
}
}ii. Request Parameters
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| offerIds | int[] | No | Array of offer IDs to cancel. Required when isAll is false. |
| isAll | boolean | Yes | Whether to cancel all offers matching the filter criteria. When true, offerIds is not required. |
| parameters | object | No | Filter parameters to select offers when isAll is true. |
| parameters.keywords | string | No | Keywords to filter offers. |
| parameters.listingStatus | string | No | Listing status to filter offers (e.g., "active", "hidden", "closed"). |
| parameters.productType | string | No | Product type to filter offers (e.g., "currency", "items", "accounts", "powerleveling", "topup"). |
| parameters.gameId | int? | No | Game ID to filter offers. |
| parameters.serverId | int? | No | Server ID to filter offers. |
| parameters.factionId | int? | No | Faction ID to filter offers. If serverId is provided, this parameter will be ignored. |
iii. Response Example
Success Response (JSON)
{
"code": 10000,
"message": "Operation Successful.",
"requestId": "550e8400-e29b-41d4-a716-446655440000",
"data": {}
}
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| code | int | Response code. 10000 indicates success, other values indicate an error. |
| message | string | Response message. Contains error details on failure. |
| requestId | string | Unique identifier for the request, used for tracking. |
iv. Error Response Example
Error Response
{
"code": 10002,
"message": "Invalid parameter.",
"requestId": "550e8400-e29b-41d4-a716-446655440000"
}Common Error Codes
| Parameter | Type | Description |
|---|---|---|
| code | int | Error code. Common values: 10002 (Invalid parameter), 50001 (Internal server error). |
| message | string | Detailed error message explaining what went wrong. |
| requestId | string | Unique identifier for the request, used for tracking. |
Notes
- When
isAllis set totrue, theofferIdsparameter is ignored, and the action is applied to all offers matching the filter criteria specified inparameters. - When
isAllis set tofalse, you must provideofferIdsarray containing the specific offer IDs you want to hide or display. - The
flagparameter is case-insensitive but should be either "hide" or "display". - When the
parameters.serverIdparameter is provided, theparameters.factionIdparameter will be ignored.