# Availability

## Endpoint Details

<mark style="color:green;">`POST`</mark> `/catalog/availability`

### **Headers**

| Header        | Value                        |
| ------------- | ---------------------------- |
| Content-Type  | `application/json`           |
| Authorization | `Bearer <YOUR_ACCESS_TOKEN>` |

### **Body**

<table><thead><tr><th width="233">Parameter</th><th width="141">Type</th><th width="269">Description</th><th data-type="checkbox">Required</th></tr></thead><tbody><tr><td><code>upcs</code></td><td>array&#x3C;string></td><td>Array of UPCs to check availability. <strong>Maximum: 70 UPCs</strong></td><td>true</td></tr><tr><td><code>grouping</code></td><td>array&#x3C;string></td><td>Array of grouping IDs to check availability. <strong>Maximum: 70  grouping IDs</strong></td><td>true</td></tr><tr><td><code>ids</code></td><td>array&#x3C;string></td><td>Array of product IDs to check availability. <strong>Maximum: 70 IDs</strong></td><td>true</td></tr><tr><td><code>loc</code></td><td><a href="/pages/IvoedyWb8YqfzF59Ppft#loc-attributes">locType</a></td><td>Location object for determining availability. If no address is provided there will not be availability for the requested products.</td><td>false</td></tr><tr><td><code>shouldShowOffHours</code></td><td>boolean</td><td>When true, returns <code>onDemand</code> retailers outside their operating hours</td><td>false</td></tr><tr><td><code>isLegacy</code></td><td>boolean</td><td>Whether to return legacy identifiers</td><td>false</td></tr><tr><td><code>isLean</code></td><td>boolean</td><td>Whether to return a minimal response format</td><td>false</td></tr><tr><td><code>refresh</code></td><td>boolean</td><td>When set to <code>true</code>, a new access token will be generated and returned</td><td>false</td></tr></tbody></table>

{% hint style="info" %}
At least one of `upcs`, `grouping`, or `ids` must be provided.&#x20;
{% endhint %}

### Response Details

<table><thead><tr><th width="226">Field</th><th width="186">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>statusCode</code></td><td>number</td><td>HTTP status code of the response</td></tr><tr><td><code>message</code></td><td>string</td><td>A brief message describing the result of the API call</td></tr><tr><td><code>metadata</code></td><td><a href="#metadata-object">metaDataObject</a></td><td>Contains metadata about the API call</td></tr><tr><td><code>auth</code></td><td><a href="/pages/4amDKkDBbASmenwDBAOp#auth-object">authObject</a></td><td>Authentication object, only when refresh in <code>true</code></td></tr><tr><td><code>navigation</code></td><td><a href="/pages/lFZpOLqpw3fdADGrqW7T#navigationschema">navigationSchema</a></td><td>Navigation schema</td></tr><tr><td><code>products</code></td><td>array&#x3C;<a href="/pages/NzXJX5QBkav0AXKCLE0I#producttype">productType</a>></td><td>Array of matched products</td></tr><tr><td><code>retailers</code></td><td>array&#x3C;<a href="/pages/KLpYnpcza2gQ1h65SCxV#retailertype">retailerType</a>></td><td>Array of available retailers</td></tr></tbody></table>

#### Metadata Object

<table><thead><tr><th width="144">Field</th><th width="140">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>languages</code></td><td>Array&#x3C;string></td><td>List of supported languages for the response, e.g. ["en"]</td></tr><tr><td><code>timestamp</code></td><td>string</td><td>Unix timestamp (in milliseconds) when the response was generated</td></tr><tr><td><code>timezone</code></td><td>string</td><td>Timezone used for the response, always "UTC"</td></tr><tr><td><code>requestId</code></td><td>string</td><td>Unique identifier for the API request. Used for debugging and support</td></tr><tr><td><code>path</code></td><td>string</td><td>API path</td></tr><tr><td><code>version</code></td><td>string</td><td>API version used for the request</td></tr></tbody></table>

### **Sample Request and Response**

```bash
curl --location 'https://staging.api.liquidcommerce.cloud/catalog/availability' \
--header 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
    "upcs": [
        "00812066021598",
        "00619947000020",
        "00081753833916",
        "00083085904081"
    ],
    "grouping": [
        "649066c19661fb45f6869934",
        "GROUPING-39553",
        "649066c19661fb45f6869937"
    ],
    "loc": {
        "address": {
            "one": "100 madison ave",
            "two": "apt 1707",
            "city": "New york",
            "state": "NY",
            "zip": "10016"
        }
    },
    "shouldShowOffHours": false,
    "isLegacy": true,
    "refresh": false,
    "isLean": false
}'
```

