{"templateId":"markdown","sharedDataIds":{},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Environment","siteUrl":"https://developers.booking.com","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Learn how to effectively use the Try it feature in the API documentation."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Try it"]}," feature to send sample requests to API endpoints directly from the developer portal. In the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Mock (schema only)"]}," environment, Try it returns schema-driven mock responses or pre-built example responses. In the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Production"]}," environment, it sends the request to the live API and returns dynamic responses from your selected test property."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"environment","__idx":0},"children":["Environment"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can select between two different environments (top right corner in the UI):"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Mock (schema only) (default)"]},":"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Helps to understand the response data schema"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Recommended for all write operations (POST, PUT, PATCH, DELETE)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Environment for testing without affecting live/test data"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Production"]},":"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Make sure to use only test properties as the requests hit the production endpoint."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Changes will affect your test property data"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Requires valid credentials"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"request","__idx":1},"children":["Request"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Click on any unresolved placeholders to add a value or edit an existing placeholder value."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The portal loads the default request body. Where the specification supports multiple request body examples (for example: Rooms API POST endpoint), you can choose a different request body from the drop-down list."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Some helpful pointers before running a request:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Authentication"]}," (when using production endpoint): Configure your authentication headers"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Bearer token (JWT) as required. Use the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Environments"]}," tab."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Make sure to manage separate machine accounts for test vs. properties in production."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Ensure credentials match your selected environment."]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Parameters"]},": Fill in required parameters"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Path parameters (like ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["propertyId"]},")"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Query parameters (like ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["language_code"]},")"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Request body for ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST/PUT"]}," operations"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Execute"]},": Click ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Send"]}," to send the request"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The request is sent to the selected environment"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["When sending requests to the production endpoint, a real HTTP request is made to the API"]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"response","__idx":2},"children":["Response"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The Try it feature provides comprehensive response information to the extent supported by the OpenAPI specification:"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"status-code","__idx":3},"children":["Status code"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["2xx"]},": Success responses (200)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["4xx"]},": Client errors (400 Bad Request, 401 Unauthorized, 404 Not Found)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["5xx"]},": Server errors (500 Internal Server Error)"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"response-body","__idx":4},"children":["Response body"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["JSON formatted response data"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If the returned response, by default, is unformatted, select the supported Response body format in the UI."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"response-headers","__idx":5},"children":["Response headers"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Content-Type, Content-Length."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"environments","__idx":6},"children":["Environments"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Environments"]}," tab allows you to create variables specific to the environment. For example, you can add a variable to hold the value of the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["propertyId"]}," placeholder. The portal inserts the respective value depending on the environment at the time of sending the request."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"variables","__idx":7},"children":["Variables"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Most of the endpoints (especially POST/PUT/PATCH/DELETE) require you to add a path or query parameter before sending the request. Path parameters use single braces in the OpenAPI specification (e.g., ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{propertyId}"]},"). The portal's Environments tab lets you store values for these parameters as reusable variables."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"path-parameters","__idx":8},"children":["Path parameters"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Required"]},": Must be provided to make the request"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Type validation"]},": Ensures correct data types (integer, string, etc.)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Example"]},": ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["propertyId"]}," in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/properties/{propertyId}/resource"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"query-parameters","__idx":9},"children":["Query parameters"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Optional"]},": Usually have default values"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Example"]},": ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["language_code"]}," with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["en-us"]}," as the default value"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"request-body","__idx":10},"children":["Request body"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Schema validation"]},": Follows OpenAPI schema definitions"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Example data"]},": Prepopulated with sample values"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"best-practices","__idx":11},"children":["Best practices"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This section provides some basic practice guidelines."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"authentication","__idx":12},"children":["Authentication"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Always use separate machine accounts for test properties vs. properties in production."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["When testing with the production endpoint, make sure to use only test properties."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"for-read-operations-get","__idx":13},"children":["For Read operations (GET)"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["GET requests are non-mutating, but use authorised test properties when testing against the production endpoint."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Use valid IDs that exist in your system"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Check response structure for integration planning"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"for-write-operations-post-put-patch","__idx":14},"children":["For Write operations (POST, PUT, PATCH)"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Always use Mock (schema only) environment first"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Verify request payload structure"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Check response for success confirmation"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Test error scenarios with invalid data"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"for-delete-operations-delete","__idx":15},"children":["For Delete operations (DELETE)"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Preferable to use Mock (schema only) environment only"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Understand the operation is irreversible"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Have backup data when testing using test properties"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"troubleshooting","__idx":16},"children":["Troubleshooting"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"common-issues","__idx":17},"children":["Common issues"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["401 Unauthorized"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Check authentication credentials"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Verify token is valid and not expired"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Ensure credentials match the selected environment"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["400 Bad Request"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Validate request payload against schema"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Check required fields are provided"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Verify data types match specification"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["404 Not Found"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Confirm the resource ID exists"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Check the endpoint URL is correct"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Verify you have access to the resource"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"getting-help","__idx":18},"children":["Getting help"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If you encounter issues:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Check the response error message for details"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Verify your request matches the API specification"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Contact the Connectivity Team for support"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"em","attributes":{},"children":["This documentation applies to all endpoints in the API. The Try it feature provides a consistent testing experience across all operations."]}]}]},"headings":[{"value":"Environment","id":"environment","depth":2},{"value":"Request","id":"request","depth":2},{"value":"Response","id":"response","depth":2},{"value":"Status code","id":"status-code","depth":3},{"value":"Response body","id":"response-body","depth":3},{"value":"Response headers","id":"response-headers","depth":3},{"value":"Environments","id":"environments","depth":2},{"value":"Variables","id":"variables","depth":3},{"value":"Path parameters","id":"path-parameters","depth":4},{"value":"Query parameters","id":"query-parameters","depth":4},{"value":"Request body","id":"request-body","depth":4},{"value":"Best practices","id":"best-practices","depth":2},{"value":"Authentication","id":"authentication","depth":3},{"value":"For Read operations (GET)","id":"for-read-operations-get","depth":3},{"value":"For Write operations (POST, PUT, PATCH)","id":"for-write-operations-post-put-patch","depth":3},{"value":"For Delete operations (DELETE)","id":"for-delete-operations-delete","depth":3},{"value":"Troubleshooting","id":"troubleshooting","depth":2},{"value":"Common issues","id":"common-issues","depth":3},{"value":"Getting help","id":"getting-help","depth":3}],"frontmatter":{"seo":{"title":"Environment"}},"lastModified":"2026-06-26T13:41:28.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/connectivity/docs/openapispecs/template/about-try-it","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}