# List Partner SKUs

### Description

This service retrieves a list of all Partner SKUs associated with the currently logged-in partner.

***

### Request

#### Restrictions

* Authentication: Requires a successful partner login.
* Role Validation: The logged-in user must have the "Partner" role.

#### Endpoint

```
GET https://<server-url>/api/v4/partner/skus
```

#### Parameters

| **Parameter** | **Location**   | **Description**                                                                        |
| ------------- | -------------- | -------------------------------------------------------------------------------------- |
| `touchpoint`  | Query / Header | The identifier for the touchpoint. Use `Thalamus-Touchpoint` for the header.           |
| `token`       | Query / Header | The authentication token for the partner session. Use `Thalamus-Token` for the header. |

#### Full URL Example

```
https://<server-url>/api/v4/partner/skus?touchpoint=test&token=...
```

***

### Response

#### ✅ Successful Response: `200 OK`

Returns a JSON object containing an array of `partnerSkus`.

| **Field**         | **Type** | **Description**                                                                       |
| ----------------- | -------- | ------------------------------------------------------------------------------------- |
| `code`            | String   | The internal code of the partner SKU.                                                 |
| `name`            | String   | The display name of the partner SKU.                                                  |
| `equivalenceType` | Integer  | Mapping type: `1` (Equivalence), `2` (Unit), `3` (Package), `4` (Boxes).              |
| `equivalence`     | String   | A decimal value. Note: Only set for Equivalence Type 1. For others, it defaults to 1. |
| `skuCodes`        | Object   | A map of SKU reference codes to their corresponding Thalamus SKU codes.               |

Example Response Body:

```
{
    "partnerSkus": [
        {
            "name": "Café negro",
            "code": "pa6_cafe",
            "equivalenceType": 1,
            "equivalence": "1.5",
            "skuCodes": {
                "COD_BRA": "bra_cafe",
                "COD_COL": "col_cafe"
            }
        },
        {
            "name": "Termo chico",
            "code": "pa6_termo",
            "equivalenceType": 2,
            "skuCodes": {
                "COD_BRA": "bra_termo"
            }
        }
    ]
}
```

***

### ❌ Unsuccessful Response

#### `400 Bad Request`

| **Error Code**              | **Field** | **Description**                                      |
| --------------------------- | --------- | ---------------------------------------------------- |
| `InvalidRoleForLoggedParty` | `partner` | The logged-in user does not have the "Partner" role. |
