Async tasks

Overview

YSystem retrieves real-time information such as hotel rates from upstream services. Because these queries can take time, asynchronous tasks let you render partial results first and complete the response later.

How it works

Add the mode parameter to enable asynchronous processing. The response includes an asyncJobId together with the partial result.

Use that ID with the same route or /job/getResult to retrieve more data.

Asynchronous task modes

/hotel/search?mode=async

/hotel/rates?mode=asyncPaging

/hotel/rates?mode=asyncPagingMerged

For /hotel/rates, /job/getResult may return another asyncJobId when more pages are still being fetched. Continue calling /job/getResult until the response no longer contains asyncJobId.

Job endpoint parameters