# Get In Stay URL

With this API, you can get the URL of the Experience CRM In Stay for a specific guest.&#x20;

You will need to use the reservation ID from the PMS.

### Request&#x20;

<mark style="color:green;">**GET**</mark> &#x20;

{% code overflow="wrap" %}

```url
https://interface.experience-hotel.com/api/xp-get-forms-url/instay/{{reference}}?language=en
```

{% endcode %}

The PMS/Channel Manager ID for the specific reservation is required to be sent in the URL before the parameters.&#x20;

<table><thead><tr><th>Params</th><th width="100">Required</th><th>Description</th></tr></thead><tbody><tr><td>language</td><td>Optional</td><td><p>If specified, the returned URL will be in that language if it is available. </p><p>If not, the default language will be returned.</p></td></tr></tbody></table>

### Response

#### Status Code 200 OK

The response will contain 3 different URLs. Each URL representing the satisfaction level of the guest. These URLs are intended to be used as a choice in the message you will send to the guest.&#x20;

Depending on the URL clicked, the guest might see different messages.&#x20;

| URLs         | Description                                    |
| ------------ | ---------------------------------------------- |
| url\_good    | URL when the guest is happy                    |
| url\_average | URL when the guest is not happy nor unhappy    |
| url\_bad     | URL when the guest is not happy with his stay. |

{% code title="JSON" overflow="wrap" %}

```json
{
    "url_good": "https://guest.experience-hotel.com/en/hotel-demo/1sp0qpbqnp73?selected=10",
    "url_average": "https://guest.experience-hotel.com/en/hotel-demo/1sp0qpbqnp73?selected=5",
    "url_bad": "https://guest.experience-hotel.com/en/hotel-demo/1sp0qpbqnp73?selected=0"
}
```

{% endcode %}

#### Exemple of use&#x20;

When an InStay message is sent from the CRM, it usually looks like that:&#x20;

<figure><img src="/files/PqgR1DpaWMWW5cWq506G" alt="" width="563"><figcaption></figcaption></figure>

#### Status code 404 Not Found

You will get this response when the Booking ID does not match with any booking ID we have for this property.&#x20;

```json
{
    "message": "Stay not found"
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://experience-crm.gitbook.io/experience-crm-api/guests/get-guest-relationship-form-url/get-in-stay-url.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
