v1

latestOpenAPI 3.0.12026-07-247756110.6 KB
Discounts

Update discount

Update Discount

patch/draft_trips/{trip_uuid}/discounts/{id}

Path parameters

trip_uuidstring required
idstring required

ID of the discount

Request body

Example request

{
  "data": {
    "name": "TRIPDISCOUNT",
    "amount": 40,
    "quantity": 10,
    "discount_type": "percentage",
    "duration": {
      "duration_reference": "absolute",
      "start_date": "2025-08-01",
      "end_date": "2025-08-15",
      "start_offset_days": 30,
      "end_offset_days": 20
    }
  }
}

Response

Successfully updated

Example response

{
  "data": {
    "id": "2510177931054358528",
    "name": "TRIPDISCOUNT",
    "amount": 40,
    "quantity": 10,
    "discount_type": "percentage",
    "duration": {
      "duration_reference": "absolute",
      "start_date": "2025-08-01",
      "end_date": "2025-08-15",
      "start_offset_days": 30,
      "end_offset_days": 20
    },
    "created_at": 1445443
  }
}