> ## Documentation Index
> Fetch the complete documentation index at: https://docs.d-edge.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> This site documents the D-EDGE APIs for technology partners (web agencies, OTAs, PMS and RMS vendors, booking and CRM tools). It is written for developers integrating with hotels that use the D-EDGE platform.
> Seven APIs, grouped by domain. Connectivity: Channel Manager API (distribute a hotel's inventory to your channel and send bookings back). Pricing & Availability: Best Price API (best offers to highlight), Quotation API (all bookable offers for a stay), Daily Rates API (daily availability between two dates). Booking: Booking Engine API (a hotel's full direct booking funnel), Gift Shop API (gift vouchers from catalogue to payment). Guest Management: CRM API (guest profiles).
> Pick the API by the need: to display prices, use the Best Price API or the Daily Rates API; to quote a specific stay, use the Quotation API; to book, use the Booking Engine API; to sell gift vouchers, use the Gift Shop API; to manage guest profiles, use the CRM API; to receive hotel inventory and send bookings back as a distribution channel, use the Channel Manager API.
> Base URLs, hotel identifiers, and credentials are delivered by the D-EDGE partnership team during onboarding. Do not invent base URLs, endpoints, parameters, or example credentials that do not appear on these pages.
> Authentication differs per API: OAuth 1.0 for Best Price, Quotation, Daily Rates, and Booking Engine; an X-API-KEY header for Gift Shop; OAuth 2.0 client credentials for CRM; partner-defined credentials carried in the XML message for the Channel Manager API. Read each API's Authentication page before writing code.
> A mock environment returns realistic but fictitious data without credentials. The Postman and Insomnia collections on the API collections page target it by default. Use it for exploration and tests, never for production traffic.
> Use the official names exactly: D-EDGE, D-EDGE platform, Channel Manager API, partnership team. Do not use Back Office or Extranet.
> Each API has a Changelog page. Check it for the current behaviour before relying on an older answer. For questions these pages do not answer, direct the reader to the Contact us page.

# Occasion landing page

> Open a seasonal gifting page on a filtered catalogue

Gift voucher sales cluster around occasions: Christmas, Valentine's Day, and Mother's Day. A landing page dedicated to the occasion converts that intent far better than a generic shop. And because the voucher arrives by email minutes after payment, the campaign keeps selling until the day itself.

## How it works

The catalogue is organised in categories, translated to the session's culture. Read them with **Get all categories**, pick the one that matches the occasion, and build the landing page on the matching slice of the catalogue. **Search active products** returns the full active catalogue; each product carries its `category`, so the occasion filter is yours to apply.

> [!NOTE]
>
> The examples send the `X-API-KEY` header introduced in the [Quick start](/gift-shop-api/get-started/quick-start.md). Replace `{sessionId}` with your session.

```bash theme={null}
curl --request GET \
  --url 'https://{apiBaseUrl}/v1/{sessionId}/categories' \
  --header 'X-API-KEY: YOUR_API_KEY'
```

```json theme={null}
{
  "categories": [
    { "id": 70001, "name": "Online" },
    { "id": 70002, "name": "At the hotel" }
  ]
}
```

## Build the occasion page

Fetch the catalogue and keep the products of the occasion's category:

```bash cURL theme={null}
curl --request POST \
  --url 'https://{apiBaseUrl}/v1/{sessionId}/products/search' \
  --header 'X-API-KEY: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{}'
```

```javascript Node.js theme={null}
const response = await fetch("https://{apiBaseUrl}/v1/{sessionId}/products/search", {
  method: "POST",
  headers: {
    "X-API-KEY": process.env.DEDGE_API_KEY,
    "Content-Type": "application/json",
  },
  body: "{}",
});

const { products } = await response.json();
const occasion = products
  .filter((p) => p.category?.id === OCCASION_CATEGORY_ID)
  .sort((a, b) => amountOf(a) - amountOf(b));
```

```python Python theme={null}
import os
import requests

response = requests.post(
    "https://{apiBaseUrl}/v1/{sessionId}/products/search",
    headers={"X-API-KEY": os.environ["DEDGE_API_KEY"]},
    json={},
)

products = response.json()["products"]
occasion = sorted(
    (p for p in products if p.get("category", {}).get("id") == OCCASION_CATEGORY_ID),
    key=amount_of,
)
```

```php PHP theme={null}
$response = $client->post('v1/{sessionId}/products/search', [
    'headers' => ['X-API-KEY' => getenv('DEDGE_API_KEY')],
    'json'    => new stdClass(),
]);

$products = json_decode($response->getBody(), true)['products'];
$occasion = array_filter($products, fn ($p) =>
    ($p['category']['id'] ?? null) === OCCASION_CATEGORY_ID);
```

```csharp C# theme={null}
var response = await client.PostAsJsonAsync(
    "/v1/{sessionId}/products/search", new { });

var catalogue = JsonDocument.Parse(
    await response.Content.ReadAsStringAsync()).RootElement;
var occasion = catalogue.GetProperty("products").EnumerateArray()
    .Where(p => p.GetProperty("category").GetProperty("id").GetInt32() == OccasionCategoryId);
```

```java Java theme={null}
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://{apiBaseUrl}/v1/{sessionId}/products/search"))
    .header("X-API-KEY", System.getenv("DEDGE_API_KEY"))
    .header("Content-Type", "application/json")
    .POST(HttpRequest.BodyPublishers.ofString("{}"))
    .build();

HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
JsonNode products = mapper.readTree(response.body()).path("products");
```

Sorting is yours too: the search returns the whole active catalogue in one call, so order the page by ascending price, best sellers, or whatever fits the campaign.

## Make it feel like a gift

Pre-fill the gift options for the occasion when the guest adds to the cart: a suggested personal message ("Happy Mother's Day!") in `comment` and the beneficiary's email for direct delivery. On `Indirect` products, set `hidePrice` on by default (a `Direct` voucher always shows its value). The full options are covered in [Voucher for a friend](/gift-shop-api/resources/use-cases/voucher-for-a-friend.md).

## Tips

* **One page per occasion**. A stable URL per occasion (`/gifts/mothers-day`) builds search ranking year after year, and gives ads and emails a precise destination.
* **Say that delivery is instant**. Late buyers are a large share of gift traffic; "delivered by email in minutes" removes their last objection.
* **Show the validity**. Each product carries its validity period (`365.00:00:00` is one year); displaying "valid one year" reassures buyers that the beneficiary has time.

## Related

> **[Get all categories](/gift-shop-api/build/reference/category/get-categories.md)**
>
> The catalogue's categories, in the session's culture.

> **[Add a cart item](/gift-shop-api/build/reference/cart/post-cart-item.md)**
>
> The cart call that carries the gift options.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.