> For the complete documentation index, see [llms.txt](https://experience-crm.gitbook.io/experience-crm-api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://experience-crm.gitbook.io/experience-crm-api/guests/get-guest-relationship-form-url/get-in-stay-url.md).

# 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="https://219370842-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwKOGLAfyeOGFwjfhVr8R%2Fuploads%2FHWQk0BAzTlKMoyP8MKvY%2Fimage.png?alt=media&amp;token=9d1fcf70-b180-4cda-a678-1c94204c919a" 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"
}
```
