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

# Get Bundling

> Endpoint to get a list of bundling products

<RequestExample>
  ```bash Request Example theme={null}
  curl --request GET 'https://api.mayar.id/hl/v2/bundling?limit=10' \
  --header 'Authorization: Bearer Paste-Your-API-Key-Here'
  ```
</RequestExample>

<ResponseExample>
  ```json Response Example 200 theme={null}
  {
      "statusCode": 200,
      "messages": "success",
      "data": [
          {
              "id": "a1b2c3d4-e5f6-4789-a012-3456789abcde",
              "name": "Paket Belajar Lengkap",
              "amount": 150000,
              "description": "<p>Paket bundling kelas online dan produk digital.</p>\n",
              "type": "bundling",
              "status": "active",
              "link": "paket-belajar-lengkap",
              "updatedAt": 1782557015266,
              "createdAt": 1773826841895,
              "bundlingProductType": "payment_link",
              "coverImageId": null,
              "coverImage": null,
              "products": [
                  {
                      "id": "6f8c19ff-2b6a-4c7e-9f1d-1a2b3c4d5e6f",
                      "status": "ENABLED",
                      "paymentLinkId": "21d84338-7c2e-4a9b-8d3f-4e5f6a7b8c9d",
                      "paymentLink": {
                          "id": "21d84338-7c2e-4a9b-8d3f-4e5f6a7b8c9d",
                          "name": "Kelas Online Dasar",
                          "type": "course",
                          "amount": 0
                      }
                  },
                  {
                      "id": "b2c3d4e5-f6a7-4890-b123-456789abcdef",
                      "status": "ENABLED",
                      "paymentLinkId": "348e083d-315a-4e5c-96b1-5a2a98c48413",
                      "paymentLink": {
                          "id": "348e083d-315a-4e5c-96b1-5a2a98c48413",
                          "name": "Produk Digital Premium",
                          "type": "digital_product",
                          "amount": 100000
                      }
                  },
                  {
                      "id": "c3d4e5f6-a7b8-4901-c234-56789abcdef0",
                      "status": "ENABLED",
                      "paymentLinkId": "7c9d2e1f-3a4b-4c5d-8e6f-7a8b9c0d1e2f",
                      "paymentLink": {
                          "id": "7c9d2e1f-3a4b-4c5d-8e6f-7a8b9c0d1e2f",
                          "name": "Link Pembayaran Tambahan",
                          "type": "generic_link",
                          "amount": 50000
                      }
                  }
              ]
          }
      ],
      "hasMore": false,
      "nextStartingAfter": null
  }
  ```
</ResponseExample>

Endpoint:

<CodeGroup>
  ```Production Production theme={null}
  https://api.mayar.id/hl/v2/bundling?limit=10
  ```

  ```Sandbox Sandbox theme={null}
  https://api.mayar.club/hl/v2/bundling?limit=10
  ```
</CodeGroup>

## Authorization

<ResponseField name="Authorization" type="string" required>
  Example:

  `Authorization | Bearer Paste-Your-API-Key-Here`
</ResponseField>

## Query Parameters

<ParamField query="limit" path="limit" default="10" type="integer">
  Number of items to return per page. Defaults to `10`, with a maximum of `50`.
</ParamField>

<ParamField query="startingAfter" path="startingAfter" type="string">
  Cursor for forward pagination. Pass the `nextStartingAfter` value from the
  previous response (a Unix timestamp in milliseconds, as a string) to fetch the
  next page.
</ParamField>

## Response

Successful Response

### Main Structure (Root)

<ResponseField name="statusCode" type="integer">
  Status code form API.
</ResponseField>

<ResponseField name="messages" type="string">
  Status message that describes the status code.
</ResponseField>

<ResponseField name="data" type="array of object">
  List of bundling products. Each item is a bundling-type product object.
</ResponseField>

<ResponseField name="hasMore" type="boolean">
  Information on whether there is additional data to be retrieved (true/false).
</ResponseField>

<ResponseField name="nextStartingAfter" type="string | null">
  Cursor to pass as `startingAfter` to fetch the next page. `null` when there is
  no further data.
</ResponseField>

### data Structure (Array Of Object)

<ResponseField name="id" type="string<uuid>">
  Unique ID of the bundling product.
</ResponseField>

<ResponseField name="name" type="string">
  Name of the bundling product.
</ResponseField>

<ResponseField name="amount" type="integer">
  Price of the bundle.
</ResponseField>

<ResponseField name="description" type="string | null">
  Bundle description (may contain HTML).
</ResponseField>

<ResponseField name="type" type="string">
  Item type. Always `bundling` for this list.
</ResponseField>

<ResponseField name="status" type="string">
  Bundle status (example: `active`, `closed`).
</ResponseField>

<ResponseField name="link" type="string">
  Unique link slug.
</ResponseField>

<ResponseField name="updatedAt" type="number (timestamp)">
  Last update time in epoch format (ms).
</ResponseField>

<ResponseField name="createdAt" type="number (timestamp)">
  Creation time in epoch format (ms).
</ResponseField>

<ResponseField name="bundlingProductType" type="string">
  Type of products that make up the bundle (example: `payment_link`).
</ResponseField>

<ResponseField name="coverImageId" type="string<uuid> | null">
  Cover image ID (if any).
</ResponseField>

<ResponseField name="coverImage" type="object | null">
  Cover image details (if any).
</ResponseField>

<ResponseField name="products" type="array of object">
  List of products included in the bundle.
</ResponseField>

### products Structure (Array Of Object)

<ResponseField name="id" type="string<uuid>">
  ID of the bundle-product link record.
</ResponseField>

<ResponseField name="status" type="string">
  Status of the product within the bundle (example: `ENABLED`).
</ResponseField>

<ResponseField name="paymentLinkId" type="string<uuid>">
  ID of the underlying product/payment link.
</ResponseField>

<ResponseField name="paymentLink" type="object">
  Summary of the underlying product/payment link.
</ResponseField>

### products.paymentLink Structure (Object)

<ResponseField name="id" type="string<uuid>">
  ID of the product/payment link.
</ResponseField>

<ResponseField name="name" type="string">
  Name of the product/payment link.
</ResponseField>

<ResponseField name="type" type="string">
  Product type (example: `course`, `digital_product`, `generic_link`).
</ResponseField>

<ResponseField name="amount" type="integer">
  Price of the underlying product.
</ResponseField>
