Wiki

Clone wiki

API-2.0 / Services_for_booking

Method: GET

Path: /booking/services

Return list of services available for booking.

Query params

booking_uuid (optional)

Booking digest. MUST be provided if services requested for existing booking. (requires authentication)

location_id (optional)

Unique ID of location (see Location for booking). Default location used if parameter not provided.

Example of response

[
  {
    "id": 2,
    "name": "Service A",
    "price": 383.42,
    "commercial": false,
    "discount_by_frequency": false,
    "discount_by_code": true,
    "extras": [
      {
        "id": 1,
        "name": "Extra A",
        "price": 25.43,
        "quantity_based": false,
        "ordering": 0,
        "description": "",
        "discount_by_frequency": false,
        "discount_by_code": true,
        "recurring": true
      }
    ],
    "pricing_parameters": [
      {
        "id": 1,
        "name": "Pricing Parameter A",
        "price": 1.47,
        "quantity_minimum": 1,
        "quantity_maximum": 10,
        "ordering": 0
      }
    ]
  },
  {
    "id": 1,
    "name": "Service B",
    "hourly": {
      "quantity_minimum": 1,
      "quantity_maximum": 5,
      "minutes_minimum": 300,
      "minutes_maximum": 60,
      "half_hour_increments": false
    },
    "price": 423.51,
    "commercial": false,
    "discount_by_frequency": true,
    "discount_by_code": true,
    "extras": [
      {
        "id": 2,
        "name": "Extra B",
        "price": 36.91,
        "quantity_based": true,
        "ordering": 0,
        "image": "https://launch27-development.s3-us-west-2.amazonaws.com/ooo/services/14/image-6808ccabb514949ada66e6e76f044f4a.jpg",
        "description": "",
        "discount_by_frequency": true,
        "discount_by_code": false,
        "recurring": false
      },
      {
        "id": 3,
        "name": "Extra BB",
        "price": 25.43,
        "quantity_based": false,
        "ordering": 0,
        "icon_code": "small-suv",
        "icon": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAnCAYAAADkUNMNAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sb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ZQliUSQmWJ7bl1X90+M/vebKaX4743M++8e++7975xms2mkxR835+U87STkARB8BrqG/SketaREPELqF7gSalU2o0kx4f0US6C5wa4A1zAA9EdP9/GeENwDPxDjgc9UF+Bpy2M3AOugefAY547IP6F9f0YkgfDQBGodjDxKNRnoNsyEpfAhTAsgw2OMCS8/RsWDsMPS1IPWALRmfZ8hi1flu/SbMWegbQGjGDhqxBiCssXPotTmS0pykd27RPUXAjxT2AI6AQ+ANMU44ismYf6qA5aktNiHyhoa0Y4vvtAHpjF4hWbGKaFaw0ofdEmnu9Avwd22PWKbf7rFRpo8y3eeAKYIqsp1eBlyYZcL6JV4EDMT7SDW6W0w7AvxBAj+SAXgpIlzl25wYptWGSFZqnxAFmtWBba7Tky5qMa8b1Fko87CYskH/4v5Ih3H3cyXbqTsHww4n0FG9PtUr4P+aMW31AjOqbeA+STtFxJJzc1HxssctoaJYUbmxbexvSYGhm1hENTEcl4LnNzipJxPmQ6/HfAM5PlVO7fgToseWC45XNM+hKgnt4V1dtVzHvDmlSYgIhu/zfsHcX9oelA1eVQtQk2NqB+o2LdbyLPiyZlK6pTlk3kLo+vY5ArLwsm8kwb5DXWPbaNKxOD/IZ1zkTe4LEbg1ylX9ZEftkGeda2t9RVlsUgdzUPIskDm5zVpKDF3kheRnnbhkZVZt3UuDwxv8IGHpc3WXUmbqSiKBzXpqr//CuC8NxUbREyhXawZvpvGePbqCjuTWltQ/s58jjL1lvt/FuAAQDJ+hrH3mcmUwAAAABJRU5ErkJggg==",
        "description": "",
        "discount_by_frequency": false,
        "discount_by_code": true,
        "recurring": true
      }
    ]
  }
]

Where:

  • service attributes:
    • id is service unique ID
    • name is service display name
    • hourly always present for hourly services, never present for non-hourly service
      • quantity_minimum and quantity_maximum tell how many workers (min/max) can be booked for the service
      • minutes_minimum and minutes_maximum tell for how long in minutes (mix/max) workers can be booked for the service
    • price is service price
    • duration is service's duration in minutes, present if service's duration greater than zero and account has duration feature ON
    • commercial: if value is true means that service cannot be booked by customer:
      • commercial service may appear in available services list (for customer user logged-in or non-logged-in) only if services requested using booking_uuid parameter (i.e. for existing booking) and only if booking already linked to the service
    • discount_by_frequency: if value is true means that booking frequency discount is applicable to service price
    • discount_by_code: if value is true means that discount due to "discount by code" is applicable to service price
    • icon_code present only if service linked to icon, value is icon name
    • icon present only if service linked to icon, value is data url which contains base64 encoded image data
    • image present only if service linked to image, value is image url
    • extras: service may or may not be linked extras
    • pricing_parameters: service may or may not be linked to pricing parameters
  • extra attributes:
    • id is extra unique ID
    • name is extra display name
    • price is extra price per unit
    • quantity_based: if value is true means that extra can be booked using quantity greater than 1
    • duration is extra's duration in minutes, present if extra's duration greater than zero and account has duration feature ON
    • icon_code present only if extra linked to icon, value is icon name
    • icon present only if extra linked to icon, value is data url which contains base64 encoded image data
    • image present only if extra linked to image, value is image url
    • description is description for extra, may be empty if not configured
    • discount_by_frequency: if value is true means that booking frequency discount is applicable to extra price
    • discount_by_code: if value is true means that discount due to "discount by code" is applicable to extra price
    • recurring: if true means that extra is recurring, i.e. will be copied over to the next recurring booking when next recurring booking created
    • ordering is configured extra order in the list of pricing parameters
  • pricing parameter attributes:
    • id is pricing parameter unique ID
    • name is pricing parameter display name
    • price is pricing parameter price per unit
    • quantity_minimum and quantity_maximum tell how many units (min/max) can be booked
    • duration is pricing parameter's duration in minutes, present if pricing parameter's duration greater than zero and account has duration feature ON
    • ordering is configured pricing parameter order in the list of pricing parameters

Example request (as non-logged-in):

For production, replace https://acme-sandbox.l27.co with https://<your subdomain>.launch27.com

curl -H "Content-Type: application/json" \
     -X GET -k \
     https://acme-sandbox.l27.co/latest/booking/services

Example request (as logged-in):

For production, replace https://acme-sandbox.l27.co with https://<your subdomain>.launch27.com

Replace BEARER_FROM_LOGIN with bearer from Login

curl -H "Content-Type: application/json" \
     -H 'Authorization: Bearer BEARER_FROM_LOGIN' \
     -X GET -k \
     https://acme-sandbox.l27.co/latest/booking/services?booking_uuid=NcUHgV93Vkf7Jxgr8P6rvOi3DMLpYvc2

Updated