Table of Contents
This API endpoint allows you to retrieve the favorite gigs of a user.
Endpoint #
The Voomerr Get Favorite Gigs endpoint is GET https://admin.voomerr.com/api/get_fav_gigs.php
Request Parameters #
Parameter | Type | Description |
---|---|---|
user_id | string | Required. The ID of the user whose favorite gigs you want to retrieve. |
currency | string | Required. The currency code you want the prices to be returned in (e.g. USD) |
Response Parameters #
The response from the API will be in JSON format and will contain the following fields:
Field | Type | Description |
---|---|---|
success | boolean | Indicates whether the API call was successful or not. |
message | string | A message that provides information about the status of the API call. |
gig_count | integer | The total number of favorite gigs returned. |
gigs | array | An array of favorite gig objects. Each object contains information about a single favorite gig. |
Each gig object in the ‘gigs’ array will contain the following fields: #
Field | Type | Description |
---|---|---|
gig_id | string | The ID of the favorite gig. |
gig_name | string | The name of the favorite gig. |
gig_image | string | The URL of the image for the favorite gig. |
gig_location | string | The location of the favorite gig. |
gig_price | object | An object that contains information about the price of the favorite gig. |
is_favorite | boolean | Indicates whether the gig is a favorite of the user making the API call or not. |
The ‘gig_price’ object will contain the following fields: #
Field | Type | Description |
---|---|---|
amount | float | The price of the gig. |
currency | string | The currency code in which the price is expressed. |
duration | string | The duration of the gig. |
distance | string | The distance from the gig location to the user. |
Example Request #
javascript
GET https://admin.voomerr.com/api/get_fav_gigs.php?user_id=12345¤cy=USD
Example Response #
json
{
"success": true,
"message": "Favorite gigs retrieved successfully.",
"gig_count": 2,
"gigs": [
{
"gig_id": "123456",
"gig_name": "Pizza delivery",
"gig_image": "https://example.com/images/pizza.jpg",
"gig_location": "123 Main St, Anytown",
"gig_price": {
"amount": 15.0,
"currency": "USD",
"duration": "30 min",
"distance": "5 km"
},
"is_favorite": true
},
{
"gig_id": "789012",
"gig_name": "Dog walking",
"gig_image": "https://example.com/images/dog-walking.jpg",
"gig_location": "456 Maple Ave, Anytown",
"gig_price": {
"amount": 20.0,
"currency": "USD",
"duration": "1 hour",
"distance": "10 km"
},
"is_favorite": true
}
]
}