{"info":{"_postman_id":"aeb0fdbe-a4bb-4512-bc1b-e501ace4a8d6","name":"Booking API Documentation","description":"<html><head></head><body><h1 id=\"overview\">Overview</h1>\n<p>This API provides a comprehensive interface for third-party applications to interact with our internal booking system. It enables seamless integration, allowing external systems to retrieve product (ticket) information, initiate booking requests, and manage booking data.</p>\n<h2 id=\"base-url\">Base URL</h2>\n<p><strong>All API endpoints are relative to the following base URL:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-html\">https://dev-api.habitat.id/dev\n\n</code></pre>\n<p>The base URL provides a foundation for all API requests. By separating the static portion of the URL from the dynamic endpoint, we improve the modularity and maintainability of the API. This also allows for easier updates to the base URL in the future.</p>\n<p><strong>Example:</strong></p>\n<p>To create a booking, you would send a POST request to the following URL:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-html\">https://dev-api.habitat.id/dev/booking\n\n</code></pre>\n<p><strong>Note:</strong></p>\n<ul>\n<li><p>Replace <code>https://dev-api.habitat.id/dev</code> with the appropriate base URL for your environment.</p>\n</li>\n<li><p>The base URL is subject to change. Please refer to the latest documentation for the most up-to-date information.</p>\n</li>\n</ul>\n<p>Dengan menambahkan section ini, Anda memberikan panduan yang jelas kepada pengguna API tentang bagaimana mengakses endpoint yang berbeda dan membantu mereka memahami struktur API secara keseluruhan.</p>\n<hr>\n<h2 id=\"authentication\">Authentication</h2>\n<p><strong>Authentication Mechanism:</strong></p>\n<p>We've implemented a token-based authentication system where the token is generated by the third-party application. This system relies on two primary parameters: <code>app_name</code> and <code>app_key</code>.</p>\n<ul>\n<li><p><strong><code>app_name</code>****:</strong> This parameter uniquely identifies the third-party application. Each application registered with our system is assigned a distinct <code>app_name</code>, serving as a form of user identification.</p>\n</li>\n<li><p><strong><code>app_key</code>****:</strong> The <code>app_key</code> is a secret key associated with the <code>app_name</code>. It acts as a password or credential, used to verify the authenticity of the <code>app_name</code> during each API request.</p>\n</li>\n</ul>\n<p><strong>Authentication Process:</strong></p>\n<ol>\n<li><p><strong>Third-party Application Generation:</strong></p>\n<ol>\n<li><p>The third-party application generates a token using their unique <code>app_name</code> and <code>app_key</code>.</p>\n</li>\n<li><p>This token is typically included in the request header for each API call.</p>\n</li>\n</ol>\n</li>\n<li><p><strong>Server-Side Validation:</strong></p>\n<ol>\n<li><p>Upon receiving a request, our server extracts the <code>app_name</code> and token from the request header.</p>\n</li>\n<li><p>The server then:</p>\n<ol>\n<li><p>Verifies the existence of the specified <code>app_name</code> in its registered applications.</p>\n</li>\n<li><p>Uses a secure hashing algorithm to generate a hash of the <code>app_name</code> and <code>app_key</code>.</p>\n</li>\n<li><p>Compares the generated hash with the hash stored in our system.</p>\n</li>\n</ol>\n</li>\n</ol>\n</li>\n</ol>\n<p><strong>Benefits of this approach:</strong></p>\n<ul>\n<li><p><strong>Security:</strong> The use of <code>app_key</code> as a secret ensures that only authorized applications can access the API.</p>\n</li>\n<li><p><strong>Scalability:</strong> The system can easily accommodate a large number of third-party applications.</p>\n</li>\n<li><p><strong>Flexibility:</strong> The token-based approach allows for easy integration with various client-side technologies.</p>\n</li>\n</ul>\n<p><strong>Additional Considerations:</strong></p>\n<ul>\n<li><p><strong>Token Expiration:</strong> To enhance security, consider implementing a token expiration mechanism, requiring third-party applications to regenerate tokens periodically.</p>\n</li>\n<li><p><strong>Token Revocation:</strong> Provide a mechanism to revoke tokens in case of security breaches or unauthorized access.</p>\n</li>\n<li><p><strong>Token Storage:</strong> Store <code>app_keys</code> securely using strong encryption and avoid storing them in plain text.</p>\n</li>\n</ul>\n<p>Example Request Header:</p>\n<p><code>token:</code></p>\n<p>By following this authentication mechanism, we ensure that only authorized third-party applications can interact with our booking system, safeguarding our data and services.</p>\n<h3 id=\"authentication-error-response\">Authentication error response</h3>\n<p>When a request fails to authenticate, the server should return an appropriate error response. This typically includes:</p>\n<ul>\n<li><p><strong>HTTP Status Code:</strong></p>\n<ul>\n<li><p><strong>401 Unauthorized:</strong> This indicates that the client must authenticate itself to get the requested response.</p>\n</li>\n<li><p><strong>403 Forbidden:</strong> This means that even if the client is authenticated, they do not have the necessary permissions to access the resource.</p>\n</li>\n</ul>\n</li>\n<li><p><strong>Error Message:</strong></p>\n<ul>\n<li><p>A clear and concise message describing the reason for the authentication failure. For example:</p>\n<ul>\n<li><p>\"Invalid app_name or app_key.\"</p>\n</li>\n<li><p>\"Token has expired.\"</p>\n</li>\n<li><p>\"Authentication required.\"</p>\n</li>\n</ul>\n</li>\n</ul>\n</li>\n<li><p><strong>Additional Details:</strong></p>\n<ul>\n<li><p>Depending on the specific error, you may include additional details such as:</p>\n<ul>\n<li><p>The timestamp of the error.</p>\n</li>\n<li><p>The specific endpoint that was requested.</p>\n</li>\n<li><p>The client's IP address.</p>\n</li>\n</ul>\n</li>\n</ul>\n</li>\n</ul>\n<hr>\n<blockquote>\n<p>copyright © WIT.ID 2024</p>\n</blockquote>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[{"content":"Overview","slug":"overview"}],"owner":"19659454","collectionId":"aeb0fdbe-a4bb-4512-bc1b-e501ace4a8d6","publishedId":"2sAXqneQ79","public":true,"customColor":{"top-bar":"C42A0A","right-sidebar":"303030","highlight":"C42A0A"},"publishDate":"2024-09-13T08:42:43.000Z"},"item":[{"name":"Token","item":[{"name":"Generate Token","id":"b9c9b88e-b4da-4ef1-abe2-e2a82fdcee78","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"app_name\": \"wit-dev-open\",\n    \"app_key\": \"w1t-d3V-0p3n\"\n}","options":{"raw":{"language":"json"}}},"url":"{{host_booking}}/generate-token","description":"<h3 id=\"endpoint\">Endpoint</h3>\n<p><strong>URL:</strong> {{host_booking}}/token<br /><strong>Method:</strong> POST</p>\n<h3 id=\"request-body\">Request Body</h3>\n<p>A JSON object containing the following fields:</p>\n<ul>\n<li><p><strong><code>app_name</code>****:</strong> The unique identifier of the third-party application.</p>\n</li>\n<li><p><strong><code>app_key</code>****:</strong> The secret key associated with the <code>app_name</code>.</p>\n</li>\n</ul>\n<h3 id=\"response\">Response</h3>\n<ul>\n<li><p><strong>Success:</strong> A JSON object containing the following fields:</p>\n<ul>\n<li><p><strong><code>data</code>****:</strong> An object with the following properties:</p>\n<ul>\n<li><p><strong><code>name</code>****:</strong> The name of the third-party application.</p>\n</li>\n<li><p><strong><code>token</code>****:</strong> The generated token.</p>\n</li>\n<li><p><strong><code>token_expired</code>****:</strong> The timestamp when the token will expire.</p>\n</li>\n</ul>\n</li>\n<li><p><strong><code>message</code>****:</strong> The message \"Success\".</p>\n</li>\n</ul>\n</li>\n<li><p><strong>Failure:</strong> A JSON object containing the following field:</p>\n<ul>\n<li><strong><code>message</code>****:</strong> An error message indicating the reason for the failure.</li>\n</ul>\n</li>\n</ul>\n<h3 id=\"error-handling\">Error Handling</h3>\n<ul>\n<li><strong>Invalid Credentials:</strong> If the provided <code>app_name</code> or <code>app_key</code> are incorrect, the API will return a <code>401 Unauthorized</code> error with the message \"invalid app key\".</li>\n</ul>\n<h3 id=\"additional-notes\">Additional Notes</h3>\n<ul>\n<li><p><strong>Token Usage:</strong> The generated token must be included in the request header of subsequent API calls to authenticate the request.</p>\n</li>\n<li><p><strong>Token Expiration:</strong> The <code>token_expired</code> field indicates the timestamp when the token will become invalid. Third-party applications should request new tokens before the current one expires.</p>\n</li>\n<li><p><strong>Security:</strong> The <code>app_key</code> should be kept confidential to prevent unauthorized access.</p>\n</li>\n</ul>\n","auth":{"type":"apikey","apikey":{"value":"{{token}}","key":"<key>"},"isInherited":true,"source":{"_postman_id":"aeb0fdbe-a4bb-4512-bc1b-e501ace4a8d6","id":"aeb0fdbe-a4bb-4512-bc1b-e501ace4a8d6","name":"Booking API Documentation","type":"collection"}},"urlObject":{"path":["generate-token"],"host":["{{host_booking}}"],"query":[],"variable":[]}},"response":[{"id":"ca62bfda-b16f-43fe-bcd1-31dcfc690d66","name":"(Success) Generate Token","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"app_name\": \"wit-open-dev\",\n    \"app_key\": \"w1t-d3V\"\n}","options":{"raw":{"language":"json"}}},"url":"{{host_booking}}/generate-token"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"name\": \"wit-dev\",\n        \"token\": \"slek93laskvn100slaoe23lsmc009.eyJhcHBfbmFtZSI6IndpdC1kZXYiLCJkZXZpY2VfaWQiOiJwb3N0bWFuIiwiZGV2aWNlX3R5cGUiOiIwMDAwMDAxIiwiZXhwIjoxNzI2MjkzODE3fQ.9Xf48KEKe5rALUTe-HC5irGTUGeUG6L4GswjpfK8G3w\",\n        \"token_expired\": \"2024-09-14T06:03:37.005128Z\"\n    },\n    \"message\": \"Success\"\n}"},{"id":"1f1d016d-2108-471d-b309-ab5545d662e9","name":"(Failed) Generate Token app-key","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"app_name\": \"wit-open-dev\",\n    \"app_key\": \"w1t-deV\"\n}","options":{"raw":{"language":"json"}}},"url":"{{host_booking}}/generate-token"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"invalid app key\"\n}"},{"id":"4c21fece-89b3-4d4e-a48d-6fbdd812241c","name":"(Failed) Generate Token app-name","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"app_name\": \"wit-open-d3v\",\n    \"app_key\": \"w1t-d3V\"\n}","options":{"raw":{"language":"json"}}},"url":"{{host_booking}}/generate-token"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"invalid app name\"\n}"},{"id":"1f3471f2-051a-4e93-8865-4817c8b23d2b","name":"(Failed) Generate Token bad-request","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"app_name\": \"\",\n    \"app_key\": \"\"\n}","options":{"raw":{"language":"json"}}},"url":"{{host_booking}}/generate-token"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"bad request: app_key is required field;app_name is required field: bad request payload\"\n}"}],"_postman_id":"b9c9b88e-b4da-4ef1-abe2-e2a82fdcee78"}],"id":"98ad7654-527b-4a10-9811-9b9f8044b4a8","description":"<h3 id=\"token\">Token</h3>\n<ul>\n<li><p><strong>Purpose:</strong> Tokens are unique identifiers generated by our system to verify the authenticity of each request.</p>\n</li>\n<li><p><strong>Process:</strong></p>\n<ul>\n<li><p>When a third-party application initiates a request to generate a token, it must provide its unique <code>app_name</code> and <code>app_key</code> as credentials.</p>\n</li>\n<li><p>Our system validates these credentials against its records.</p>\n</li>\n<li><p>Upon successful validation, a new token is generated using a secure hashing algorithm combined with a timestamp and other random elements.</p>\n</li>\n<li><p>The generated token is then returned to the third-party application.</p>\n</li>\n</ul>\n</li>\n</ul>\n","_postman_id":"98ad7654-527b-4a10-9811-9b9f8044b4a8","auth":{"type":"apikey","apikey":{"value":"{{token}}","key":"<key>"},"isInherited":true,"source":{"_postman_id":"aeb0fdbe-a4bb-4512-bc1b-e501ace4a8d6","id":"aeb0fdbe-a4bb-4512-bc1b-e501ace4a8d6","name":"Booking API Documentation","type":"collection"}}},{"name":"Booking","item":[{"name":"Ticket","id":"3eb45811-9142-4155-a75c-c619578416be","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{host_booking}}/booking/ticket","description":"<h3 id=\"list-available-tickets\">List Available Tickets</h3>\n<p><strong>Endpoint:</strong> {{host_booking}}/tickets<br /><strong>Method:</strong> GET</p>\n<h3 id=\"response\">Response</h3>\n<ul>\n<li><p><strong>Success:</strong> A JSON object containing an array of ticket objects. Each ticket object includes the following properties:</p>\n<ul>\n<li><p><strong><code>is_bundle</code>****:</strong> Indicates whether the ticket is a bundle of multiple tickets.</p>\n</li>\n<li><p><strong><code>ticket_id</code>****:</strong> The unique identifier of the ticket.</p>\n</li>\n<li><p><strong><code>ticket_name</code>****:</strong> The name of the ticket.</p>\n</li>\n<li><p><strong><code>description</code>****:</strong> A description of the ticket.</p>\n</li>\n<li><p><strong><code>price</code>****:</strong> The price of the ticket.</p>\n</li>\n<li><p><strong><code>stock</code>****:</strong> The number of available tickets.</p>\n</li>\n<li><p><strong><code>image</code>****:</strong> An optional URL to an image of the ticket.</p>\n</li>\n<li><p><strong><code>ticket_detail</code>****:</strong> If <code>is_bundle</code> is true, an array of objects representing the individual tickets included in the bundle.</p>\n</li>\n<li><p><strong><code>is_active</code>****:</strong> Indicates whether the ticket is currently active.</p>\n</li>\n<li><p><strong><code>is_online</code>****:</strong> Indicates whether the ticket can be purchased online.</p>\n</li>\n</ul>\n</li>\n</ul>\n<h3 id=\"error-handling\">Error Handling</h3>\n<ul>\n<li><strong>Invalid Request:</strong> If the request contains invalid parameters or is malformed, the API will return a <code>400 Bad Request</code> error.</li>\n</ul>\n<p><strong>Additional Notes:</strong></p>\n<ul>\n<li><p>You can customize the response fields to include additional information about the tickets, such as valid dates, restrictions, or special offers.</p>\n</li>\n<li><p>Consider using pagination to handle large result sets.</p>\n</li>\n</ul>\n","auth":{"type":"apikey","apikey":{"value":"{{token}}","key":"<key>"},"isInherited":true,"source":{"_postman_id":"aeb0fdbe-a4bb-4512-bc1b-e501ace4a8d6","id":"aeb0fdbe-a4bb-4512-bc1b-e501ace4a8d6","name":"Booking API Documentation","type":"collection"}},"urlObject":{"path":["booking","ticket"],"host":["{{host_booking}}"],"query":[],"variable":[]}},"response":[{"id":"64199fe8-8d85-4ee1-8f99-ef0d4d397bdd","name":"Ticket","originalRequest":{"method":"GET","header":[],"url":"{{host_booking}}/ticket"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": [\n        {\n            \"is_bundle\": true,\n            \"ticket_id\": \"e0443fc7-59f5-41b2-8340-2f16e1ead209\",\n            \"ticket_name\": \"Bundling Ticket\",\n            \"description\": \"\",\n            \"price\": 700000,\n            \"stock\": 883,\n            \"image\": \"\",\n            \"ticket_detail\": [\n                {\n                    \"ticket_id\": \"0101a4ba-cf77-4e71-98a2-12e4a112fc50\",\n                    \"ticket_name\": \"Main Park Entrance Ticket\"\n                },\n                {\n                    \"ticket_id\": \"74fdd29d-5b1d-44fd-b667-a3effe3ed91a\",\n                    \"ticket_name\": \"Botanical Garden Entrance Ticket\"\n                }\n            ],\n            \"is_active\": true,\n            \"is_online\": true\n        }\n    ],\n    \"message\": \"Success\"\n}"}],"_postman_id":"3eb45811-9142-4155-a75c-c619578416be"},{"name":"Booking","id":"af6b8d9c-7d5f-4a06-ab9f-e29ccd150d95","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"ticket_id\": \"TCKT-12345\",\n  \"is_bundling\": true,\n  \"quantity\": 3,\n  \"booking_date\": \"2023-12-25T12:34:56Z\",\n  \"parent\": {\n    \"name\": \"John Doe\",\n    \"email\": \"johndoe@example.com\",\n    \"phone_number\": \"+6281122334455\",\n    \"gender\": \"Male\"\n  },\n  \"guest\": [\n    {\n      \"name\": \"Jane Doe\"\n    },\n    {\n      \"name\": \"Alice Smith\"\n    }\n  ]\n}","options":{"raw":{"language":"json"}}},"url":"{{host_booking}}/booking","description":"<h3 id=\"endpoint\">Endpoint</h3>\n<p><strong>URL:</strong> {{host_booking}}<br /><strong>Method:</strong> POST</p>\n<h3 id=\"request-body\">Request Body</h3>\n<p>A JSON object containing the following fields:</p>\n<ul>\n<li><p><strong><code>ticket_id</code>****:</strong> The unique identifier of the ticket (required).</p>\n</li>\n<li><p><strong><code>is_bundling</code>****:</strong> Boolean flag indicating whether the ticket is a bundle (required). Set to <code>true</code> for bundled tickets, <code>false</code> for single tickets.</p>\n</li>\n<li><p><strong><code>quantity</code>****:</strong> The total number of tickets to be booked (required).</p>\n</li>\n<li><p><strong><code>booking_date</code>****:</strong> The desired booking date in ISO 8601 format (e.g., \"2023-12-25T12:34:56Z\") (required).</p>\n</li>\n<li><p><strong><code>parent</code>****:</strong> An object containing information about the booking lead:</p>\n<ul>\n<li><p><strong><code>name</code>****:</strong> The full name of the booking lead (required).</p>\n</li>\n<li><p><strong><code>email</code>****:</strong> The email address of the booking lead (required).</p>\n</li>\n<li><p><strong><code>phone_number</code>****:</strong> The phone number of the booking lead (required).</p>\n</li>\n<li><p><strong><code>gender</code>****:</strong> (Optional) The gender of the booking lead.</p>\n</li>\n</ul>\n</li>\n<li><p><strong><code>guest</code>****:</strong> An array of objects containing information about any guests included in the booking:</p>\n<ul>\n<li><strong><code>name</code>****:</strong> The full name of the guest (required).</li>\n</ul>\n</li>\n</ul>\n<h3 id=\"response-success\">Response (Success)</h3>\n<p>A JSON object containing the following fields:</p>\n<ul>\n<li><p><strong><code>data</code>****:</strong> An object containing detailed information about the created booking:</p>\n<ul>\n<li><p><strong><code>booking_id</code>****:</strong> A unique identifier for the booking.</p>\n</li>\n<li><p><strong><code>grand_total</code>****:</strong> The total amount to be paid for the booking.</p>\n</li>\n<li><p><strong><code>transaction_number</code>****:</strong> A unique transaction number associated with the booking.</p>\n</li>\n<li><p><strong><code>user</code>****:</strong> An object containing information about the booking lead:</p>\n<ul>\n<li><p><strong><code>email</code>****:</strong> The email address of the booking lead.</p>\n</li>\n<li><p><strong><code>guid</code>****:</strong> A unique identifier for the booking lead.</p>\n</li>\n<li><p><strong><code>name</code>****:</strong> The full name of the booking lead.</p>\n</li>\n<li><p><strong><code>phone</code>****:</strong> The phone number of the booking lead.</p>\n</li>\n</ul>\n</li>\n<li><p><strong><code>items</code>****:</strong> An array of objects representing each item included in the booking:</p>\n<ul>\n<li><p><strong><code>subtotal</code>****:</strong> The subtotal amount for the item.</p>\n</li>\n<li><p><strong><code>tenant_category_id</code>****:</strong> Unique identifier for the ticket category.</p>\n</li>\n<li><p><strong><code>tenant_category_name</code>****:</strong> Name of the ticket category (e.g., \"Main Tenant\").</p>\n</li>\n<li><p><strong><code>tenant_id</code>****:</strong> Unique identifier for the tenant associated with the ticket.</p>\n</li>\n<li><p><strong><code>tenant_location_id</code>****:</strong> Unique identifier for the location associated with the ticket.</p>\n</li>\n<li><p><strong><code>tenant_location_name</code>****:</strong> Name of the location associated with the ticket (e.g., \"Main Park\").</p>\n</li>\n<li><p><strong><code>tenant_name</code>****:</strong> Full name of the tenant associated with the ticket (e.g., \"(MAIN) SCBD Habitat\").</p>\n</li>\n<li><p><strong><code>ticket_sub_total</code>****:</strong> The subtotal amount for all tickets within the item.</p>\n</li>\n<li><p><strong><code>ticket</code>****:</strong> An array of objects representing each individual ticket within the item:</p>\n<ul>\n<li><p><strong><code>amount</code>****:</strong> Price paid for the specific ticket instance.</p>\n</li>\n<li><p><strong><code>booking_date</code>****:</strong> Booking date for this specific ticket instance.</p>\n</li>\n<li><p><strong><code>is_ticket_bundle</code>****:</strong> Boolean flag indicating whether the ticket is a bundle (false for single tickets).</p>\n</li>\n<li><p><strong><code>note</code>****:</strong> (Optional) Any notes associated with the ticket instance.</p>\n</li>\n<li><p><strong><code>quantity</code>****:</strong> The number of units booked for this specific ticket instance.</p>\n</li>\n<li><p><strong><code>ticket</code>****:</strong> An object containing detailed information about the individual ticket:</p>\n<ul>\n<li><p><strong><code>category_guid</code>****:</strong> Unique identifier for the ticket category.</p>\n</li>\n<li><p><strong><code>category_name</code>****:</strong> Name of the ticket category (e.g., \"Main Park\").</p>\n</li>\n<li><p><strong><code>description</code>****:</strong> A description of the ticket.</p>\n</li>\n<li><p><strong><code>discount</code>****:</strong> The discount applied to the ticket price (if any).</p>\n</li>\n<li><p><strong><code>discount_type</code>****:</strong> The type of discount applied (e.g., \"nominal\", \"percentage\").</p>\n</li>\n<li><p><strong><code>guid</code>****:</strong> Unique identifier for the ticket.</p>\n</li>\n<li><p><strong><code>image_url</code>****:</strong> URL of an image for the ticket.</p>\n</li>\n<li><p><strong><code>name</code>****:</strong> The name of the ticket (e.g., \"Main Park Entrance Ticket\").</p>\n</li>\n<li><p><strong><code>pb_1</code>****:</strong> (Optional) Additional ticket-specific data.</p>\n</li>\n<li><p><strong><code>pb_1_value</code>****:</strong> (Optional) Additional ticket-specific data.</p>\n</li>\n<li><p><strong><code>price</code>****:</strong> The base price of the ticket.</p>\n</li>\n<li><p><strong><code>transaction_visitor_ticket_id</code>****:</strong> Unique identifier for the ticket within the transaction system.</p>\n</li>\n</ul>\n</li>\n<li><p><strong><code>ticket_actor</code>****:</strong> An array of objects representing the individuals associated with the ticket:</p>\n<ul>\n<li><p><strong><code>full_name</code>****:</strong> Full name of the individual.</p>\n</li>\n<li><p><strong><code>gender</code>****:</strong> Gender of the individual.</p>\n</li>\n<li><p><strong><code>guid</code>****:</strong> Unique identifier for the individual.</p>\n</li>\n<li><p><strong><code>is_guest</code>****:</strong> Boolean flag indicating if the individual is a guest.</p>\n</li>\n<li><p><strong><code>is_parent</code>****:</strong> Boolean flag indicating if the individual is the booking lead.</p>\n</li>\n<li><p><strong><code>is_redeemed</code>****:</strong> Boolean flag indicating if the ticket has been redeemed.</p>\n</li>\n<li><p><strong><code>phone_number</code>****:</strong> Phone number of the individual.</p>\n</li>\n<li><p><strong><code>visitor_member_id</code>****:</strong> Unique identifier for the individual within the visitor management system.</p>\n</li>\n</ul>\n</li>\n</ul>\n</li>\n</ul>\n</li>\n</ul>\n</li>\n<li><p><strong><code>message</code>****:</strong> The message \"Success\".</p>\n</li>\n</ul>\n<p><strong>Additional Notes:</strong></p>\n<ul>\n<li><p>The specific fields and their values may vary depending on your application's requirements.</p>\n</li>\n<li><p>The <code>items</code> array can contain multiple items if the booking includes tickets from different categories or locations.</p>\n</li>\n<li><p>The <code>ticket_actor</code> array within each ticket can contain multiple entries for guests associated with the ticket.</p>\n</li>\n</ul>\n<p>This enhanced response provides a more comprehensive view of the booking details, including information about the booking lead, guests, individual tickets, and the overall transaction.</p>\n","auth":{"type":"apikey","apikey":{"value":"{{token}}","key":"<key>"},"isInherited":true,"source":{"_postman_id":"aeb0fdbe-a4bb-4512-bc1b-e501ace4a8d6","id":"aeb0fdbe-a4bb-4512-bc1b-e501ace4a8d6","name":"Booking API Documentation","type":"collection"}},"urlObject":{"path":["booking"],"host":["{{host_booking}}"],"query":[],"variable":[]}},"response":[{"id":"e7c79196-1a2a-4525-999e-c2418c185d84","name":"Booking","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"    {\n    \"ticket_id\": \"TCKT-12345\",\n    \"is_bundling\": true,\n    \"quantity\": 3,\n    \"booking_date\": \"2023-12-25T12:34:56Z\",\n    \"parent\": {\n        \"name\": \"John Doe\",\n        \"email\": \"johndoe@example.com\",\n        \"phone_number\": \"+6281122334455\",\n        \"gender\": \"Male\"\n    },\n    \"guest\": [\n        {\n        \"name\": \"Jane Doe\"\n        },\n        {\n        \"name\": \"Alice Smith\"\n        }\n    ]\n    }","options":{"raw":{"language":"json"}}},"url":"{{host_booking}}"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"booking_id\": \"9d6e437d-fba5-445b-980c-32a77cb36613\",\n        \"grand_total\": 38500,\n        \"item\": [\n            {\n                \"subtotal\": 38500,\n                \"tenant_category_id\": \"45e0681e-e76f-4d8b-917e-7d91c27158b9\",\n                \"tenant_category_name\": \"Main Tenant\",\n                \"tenant_id\": \"9e30eaae-9295-4b01-90f7-2579cd99d359\",\n                \"tenant_location_id\": \"63a78593-ea3e-4b6d-a54f-acdbda072c48\",\n                \"tenant_location_name\": \"Main Park\",\n                \"tenant_name\": \"(MAIN) SCBD Habitat\",\n                \"ticket\": [\n                    {\n                        \"amount\": 38500,\n                        \"booking_date\": \"2024-09-13T16:00:00\",\n                        \"is_ticket_bundle\": false,\n                        \"note\": null,\n                        \"quantity\": 1,\n                        \"ticket\": {\n                            \"category_guid\": \"Main Tenant\",\n                            \"category_name\": \"Main Park\",\n                            \"description\": \"<p>The \\\"Main Park Entrance Ticket\\\" grants access to the Habitat, offering an immersive experience into the heart of nature's wonders.</p><p><br></p><p>Area : ENTRANCE, PLAYGROUND, PLAZA, SAOLA</p>\",\n                            \"discount\": 0,\n                            \"discount_type\": \"nominal\",\n                            \"guid\": \"0101a4ba-cf77-4e71-98a2-12e4a112fc50\",\n                            \"image_url\": \"https://storage.googleapis.com/scbd-habitat-bucket/45836012-f937-455e-ad68-9576e0d6e5f1.png\",\n                            \"name\": \"Main Park Entrance Ticket\",\n                            \"pb_1\": 10,\n                            \"pb_1_value\": 3500,\n                            \"price\": 35000,\n                            \"transaction_visitor_ticket_id\": \"e7fa80d7-3947-4c4e-805a-c7a5c6cfa2a6\"\n                        },\n                        \"ticket_actor\": [\n                            {\n                                \"full_name\": \"John Doe\",\n                                \"gender\": \"\",\n                                \"guid\": \"01e5131c-2f91-46ef-94e3-3d4dc1360b0f\",\n                                \"is_guest\": false,\n                                \"is_parent\": true,\n                                \"is_redeemed\": false,\n                                \"phone_number\": \"+6281122223344\",\n                                \"visitor_member_id\": \"f8912687-8d0e-4890-b3ec-d83a6aadf6e6\"\n                            }\n                        ],\n                        \"ticket_bundling\": null\n                    }\n                ],\n                \"ticket_sub_total\": 38500\n            }\n        ],\n        \"transaction_number\": \"INV-HABITAT-20240913-00001\",\n        \"user\": {\n            \"email\": \"johndoe@example.com\",\n            \"guid\": \"f8912687-8d0e-4890-b3ec-d83a6aadf6e6\",\n            \"name\": \"John Doe\",\n            \"phone\": \"+6281122223344\"\n        }\n    },\n    \"message\": \"Success\"\n}"}],"_postman_id":"af6b8d9c-7d5f-4a06-ab9f-e29ccd150d95"}],"id":"8ac9a543-99bb-48c6-8c08-14d6eb0e6462","description":"<h3 id=\"overview\">Overview</h3>\n<p>This section details the endpoints and methods related to managing bookings. It includes creating new bookings, retrieving booking details, and listing available tickets for booking.</p>\n","_postman_id":"8ac9a543-99bb-48c6-8c08-14d6eb0e6462","auth":{"type":"apikey","apikey":{"value":"{{token}}","key":"<key>"},"isInherited":true,"source":{"_postman_id":"aeb0fdbe-a4bb-4512-bc1b-e501ace4a8d6","id":"aeb0fdbe-a4bb-4512-bc1b-e501ace4a8d6","name":"Booking API Documentation","type":"collection"}}},{"name":"Health Check","id":"dad2aa18-622e-4d89-aca9-a361294b4e18","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{host_booking}}/health-check","description":"<p><strong>Health Check Endpoint</strong></p>\n<p><strong>Purpose:</strong><br />This endpoint is designed to provide a quick and easy way to check the health and availability of the booking system.</p>\n<p><strong>Method:</strong> GET<br /><strong>Endpoint:</strong> {{host_booking}}/health-check</p>\n<p><strong>Response:</strong></p>\n<ul>\n<li><p><strong>Success:</strong> Returns a JSON object indicating that all essential services are operational.</p>\n</li>\n<li><p><strong>Failure:</strong> Returns a JSON object indicating that at least one service is not responding.</p>\n</li>\n</ul>\n<p><strong>Additional Notes:</strong></p>\n<ul>\n<li><p>The specific services included in the <code>services</code> object may vary depending on the application.</p>\n</li>\n<li><p>The healthcheck endpoint can be used by monitoring tools to track the availability of the system.</p>\n</li>\n<li><p>Consider implementing rate limiting to prevent abuse of the endpoint.</p>\n</li>\n</ul>\n<p><strong>Why is this important?</strong></p>\n<ul>\n<li><p><strong>Monitoring:</strong> Helps identify issues early before they impact users.</p>\n</li>\n<li><p><strong>Debugging:</strong> Provides insights into the health of individual services.</p>\n</li>\n<li><p><strong>Automation:</strong> Can be used in automated deployment and monitoring pipelines.</p>\n</li>\n</ul>\n","auth":{"type":"apikey","apikey":{"value":"{{token}}","key":"<key>"},"isInherited":true,"source":{"_postman_id":"aeb0fdbe-a4bb-4512-bc1b-e501ace4a8d6","id":"aeb0fdbe-a4bb-4512-bc1b-e501ace4a8d6","name":"Booking API Documentation","type":"collection"}},"urlObject":{"path":["health-check"],"host":["{{host_booking}}"],"query":[],"variable":[]}},"response":[{"id":"79e2318c-cf39-47ca-972f-80f00460be6e","name":"UP Health Check","originalRequest":{"method":"GET","header":[],"url":"{{host_booking}}}/health-check"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n  \"status\": \"UP\",\n  \"timestamp\": \"2023-11-23T13:37:00Z\",\n  \"services\": {\n    \"database\": \"UP\",\n    \"cache\": \"UP\",\n    \"messaging\": \"UP\"\n  }\n}"},{"id":"017452c8-19b5-4342-8bb2-b2f73a73af02","name":"DOWN Health Check","originalRequest":{"method":"GET","header":[],"url":"{{host_booking}}}/health-check"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n  \"status\": \"DOWN\",\n  \"timestamp\": \"2023-11-23T13:37:00Z\",\n  \"error\": \"Database connection failed\",\n  \"services\": {\n    \"database\": \"DOWN\",\n    \"cache\": \"UP\",\n    \"messaging\": \"UP\"\n  }\n}"}],"_postman_id":"dad2aa18-622e-4d89-aca9-a361294b4e18"}],"auth":{"type":"apikey","apikey":{"value":"{{token}}","key":"<key>"}},"event":[{"listen":"prerequest","script":{"id":"f8271526-4d38-416e-81cb-282e9556b5f5","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"390f4d3f-d22b-480b-baa6-61541249e6ea","type":"text/javascript","exec":[""]}}]}