# Upload list of flat hierarchies

**POST** `https://api.zoined.com/flatHierarchies?dryRun=false&separator=%3B&encoding=utf-8`

Endpoint: POST /flatHierarchies
Security: bearerAuth

## Security:

  - `bearerAuth` (unknown)
    http bearer token

## Query parameters:

  - `dryRun` (boolean, required)
    Only validate the request without storing the data

  - `separator` (string, required)
    Column separator used when loading CSV data

  - `encoding` (string, required)
    Character encoding used in the CSV data (default is utf-8)

## Request fields (application/json):

  - `hierarchy_key` (string, required)
    Type of hierarchy that is uploaded
    Enum: "product", "model", "product_group", "organisation", "customer", "channel", "area", "account"

  - `entity_id` (string, required)
    Identifier for the lowest level entity in the hierarchy
    Example: XYZ

  - `level1` (string, required)
    Name of root category level
    Example: Clothing

  - `level2` (string)
    Name of category level 2
    Example: Children's clothing

  - `level3` (string)
    Name of category level 3
    Example: Children's outdoor clothing

  - `level4` (string)
    Name of category level 4
    Example: Children's outdoor headwear

  - `level5` (string)
    Name of category level 5
    Example: Children's caps

  - `level6` (string)
    Name of category level 6
    Example: Children's small caps

  - `level7` (string)
    Name of category level 7
    Example: Children's themed caps

  - `level8` (string)
    Name of category level 8
    Example: Children's disney caps

  - `level9` (string)
    Name of category level 9
    Example: Children's mickey caps

  - `level10` (string)
    Name of category level 10
    Example: Children's ...

  - `source_system` (string)
    Identifier of the source system this data is from. Needed when mapping between source system identifiers and master identifiers are used.
    Example: ABCDEF

## Response 200:

  - `200` (unknown)
    Request has been processed successfully.
**Headers**
- `Content-Type: application/json`

## Response 200 fields (application/json):

  - `status` (string, required)
    Status of the operation OK / Not OK
    Example: OK

  - `msg` (string, required)
    Message describing result of operation
    Example: 1 entity added

## Response 400:

  - `400` (unknown)
    Invalid, malformed or missing JSON-data in request
**Headers**
- `Content-Type: application/json`

## Response 400 fields (application/json):

  - `status` (string, required)
    Status of the operation OK / Not OK
    Example: Not OK

  - `msg` (string, required)
    Message describing result of operation
    Example: Reason for error

## Response 401:

  - `401` (unknown)
    Missing or invalid authorization token in header
**Headers**
- `Content-Type: application/json`

## Response 401 fields (application/json):

  - `status` (string, required)
    Status of the operation OK / Not OK
    Example: Not OK

  - `msg` (string, required)
    Message describing result of operation
    Example: Unauthorized

## Response 500:

  - `500` (unknown)
    Internal error or exception
**Headers**
- `Content-Type: application/json`

## Response 500 fields (application/json):

  - `status` (string, required)
    Status of the operation OK / Not OK
    Example: Not OK

  - `msg` (string, required)
    Message describing result of operation
    Example: Reason for error

## Response 200 examples:

  - `response` (unknown)

## Response 400 examples:

  - `response` (unknown)

## Response 401 examples:

  - `response` (unknown)

## Response 500 examples:

  - `response` (unknown)

