Booking Components
A Booking Component object represents an individual component of a booking, such as a flight or package, and includes details like the supplier, amount, and more.
Booking Component Model
Properties
- Name
id
- Type
- string
- Description
Unique identifier for the object.
- Name
supplier
- Type
- object
- Description
The supplier model that the booking component is booked with.
- Name
amount
- Type
- integer
- Description
The amount that the component is for, in the lowest denomination for the currency (e.g., pence for GBP).
- Name
currency
- Type
- string
- Description
The currency of the component. See the currency documentation.
- Name
booking_reference
- Type
- string
- Description
The supplier booking reference for the component.
- Name
destination_air
- Type
- string
- Description
If the component is a flight, this represents the destination airport code.
- Name
type
- Type
- string
- Description
A reference type for the component (e.g., flight, package, transfer).
- Name
created_at
- Type
- datetime
- Description
The datetime at which the object was created within our systems.
<div class="syntax-highlighter"><pre style="color:#d4d4d4;font-size:13px;text-shadow:none;font-family:Menlo, Monaco, Consolas, "Andale Mono", "Ubuntu Mono", "Courier New", monospace;direction:ltr;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none;padding:1em;margin:.5em 0;overflow:auto;background:#1b0f27"><code class="language-json" style="white-space:pre;color:#d4d4d4;font-size:13px;text-shadow:none;font-family:Menlo, Monaco, Consolas, "Andale Mono", "Ubuntu Mono", "Courier New", monospace;direction:ltr;text-align:left;word-spacing:normal;word-break:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none"><span class="token" style="color:#d4d4d4">{</span><span>
</span><span> </span><span class="token" style="color:#9cdcfe">"id"</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">"8224bb6e-1d70-588b-82b8-226f2d71012e"</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span> </span><span class="token" style="color:#9cdcfe">"supplier"</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#d4d4d4">{</span><span>
</span><span> </span><span class="token" style="color:#9cdcfe">"id"</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">"6ab41ce7-36c8-5835-b997-492adb3d66e1"</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span> </span><span class="token" style="color:#9cdcfe">"name"</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">"Felloh Travel - Packages"</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span> </span><span class="token" style="color:#9cdcfe">"created_at"</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">"2022-06-28T17:27:59.616Z"</span><span>
</span><span> </span><span class="token" style="color:#d4d4d4">}</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span> </span><span class="token" style="color:#9cdcfe">"amount"</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#b5cea8">56300</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span> </span><span class="token" style="color:#9cdcfe">"currency"</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">"GBX"</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span> </span><span class="token" style="color:#9cdcfe">"booking_reference"</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">"X1232JJ"</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span> </span><span class="token" style="color:#9cdcfe">"destination_air"</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">"AMS"</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span> </span><span class="token" style="color:#9cdcfe">"type"</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">"flight"</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span> </span><span class="token" style="color:#9cdcfe">"created_at"</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">"2023-02-15T16:00:18.886Z"</span><span>
</span><span></span><span class="token" style="color:#d4d4d4">}</span><span>
</span></code></pre></div>
Create One
This endpoint allows you to create a new booking component.
Path Parameters
- Name
booking_id
- Type
- UUID
- Description
The booking ID to which you wish to add a component.
Parameters
- Name
supplier
required
- Type
- uuid
- Description
The supplier object that the booking component is booked with.
- Name
amount
required
- Type
- integer
- Description
The amount that the component is for, in the lowest denomination for the currency.
- Name
currency
required
- Type
- string
- Description
The currency of the component.
- Name
booking_reference
required
- Type
- string
- Description
The supplier booking reference for the component.
- Name
destination_air
required
- Type
- string
- Description
(Optional) The destination airport code if the component is a flight.
- Name
type
required
- Type
- string
- Description
(Optional) A reference type for the component (e.g., flight, package, transfer).
Returns
- Name
id
- Type
- string
- Description
Unique identifier for the object.
Request
<div class="syntax-highlighter"><pre style="color:#d4d4d4;font-size:13px;text-shadow:none;font-family:Menlo, Monaco, Consolas, "Andale Mono", "Ubuntu Mono", "Courier New", monospace;direction:ltr;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none;padding:1em;margin:.5em 0;overflow:auto;background:#1b0f27"><code class="language-javascript" style="white-space:pre;color:#9cdcfe;font-size:13px;text-shadow:none;font-family:Menlo, Monaco, Consolas, "Andale Mono", "Ubuntu Mono", "Courier New", monospace;direction:ltr;text-align:left;word-spacing:normal;word-break:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none"><span class="token" style="color:#c586c0">import</span><span> </span><span class="token">axios</span><span> </span><span class="token" style="color:#c586c0">from</span><span> </span><span class="token" style="color:#ce9178">'axios'</span><span class="token" style="color:#d4d4d4">;</span><span> </span> <span></span><span class="token" style="color:#569CD6">const</span><span> response </span><span class="token" style="color:#d4d4d4">=</span><span> </span><span class="token" style="color:#c586c0">await</span><span> axios</span><span class="token" style="color:#d4d4d4">.</span><span class="token method property-access" style="color:#c0a9e5">put</span><span class="token" style="color:#d4d4d4">(</span><span> </span><span> </span><span class="token template-string template-punctuation" style="color:#ce9178">`</span><span class="token template-string" style="color:#ce9178">https://api.felloh.com/agent/booking/8224bb6e-1d70-588b-82b8-226f2d71012e/component</span><span class="token template-string template-punctuation" style="color:#ce9178">`</span><span class="token" style="color:#d4d4d4">,</span><span> </span><span> </span><span class="token" style="color:#d4d4d4">{</span><span> </span><span> </span><span class="token literal-property" style="color:#9cdcfe">supplier</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">"ab6f8eb9-1c07-4ca4-888b-ae1a11b4463c"</span><span class="token" style="color:#d4d4d4">,</span><span> </span><span> </span><span class="token literal-property" style="color:#9cdcfe">amount</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#b5cea8">56300</span><span class="token" style="color:#d4d4d4">,</span><span> </span><span> </span><span class="token literal-property" style="color:#9cdcfe">currency</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">"GBX"</span><span class="token" style="color:#d4d4d4">,</span><span> </span><span> </span><span class="token literal-property" style="color:#9cdcfe">booking_reference</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">"X1232JJ"</span><span class="token" style="color:#d4d4d4">,</span><span> </span><span> </span><span class="token literal-property" style="color:#9cdcfe">destination_air</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">"AMS"</span><span class="token" style="color:#d4d4d4">,</span><span> </span><span> </span><span class="token literal-property" style="color:#9cdcfe">type</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">"flight"</span><span> </span><span> </span><span class="token" style="color:#d4d4d4">}</span><span class="token" style="color:#d4d4d4">,</span><span> </span><span> </span><span class="token" style="color:#d4d4d4">{</span><span> </span><span> </span><span class="token literal-property" style="color:#9cdcfe">headers</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#d4d4d4">{</span><span> </span><span class="token string-property" style="color:#9cdcfe">'Content-Type'</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">'application/json'</span><span class="token" style="color:#d4d4d4">,</span><span> </span><span class="token string-property" style="color:#9cdcfe">'Authorization'</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token template-string template-punctuation" style="color:#ce9178">`</span><span class="token template-string" style="color:#ce9178">Bearer <YOUR TOKEN HERE></span><span class="token template-string template-punctuation" style="color:#ce9178">`</span><span> </span><span class="token" style="color:#d4d4d4">}</span><span> </span><span> </span><span class="token" style="color:#d4d4d4">}</span><span> </span><span></span><span class="token" style="color:#d4d4d4">)</span><span class="token" style="color:#d4d4d4">;</span><span> </span></code></pre></div>
<div class="syntax-highlighter"><pre style="color:#d4d4d4;font-size:13px;text-shadow:none;font-family:Menlo, Monaco, Consolas, "Andale Mono", "Ubuntu Mono", "Courier New", monospace;direction:ltr;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none;padding:1em;margin:.5em 0;overflow:auto;background:#1b0f27"><code class="language-json" style="white-space:pre;color:#d4d4d4;font-size:13px;text-shadow:none;font-family:Menlo, Monaco, Consolas, "Andale Mono", "Ubuntu Mono", "Courier New", monospace;direction:ltr;text-align:left;word-spacing:normal;word-break:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none"><span class="token" style="color:#d4d4d4">{</span><span>
</span><span> </span><span class="token" style="color:#9cdcfe">"data"</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#d4d4d4">{</span><span>
</span><span> </span><span class="token" style="color:#9cdcfe">"id"</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">"226009ab-ffe9-4c80-922b-982e8e7849f8"</span><span>
</span><span> </span><span class="token" style="color:#d4d4d4">}</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span> </span><span class="token" style="color:#9cdcfe">"errors"</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#d4d4d4">{</span><span class="token" style="color:#d4d4d4">}</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span> </span><span class="token" style="color:#9cdcfe">"meta"</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#d4d4d4">{</span><span>
</span><span> </span><span class="token" style="color:#9cdcfe">"code"</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#b5cea8">200</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span> </span><span class="token" style="color:#9cdcfe">"reason"</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">"OK"</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span> </span><span class="token" style="color:#9cdcfe">"message"</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">"The request was successful"</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span> </span><span class="token" style="color:#9cdcfe">"request_id"</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">"cdd40f5c-9d82-44c2-92e3-b5d2cad364f6"</span><span>
</span><span> </span><span class="token" style="color:#d4d4d4">}</span><span>
</span><span></span><span class="token" style="color:#d4d4d4">}</span><span>
</span></code></pre></div>
Delete One
This endpoint allows you to delete a booking component.
Path Parameters
- Name
booking_id
- Type
- UUID
- Description
The booking ID from which you wish to delete a component.
- Name
component_id
- Type
- UUID
- Description
The component ID that you wish to delete.
Request
<div class="syntax-highlighter"><pre style="color:#d4d4d4;font-size:13px;text-shadow:none;font-family:Menlo, Monaco, Consolas, "Andale Mono", "Ubuntu Mono", "Courier New", monospace;direction:ltr;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none;padding:1em;margin:.5em 0;overflow:auto;background:#1b0f27"><code class="language-javascript" style="white-space:pre;color:#9cdcfe;font-size:13px;text-shadow:none;font-family:Menlo, Monaco, Consolas, "Andale Mono", "Ubuntu Mono", "Courier New", monospace;direction:ltr;text-align:left;word-spacing:normal;word-break:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none"><span class="token" style="color:#c586c0">import</span><span> </span><span class="token">axios</span><span> </span><span class="token" style="color:#c586c0">from</span><span> </span><span class="token" style="color:#ce9178">'axios'</span><span class="token" style="color:#d4d4d4">;</span><span> </span> <span></span><span class="token" style="color:#569CD6">const</span><span> bookingID </span><span class="token" style="color:#d4d4d4">=</span><span> </span><span class="token" style="color:#ce9178">'226009ab-ffe9-4c80-922b-982e8e7849f8'</span><span class="token" style="color:#d4d4d4">;</span><span> </span><span></span><span class="token" style="color:#569CD6">const</span><span> componentID </span><span class="token" style="color:#d4d4d4">=</span><span> </span><span class="token" style="color:#ce9178">'226009ab-ffe9-4c80-922b-982e8e7849f8'</span><span class="token" style="color:#d4d4d4">;</span><span> </span> <span></span><span class="token" style="color:#569CD6">const</span><span> response </span><span class="token" style="color:#d4d4d4">=</span><span> </span><span class="token" style="color:#c586c0">await</span><span> axios</span><span class="token" style="color:#d4d4d4">.</span><span class="token method property-access" style="color:#c0a9e5">delete</span><span class="token" style="color:#d4d4d4">(</span><span> </span><span> </span><span class="token template-string template-punctuation" style="color:#ce9178">`</span><span class="token template-string" style="color:#ce9178">https://api.felloh.com/agent/bookings/</span><span class="token template-string" style="color:#569cd6">${</span><span class="token template-string" style="color:#9cdcfe">bookingID</span><span class="token template-string" style="color:#569cd6">}</span><span class="token template-string" style="color:#ce9178">/component/</span><span class="token template-string" style="color:#569cd6">${</span><span class="token template-string" style="color:#9cdcfe">componentID</span><span class="token template-string" style="color:#569cd6">}</span><span class="token template-string template-punctuation" style="color:#ce9178">`</span><span class="token" style="color:#d4d4d4">,</span><span> </span><span> </span><span class="token" style="color:#d4d4d4">{</span><span> </span><span> </span><span class="token literal-property" style="color:#9cdcfe">headers</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#d4d4d4">{</span><span> </span><span class="token string-property" style="color:#9cdcfe">'Content-Type'</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">'application/json'</span><span class="token" style="color:#d4d4d4">,</span><span> </span><span class="token string-property" style="color:#9cdcfe">'Authorization'</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token template-string template-punctuation" style="color:#ce9178">`</span><span class="token template-string" style="color:#ce9178">Bearer <YOUR TOKEN HERE></span><span class="token template-string template-punctuation" style="color:#ce9178">`</span><span> </span><span class="token" style="color:#d4d4d4">}</span><span> </span><span> </span><span class="token" style="color:#d4d4d4">}</span><span> </span><span></span><span class="token" style="color:#d4d4d4">)</span><span class="token" style="color:#d4d4d4">;</span><span> </span></code></pre></div>
<div class="syntax-highlighter"><pre style="color:#d4d4d4;font-size:13px;text-shadow:none;font-family:Menlo, Monaco, Consolas, "Andale Mono", "Ubuntu Mono", "Courier New", monospace;direction:ltr;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none;padding:1em;margin:.5em 0;overflow:auto;background:#1b0f27"><code class="language-json" style="white-space:pre;color:#d4d4d4;font-size:13px;text-shadow:none;font-family:Menlo, Monaco, Consolas, "Andale Mono", "Ubuntu Mono", "Courier New", monospace;direction:ltr;text-align:left;word-spacing:normal;word-break:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none"><span class="token" style="color:#d4d4d4">{</span><span>
</span><span> </span><span class="token" style="color:#9cdcfe">"data"</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#d4d4d4">{</span><span class="token" style="color:#d4d4d4">}</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span> </span><span class="token" style="color:#9cdcfe">"errors"</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#d4d4d4">{</span><span class="token" style="color:#d4d4d4">}</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span> </span><span class="token" style="color:#9cdcfe">"meta"</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#d4d4d4">{</span><span>
</span><span> </span><span class="token" style="color:#9cdcfe">"code"</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#b5cea8">200</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span> </span><span class="token" style="color:#9cdcfe">"reason"</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">"OK"</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span> </span><span class="token" style="color:#9cdcfe">"message"</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">"The request was successful"</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span> </span><span class="token" style="color:#9cdcfe">"request_id"</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">"cdd40f5c-9d82-44c2-92e3-b5d2cad364f6"</span><span>
</span><span> </span><span class="token" style="color:#d4d4d4">}</span><span>
</span><span></span><span class="token" style="color:#d4d4d4">}</span><span>
</span></code></pre></div>