> For the complete documentation index, see [llms.txt](https://docs.fairmarkit.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fairmarkit.com/buyers/integrations/flat-file-integration/import-data/import-categories.md).

# 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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
