---
title: Attributes
description: "### Lookup Data | Id | Category | | --- | --- | | 1 | Reservation | | 2 | User | | 4 | Resource | | Id | Type | | --- | --- | | 1…"
url: "https://www.bookedscheduler.com/help/api/api-attributes/"
updated: "2023-01-18"
category: API
---

# Attributes

### Lookup Data

| Id | Category |
| --- | --- |
| 1 | Reservation |
| 2 | User |
| 4 | Resource |

| Id | Type |
| --- | --- |
| 1 | Single Line Textbox |
| 2 | Multi Line Textbox |
| 3 | Select List |
| 4 | Checkbox |
| 5 | Date Time |
| 6 | Multiple Select |
| 7 | Link |

### GET Methods

#### Get Category Attributes

 Description Gets all custom attribute definitions for the requested category. Route /Attributes/Category/:categoryId Authentication This service is secure and requires authentication headers Example Response `{
    "attributes": [
        {
            "id": 1,
            "label": "display label",
            "type": "Allowed values for type: 4 (checkbox), 2 (multi line), 3 (select list), 1 (single line)",
            "categoryId": "Allowed values for category: 1 (reservation), 4 (resource), 5 (resource type), 2 (user)",
            "regex": "validation regex",
            "required": true,
            "possibleValues": [
                "possible",
                "values"
            ],
            "sortOrder": 100,
            "appliesToIds": [
                10
            ],
            "adminOnly": true,
            "isPrivate": true,
            "secondaryCategoryId": 1,
            "secondaryEntityIds": [
                1,
                2
            ],
            "links": [],
            "message": null
        }
    ],
    "links": [],
    "message": null
}`

#### Get Attribute

 Description Gets all custom attribute definitions for the requested attribute. Route /Attributes/:attributeId Authentication This service is secure and requires authentication headers Example Response `{
    "id": 1,
    "label": "display label",
    "type": "Allowed values for type: 4 (checkbox), 2 (multi line), 3 (select list), 1 (single line)",
    "categoryId": "Allowed values for category: 1 (reservation), 4 (resource), 5 (resource type), 2 (user)",
    "regex": "validation regex",
    "required": true,
    "possibleValues": [
        "possible",
        "values"
    ],
    "sortOrder": 100,
    "appliesToIds": [
        10
    ],
    "adminOnly": true,
    "isPrivate": true,
    "secondaryCategoryId": 1,
    "secondaryEntityIds": [
        1,
        2
    ],
    "links": [],
    "message": null
}`

### POST Methods

#### Create Custom Attribute

 Description Creates a new custom attribute. appliesToIds only allowed for category 2, 4, 5 and must match the id of corresponding entities secondaryCategoryId and secondaryEntityIds only applies to category 1 and must match the id of the corresponding entities Route /Attributes/ Authentication This service is secure and requires authentication headers This service is only available to application administrators Example Request `{
    "label": "attribute name",
    "type": 1,
    "categoryId": 1,
    "regex": "validation regex",
    "required": true,
    "possibleValues": [
        "possible",
        "values",
        "only valid for select list"
    ],
    "sortOrder": 100,
    "appliesToIds": [
        10
    ],
    "adminOnly": true,
    "isPrivate": true,
    "secondaryCategoryId": 1,
    "secondaryEntityIds": [
        1,
        2
    ]
}` Example Response `{
    "attributeId": 1,
    "links": [
        {
            "href": "http://url/to/attribute",
            "title": "get_custom_attribute"
        },
        {
            "href": "http://url/to/update/attribute",
            "title": "update_custom_attribute"
        }
    ],
    "message": null
}`

#### Update Custom Attribute

 Description Updates an existing custom attribute. appliesToIds only allowed for category 2, 4, 5 and must match the id of corresponding entities secondaryCategoryId and secondaryEntityIds only applies to category 1 and must match the id of the corresponding entities Route /Attributes/:attributeId Authentication This service is secure and requires authentication headers This service is only available to application administrators Example Request `{
    "label": "attribute name",
    "type": 1,
    "categoryId": 1,
    "regex": "validation regex",
    "required": true,
    "possibleValues": [
        "possible",
        "values",
        "only valid for select list"
    ],
    "sortOrder": 100,
    "appliesToIds": [
        10
    ],
    "adminOnly": true,
    "isPrivate": true,
    "secondaryCategoryId": 1,
    "secondaryEntityIds": [
        1,
        2
    ]
}` Example Response `{
    "attributeId": 1,
    "links": [
        {
            "href": "http://url/to/attribute",
            "title": "get_custom_attribute"
        },
        {
            "href": "http://url/to/update/attribute",
            "title": "update_custom_attribute"
        }
    ],
    "message": null
}`

### DELETE Methods

#### Delete Custom Attribute

 Description Deletes an existing custom attribute. Route /Attributes/:attributeId Authentication This service is secure and requires authentication headers This service is only available to application administrators Example Response `{
    "links": [],
    "message": "The item was deleted"
}`
