---
title: "get variant bundle contributions"
method: GET
path: "/api/v1/sales/velocity/variants/{variant_id}/bundle-contributions"
tags: ["sales_velocity"]
---

# get variant bundle contributions

`GET /api/v1/sales/velocity/variants/{variant_id}/bundle-contributions`

## Request

- Base URL: `https://api.app.tightly.io`
- URL: `https://api.app.tightly.io/api/v1/sales/velocity/variants/{variant_id}/bundle-contributions`
- Auth: HTTP bearer

How much of one variant's demand comes from each bundle that contains it, over a window: one entry per bundle with the bundle's product and variant titles and its contribution, plus `total_count` and `total_demand`.

`variant_id` is in the path; `sales_channel_id`, `start_date` and `end_date` are all required. It uses the same effective-demand figures as get_sales_velocity_table. At most 20 bundles come back, largest contribution first, and where there are more the last entry is an `Others` row summing the rest.

`data_source` says which store served the read, `ch` for the analytics mirror and `pg` for PostgreSQL, exactly as on get_sales_velocity_table. The figures are the same either way; the field is there because a fallback to PostgreSQL is otherwise invisible.

Scope: `sales:read`.

## Path parameters

- `variant_id` string, required

## Query parameters

- `sales_channel_id` string, required
- `start_date` string, date, required
- `end_date` string, date, required

## Headers

- `Tightly-Version` string

## Response `200`

Bundle demand contributions for the variant

- object
  - `data` object
  - `message` object: severity, service and desc.

## Other responses

- `400`: Bad Request - Invalid parameters
- `401`: No usable key: malformed, unknown, revoked, expired or stopped. One refusal covers all five, telling a caller which is which maps the surface for them. A request with no Authorization header at all is refused 400 before any key is looked for.
- `403`: The key may not reach this operation. `scope_missing` when the key does not hold Sales; `organization_mismatch` when the path names an organisation that is not the key's; `ip_not_allowed` when the caller's address is outside the key's allowlist.
- `429`: The key has spent its allowance for this minute. 600 reads and 120 writes a minute, counted per key, refused calls included. `Retry-After` says how long to wait.
- `500`: Internal Server Error
- `503`: The database is briefly out of reach, which is what a failover or a full connection pool looks like from outside. Wait the seconds `Retry-After` names and send the request again. A read is safe to repeat. A write is not, because the connection was lost in the middle of it, so read the object back before sending it a second time. Branch on the status rather than on `code`, which is `POSTGRES_UNAVAILABLE` from one of the two seams that raise this and `SERVICE_UNAVAILABLE` from the other.

---

[API](https://skmtc.dev/tightly/apis/tightly-api.md) · [All operations](https://skmtc.dev/tightly/apis/tightly-api/llms.txt) · [OpenAPI document](https://skmtc.dev/tightly/apis/tightly-api/revisions/199f7eb35afb?raw)
