---
id: get
title: "Get reservations"
sidebar_label: Get reservations
hide_title: true
unlisted: true
description: "Management API - Reservations - Get reservations"
---

Use this endpoint to see a customer's credit reservations in your stores:
  their status, the reserved amount and how much of it is still available.

Identify the customer in one of two ways:

- **By integration ID**, your identifier for the customer. An integration ID belongs to a store, so
  Walley looks it up in each store separately: in the stores you pass in `storeIds`, or otherwise
  in every store your API key covers.
- **By registration number** (personal or organization number) together with its country. You
  get the customer's reservations in every store your API key covers, or only in the stores you
  pass in `storeIds`.

## Example

**Request**

```http
GET /manage/reservations?storeIds=12345&integrationId=customer-abc-123 HTTP/1.1
Host: api.uat.walleydev.com // Test environment. Production uses a different hostname.
Authorization: Bearer {{accessToken}}
```

**Response**

```json
{
  "data": [
    {
      "storeId": 12345,
      "customerName": "Vilma Lundqvist",
      "customerRegistrationNumber": "194903315555",
      "status": "ACTIVE",
      "customerStatus": "",
      "reservedAmount": 20000.0,
      "availableReservationAmount": 14500.0,
      "validUntil": "2027-10-15T00:00:00",
      "pendingUntil": null,
      "productCode": "DI_001"
    }
  ],
  "links": {},
  "metaData": {}
}
```

## Data Model

### Request

#### Request headers

| Header            | Required | Explanation                                                                                                  |
| ----------------- | -------- | ------------------------------------------------------------------------------------------------------------ |
| **Authorization** | Yes      | See [Authentication](/docs/manage/getting-started/authentication) for how to generate the Bearer token value |

#### Query parameters

Send either `integrationId`, or `registrationNumber` with `countryCode`.

| Parameter              | Required                    | Explanation                                                        | Type   | Notes                                                                                                                                                 |
| ---------------------- | --------------------------- | ------------------------------------------------------------------ | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| **integrationId**      | Unless `registrationNumber` | Your identifier for the customer (integration ID)                  | string | Not together with `registrationNumber`                                                                                                                |
| **registrationNumber** | Unless `integrationId`      | The customer's personal or organization number                     | string | Not together with `integrationId`                                                                                                                     |
| **countryCode**        | With `registrationNumber`   | The country of the registration number                             | string | ISO 3166-1 alpha-2, e.g. `SE`                                                                                                                         |
| **storeIds**           | No                          | The stores to look in. Without it, every store your API key covers | number | Repeat the parameter for several stores (`storeIds=1&storeIds=2`), max 50. Required with `integrationId` when your API key covers more than 50 stores |

### Response

#### Possible responses

| Http status code | Description                                                                              |
| ---------------- | ---------------------------------------------------------------------------------------- |
| 200              | The reservations are returned in `data`                                                  |
| 401              | Token missing, expired, or invalid                                                       |
| 403              | Your API key does not cover one of the stores in `storeIds`                              |
| 404              | No customer found, or the customer has no reservations in the stores your API key covers |
| 422              | The query parameters are invalid, see below                                              |

See [Errors](/docs/manage/errors) for what to do about each of these.

#### Response body from 200 OK

`response.data` is a list with one reservation per store:

| Property                       | Explanation                                                                          | Type   | Notes                                                  |
| ------------------------------ | ------------------------------------------------------------------------------------ | ------ | ------------------------------------------------------ |
| **storeId**                    | The store the reservation is in                                                      | number |                                                        |
| **customerName**               | The company name for company customers, otherwise the customer's first and last name | string |                                                        |
| **customerRegistrationNumber** | The customer's personal or organization number                                       | string |                                                        |
| **status**                     | The status of the reservation                                                        | string | `ACTIVE`, `PENDING`, `SIGNING` or `NO_RESERVATION`     |
| **customerStatus**             | Whether the customer is blocked                                                      | string | `BLOCKED`, or an empty string when the customer is not |
| **reservedAmount**             | The reserved amount                                                                  | number | Decimal. `null` when nothing is reserved               |
| **availableReservationAmount** | How much of the reservation is still available for purchases                         | number | Decimal                                                |
| **validUntil**                 | When the reservation expires                                                         | string | Date and time, or `null`                               |
| **pendingUntil**               | Until when a pending reservation waits to be activated                               | string | Date and time, or `null`                               |
| **productCode**                | The product the reservation is for                                                   | string |                                                        |

#### Error responses

| Http status code           | Code                              | Description                                                                                                                                 |
| -------------------------- | --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| `422 Unprocessable Entity` | `REQUEST_INVALID`                 | The `errors` list holds `RESERVATIONS_CUSTOMER_IDENTIFIER_INVALID` when the customer is not identified by exactly one of the two ways above |
| `422 Unprocessable Entity` | `REQUEST_INVALID`                 | More than 50 `storeIds`                                                                                                                     |
| `422 Unprocessable Entity` | `RESERVATIONS_STORE_IDS_REQUIRED` | `integrationId` without `storeIds` when your API key covers more than 50 stores                                                             |
