---
updatedAt: 2025-09-09T21:11:27.000Z
agentTools:
  projectIndex: https://developer.paylink.sa/llms.txt
---

# Retrieve Merchant Invoice Themes

Here’s the updated documentation to reflect the new response structure:

***

## API Endpoint: Retrieve Merchant Invoice Themes

### Description

This API endpoint retrieves the theme configuration for a specific merchant based on a dynamic key and value. It is secured and can only be accessed by users with the `PARTNER` role.

### HTTP Request

**Testing Environment:**

```plaintext
GET https://restpilot.paylink.sa/rest/partner/v2/merchant/{key}/{value}/themes
```

**Production Environment:**

```plaintext
GET https://restapi.paylink.sa/rest/partner/v2/merchant/{key}/{value}/themes
```

### Headers

| Header        | Value                      |
| ------------- | -------------------------- |
| Authorization | Bearer `<your_token_here>` |

> **Note:** To obtain the Bearer token required for authentication, refer to the [Partner Authentication Guide](https://developer.paylink.sa/docs/partner-authentication).

### Path Parameters

* **`key`:** The key used to identify the merchant attribute. Possible values:
  * `cr` or `freelancer`: Search by the merchant's license number.
  * `mobile`: Search by the merchant's phone number.
  * `email`: Search by the merchant's email address.
  * `accountNo`: Search by the merchant's account number.

* **`value`:** The value associated with the key (e.g., specific license number, phone number, email, or account number).

### Example `curl` Request

**Testing Environment:**

```bash
curl --location 'https://restpilot.paylink.sa/rest/partner/v2/merchant/email/it2@paylink.sa/themes' \
--header 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJoYXNzYW4uYXlvdWIuMTk4MEBnbWFpbC5jb20iLCJhdXRoIjoiUk9MRV9NRVJDSEFOVCxST0xFX01FUkNIQU5UX0FDQ09VTlQsUk9MRV9QQVJUTkVSIiwiaXNzIjoiQVBJIiwiZXhwIjoxNzI1MDYwNDYwfQ.PyzoR4YCxcVlls3ne7ApvvW9wSQoURVzoPNTO7stiPuuGAsAXexFIOZJ79tXI8v-b5HGESr20K0-I2_yFbUPvQ'
```

**Production Environment:**

```bash
curl --location 'https://restapi.paylink.sa/rest/partner/v2/merchant/email/it2@paylink.sa/themes' \
--header 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJoYXNzYW4uYXlvdWIuMTk4MEBnbWFpbC5jb20iLCJhdXRoIjoiUk9MRV9NRVJDSEFOVCxST0xFX01FUkNIQU5UX0FDQ09VTlQsUk9MRV9QQVJUTkVSIiwiaXNzIjoiQVBJIiwiZXhwIjoxNzI1MDYwNDYwfQ.PyzoR4YCxcVlls3ne7ApvvW9wSQoURVzoPNTO7stiPuuGAsAXexFIOZJ79tXI8v-b5HGESr20K0-I2_yFbUPvQ'
```

### Response

| Content-Type | Value              |
| ------------ | ------------------ |
| JSON         | `application/json` |

### Response Example

```json
{
    "primaryColor": "#3087de",
    "secondaryColor": "#8C60E2",
    "footerColor": "#f2f0f5",
    "footerBackgroundColor": "#110f15",
    "primaryLightColor": "#4f99e3",
    "primaryHoverColor": "#1b61a7",
    "defaultLanguage": "ar",
    "showLogo": "paylink",
    "textColor": "#000",
    "menuTextColor": "#FFF",
    "buttonHoverTextColor": "#FFF",
    "fontUrl": "https://fonts.googleapis.com/icon?family=Montserrat",
    "fontFamily": "\"dinnext-r\", sans-serif",
    "backgroundColor": "#898989",
    "foregroundColor": "#FFF",
    "progressModalBackground": "#FFF",
    "titlePanelBackground": "#e9ecef",
    "paymentFormBackground": "#FFF",
    "buttonTextColor": "#FFF",
    "paymentDeclineColor": "#ffc107",
    "paymentApprovedColor": "#44781a",
    "invoiceHeaderTextColor": "#FFF"
}
```

### Response Details

| Field                     | Type   | Description                                                                            |
| ------------------------- | ------ | -------------------------------------------------------------------------------------- |
| `primaryColor`            | String | The primary color used in the theme.                                                   |
| `secondaryColor`          | String | The secondary color used in the theme.                                                 |
| `footerColor`             | String | The color of the footer text.                                                          |
| `footerBackgroundColor`   | String | The background color of the footer.                                                    |
| `primaryLightColor`       | String | A lighter variation of the primary color.                                              |
| `primaryHoverColor`       | String | The color used when an element is hovered over.                                        |
| `defaultLanguage`         | String | The default language of the theme, represented as an ISO code (e.g., "ar" for Arabic). |
| `showLogo`                | String | Indicates which logo to show. Possible values are: `paylink`, `merchant`, or `none`.   |
| `textColor`               | String | The color of the text used in the theme.                                               |
| `menuTextColor`           | String | The color of the menu text.                                                            |
| `buttonHoverTextColor`    | String | The color of the button text when hovered.                                             |
| `fontUrl`                 | String | The URL to the font used in the theme.                                                 |
| `fontFamily`              | String | The font family used in the theme.                                                     |
| `backgroundColor`         | String | The background color used in the theme.                                                |
| `foregroundColor`         | String | The foreground color used in the theme.                                                |
| `progressModalBackground` | String | The background color of the progress modal.                                            |
| `titlePanelBackground`    | String | The background color of the title panel.                                               |
| `paymentFormBackground`   | String | The background color of the payment form.                                              |
| `buttonTextColor`         | String | The color of the text on buttons.                                                      |
| `paymentDeclineColor`     | String | The color used to indicate payment decline.                                            |
| `paymentApprovedColor`    | String | The color used to indicate payment approval.                                           |
| `invoiceHeaderTextColor`  | String | The color of the text in the invoice header.                                           |

### Security

| Code | Meaning                                                                      |
| ---- | ---------------------------------------------------------------------------- |
| 401  | Unauthorized: If the provided token is invalid or expired.                   |
| 403  | Forbidden: If the user does not have the required `PARTNER` role.            |
| 404  | Not Found: If no merchant or theme is found for the specified key and value. |

***

This documentation now aligns with the new response structure you provided, reflecting the updated fields and their descriptions.