### Get Listing Fee Settings (Java) Source: https://github.com/hostaway/api/blob/master/source/includes/_listing_feeSettings_list.md This Java example utilizes the OkHttpClient library to perform a GET request for listing fee settings. It demonstrates how to build the request with the necessary URL and headers. ```java OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://api.hostaway.com/v1/listingFeeSettings/{listingId}") .get() .addHeader("Authorization", "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c") .addHeader("Cache-control", "no-cache") .build(); Response response = client.newCall(request).execute(); ``` -------------------------------- ### Example GET Request URL with Query Parameters Source: https://github.com/hostaway/api/blob/master/source/includes/_los_retrieveList.md This is an example of a GET request URL for retrieving a list of bookings. It includes query parameters for filtering results, such as listingMapId, checkin dates, sync statuses, and occupancy. The `limit` parameter can be used to control the number of items returned. ```http GET https://api.hostaway.com/v1/los?listingMapId=83546&checkinStart=2022-09-01&checkInEnd=2022-09-01&isSyncedAirbnb=0&isSyncedBooking=0&isSyncedExpedia=0&isSyncedVrbo=0&occupancy=1 ``` -------------------------------- ### Get Listing Tax Settings (Python) Source: https://github.com/hostaway/api/blob/master/source/includes/_taxSettings_listing.md This Python example uses the 'requests' library to fetch listing tax settings. It shows how to define the URL, headers, and send the GET request, then prints the response text. ```python import requests url = "https://api.hostaway.com/v1/listingTaxSettings/{listingId}" headers = { 'Authorization': "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c", 'Cache-control': "no-cache", } response = requests.request("GET", url, headers=headers) print(response.text) ``` -------------------------------- ### Get Listing Price Settings (Python) Source: https://github.com/hostaway/api/blob/master/source/includes/_listing_listingPricingSettings_get.md This Python example uses the 'requests' library to fetch listing price settings. It defines the URL and headers, including the authorization token, before sending the GET request. ```python import requests url = "https://api.hostaway.com/v1/listing/pricingSettings/{listingId}" headers = { 'Authorization': "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c", 'Cache-control': "no-cache", } response = requests.request("GET", url, headers=headers) print(response.text) ``` -------------------------------- ### Retrieve Reservations Payment Methods (Python) Source: https://github.com/hostaway/api/blob/master/source/includes/_reservationPaymentMethod_retrieveList.md This Python example uses the 'requests' library to perform a GET request for reservation payment methods. It shows how to set up the request headers, including the authorization token. ```python import requests url = "https://api.hostaway.com/v1/reservations/paymentMethods" headers = { 'Authorization': "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6IjljOGYzN2NjMzAzNWI5M2Q5MzJiMGZjZGYwOGYzNjc2NDA5MWNjMTI3MTY0ZWZhOGIzMTk1ZjRiOTU4YjNkZjYxZWNlZjVmOGJhMzkxZGYyIn0.eyJhdWQiOiIxMDQ1MCIsImp0aSI6IjljOGYzN2NjMzAzNWI5M2Q5MzJiMGZjZGYwOGYzNjc2NDA5MWNjMTI3MTY0ZWZhOGIzMTk1ZjRiOTU4YjNkZjYxZWNlZjVmOGJhMzkxZGYyIiwiaWF0IjoxNTI2NjQ0MzE0LCJuYmYiOjE1MjY2NDQzMTQsImV4cCI6MTU0MjE5NjMxNCwic3ViIjoiIiwic2NvcGVzIjpbImdlbmVyYWwiXX0.hVv1ybL5Ifl6VatEBXxJz4sNa7f2RPGlSGCK5YNiSDNBeW9FjgfzbKFW4GaKGXNBYk2b7TpxhwF_3RbBRE0Y817TIiwUNZEhMCz5do4Kp9ZX6nrHlvJiqdLYZXhaHUlU8vq-80a0xTmgVnjRH20JeA0q9t8gxcfYJUQfQMOb59Q", 'Cache-control': "no-cache", } response = requests.request("GET", url, headers=headers) print(response.text) ``` -------------------------------- ### Task Creation Response Example Source: https://github.com/hostaway/api/blob/master/source/includes/_task_create.md This is an example of a successful response when creating a task. It includes the status and the details of the created task object. ```json { "status": "success", "result": { "id": 1, "listingMapId": null, "channelId": null, "reservationId": null, "autoTaskId": null, "assigneeUserId": null, "canBePickedByGroupId": null, "supervisorUserId": null, "createdByUserId": null, "isUpdatedManually": 0, "checklistTemplateId": null, "reservationUnitId": 0, "title": "Task title", "description": null, "canStartFrom": "2023-07-01 00:00:00", "canStartFromListingTime": "2023-07-01 00:00:00", "canStartFromEvent": "arrival", "canStartFromEventDelta": 0, "shouldEndBy": "2023-07-30 00:00:00", "shouldEndByListingTime": "2023-07-30 00:00:00", "shouldEndByEvent": "departure", "shouldEndByEventDelta": 0, "status": "pending", "resolutionNote": null, "feedbackScore": null, "feedbackNote": null, "startedAt": null, "confirmedAt": null, "completedAt": null, "priority": null, "cost": null, "costCurrency": null, "costDescription": null, "color": null, "expense": null, "rank": 0, "checklistItems": [], "customFieldValue": [], "categoriesMap": null } } ``` -------------------------------- ### Install Dependencies and Start Server Source: https://github.com/hostaway/api/blob/master/README.md Install project dependencies using Bundler and start the Middleman server for local development. This command is used after cloning the repository and changing into the project directory. ```shell bundle install bundle exec middleman server ``` -------------------------------- ### OkHttpClient Setup (Java) Source: https://github.com/hostaway/api/blob/master/source/includes/_reservation_createReservationFinanceFields.md This snippet shows the basic setup for an OkHttpClient in Java. It is often used as a prerequisite for making HTTP requests in Java applications. ```java OkHttpClient client = new OkHttpClient().newBuilder() .build(); ``` -------------------------------- ### Create SetupIntent using Python Source: https://github.com/hostaway/api/blob/master/source/includes/_stripe_createSetupIntentForListing.md This Python script utilizes the 'requests' library to send a POST request for creating a Stripe SetupIntent. It includes the required Authorization header. ```python import requests url = "https://api.hostaway.com/v1/stripe/createSetupIntent/123" headers = { 'Authorization': "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c", } response = requests.request("POST", url, headers=headers) print(response.text) ``` -------------------------------- ### Get Currency Codes and Currencies List in Python Source: https://github.com/hostaway/api/blob/master/source/includes/_commonInfo_currencies.md This Python script utilizes the 'requests' library to perform a GET request to the Hostaway API for currency data. Ensure the 'requests' library is installed (`pip install requests`). ```python import requests url = "https://api.hostaway.com/v1/currencies" payload = "" headers = { 'Authorization': "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImRlNTVlZTc1ZGI3YzhkZmYyMGE4MzU2ODFjMGNkNmY0OGE3ZDI5ODg4NmU4ZGI5ZmRhMDM2ODg5YTFhZDNjNWFkOTAzY2QyOGNmNTExZTBjIn0.eyJhdWQiOiIxMDQ5MCIsImp0aSI6ImRlNTVlZTc1ZGI3YzhkZmYyMGE4MzU2ODFjMGNkNmY0OGE3ZDI5ODg4NmU4ZGI5ZmRhMDM2ODg5YTFhZDNjNWFkOTAzY2QyOGNmNTExZTBjIiwiaWF0IjoxNTQzODcyMDMzLCJuYmYiOjE1NDM4NzIwMzMsImV4cCI6MTU1OTQyNDAzMywic3ViIjoiIiwic2NvcGVzIjpbImdlbmVyYWwiXX0.Fx-hyFdOENc_n_2GPPpYlGHXSwGck01EpQ7IMz-kTSpzZ-sNxPYf2bK9wnCYApCFqSYQsmNaUcEN7spUz-6sT0sFpBCNhOVqm_lK6vvHkGn8Z9ScfowSWcdrl6E8BAQxGDRxLQx4RgVAlBdZsN0HgHRVuB49bjTnpTWlQs0N-iM", 'Cache-control': "no-cache" } response = requests.request("GET", url, data=payload, headers=headers) print(response.text) ``` -------------------------------- ### Create SetupIntent using PHP Source: https://github.com/hostaway/api/blob/master/source/includes/_stripe_createSetupIntentForListing.md This PHP script demonstrates how to make a POST request to create a Stripe SetupIntent. It includes error handling for cURL requests. ```php "https://api.hostaway.com/v1/stripe/createSetupIntent/123", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_HTTPHEADER => array( "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c", ), )); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } ``` -------------------------------- ### Stripe SetupIntent Response Example Source: https://github.com/hostaway/api/blob/master/source/includes/_stripe_createSetupIntentForListing.md This is an example of a successful response when creating a Stripe SetupIntent. It contains the client secret needed for the Stripe client-side SDK. ```json { "status": "success", "result": { "clientSecret": "seti_1FJaxuJjX5ptYS3JAMyMSkRQ_secret_FpFS6JXsMVAsiSbhjlF1RKcIHh4pEyz" } } ``` -------------------------------- ### Get Finance Standard Fields by Reservation ID (Java) Source: https://github.com/hostaway/api/blob/master/source/includes/_financialReporting_standardFields.md This Java example utilizes OkHttpClient to perform a GET request for finance standard fields. It sets necessary headers for authentication and caching. ```java OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://api.hostaway.com/v1/financeStandardField/reservation/755143") .get() .addHeader("Authorization", "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c") .addHeader("Cache-control", "no-cache") .build(); Response response = client.newCall(request).execute(); ``` -------------------------------- ### Create Stripe Setup Intent using Java Source: https://github.com/hostaway/api/blob/master/source/includes/_stripe_createSetupIntent.md This Java snippet demonstrates creating a Stripe Setup Intent using the OkHttpClient library. It configures a POST request with the required authorization header. ```java OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://api.hostaway.com/v1/stripe/createSetupIntent") .post(null) .addHeader("Authorization", "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c") .build(); Response response = client.newCall(request).execute(); ``` -------------------------------- ### Get Country Codes and List (Java) Source: https://github.com/hostaway/api/blob/master/source/includes/_commonInfo_countries.md Use OkHttpClient in Java to make a GET request to retrieve country data. This example shows how to build the request with the necessary authorization and cache headers. ```java OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://api.hostaway.com/v1/countries") .get() .addHeader("Authorization", "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImRlNTVlZTc1ZGI3YzhkZmYyMGE4MzU2ODFjMGNkNmY0OGE3ZDI5ODg4NmU4ZGI5ZmRhMDM2ODg5YTFhZDNjNWFkOTAzY2QyOGNmNTExZTBjIn0.eyJhdWQiOiIxMDQ5MCIsImp0aSI6ImRlNTVlZTc1ZGI3YzhkZmYyMGE4MzU2ODFjMGNkNmY0OGE3ZDI5ODg4NmU4ZGI5ZmRhMDM2ODg5YTFhZDNjNWFkOTAzY2QyOGNmNTExZTBjIiwiaWF0IjoxNTQzODcyMDMzLCJuYmYiOjE1NDM4NzIwMzMsImV4cCI6MTU1OTQyNDAzMywic3ViIjoiIiwic2NvcGVzIjpbImdlbmVyYWwiXX0.Fx-hyFdOENc_n_2GPPpYlGHXSwGck01EpQ7IMz-kTSpzZ-sNxPYf2bK9wnCYApCFqSYQsmNaUcEN7spUz-6sT0sFpBCNhOVqm_lK6vvHkGn8Z9ScfowSWcdrl6E8BAQxGDRxLQx4RgVAlBdZsN0HgHRVuB49bjTnpTWlQs0N-iM") .addHeader("Cache-control", "no-cache") .build(); Response response = client.newCall(request).execute(); ``` -------------------------------- ### Java Request Example with OkHttp Source: https://github.com/hostaway/api/blob/master/source/includes/_cancellationPolicy_createCancellationPolicy.md Demonstrates creating a cancellation policy using Java and the OkHttp client. Includes setting up the request body, headers, and executing the request. ```java OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("application/json"); RequestBody body = RequestBody.create(mediaType, "{\n \"name\": \"Cancellation policies\",\n \"cancellationPolicyItem\": [\n {\n \"refundAmount\": 30,\n \"refundType\": \"percentage\",\n \"refundField\": \"totalPrice\",\n \"timeDelta\": 3600,\n \"event\": \"reservation\"\n },\n {\n \"refundAmount\": 30,\n \"refundType\": \"percentage\",\n \"refundField\": \"totalPrice\",\n \"timeDelta\": 3600,\n \"event\": \"reservation\"\n },\n {\n \"refundAmount\": 30,\n \"refundType\": \"percentage\",\n \"refundField\": \"totalPrice\",\n \"timeDelta\": 3600,\n \"event\": \"reservation\"\n }\n ]\n}"); Request request = new Request.Builder() .url("https://api.hostaway.com/v1/cancellationPolicies") .post(body) .addHeader("Authorization", "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImU3ZDRkNDM1ZDQ0M2UwYTJkYTYxOTE5Yzk0NWY3ODk0YThhYTMzZjM1MjM2ZWEzY2NiZjEwMzJmNTM2YzRiYjVhY2Y3YTkzYTNkN2ZhYjQ0In0.eyJhdWQiOiIxMDQ5MCIsImp0aSI6ImU3ZDRkNDM1ZDQ0M2UwYTJkYTYxOTE5Yzk0NWY3ODk0YThhYTMzZjM1MjM2ZWEzY2NiZjEwMzJmNTM2YzRiYjVhY2Y3YTkzYTNkN2ZhYjQ0IiwiaWF0IjoxNTI4MjgzMjgwLCJuYmYiOjE1MjgyODMyODAsImV4cCI6MTU0MzgzNTI4MCwic3ViIjoiIiwic2NvcGVzIjpbImdlbmVyYWwiXX0.pzzHM2Qebad--FC8iwWZrFpblWQyiCKiroaEyrXKPWTXug3soe-62HK1bzZVlLQEJa166AtkevdEjXkOhQ6yRMJh3LlINrOKpLOSZKeTyMIydtYCdXJyWqgl3b3llAk8dZyQ8L8J_oyV9sRWMhy7MuIgAyFf1ITdVS2Z94KdyII") .addHeader("Content-type", "application/json") .addHeader("Cache-control", "no-cache") .build(); Response response = client.newCall(request).execute(); ``` -------------------------------- ### Create SetupIntent using cURL Source: https://github.com/hostaway/api/blob/master/source/includes/_stripe_createSetupIntentForListing.md Use this cURL command to create a Stripe SetupIntent for a specific listing. Ensure your API key is correctly set in the Authorization header. ```shell curl -X POST \ https://api.hostaway.com/v1/stripe/createSetupIntent/123 \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXeyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c' ``` -------------------------------- ### Get Finance Calculated Fields by Reservation ID (Java) Source: https://github.com/hostaway/api/blob/master/source/includes/_financialReporting_calculatedFields.md This Java example utilizes the OkHttpClient library to perform a GET request for finance calculated fields. It includes setting the necessary headers for authentication and caching. ```java OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://api.hostaway.com/v1/financeCalculatedField/reservation/755143") .get() .addHeader("Authorization", "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c") .addHeader("Cache-control", "no-cache") .build(); Response response = client.newCall(request).execute(); ``` -------------------------------- ### Retrieve Seasonal Rules with JavaScript Source: https://github.com/hostaway/api/blob/master/source/includes/_seasonalRule_retrieveList.md This JavaScript example uses the XMLHttpRequest object to make a GET request for seasonal rules. It logs the response to the console. ```javascript var data = null; var xhr = new XMLHttpRequest(); xhr.withCredentials = true; xhr.addEventListener("readystatechange", function () { if (this.readyState === 4) { console.log(this.responseText); } }); xhr.open("GET", "https://api.hostaway.com/v1/seasonalRules"); xhr.setRequestHeader("Authorization", "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6IjljOGYzN2NjMzAzNWI5M2Q5MzJiMGZjZGYwOGYzNjc2NDA5MWNjMTI3MTY0ZWZhOGIzMTk1ZjRiOTU4YjNkZjYxZWNlZjVmOGJhMzkxZGYyIn0.eyJhdWQiOiIxMDQ1MCIsImp0aSI6IjljOGYzN2NjMzAzNWI5M2Q5MzJiMGZjZGYwOGYzNjc2NDA5MWNjMTI3MTY0ZWZhOGIzMTk1ZjRiOTU4YjNkZjYxZWNlZjVmOGJhMzkxZGYyIiwiaWF0IjoxNTI2NjQ0MzE0LCJuYmYiOjE1MjY2NDQzMTQsImV4cCI6MTU0MjE5NjMxNCwic3ViIjoiIiwic2NvcGVzIjpbImdlbmVyYWwiXX0.hVv1ybL5Ifl6VatEBXxJz4sNa7f2RPGlSGCK5YNiSDNBeW9FjgfzbKFW4GaKGXNBYk2b7TpxhwF_3RbBRE0Y817TIiwUNZEhMCz5do4Kp9ZX6nrHlvJiqdLYZXhaHUlU8vq-80a0xTmgVnjRH20JeA0q9t8gxcfYJUQfQMOb59Q"); xhr.setRequestHeader("Cache-control", "no-cache"); xhr.send(data); ``` -------------------------------- ### Retrieve Listing with Python (requests) Source: https://github.com/hostaway/api/blob/master/source/includes/_listing_retrieveListing.md This Python example uses the 'requests' library to perform a GET request for a specific listing. It prints the response text. ```python import requests url = "https://api.hostaway.com/v1/listings/40160" headers = { 'Authorization': "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c", 'Cache-control': "no-cache", } response = requests.request("GET", url, headers=headers) print(response.text) ``` -------------------------------- ### Create Reservation with Finance Fields Source: https://github.com/hostaway/api/blob/master/source/includes/_reservation_createReservationFinanceFields.md This example demonstrates how to send a POST request to create a reservation, including a detailed 'financeField' array. This array specifies various financial components like base rate, cleaning fee, VAT, and damage deposit, along with their values and whether they are included in the total price. ```php 'https://api.hostaway.net/reservations', CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_POSTFIELDS => '{ "guestEmail": "mikhail@hostaway.com", "guestPicture": "https://a0.muscache.com/im/pictures/3c4d82ed-196d-493a-a43b-07fcc70d5ccd.jpg?aki_policy=profile_small", "guestRecommendations": 5, "guestTrips": 10, "guestWork": "test", "isGuestIdentityVerified": 1, "isGuestVerifiedByEmail": 1, "isGuestVerifiedByWorkEmail": 1, "isGuestVerifiedByFacebook": 1, "isGuestVerifiedByGovernmentId": 1, "isGuestVerifiedByPhone": 1, "isGuestVerifiedByReviews": 1, "numberOfGuests": 1, "adults": 1, "children": null, "infants": null, "pets": null, "arrivalDate": "2022-11-19", "departureDate": "2022-11-20", "checkInTime": null, "checkOutTime": null, "phone": "+75125551212", "totalPrice": 13520, "taxAmount": null, "channelCommissionAmount": null, "cleaningFee": null, "securityDepositFee": null, "isPaid": null, "currency": "USD", "hostNote": null, "guestNote": null, "guestLocale": null, "doorCode": "12345", "doorCodeVendor": "test", "doorCodeInstruction": "test", "comment": null, "airbnbExpectedPayoutAmount": 111.12, "airbnbListingBasePrice": 110, "airbnbListingCancellationHostFee": 12.02, "airbnbListingCancellationPayout": 122, "airbnbListingCleaningFee": 1, "airbnbListingHostFee": 43, "airbnbListingSecurityPrice": 12, "airbnbOccupancyTaxAmountPaidToHost": 332, "airbnbTotalPaidAmount": 12, "airbnbTransientOccupancyTaxPaidAmount": 0, "airbnbCancellationPolicy": "moderate", "customerUserId": null, "financeField": [ { "id": null, "listingFeeSettingId": null, "type": "price", "name": "baseRate", "title": "Base rate", "alias": null, "quantity": null, "value": 12320, "total": 12320, "isIncludedInTotalPrice": 1, "isOverriddenByUser": 0, "isQuantitySelectable": 0, "isMandatory": null, "isDeleted": 0 }, { "id": null, "listingFeeSettingId": null, "type": "fee", "name": "cleaningFee", "title": "Cleaning fee", "alias": null, "quantity": null, "value": 500, "total": 500, "isIncludedInTotalPrice": 1, "isOverriddenByUser": 0, "isQuantitySelectable": 0, "isMandatory": null, "isDeleted": 0 }, { "id": null, "listingFeeSettingId": null, "type": "tax", "name": "vat", "title": "VAT / GST", "alias": null, "quantity": null, "value": 200, "total": 200, "isIncludedInTotalPrice": 1, "isOverriddenByUser": 0, "isQuantitySelectable": 0, "isMandatory": null, "isDeleted": 0 }, { "id": null, "listingFeeSettingId": null, "type": "fee", "name": "damageDeposit", "title": "Damage deposit", "alias": null, "quantity": null, "value": 500, "total": 500, "isIncludedInTotalPrice": 1, "isOverriddenByUser": 0, "isQuantitySelectable": 0, "isMandatory": null, "isDeleted": 0 } ] }', CURLOPT_HTTPHEADER => array( 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIyODY3MyIsImp0aSI6IjJjYjk4NWRlNDIzYmExZTBiMzdiZjgzNjdjOWExZDE0ZmIwNDE3YjIxNGQ0Yjk4OGJkYzE5NjU3NjI4YmFiZDQ0YTQxNGRlZmI5NTYyMGRhIiwiaWF0IjoxNjY3MzEyNjUxLCJuYmYiOjE2NjczMTI2NTEsImV4cCI6MTczMDQ3MTA1MSwic3ViIjoiIiwic2NvcGVzIjpbImdlbmVyYWwiXSwic2VjcmV0SWQiOjI3MTd9.JSvlt8VuBvPygoSjBeShiG0SQgwleninXSMuD4S4NwpsvljtHmsfM5CF1uQT-FTVeRuc8BdxNVPFuobWovQIEOlh6dYZJtaYv8PECp-EzgJCZKyv7-sY6cEC9s8Kf8hmJP3uOc-T90gxmOmOWm5zeL09HzWrdOqF_b-WgMifBtQ', 'Content-type: text/plain' ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ``` } ] } ] } ```