# 2026-04-07: Emporix SDK - Availability Service support

## Overview

A new `1.2.2` version of the Emporix SDK has been released with support for the Availability Service.

A new `AvailabilityClient` has been introduced, providing full access to the Availability Service API. It enables managing product availability information including stock levels, availability flags, distribution channels, and popularity scores. Both single-product and bulk operations are supported.

## New client

| Client             | Description                                                                                                                |
| ------------------ | -------------------------------------------------------------------------------------------------------------------------- |
| AvailabilityClient | Declarative HTTP client for the Availability Service. Automatically registered as a Spring bean when tenant is configured. |

## New methods

| Method                                      | Description                                                                                   |
| ------------------------------------------- | --------------------------------------------------------------------------------------------- |
| AvailabilityClient.createAvailability       | Creates a new availability entry for a specific product and site.                             |
| AvailabilityClient.bulkCreateAvailability   | Creates availability entries for multiple products in a single bulk operation.                |
| AvailabilityClient.upsertAvailability       | Creates or fully replaces the availability entry for a specific product and site.             |
| AvailabilityClient.bulkUpsertAvailability   | Creates or fully replaces availability entries for multiple products in a single bulk upsert. |
| AvailabilityClient.deleteAvailability       | Deletes the availability entry for a specific product and site.                               |
| AvailabilityClient.bulkDeleteAvailability   | Deletes availability entries for multiple products in a single bulk operation.                |
| AvailabilityClient.searchAvailability       | Searches for availability information across multiple products on a given site.               |
| AvailabilityClient.getAvailabilitiesForSite | Retrieves all availability entries for a specific site.                                       |
| AvailabilityClient.getAvailability          | Retrieves the availability details for a specific product on a specific site.                 |

## New types

| Type                      | Description                                                                                                                                                                                    |
| ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| AvailabilityDto           | Request body for creating or upserting a single availability entry. Contains `stockLevel`, `available`, `popularity`, `distributionChannel`, `mixins`, `metadata`, and `bundleAvailabilities`. |
| AvailabilityBulkDto       | Extends `AvailabilityDto` with `productId` and `site` fields for use in bulk create and upsert operations.                                                                                     |
| AvailabilityDeleteBulkDto | Identifies an availability entry by `productId` and `site` for use in bulk delete operations.                                                                                                  |
| AvailabilityResponse      | Extends `AvailabilityDto` with `id`, `site`, `productId`, and `vendorId` fields returned by read operations.                                                                                   |
| DistributionChannel       | Enum representing the distribution channel of an availability entry. Possible values: `ASSORTMENT`, `HOME_DELIVERY`, `PICKUP`.                                                                 |

## Known problems

We recommend to avoid creating new availabilities for the site `main`. More details in [API Reference](https://developer.emporix.io/api-references-1/readme/api-reference-2/availabilities#post-availability-tenant-availability-productid-site).


---

# 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://developer.emporix.io/changelog/2026/2026-04-07-sdk.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.
