Add childcare services to a proposal

  • Booking
  • Activity option
  • 6 routes
How do I add childcare services before the booking is created?

This scenario shows how to start from a proposal, identify the childcare services available for the relevant attendees, and add them before turning the proposal into a booking.

It covers proposal creation, additional-service discovery with the CHILDCARE filter, service update, and final verification of the selected services.

Overview

Use this journey to enrich a proposal with childcare services before booking creation. The scenario relies on additional services available for each attendee and on the proposal service update mechanism.

Prerequisites

  • Have a valid proposal that includes at least one child eligible for childcare.
  • Keep the proposal_id returned by the proposal search.
  • When updating services, send the full list of services you want to keep because the update works as a full replacement.

Process workflow

Legend:
Mandatory
Optional
1

Create the initial proposal

Mandatory

This route searches for the starting proposals of the journey and returns the proposal_id reused in the following steps.

Prerequisites

  • Have the stay criteria and the attendees of the file available.
  • Include the relevant child in this search if you plan to add CHILDCARE services later.

Calling CURL

curl -X 'POST' \
  'https://api.clubmed.com/v3/proposals/search' \
  -H 'accept: application/json' \
  -H 'accept-language: en-US' \
  -H 'x-api-key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{ ... }'

Example answer

[
  {
    "id": "123456",
    "product_id": "MPAC",
    "package_id": "AI",
    "price": {
      "total": 9815.4,
      "currency": "EUR"
    },
    "package_options": [
      {
        "type": "CHILDCARE",
        "amount": 152.25
      }
    ],
    "is_bookable": false
  }
]

info: keep the proposal_id and reuse the same locale until the booking is created.


Response codes

  • OK Response (200): returns a list of priced proposals.
  • Error (400): duplicated attendees, inconsistent accommodations, no valid priced proposal, invalid payload.
  • Error (401): unauthorized.
  • Error (404): Unknown Product.
  • Error (409): The proposal criteria are no longer valid.
Click to expand
POST/v3/proposals/search
See more
2

List available childcare services

Mandatory

This route lists the additional services available for a proposal and lets you isolate childcare by using types=CHILDCARE.

Prerequisites

  • Have a valid proposal_id.
  • Use types=CHILDCARE to focus the response on childcare services only.

Calling CURL

curl -X 'GET' \
  'https://api.clubmed.com/v0/additional_services?proposal_id=123456&types=CHILDCARE' \
  -H 'accept: application/json' \
  -H 'accept-language: en-US' \
  -H 'x-api-key: YOUR_API_KEY'

Example answer

[
  {
    "id": "VMOSK1",
    "type": "CHILDCARE",
    "time_slot": "MORNING",
    "age_in_months": {
      "min": 12,
      "max": 48
    },
    "schedules": [
      {
        "remaining_stock": 2,
        "attendees": [
          {
            "id": "A",
            "price": 88
          }
        ]
      }
    ]
  }
]

info: check sold_only_with and not_compatible_with before composing the final service selection.


Response codes

  • OK Response (200): returns the list of available services for the proposal.
  • Error (400): invalid proposal, unsupported state, customer mismatch, invalid payload.
  • Error (401): unauthorized.
  • Error (404): Booking/Proposal not found.
  • Error (206): partial_content.
  • Error (403): unauthorized country or missing authentication with booking_id and customer_id.
  • Error (409): The proposal criteria are no longer valid.
  • Error (416): Requested range not satisfiable.
GET/v0/additional_services
See more
3

Apply services to the proposal

Mandatory

This route modifies the list of services associated with a proposal. Swagger states that the submitted selection must be built from the service search resource and from the services already present on the proposal. Because this is a cancel & replace route, every call must contain the full set of additional services you want to keep.

Prerequisites

  • Have a valid proposal_id.
  • Prepare the full list of services to keep from the service search result and the current proposal state.
  • Send accept-language and x-api-key. Add authorization if your integration context uses it.

Calling CURL

curl -X 'PUT' \
  'https://api.clubmed.com/v0/proposals/123456/services' \
  -H 'accept: application/json' \
  -H 'accept-language: en-US' \
  -H 'authorization: Bearer YOUR_TOKEN' \
  -H 'x-api-key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '[ ... ]'

Example answer

HTTP/1.1 204 No Content

info: Call GET/v0/proposals/{proposal_id}/services afterwards to verify the result actually applied to the proposal.