{% tabs %}
{% tab title="200 " %}

```json
{
    "statusCode": 200,
    "message": "List of available products based on upcs provided.",
    "metadata": {
        "languages": [
            "en"
        ],
        "timestamp": 1731607501591,
        "timezone": "UTC",
        "requestId": "requestid_123abc456def",
        "path": "/api/catalog/availability",
        "version": "1.7.0"
    },
    "products": [
        {
            "id": "ful_def456uvw123",
            "salsifyGrouping": "GRP-78392",
            "name": "Maestro Dobel® Diamante Tequila Cristalino",
            "brand": "Maestro Dobel",
            "catPath": "Spirits > Tequila > Cristalino",
            "category": "",
            "classification": "",
            "type": "",
            "subType": "",
            "region": "Jalisco",
            "country": "Mexico",
            "material": "Agave",
            "color": "White",
            "flavor": "",
            "variety": "100% Blue Agave",
            "appellation": "",
            "abv": "40",
            "proof": "80",
            "age": "",
            "vintage": "",
            "description": "Maestro Dobel® Diamante® is the original Cristalino. Blended extra Añejo, Añejo and reposado tequilas are aged in Balkan new white wood barrels, then filtered again to retain an elegant flavor. The Cristalino tequila has a mild oak aroma with a touch of vanilla. It has a citrus and prickly pear flavor with a smooth, crisp, clean finish. Pour one shot of straight Diamante Tequila to sip, into an old-fashioned glass with ice and a lemon slice, or as a Margarita. (80 proof)",
            "htmlDescription": "<p>Maestro Dobel® Diamante® is the original Cristalino. Blended extra Añejo, Añejo and reposado tequilas are aged in Balkan new white wood barrels, then filtered again to retain an elegant flavor. The Cristalino tequila has a mild oak aroma with a touch of vanilla. It has a citrus and prickly pear flavor with a smooth, crisp, clean finish. Pour one shot of straight Diamante Tequila to sip, into an old-fashioned glass with ice and a lemon slice, or as a Margarita. (80 proof)</p>",
            "tastingNotes": "World's first multi-aged clear tequila.",
            "images": [
                "https://example.com/products/dobel-diamante-1.jpg",
                "https://example.com/products/dobel-diamante-2.jpg"
            ],
            "sizes": [
                {
                    "id": "sz_xy789zw456",
                    "upc": "00811538012034",
                    "size": "750 ML",
                    "volume": "750",
                    "uom": "MILLILITRE",
                    "container": "Bottle",
                    "containerType": "Bottle",
                    "pack": false,
                    "packDesc": "",
                    "image": "https://example.com/products/dobel-diamante-bottle.jpg",
                    "attributes": {
                        "engraving": {
                            "status": true,
                            "maxLines": 3,
                            "maxCharsPerLine": 16,
                            "fee": 5000,
                            "location": "Back of the Bottle"
                        }
                    }
                }
            ]
        },
        {
            "id": "ful_ghi789rst123",
            "salsifyGrouping": "649066c19661fb45f6869934",
            "name": "The Macallan Double Cask 12 Years Old Single Malt Whisky",
            "brand": "The Macallan",
            "catPath": "Spirits > Whiskey > Scotch",
            "category": "",
            "classification": "",
            "type": "",
            "subType": "",
            "region": "Speyside",
            "country": "Scotland",
            "material": "Grain",
            "color": "Tawny/brown",
            "flavor": "",
            "variety": "Barley",
            "appellation": "Speyside",
            "abv": "40",
            "proof": "80",
            "age": "",
            "vintage": "",
            "description": "The Macallan Double Cask 12-Year-Old pairs the indulgent fruit, caramel, and oak spice character of Sherry-seasoned European oak with the bright citrus and vanilla notes of Sherry-seasoned American oak for a satisfyingly rich and perfectly balanced flavor experience. Awarded unanimous Double Gold upon release.",
            "htmlDescription": "<p>The Macallan Double Cask 12-Year-Old pairs the indulgent fruit, caramel, and oak spice character of Sherry-seasoned European oak with the bright citrus and vanilla notes of Sherry-seasoned American oak for a satisfyingly rich and perfectly balanced flavor experience. Awarded unanimous Double Gold upon release.</p>",
            "tastingNotes": "\"If there is royalty in the whisky world, it belongs to Scotland, and if there is a king of Scotch whisky, it's The Macallan.\" – Forbes",
            "images": [
                "https://example.com/products/macallan-12-1.jpg"
            ],
            "sizes": [
                {
                    "id": "sz_pqr123mn456",
                    "upc": "00812066021598",
                    "size": "750 ML",
                    "volume": "750",
                    "uom": "MILLILITRE",
                    "container": "Bottle",
                    "containerType": "Bottle",
                    "pack": false,
                    "packDesc": "",
                    "image": "https://example.com/products/macallan-12-bottle.jpg",
                    "attributes": {
                        "engraving": {
                            "status": true,
                            "maxLines": 3,
                            "maxCharsPerLine": 16,
                            "fee": 5000,
                            "location": "Below the Label"
                        }
                    }
                }
            ]
        }
    ],
    "retailers": [
        {
            "id": "ret_abc123xyz789",
            "name": "LiquidCommerce Wine & Spirits",
            "platformFee": 499,
            "address": {
                "one": "240 Loisaida Avenue",
                "two": "",
                "city": "New York",
                "state": "NY",
                "zip": "10009",
                "country": "US"
            },
            "fulfillments": [
                {
                    "id": "ful_ghi189rst123",
                    "timezone": "America/New_York",
                    "type": "onDemand",
                    "canEngrave": false,
                    "fees": {
                        "min": 1999,
                        "fee": 0,
                        "free": {
                            "active": false,
                            "min": 0
                        }
                    },
                    "expectation": {
                        "detail": "Arrives in 60 mins",
                        "short": "60 mins"
                    },
                    "hours": {
                        "monday": {
                            "active": true,
                            "times": [
                                {
                                    "startsAt": "10:00",
                                    "endsAt": "21:00"
                                }
                            ]
                        },
                        "tuesday": {
                            "active": true,
                            "times": [
                                {
                                    "startsAt": "10:00",
                                    "endsAt": "21:00"
                                }
                            ]
                        },
                        "wednesday": {
                            "active": true,
                            "times": [
                                {
                                    "startsAt": "10:00",
                                    "endsAt": "21:00"
                                }
                            ]
                        },
                        "thursday": {
                            "active": true,
                            "times": [
                                {
                                    "startsAt": "10:00",
                                    "endsAt": "21:00"
                                }
                            ]
                        },
                        "friday": {
                            "active": true,
                            "times": [
                                {
                                    "startsAt": "10:00",
                                    "endsAt": "21:00"
                                }
                            ]
                        },
                        "saturday": {
                            "active": true,
                            "times": [
                                {
                                    "startsAt": "10:00",
                                    "endsAt": "21:00"
                                }
                            ]
                        },
                        "sunday": {
                            "active": true,
                            "times": [
                                {
                                    "startsAt": "10:00",
                                    "endsAt": "21:00"
                                }
                            ]
                        }
                    },
                    "breaks": [],
                    "items": []
                }
            ]
        },
        {
            "id": "ret_abc123xyz189",
            "name": "LiquidCommerce Barn",
            "platformFee": 499,
            "address": {
                "one": "1000 N 5th Ave",
                "two": "134",
                "city": "Vernon Hills",
                "state": "NY",
                "zip": "10061",
                "country": "US"
            },
            "fulfillments": [
                {
                    "id": "ful_abc123xyz189",
                    "timezone": "America/Chicago",
                    "type": "shipping",
                    "canEngrave": true,
                    "fees": {
                        "pack": {
                            "active": true,
                            "maxQuantity": 25,
                            "fee": 1599
                        },
                        "individual": {
                            "active": true,
                            "maxQuantity": 25,
                            "fee": 1599
                        },
                        "free": {
                            "active": false,
                            "min": 0
                        }
                    },
                    "expectation": {
                        "detail": "Ships in 2-3 days",
                        "short": "2-3 days"
                    },
                    "hours": {
                        "monday": {
                            "active": false,
                            "times": []
                        },
                        "tuesday": {
                            "active": false,
                            "times": []
                        },
                        "wednesday": {
                            "active": false,
                            "times": []
                        },
                        "thursday": {
                            "active": false,
                            "times": []
                        },
                        "friday": {
                            "active": false,
                            "times": []
                        },
                        "saturday": {
                            "active": false,
                            "times": []
                        },
                        "sunday": {
                            "active": false,
                            "times": []
                        }
                    },
                    "breaks": [],
                    "items": []
                }
            ]
        }
    ]
}
```

{% endtab %}
{% endtabs %}


---

# 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://docs.liquidcommerce.cloud/services/catalog-api/availability.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.
