> For the complete documentation index, see [llms.txt](https://docs.highsidelabs.co/feed-transformer/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.highsidelabs.co/feed-transformer/feed-types/xml/inventory-availability.md).

# Inventory Availability

## Usage

To convert a `POST_INVENTORY_AVAILABILITY_DATA` feed to the newer `JSON_LISTINGS_FEED` format:

```php
use SellingPartnerApi\FeedTransformer\Transformer;
use SellingPartnerApi\FeedTransformer\FeedTypes\InventoryAvailability;

$feedPath = 'path/to/feed.xml';
$json = Transformer::fromFile(
    InventoryAvailability::$feedType,
    $feedPath,
    'ATVPDKIKX0DER'  // -> US Selling Partner API marketplace ID
);

$jsonFeedPath = 'path/to/new/feed.json';
file_put_contents($jsonFeedPath, json_encode($json));
```