Response codes

  • OK Response (200): not documented in Swagger.
  • Error (400): incompatible services, missing required service, invalid payload.
  • Error (401): unauthorized.
  • Error (404): Proposal not found.
  • Success (204): no_content.
  • Error (409): The economic control of this proposition is no longer valid.
Click to expand
PUT/v0/proposals/{proposal_id}/services
See more
4

Review the applied services

Mandatory

This route reads the services currently attached to the proposal so you can verify that childcare has been applied correctly.

Prerequisites

  • Have already applied the services on the proposal.
  • Know the proposal_id to review.

Calling CURL

curl -X 'GET' \
  'https://api.clubmed.com/v0/proposals/123456/services?filter=type==CHILDCARE' \
  -H 'accept: application/json' \
  -H 'x-api-key: YOUR_API_KEY'

Example answer

[
  {
    "id": "AHSI01",
    "type": "RENTAL",
    "time_slot": "MORNING",
    "currency": "EUR",
    "schedules": [
      {
        "attendees": [
          {
            "id": "A",
            "price": 250,
            "price_without_discount": 300
          }
        ]
      }
    ]
  }
]

info: the filter can target CHILDCARE, but the Swagger example remains generic and may show another service type.


Response codes

  • OK Response (200): returns the services currently attached to the proposal.
  • Error (400): bad_request or validation_error.
  • Error (401): not documented in Swagger.
  • Error (404): not documented in Swagger.
Click to expand
GET/v0/proposals/{proposal_id}/services
See more
5

Update proposal attendees

Mandatory

Use PUT/v3/proposals/{proposal_id}/attendees to complete or correct the travellers attached to the proposal before creating the booking.

Prerequisites

  • Have a valid proposal_id.
  • Provide the expected identity data for each traveller and, when needed, travel documents.
  • You can add call_id in query to track the call context from a front-end or contact-center journey.

Calling CURL

curl -X 'PUT' \
  'https://api.clubmed.com/v3/proposals/123456/attendees?call_id=1234567890' \
  -H 'accept: application/json' \
  -H 'accept-language: en-US' \
  -H 'x-api-key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '[{
    "id": "A",
    "customer_id": "123456789",
    "partner_type": "ADULT",
    "travel_documents": []
  }]'

Example answer

[
  {
    "id": "A",
    "customer_id": "123456789",
    "customer_status": "EXISTING_CUSTOMER",
    "loyalty_status": "GOLD",
    "partner_type": "ADULT"
  }
]

info: v3 keeps the same business goal as the historical route but adds call_id so the proposal update can be traced back to the call context.


Response codes

  • OK Response (200): returns the updated attendee list on the proposal.
  • Error (400): invalid traveller data, reused document, passport constraint issue, or invalid payload.
  • Error (401): authentication is missing, invalid, or expired.
  • Error (403): at least one added customer is not allowed to proceed with the booking.
  • Error (404): not documented in Swagger.
  • Error (409): the proposal economic control is no longer valid.
Click to expand
PUT/v3/proposals/{proposal_id}/attendees
See more
6

Create the booking from the proposal

Mandatory

This route creates the final booking from the proposal enriched with attendees and selected services.

Prerequisites

  • The proposal must already contain the attendees and selected services.
  • Keep the same accept-language value used when the proposal was created.

Calling CURL

curl -X 'POST' \
  'https://api.clubmed.com/v3/bookings' \
  -H 'accept: application/json' \
  -H 'accept-language: en-US' \
  -H 'x-api-key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{ ... }'

Example answer

{
  "booking_id": "654321",
  "households": [
    {
      "attendees": [
        {
          "customer_id": 987654,
          "type": "MAIN"
        }
      ]
    }
  ],
  "option_durability": {
    "is_reliable": true,
    "expiration_date_time": "20160415T10:23:00.234Z"
  }
}

info: depending on the context, success may be returned as 200 or 201.


Response codes

  • OK Response (200): returns the booking_id, household attendees and option_durability.
  • Error (400): reused document, invalid departure city, passport constraint, invalid payload.
  • Error (401): unauthorized.
  • Error (404): not documented in Swagger.
  • Error (403): unauthorized user, booking already created from the proposal, forbidden option or promotion.
  • Error (409): price, promotion, transport, accommodation or service dependency became invalid.
  • Error (419): Flight no longer available.
Click to expand
POST/v3/bookings
See more