# Import categories

With Fairmarkit, you can assign categories to your events. Categories and subcategories are made to match your business practices and can be used to organize and track your analytics in a way that makes sense to your organization.

### Category levels <a href="#categorylevels" id="categorylevels"></a>

With categories, you can create a category *(L1 Category)* and then up to three levels of subcategories *(L2 Category - L4 Category).* The first two level of categories will be visible in Fairmarkit, and the full category list are used to help improve your supplier recommendations.

**Example**:

| L1 Category > | L2 Category > | L3 Category > | L4 Category |
| ------------- | ------------- | ------------- | ----------- |
| Supplies >    | Coffee >      | Whole bean>   | Dark roast  |

&#x20;

### Category data <a href="#categorydata" id="categorydata"></a>

The following table outlines the column headers you will need to create when you import your categories into Fairmarkit. The \*required fields are marked.

Template: Make sure you have the latest version of the flat file template ([view](https://docs.google.com/spreadsheets/d/1INb94RFKXMIBECHJ0DEpPo4EiY7iUvetkmloNSABD8o/edit#gid=0) | [download CSV file](https://docs.google.com/spreadsheets/d/e/2PACX-1vSsskPZC9mulbFftbuowuzDwLg43wu2SiFVbOWLulELeU0Pvr61n9e0LgwQ-jyt7KJEdnaRNtBt8wBq/pub?gid=0\&single=true\&output=csv)).

| Fairmarkit field | Header         | Description      |                                                                                                                                                                           |
| ---------------- | -------------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|                  | L1 Category    | category\_l1     | <p>Category as defined in your purchasing application.</p><p>Data type: Text</p><p><em>Example: Supplies</em></p>                                                         |
|                  | L1 Category ID | category\_id\_l1 | <p>Category ID</p><p>Data type: Text</p><p><em>Example: 1001</em></p>                                                                                                     |
|                  | L2 Category    | category\_l2     | <p>Subcategory.</p><p>Data type: Text</p><p><em>Example: Coffee</em></p>                                                                                                  |
|                  | L2 Category ID | category\_id\_l2 | <p>Subcategory ID</p><p>Data type: Text</p><p><em>Example: 23</em></p>                                                                                                    |
|                  | L3 Category    | category\_l3     | <p>Subcategory.</p><p>Data type: Text</p><p><em>Example: Whole bean</em></p>                                                                                              |
|                  | L3 Category ID | category\_id\_l3 | <p>Subcategory ID</p><p>Data type: Text</p><p><em>Example: 01</em></p>                                                                                                    |
|                  | L4 Category    | category\_l4     | <p>Subcategory.</p><p>Data type: Text</p><p><em>Example: Dark roast</em></p>                                                                                              |
|                  | L4 Category ID | category\_id\_l4 | <p>Subcategory ID</p><p>Data type: Text</p><p><em>Example: 03</em></p>                                                                                                    |
|                  | Visible in UI  | visible\_in\_ui  | <p>Is the category visible in the Fairmarkit user interface?</p><p>Default: True</p><p>Data type: Text</p><p><em>Example: True</em></p><p>Accepted values: True/False</p> |
|                  | Category Type  | category\_type   | <p>Category type.</p><p>Data type: Text</p><p><em>Example: Spend</em></p><p>Accepted values: Spend/Supplier</p>                                                           |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fairmarkit.com/buyers/integrations/flat-file-integration/import-data/import-categories.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
