## Documentation Index

Fetch the complete documentation index at: [/llms.txt](https://developer.fabric.inc/llms.txt)

Use this file to discover all available pages before exploring further.

### cURL

#### CategoryDate

```bash
curl --request PUT \
  --url https://api.fabric.inc/v3/product-attributes/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Category datetime example",
  "isLocalizable": false,
  "target": "CATEGORY",
  "type": "DATETIME",
  "validation": {
    "isMandatory": false,
    "isManualOverwrite": false,
    "formula": "",
    "dateFormat": "MM/DD/YYYY"
  }
}
'
```

#### 200

##### CategoryDate

```json
{
  "id": "64c15582e1f95e3214660d08",
  "name": "Category datetime example",
  "isLocalizable": false,
  "target": "CATEGORY",
  "type": "DATETIME",
  "validation": {
    "isMandatory": false,
    "isManualOverwrite": false,
    "formula": "",
    "dateFormat": "MM/DD/YYYY"
  },
  "updatedAt": "2023-07-26T17:18:47.162Z",
  "createdAt": "2023-07-26T17:18:47.162Z",
  "updatedBy": "test@email.com"
}
```

#### PUT Request

`/product-attributes/{id}`

### Authorizations

#### Authorization
- `string`
- `header`
- required
- S2S access token (JWT) from fabric Identity service (during Login)

#### Headers

- `x-fabric-tenant-id`
  - `string`
  - A header used by fabric to identify the tenant making the request. You must include tenant id in the authentication header for an API request to access any of fabric’s endpoints. This header is required.
- Example:
  ```
  "517fa9dfd42d8b00g1o3k312"
  ```

- `x-fabric-request-id`
  - `string`
  - Unique request ID
- Example:
  ```
  "263e731c-45c8-11ed-b878-0242ac120002"
  ```

### Path Parameters

- `id`
  - `string`
  - required
  - The 24-character system-generated ID of the attribute to update.

### Body

- `application/json`
- Request body to update attribute
- `name`
  - `string`
  - Attribute name that appears when it isn't localized. Refer to `localizedProperties` to get the localized name.
  - Example:
    ```
    "color"
    ```
- `description`
  - `string`
  - Brief description of attribute
  - Example:
    ```
    "Product color"
    ```
- `localizedProperties`
  - `object`
  - Names of localized attributes
  - Example:
    ```
    {
      "en-US": { "name": "color" },
      "en-IN": { "name": "colour" }
    }
    ```
- `type`
  - `enum<string>`
  - Available options: `TEXT`, `NUMBER`, `DATETIME`, `BOOLEAN`, `OPTIONS`, `SERIAL`
  - Example:
    ```
    "TEXT"
    ```
- `target`
  - `enum<string>`
  - Available options: `PRODUCT`, `CATEGORY`
  - Example:
    ```
    "PRODUCT"
    ```
- `isLocalizable`
  - `boolean`
  - Example:
    ```
    true
    ```
- `validation`
  - `object`
  - Validation details

### Response

- `200`
- `application/json`
- OK

Example Response:

```json
{
  "id": "CAZZX1234567DDDDD",
  "name": "color",
  "description": "Product color",
  "type": "TEXT",
  "target": "PRODUCT",
  "localizedProperties": {
    "en-US": { "name": "color" },
    "en-IN": { "name": "colour" }
  },
  "isLocalizable": true,
  "validation": {},
  "updatedBy": "test@email.com",
  "createdAt": "2021-04-20T10:24:36.162Z",
  "updatedAt": "2021-04-20T10:24:36.162Z"
}
```
