# Get message by response ID

## Service description

Use this service to retrieve a specific message by its response ID, usually in combination with the [get-list-of-messages](https://docs.lhv.com/home/connect/services/messages/get-list-of-messages "mention") service. The response body and headers are similar to [get-next-message](https://docs.lhv.com/home/connect/services/messages/get-next-message "mention")

See [response-compression](https://docs.lhv.com/home/connect/fundamentals/response-compression "mention") for details on how to compress responses from this service.

## Request <a href="#virtual-iban-open" id="virtual-iban-open"></a>

<mark style="color:green;">`GET`</mark> <https://connect.lhv.com/messages/{messageResponseId}>

#### **Headers**

<table><thead><tr><th width="165">Name</th><th width="181">Value</th><th>Description</th></tr></thead><tbody><tr><td>Client-Code</td><td><code>customer value</code></td><td>For Service Providers only. Company registration code of the Service Provider or its customer. When using the Service Provider own value also related customers messages are returned by default - see also Filter-Service-Provider for more options.</td></tr><tr><td>Client-Country</td><td><code>customer value</code></td><td>For Service Providers only. Should match the value of Client-Code</td></tr></tbody></table>

#### **Body**

Typically XML or JSon body depending on message type

### **Response**

**Headers**

<table><thead><tr><th width="241">Name</th><th width="186">Value</th><th>Description</th></tr></thead><tbody><tr><td>Content-Type</td><td><code>application/xml</code> or <code>application/json</code></td><td>Format of the message body</td></tr><tr><td>X-Bank-Code</td><td><code>LHVUK</code>, <code>LHVEE</code></td><td>LHV Bank entity</td></tr><tr><td>Client-Code</td><td><code>customer value</code></td><td>When using service provider model - customer entity related to the message</td></tr><tr><td>Client-Country</td><td><code>customer value</code></td><td>When using service provider model - customer entity related to the message</td></tr><tr><td>Message-Request-Id</td><td>random string</td><td>Message-Request-Id from the the original request. There are cases where request id can be missing, for example the Debit Credit Notification.</td></tr><tr><td>Message-Response-Id</td><td>random string</td><td>Unique response id</td></tr><tr><td>Message-Response-Type</td><td>CREDIT_DEBIT_NOTIFICATION, PAYMENT etc.</td><td>Type of the response depending on the service.</td></tr></tbody></table>

#### Body

{% tabs %}
{% tab title="200 - message" %}
{% hint style="success" %}
OK
{% endhint %}

```
Content depends on the service - see specifications of different services.
```

{% endtab %}

{% tab title="204 - no more messages" %}
{% hint style="warning" %}
Not found
{% endhint %}

```json
{
    "errors": [
        {
            "errorCode": "NOT_FOUND",
            "description": "Requested resource not found"
        }
    ]
}
```

{% endtab %}

{% tab title="403 - error" %}
{% hint style="danger" %}
Error code and description
{% endhint %}

<pre><code>&#x3C;Errors>
<strong>    &#x3C;Error>
</strong>        &#x3C;ErrorCode>FORBIDDEN&#x3C;/ErrorCode>
        &#x3C;Description>User doesn't exist&#x3C;/Description>
    &#x3C;/Error>
&#x3C;/Errors>
</code></pre>

{% endtab %}
{% endtabs %}
