Skip to main content

Postpone Auction

Postpones an auction by updating its start and end times.

  • URI: /api/Auctions/{id}/postpone
  • Method: POST
  • Authentication: Required (JWT)
  • Permission Required: Auctions.Update (default value: "AuctionR:Auctions:Update")

🔐 Permission values are configurable via the Permissions section in appsettings.json.


Route Parameters

FieldTypeRequiredDescription
idintYesID of the auction to postpone

Request Body

Content-Type: application/json

FieldTypeRequiredDescription
auctionIdintYesID of the auction being postponed (should match route id)
userIdintYesID of the user requesting postponement (typically the owner)
startTimestringYesNew auction start time (ISO 8601 format)
endTimestringYesNew auction end time (ISO 8601 format)

Sample Request

POST /api/Auctions/789/postpone HTTP/1.1
Authorization: Bearer {your_jwt_token}
Content-Type: application/json

{
"auctionId": 789,
"userId": 456,
"startTime": "2025-06-10T14:00:00Z",
"endTime": "2025-06-12T14:00:00Z"
}

Response

Status Code: 200 OK

Response Body Example

{
"success": true,
"message": "Auction postponed successfully.",
"data": null
}

Possible Error Responses

Status CodeMeaningWhen it Happens
400Bad RequestInput validation fails (e.g., missing/invalid fields)
401UnauthorizedJWT is missing or invalid
403ForbiddenCaller does not have permission to update auctions or caller's ID doesn't match the auction's owner ID
429Too Many RequestsRate limiting exceeded
500Internal Server ErrorUnexpected server-side error