Appearance
Offers API
Manage offers and offer applications.
Endpoints
| Method | Endpoint |
|---|---|
| POST | /api/v1/offers |
| GET | /api/v1/offers |
| GET | /api/v1/offers/ |
| PUT | /api/v1/offers/ |
| DELETE | /api/v1/offers/ |
| POST | /api/v1/offers/{offerId}/applications |
| GET | /api/v1/offers/applications |
| GET | /api/v1/offers/applications/ |
| PUT | /api/v1/offers/applications/{applicationId}/status |
Create Offer Fields
| Field | Type | Required | Description |
|---|---|---|---|
| offer_type | string | ✅ Yes | Hotel, Flight, Package_Tour, Visa, Tour |
| quota | int | ✅ Yes | Minimum 1 |
| country | string | ✅ Yes | Country |
| city | string | ✅ Yes | City |
| min_people | int | ✅ Yes | Minimum 1 |
| max_people | int | ✅ Yes | Minimum 1 |
| price_per_person | number | ✅ Yes | >= 0 |
| valid_until | string | ✅ Yes | RFC3339 or 2006-01-02 |
| description | string | No | Description |
| image_url | string | No | Image URL |
| status | string | No | Active, Inactive, Suspended, Waiting |
| is_active | boolean | No | Active flag |
| search_vector | string | No | Search string |
| title | string | No | Offer title |
| flight_details | object | No | Required when offer_type = Flight |
| hotel_details | object | No | Required when offer_type = Hotel |
| package_tour_details | object | No | Required when offer_type = Package_Tour |
| tour_details | object | No | Required when offer_type = Tour |
| visa_details | object | No | Required when offer_type = Visa |
Update Offer Fields
All fields are optional. Same fields as Create Offer.
Offer List Filters
| Parameter | Type | Description |
|---|---|---|
| page | int | Page number |
| page_size | int | Page size |
| agency_id | string | Filter by agency (admins only) |
| offer_type | string | Hotel, Flight, Package_Tour, Visa, Tour |
| status | string | Active, Inactive, Suspended, Waiting |
| is_active | bool | Filter by active |
| city | string | Filter by city |
| country | string | Filter by country |
| search | string | Search term |
| valid_from | string | RFC3339 or 2006-01-02 |
| valid_until | string | RFC3339 or 2006-01-02 |
Apply To Offer Fields
| Field | Type | Required | Description |
|---|---|---|---|
| number_of_persons | int | ✅ Yes | Minimum 1 |
| contact_phone | string | No | Contact phone |
| note | string | No | Note |
Offer Application List Filters
| Parameter | Type | Description |
|---|---|---|
| offer_id | string | Offer ID |
| user_id | string | User ID |
| status | string | Pending, Approved, Rejected, Cancelled |
| page | int | Page number |
| page_size | int | Page size |
Update Application Status Fields
| Field | Type | Required | Description |
|---|---|---|---|
| status | string | ✅ Yes | Pending, Approved, Rejected, Cancelled |