# WebSellable Inventory

Use WebSellable Inventory when an approved integration needs the inventory selected for a dealership website. It is part of the DX1 Dealership API suite and uses the same vendor approval, dealership authorization, authentication, routing, and security processes.

## Prerequisites

- Complete [DX1 access and approval](/docs/dx1-dealership-api/getting-started/access-and-environments).
- Request `MU Inventory` access for the dealership credential.
- Authenticate from a trusted backend and retain both the bearer token and returned `api_url` as described in [Authentication](/docs/dx1-dealership-api/getting-started/authentication).
- Contact [DX1 Support](mailto:dx1support@dx1support.com) to obtain the `siteId` for each dealership website.


## Request inventory

Send `GET WebSellableItem/GetItems` relative to the returned `api_url`:

```http
GET <API_URL>WebSellableItem/GetItems?siteId=9dbb593b-5f2e-4ca7-bf47-57a74e902486&includeImageUrls=true&take=50
Authorization: Bearer <BEARER_TOKEN>
Accept: application/json
```

Do not send a live credential, returned route, dealer identifier, or inventory record through browser code or the documentation mock server. See the [WebSellable API reference](/docs/dx1-dealership-api/openapi/websellable-inventory-api) for the complete parameter and response schemas.

## Choose the retrieval mode deliberately

`includeDetail` changes more than the fields in the response:

| `includeDetail` | Paging | `updatedDate` | Listing filter | Detail XML |
|  --- | --- | --- | --- | --- |
| `false` | `skip` and `take` are applied | Not applied by the current stored procedure | Only active listings | Not populated |
| `true` | `skip` and `take` are not applied by the current stored procedure | Applied as an inclusive threshold | No additional active-listing-only predicate | Specification, feature, and option XML can be populated |


This behavior is established by the current controller, repository, and stored procedure. Do not combine `includeDetail=true` with an assumption that `take` limits the response.

If `updatedDate` is omitted while full-data mode is inactive, the controller supplies a server-configured lookback timestamp. `isGetFullData=true` prevents that default lookback, but it does not change the stored procedure's paging mode. The server can also activate full-data mode during a configured time window.

## Process the response

The response contains:

- `WebSellableItems`, an array of envelopes containing `WebSellableItem` and `ImageUrls`.
- `TotalCount`, the count produced for the filters applied by the stored procedure.


When `includeImageUrls=true`, the endpoint resolves photo URLs into each envelope's `ImageUrls` array and video URLs into `WebSellableItem.VideoUrls`. When false, both arrays remain empty. `WebSellableItem.ImageUrl` is independently computed from the preview asset when one is present.

Use `DealerInventoryId` as the inventory identifier when it is present. Preserve response names, enum numbers, code values, and null values exactly as returned.

## Sort and page

The controller default is `skip=0` and `take=500`; current source does not declare a maximum. Paging is effective only with `includeDetail=false`.

Supported `orderBy` values are:

- `ProductYear`
- `VendorMarketingName`
- `ProductName`
- `CurrentPrice`
- `ProductTypeName`
- `ProductColor`
- `ProductCategoryName`
- `ProductEngineSize`


The `orderBy` value is case-sensitive. Only the exact `orderDirection` value `DESC` selects descending order; every other value selects ascending order.

## Handle failures

- `400` can result from query binding or an unrecognized case-sensitive `orderBy` value.
- `401` means the bearer token is missing, invalid, or expired.
- `403` means the authenticated credential does not have `MU Inventory`.
- `500` represents an action, service, or data-access failure; the current action does not define a stable error-body schema.


The implementation does not establish a distinct error response for an unknown `siteId`. An empty result therefore must not be treated as proof that the identifier is valid. Follow [Errors and routing](/docs/dx1-dealership-api/guides/errors-and-routing). The portal also publishes [suite-wide rate-limit guidance](/docs/dx1-dealership-api/guides/rate-limits-and-resilience); the inspected WebSellable source does not define a separate endpoint-specific limit.

## Try synthetic responses

The [WebSellable API reference](/docs/dx1-dealership-api/openapi/websellable-inventory-api) includes complete synthetic inventory and empty-result examples for Redocly Replay. The mock server does not authenticate with DX1, validate `siteId`, retrieve dealership inventory, or reproduce mode-dependent database behavior. If a mock request requires an Authorization value, use a fabricated placeholder only; never supply a dealership key or live bearer token.