# Get Partner SKU

### Description

This service retrieves the details of a specific Partner SKU associated with the logged-in partner. The search is performed using the `partner_sku_code`.

***

### 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/{partner_sku_code}
```

#### Path Parameters

| **Parameter**      | **Type** | **Description**                                |
| ------------------ | -------- | ---------------------------------------------- |
| `partner_sku_code` | String   | The internal partner code assigned to the SKU. |

#### 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/pa6_cafe?touchpoint=test&token=...
```

***

### Response

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

Returns the details of the Partner SKU, including its mapping to various Thalamus SKU codes.

| **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 representing the equivalence.                                           |
| `skuCodes`        | Object   | A map of SKU reference codes (keys) to their corresponding Thalamus SKU codes (values). |

Example Response Body:

```
{
    "name": "Café negro",
    "code": "pa6_cafe", 
    "equivalenceType": 1,
    "equivalence": "1.5",
    "skuCodes": {
        "COD_BRA": "bra_cafe",
        "COD_COL": "col_cafe"
    }
}
```

***

### ❌ Unsuccessful Response

#### `400 Bad Request` / `404 Not Found`

| **Error Code**              | **Field**         | **Description**                                      |
| --------------------------- | ----------------- | ---------------------------------------------------- |
| `InvalidRoleForLoggedParty` | `partner`         | The logged-in user does not have the "Partner" role. |
| `code.notFound`             | `partnerSku code` | No Partner SKU was found for the provided code.      |
