Skip to content

Flat hierarchies

This end point provides way to upload hierarchy information for different entities like products and organisations in "flat"-form.

This means that for each entity its full path in hierarchy is send, and hierarchy tree is build by us based on that.

Upload list of flat hierarchies

Request

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

Security
bearerAuth
Query
dryRunbooleanrequired

Only validate the request without storing the data

Example:dryRun=false
separatorstringrequired

Column separator used when loading CSV data

Example:separator=;
encodingstringrequired

Character encoding used in the CSV data (default is utf-8)

Example:encoding=utf-8
Body
Any of:
hierarchy_keystringrequired

Type of hierarchy that is uploaded

Enum ValueDescription
product

Product category hierarchy

model

Product model hierarchy

product_group

Product group hierarchy

organisation

Organisation hierarchy

customer

Customer hierarchy

channel

Channel hierarchy

area

Area hierarchy

account

Bookkeeping account hierarchy

Example:"product"
entity_idstringrequired

Identifier for the lowest level entity in the hierarchy

Example:"XYZ"
level1stringrequired

Name of root category level

Example:"Clothing"
level2string

Name of category level 2

Example:"Children's clothing"
level3string

Name of category level 3

Example:"Children's outdoor clothing"
level4string

Name of category level 4

Example:"Children's outdoor headwear"
level5string

Name of category level 5

Example:"Children's caps"
level6string

Name of category level 6

Example:"Children's small caps"
level7string

Name of category level 7

Example:"Children's themed caps"
level8string

Name of category level 8

Example:"Children's disney caps"
level9string

Name of category level 9

Example:"Children's mickey caps"
level10string

Name of category level 10

Example:"Children's ..."
source_systemstring

Identifier of the source system this data is from. Needed when mapping between source system identifiers and master identifiers are used.

Example:"ABCDEF"
curl -i -X POST \
  'https://zapi-api.zoined.com/_mock/flatHierarchies?dryRun=false&separator=%3B&encoding=utf-8' \
  -H 'Authorization: Bearer <YOUR_token_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "hierarchy_key": "product",
    "entity_id": "XYZ",
    "level1": "Clothing",
    "level2": "Children'\''s clothing",
    "level3": "Children'\''s outdoor clothing",
    "level4": "Children'\''s outdoor headwear",
    "level5": "Children'\''s caps",
    "level6": "Children'\''s small caps",
    "level7": "Children'\''s themed caps",
    "level8": "Children'\''s disney caps",
    "level9": "Children'\''s mickey caps",
    "level10": "Children'\''s ...",
    "source_system": "ABCDEF"
  }'

Responses

Request has been processed successfully.

Headers

  • Content-Type: application/json
Bodyapplication/json
statusstringrequired

Status of the operation OK / Not OK

Example:"OK"
msgstringrequired

Message describing result of operation

Example:"1 entity added"
Response
{ "status": "OK", "msg": "1 entity added" }