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

# List Partnerships

> List the partnerships your credentials can access, optionally filtered by partner, merchant, or partnership IDs

> [!NOTE]
>
> The `x-api-key` header value to be used on this API is your **partner API key**, which can be generated through the dashboard.

**x-api-key** `string` *required*

Your partner API key, generated through the dashboard.

**partner\_ids** `string`

A comma-separated list of partner IDs. When provided, only partnerships associated with these partners are returned.

**merchant\_ids** `string`

A comma-separated list of merchant IDs. When provided, only partnerships associated with these merchants are returned.

**ids** `string`

A comma-separated list of partnership integer IDs. When provided, only those partnerships are returned, still subject to the `include` filters below. This parameter accepts integer IDs, not partnership UUIDs. To look up a single partnership by UUID, use [Get Partnership](https://docs.withbenji.com/api-reference/endpoint/partnerships/get.md).

**include** `string`

A comma-separated list of modifiers that change which partnerships are returned:

**supported include values**

* **inactive** : Also return inactive partnerships. By default, only active partnerships (`is_active` 1) are returned. \\

* **campaigns** : Attach the campaigns associated with each returned partnership in that partnership's `campaigns` array.

### Response

**partnerships** `array` *required*

The partnerships that match the request. The list is empty when no partnerships match. Deleted partnerships are not returned.

**properties**

**uuid\_id** `string`

The UUID of the partnership. Use this identifier on [Get Partnership](https://docs.withbenji.com/api-reference/endpoint/partnerships/get.md) and [Campaign Eligibility](https://docs.withbenji.com/api-reference/endpoint/campaigns/eligibility.md). May be null.

**id** `integer` *required*

The numeric identifier of the partnership returned by the API.

**name** `string` *required*

The name of the partnership displayed to users and administrators.

**description** `string`

A description of the partnership. May be null if no description is provided.

**img** `string`

The URL of the partnership logo or image. May be null if no image is provided.

**merchant\_id** `integer`

The identifier of the merchant in this partnership. When present, this is a positive integer.

**related\_partner\_id** `integer`

The identifier of the related partner in this partnership. May be null. When present, this is a positive integer.

**partner\_id** `integer`

The identifier of the partner in this partnership. When present, this is a positive integer.

**is\_active** `integer`

Whether this partnership is currently active. Values: 1 = active, 0 = inactive.

**is\_deleted** `integer`

Whether this partnership has been marked as deleted. Values: 1 = deleted, 0 = not deleted.

**owner\_id** `integer`

The identifier of the user who created or owns this partnership.

**is\_demo** `integer`

Whether this partnership is for demonstration purposes only. Values: 1 = demo, 0 = real.

**created\_date** `string`

The date and time when this partnership was created, in ISO 8601 format. May be null.

**campaigns** `array`

Campaigns associated with this partnership. Returned when `include` contains `campaigns`. May be null when campaigns are not included.

**campaign properties**

**id** `integer` *required*

The unique identifier of the campaign.

**name** `string` *required*

The name of the campaign displayed to users and administrators, up to 255 characters.

**description** `string`

A description of the campaign. May be null.

**campaign\_logo** `string`

The URL of the campaign logo. May be null.

**campaign\_type** `integer` *required*

The campaign type that determines how rewards are structured:

**possible campaign type values**

* **EARN (1)** : Campaigns that reward users with points \\

* **REDEEM (2)** : Campaigns that let users spend points on a perk or discount \\

* **CONNECT\_ONLY (3)** : Campaigns that only require connecting an account \\

* **TRANSFER (4)** : Campaigns that transfer points between programs

**merchant\_id** `integer`

The identifier of the merchant associated with this campaign. When present, this is a positive integer.

**partner\_id** `integer`

The identifier of the partner associated with this campaign. When present, this is a positive integer.

**partnership\_id** `integer`

The identifier of the partnership this campaign belongs to. May be null. When present, this is a positive integer.

**is\_active** `integer`

Whether the campaign is currently active. Values: 1 = active, 0 = inactive.

**is\_deleted** `integer`

Whether the campaign has been deleted. Values: 1 = deleted, 0 = not deleted.

**start\_date** `string`

The date and time when this campaign becomes available, in ISO 8601 format. May be null.

**end\_date** `string`

The date and time when this campaign expires, in ISO 8601 format. May be null if the campaign has no expiration.

**activation\_date** `string`

The date and time when this campaign was activated, in ISO 8601 format. May be null.

**owner\_id** `integer`

The identifier of the user who created or owns this campaign.

**is\_template** `integer`

Whether this campaign is a template. Values: 1 = template, 0 = not a template.

**template\_id** `integer`

The template campaign ID this campaign is based on. May be null if it is not based on a template.

**total\_rewards** `integer`

The total amount of rewards distributed through this campaign so far, in the smallest currency unit (for example, cents).

**campaign\_flows** `array`

The campaign flows that define trigger conditions and reward structures for this campaign. May be null if no flows are defined. `offers` is an alias for this same list.

**offers** `array`

Alias for `campaign_flows`.

**goals** `array`

Goals for this campaign, such as targets or limits for campaign performance metrics. May be null.

**messaging\_templates** `array`

Transactional messaging template associations for this campaign. May be null.

```bash cURL theme={null}
curl --request GET \
  --url 'https://api-staging.withbenji.com/partnerships?partner_ids=61&include=inactive,campaigns' \
  --header 'x-api-key: <your-partner-api-key>'
```

```json 200 theme={null}
{
  "code": "ok",
  "data": {
    "partnerships": [
      {
        "id": 42,
        "uuid_id": "550e8400-e29b-41d4-a716-446655440000",
        "name": "Test Partnership",
        "description": "A partnership between merchant and loyalty partner",
        "img": "https://example.com/partnership-logo.png",
        "merchant_id": 1,
        "related_partner_id": null,
        "partner_id": 61,
        "is_active": 1,
        "is_deleted": 0,
        "owner_id": 5,
        "is_demo": 0,
        "created_date": "2024-11-20T00:30:57.256493+00:00",
        "campaigns": [
          {
            "id": 118,
            "name": "Redeem perk campaign",
            "description": null,
            "campaign_logo": null,
            "campaign_type": 2,
            "merchant_id": 1,
            "partner_id": 61,
            "partnership_id": 42,
            "is_active": 1,
            "is_deleted": 0,
            "start_date": null,
            "end_date": null,
            "activation_date": null,
            "owner_id": 5,
            "is_template": 0,
            "template_id": null,
            "total_rewards": 0,
            "campaign_flows": [],
            "offers": [],
            "goals": [],
            "messaging_templates": []
          }
        ]
      }
    ]
  }
}
```

```json 400 theme={null}
{
  "code": "invalid_request_parameters",
  "message": "{'ids': {0: ['Not a valid integer.']}}"
}
```

```json 401 theme={null}
{
  "code": "unauthorized_error",
  "message": "Unauthorized."
}
```

```json 401 theme={null}
{
  "code": "method_not_allowed_error",
  "message": "Method is not allowed for this user"
}
```

```json 403 theme={null}
{
  "code": "forbidden_error",
  "message": "Access forbidden. Insufficient permissions."
}
```

> [!TIP]
>
> This endpoint lists partnerships. To retrieve a single partnership by UUID, use [Get Partnership](https://docs.withbenji.com/api-reference/endpoint/partnerships/get.md).


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