API Models

This document provides details about the models used in the Funbooker Partner API.

Api Listing

Listing

Represents a listing.

  • id (int): Listing's unique identifier.

  • slug (string): Listing's slug.

  • title (string): Listing's title.

  • atHome (bool): Define if the activity is taking place at the clients/user home address.

  • isInstant (bool): The activity doesn't need to be confirmed by the pro, the booking will be confirmed instantaneously.

  • pictureUrl (string): The URL of the listing's main image.

  • listingItems (ListingItem[]): Services and options offered in the activity.

  • funpro (ShortFunpro): Funpro who propose the activity.

  • updated (DateTimeInterface): The last updated date of the listing.

  • averageRating (float, nullable): Listing's average rating.

  • ratingCount (int): The number of reviews for this activity.

  • address (Address, nullable): Address where the activity is located.

  • specialCondition (string, nullable): Extra information about the activity.

    • ex: You can cancel without extra charges until 48h before the bookings's date.

  • cancellationPolicy (array, nullable): Describe the conditions to cancel the activity.

  • minPerson (int): The minimum number of persons for a booking.

  • maxPerson (int): The maximum number of persons for a booking.

  • displayListingEndTime (bool): Display activity end time.

  • checkoutLinks (ListingCheckoutLink[]): Listing's checkout links.

  • latitude (float, nullable): Listing's latitude.

  • longitude (float, nullable): Listing's longitude.

  • description (string, nullable): Listing's description.

ListingItem

Represents an item in a listing.

  • id (int): ListingItem's unique identifier.

  • listingId (int): Listing's unique identifier.

  • label (string): ListingItem's label.

    • ex: Escape Game - 1h - 2 people

  • description (string, nullable): Listing item's description.

    • ex: Price / person (for 2 visits)

  • isOption (bool): Indicates if the item is an option

    • ex: photo or video on parachute jump

  • maxCapacity (int): Item's maximum capacity.

  • minCapacity (int): Item's minimum capacity.

  • durationTime (int, nullable): Item's duration in minutes.

    • ex: 120 (minutes)

  • price (int): Item's price in cents.

  • priceType (string): Item's price type, on o: 'per_person', 'plan', 'option'.

  • numberOfPersons (int): Number of persons included in the item

    • ex : 1 person, 15 persons, etc

Represents a checkout link for a listing.

Address

Represents an address.

  • city (string): The address city.

  • country (string): The address country.

  • route (string, nullable): The address route.

  • streetNumber (string, nullable): The address street number.

  • zip (string, nullable): The address zip code.

ShortFunpro

Represents a short version of a Funpro.

  • id (int): Funpro's unique identifier.

  • name (string): Funpro's name.

  • pictureUrl (string): The URL of the Funpro's picture.

Api Category

Category

Represents a category in the listing.

  • id (int): Category's unique identifier.

  • name (string): Category's name.

  • parentId (int, nullable): Category's parent categoryId, null value means that is a root category. Root category represents the occasion.

  • occasion (string): Occasion name, on of 'entertainment', 'gift', 'birthday', 'business', 'bachelor-party', 'internship'

SearchRequest

Represents the request object that will be sent to the search action

  • query (string): The search query.

    • ex: escape game

  • radius (int): The radius search in meters.

    • ex: 50000

  • categories (int[]): Lis of category id's.

    • ex: [1, 195, 147]

  • lat (float): Latitude to determine the location

  • lng (float): Longitude to determine the location

  • hitsPerPage (int): Number of results per page

  • page (int): Selected page

  • minY (float): minY coord to determine the map bounding box.

  • maxY (float): maxY coord to determine the map bounding box.

  • minX (float): minX coord to determine the map bounding box.

  • maxX (float): maxX coord to determine the map bounding box.

SearchResponse

Represents the response that we receive from the search service Algolia

  • hits (ResponseHit[]): List of results.

  • nbHits (int): Total number of results.

  • page (int): Pagination current page.

  • nbPages (int): Pagination number of pages.

  • hitsPerPage (int): Results per page.

  • query (string): search query.

  • pagination (Pagination): Result pagination.

ResponseHit

Represents a result retrieved from the search service Algolia, each hit represents a Listing.

  • id (int): Listing's unique identifier.

  • type (string): Listing type, one of 'entertainment', 'gift', 'birthday', 'business', 'bachelor-party', 'internship'.

  • user (Object): Funpro who propose the activity.

    • average_offerr_rating (int): Funpro's average rating.

    • name (string): Funpro's name.

  • _geoloc (Object, nullable): Listing's geolocation.

    • lat (float): Listing's latitude.

    • lng (float): Listing's longitude.

    • department_code (string): Listing's department code.

    • city (string): Listing's city.

    • zip (string): Listing's sip code.

  • categories (Object[]): List of categories linked to the Listing.

    • root (int): Root category id, represents the occasion.

    • parent (int): Parent category id, if null it means that it's a category root.

    • id (int): Category id.

    • name (string): Category full name.

    • short_name (string): Category short name.

    • occasion (string): The related occasion, on of 'entertainment', 'gift', 'birthday', 'business', 'bachelor-party', 'internship'.

    • lvl (int): Category's level, on of 0, 1, 2, 3.

    • isLeaf (boolean): Describe if category has childrens or subcategories.

  • averageRating (int): Listing's average rating.

  • commentCount (int): The number of reviews for this activity.

  • minAge (int): The filter age is active and means that the activity is for children from 3 years (or the selected age).

  • maxAge (int): The filter age is active and means that the activity is for children until 12 years (or the selected age).

  • home (boolean): Define if the activity is taking place at the clients/user home address.

  • user_picture (string): Funpro's profile picture.

  • title (string): Listing title.

  • teaser (string): Listing's presentation.

  • priceFrom (string): Describes how many people the price is for.

  • slug (string): Listing's slug.

  • status (int): Listing status, on of 1 (new), 2 (published), 4 (suspended), 5 (deleted), 6 (under review).

  • price (int): Listing's global price.

  • departments (int[]): Departments where the activity is available.

  • image_name (string): Listing's main image name.

  • duration (Object): Listing's duration time with detail of hours, minutes and total time in minutes.

    • hours (int): number of hours.

    • minutes (int): number of minutes.

    • real_time (int): total time in minutes.

  • sort_scoring (int): Represents the search scorig relevance comming from and calculated by Algolia service.

  • onDiscount (int, nullable): Discount percent.

  • objectID (string): Algolia id reference, match the listing id.

  • videoUrl (string, nullable): Listing's video url.

Pagination

Represents the results pagination.

  • page (int): The current page.

  • pageCount (int): The total number of pages.

  • totalItems (int): The total number of results.

  • perPage (int): Number of items per page.

Api Voucher

VoucherRequest

Represents the request to send to be able to create a voucher.

  • listingId (int): Reference to ListingId

  • listingItems (VoucherItem[]): List of selected options.

  • giftName (string, nullable): Name of the user who offers the gift.

  • gitReceiverName (string, nullable): Name of the user who receive the gift.

  • giftMessage (string, nullable): Message present in the voucher.

VoucherItem

Represents a voucher's option or item.

  • quantity (int): Selected item's quantity.

  • listingItemId (int): Selected option's listingItem reference.

  • unitPrice (int): Selected option's unit price

VoucherResponse

Represents the create the voucher object.

  • voucherCode (string): Code to convert the voucher.

    • ex: XJGHG646KFJG

  • bookingUrl (string): QrCode with the booking url.

  • price (Money): The voucher's price.

    • amount (float): The voucher's price amount.

    • currency (string): The ISO_4217 currency code.

      • ex: EUR

Last updated