Skip to content
This repository was archived by the owner on Jun 26, 2020. It is now read-only.

Latest commit

 

History

History
102 lines (80 loc) · 2.32 KB

category.md

File metadata and controls

102 lines (80 loc) · 2.32 KB

FORMAT: 1A

Entity Categories [/api/v1.1/entity/{entity_id}/category]

Retrieve Entity Categories [GET]

  • Headers

      Authorization: <api_key>
    

Response 200 (application/json)

    {
       "categories" : [
        {
            "sub" : [],
             "name" : "Cultura/Ipsilon",
             "slug" : "/culturaIpsilon",
             "id" : "229bc10c-c761-425f-8512-208675cefb4a"
        },
        {
             "sub" : [],
             "name" : "Desporto",
             "slug" : "/desporto",
             "id" : "2d79b471-458b-44a7-9341-e9025ac39c68"
        },
        {
             "sub" : [],
             "name" : "Economia",
             "slug" : "/economia",
             "id" : "5cc511b1-091f-40e9-abde-9543899ea2cf"
        },
        {
             "sub" : [],
             "name" : "Lifestyle",
             "slug" : "/lifestyle",
             "id" : "c08f283e-cc69-4c89-8261-5b4a2ef48b7a"
        },
        {
             "sub" : [],
             "name" : "Local",
             "slug" : "/local",
             "id" : "10a6124e-51be-49e4-bae6-9519be820a0f"
        },
        {
             "sub" : [],
             "name" : "Mundo",
             "slug" : "/mundo",
             "id" : "0c9ced13-fdde-41fd-ba13-adc04bd757bf"
        },
        {
             "sub" : [],
             "name" : "Política",
             "slug" : "/politica",
             "id" : "08acfabd-6799-4f30-b0b6-4bce95fcbe2a"
        },
        {
             "sub" : [],
             "name" : "Sociedade",
             "slug" : "/sociedade",
             "id" : "fc04c7f4-b2b2-49c6-88b0-aaab59d057d7"
        },
        {
            "sub" : [],
             "name" : "Tecnologia",
             "slug" : "/tecnologia",
             "id" : "d4e5c27c-7bee-4211-984a-db80c1b59692"
        }
    ]
}

Add category [POST]

  • Headers

      Authorization: <api_key>
    
  • Body

      {
          "name": "category name",
      }
    
      {
          "name": "category name",
          "parent": "parent_id",
      }
    

Response 200 (application/json)

    {
        "ok": 1
        "id": "category id"
    }