
# Store Endpoints
These endpoints are used to manage the stores of a vendor. This can also be done on the anybill Partner Portal.  
The most important usecase of these endpoints is to enable larger companies to automate the process of syncing store details. 

- <b>GET</b> `/v3/store?skip=0&take=100`: list the stores of the vendor (200 with a `Total-Count` response header, 204 if there are none).
- <b>POST</b> `/v3/store`: create or update a store (201 when a new store was created, 200 when an existing store was updated).
- <b>GET</b> `/v3/store/{id}`: read a single store (404 if unknown).
- <b>DELETE</b> `/v3/store/{id}`: delete a store (204, 404 if unknown).
- <b>POST</b> `/v3/store/search`: find a store by address; the body is a JSON object with an `address`, the response body is the store id as a string (404 if no store matches).

All store routes require an access token with the `https://ad.anybill.de/vendor/store`
scope (see [Authentication](https://developer.anybill.de/vendor_api/authentication)).

## Detailed Endpoint Description
Staging Environment: [SwaggerUI](https://vendor.stg.anybill.de/api/swagger/index.html#/Store)<br>
Production Environment: [SwaggerUI](https://vendor.anybill.de/api/swagger/index.html#/Store)

## Create Store

To automate the onboarding process of a merchant, anybill provides an endpoint to onboard and activate stores for digital receipts. This operation creates stores at anybill and assigns a unique Store ID. Additionally, this interface replaces the manual entry of stores in the Anybill portal. It can also be utilized in special cases, such as when store IDs cannot be manually entered into the cash register (e.g., due to a lack of a feedback channel to the cash register).

```
POST /v3/store
```
Request Body:
```json
{
  "id": "string, max. 36 chars, optional – generated by anybill if omitted",
  "displayName": "string, 1–64 chars",
  "legalName": "string, max. 128 chars",
  "address": {
    "countryCode": "string, ISO 3166-1 alpha-3",
    "zip": "string, max. 12 chars",
    "city": "string, max. 150 chars",
    "street": "string, max. 150 chars",
    "number": "string, max. 15 chars"
  },
  "vatId": "string, max. 24 chars",
  "language": "string, ISO 639-1"
}

```

The route is an upsert: if a store with the given `id` already exists for the vendor, its
details are updated and `200 OK` is returned; otherwise the store is created and
`201 Created` is returned. Both responses carry the resulting store object. `address` is
mandatory and must contain `countryCode` (the older `country` name is deprecated).

## Search store by address

Additionally, it can occur that cash registers in a shop cannot communicate with each other, and thus, calling the Create Store Endpoint might create duplicates. For this scenario, anybill provides the Search Store Endpoint, allowing you to check in advance whether a store already exists for the address integrated into the cash register. If no store exists, you need to create a store using the Create Store Endpoint. If a store already exists, the Store ID is returned, which should then be used in the receipt data for creating digital receipts.

```
POST /v3/store/search
```
Request Body:
```json
{
  "address": {
    "countryCode": "DEU",
    "zip": "86150",
    "city": "Augsburg",
    "street": "Musterstraße",
    "number": "1"
  }
}
```

Response: `200 OK` with the store id as a JSON string (e.g. `"3QT1su7Wtl"`), or
`404 Not Found` if no store matches the address.

<img id="" src="https://developer.anybill.de/images/Store_Add_Search.png"  alt="onboarding from a POS" style="max-width: 620px; width: 100%; object-fit: contain; margin: 0 auto; padding: 5px 0; display: block"/>

## Status codes
The **Retry** column is the behaviour a POS system has to implement for each code; the common rules
(backoff, attempts, token refresh on 401) are described in the
[Retry Policy Guidelines](https://developer.anybill.de/vendor_api/#retry-policy-guidelines). All store endpoints are idempotent:
resending the identical request after a 5xx or a network error is safe. None of them returns 429.

| Status | Endpoints | When | Body | Retry |
| --- | --- | --- | --- | --- |
| 200 | `GET /v3/store`, `GET /v3/store/{id}`, `POST /v3/store` (updated), `POST /v3/store/search` | Success. | JSON (list, store object or store id string) | – |
| 201 | `POST /v3/store` | A new store was created. | store object | – |
| 204 | `GET /v3/store` (no stores), `DELETE /v3/store/{id}` | Success without content. | empty | – |
| 400 | `POST /v3/store`, `POST /v3/store/search`, `DELETE /v3/store/{id}` | Payload invalid, or the store could not be saved / deleted for a business reason. | problem details with `errors` and `traceId` | no – fix the payload; log the `traceId` |
| 401 | all | Token missing, expired or invalid. | empty or plain text | refresh the token, resend once |
| 403 | all | Missing `vendor/store` scope or API user permission. | plain text | no |
| 404 | `GET /v3/store/{id}`, `DELETE /v3/store/{id}`, `POST /v3/store/search` | Unknown store id, or no store matches the address. | empty or plain text | no – for `DELETE` treat it as already deleted; for `search` create the store |
| 500 / 502 / 503 / 504 | all | Temporary server or gateway problem. | empty or plain text | yes – exponential backoff, identical request |

## Required Fields
These fields are validated against the OpenAPI schema. Fields listed as required
once the surrounding object is sent belong to an optional part of the payload —
omitting that part entirely is fine, including it makes the listed fields mandatory.

<!-- vendor-api:required:start -->

*Generated from the [production OpenAPI specification](https://vendor.anybill.de/api/swagger/v3/swagger.json) (API version 3.0) on 3 September 2026.*

### GET /v3/store

No required parameters and no request body.

### POST /v3/store

Request body: `UpsertStoreDto`

**Always required**

| Field | Type | Description |
| --- | --- | --- |
| `address` | `AddressDto` |  |
| `address.zip` | string, 1–12 chars | Zip code / postal code of the address. |
| `address.city` | string, 1–150 chars | City of the address. |
| `address.street` | string, 1–150 chars | Street name of the address. |

**Required once the surrounding optional object is sent**

| Object | Position in the request body | Required fields |
| --- | --- | --- |
| `StoreOpeningHoursDto` | `storeOpeningHours[]` | `dayOfWeek`, `open`, `close` |

### GET /v3/store/{storeId}

| Name | Location | Type | Description |
| --- | --- | --- | --- |
| `storeId` | path parameter | string | The id of the store. |

### DELETE /v3/store/{storeId}

| Name | Location | Type | Description |
| --- | --- | --- | --- |
| `storeId` | path parameter | string | The id of the store. |

### POST /v3/store/search

Request body: `SearchStoreDto`

**Always required** — none.

**Required once the surrounding optional object is sent**

| Object | Position in the request body | Required fields |
| --- | --- | --- |
| `AddressDto` | `address` | `zip`, `city`, `street` |

<!-- vendor-api:required:end -->

---

