AddCategory

POST /categories

Add a new category

Query parameters

  • apiKey string Required

    Token defined on the server to be able to perform administration tasks

application/json

Body

This would create such a category: Type: Plant -> Category: Cactus

  • type string Required

    Values are plant or insect.

  • category string
  • subcategory string

Responses

  • 201

    Created

  • 400

    Bad Request

  • 401

    Unauthorized

  • 409

    This category already exists

  • 500

    Internal Server Error

POST /categories
curl \
 --request POST 'https://garden-to-yours.herokuapp.com/categories?apiKey=string' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"type":"plant","category":"Cactus"}'
Request example
{
  "type": "plant",
  "category": "Cactus"
}