- version: required(1)
Welcome to the Shopping API Documentation. This API allows you to interact with a DB to store recipes an their ingredients.
URI for everything related to the Units class.
HTTP status code 200
Media type: application/json
Type:
{
"type": "array",
"items": {
"type": "string"
}
}
Example:
[
"slices",
"floz",
"tons",
"tbsp",
"cubic_meters"
]
HTTP status code 404
Media type: application/json
Type: object
Properties
- message: required(string)
- code: required(number)
Example:
{
"code": 400,
"message": "Reference not found in the data base"
}
Media type: application/json
Type:
{
"type": "object",
"properties": {
"units": {"type": ["string", "array"]}
}
}
Example:
{
"units": "g"
}
Media type: application/json
Type:
{
"type": "object",
"properties": {
"units": {"type": ["string", "array"]}
}
}
Example:
{
"units": "g"
}
URI for everything related to the Supermarket class.
HTTP status code 200
Media type: application/json
Type:
{
"type": "array",
"items": {
"type": "string"
}
}
Example:
[
"edeka",
"aldi"
]
HTTP status code 404
Media type: application/json
Type: object
Properties
- message: required(string)
- code: required(number)
Example:
{
"code": 400,
"message": "Reference not found in the data base"
}
Media type: application/json
Type:
{
"type": "object",
"properties": {
"supermarkets": {"type": ["string", "array"]}
}
}
Example:
{
"supermarkets": "aldi"
}
Media type: application/json
Type:
{
"type": "object",
"properties": {
"supermarkets": {"type": ["string", "array"]}
}
}
Example:
{
"supermarkets": "aldi"
}
URI for everything related to the Ingredients class.
HTTP status code 200
Media type: application/json
Type:
{
"title": "Ingredients response",
"type": "object",
"patternProperties": {
"^.*$": {
"properties": {
"name": {"type": "string"},
"category": {"type": "string"},
"supermarkets": {"type": "array"},
"units": {"type": "array"}
}
}
}
}
Example:
{
"-M9HqlUQnD7MS-W6kySH": {
"name": "Onion",
"category": "Vegetable/Fruit",
"supermarkets": [
"Aldi",
"Edeka"
],
"units": [
"u",
"g"
]
},
"-M9HqlUQnD7MS-DS53cKJ": {
"name": "...",
"category": "...",
"supermarkets": [],
"units": []
},
"-M9HqlUQnD7MS-LKH4c8": {},
"-M9HqlUQnHJGF-5KJHF4": {}
}
HTTP status code 404
Media type: application/json
Type: object
Properties
- message: required(string)
- code: required(number)
Example:
{
"code": 400,
"message": "Reference not found in the data base"
}
HTTP status code 200
Media type: application/json
Type:
{
"title": "Ingredients response",
"type": "object",
"patternProperties": {
"^.*$": {
"properties": {
"name": {"type": "string"},
"category": {"type": "string"},
"supermarkets": {"type": "array"},
"units": {"type": "array"}
}
}
}
}
Example:
{
"-M9HqlUQnD7MS-W6kySH": {
"name": "Onion",
"category": "Vegetable/Fruit",
"supermarkets": [
"Aldi",
"Edeka"
],
"units": [
"u",
"g"
]
}
}
HTTP status code 400
Media type: application/json
Type: object
Properties
- message: required(string)
- code: required(number)
Example:
{
"code": 400,
"message": "'u' is not of type 'array'"
}
HTTP status code 404
Media type: application/json
Type: object
Properties
- message: required(string)
- code: required(number)
Example:
{
"code": 400,
"message": "Reference not found in the data base"
}
Media type: application/json
Type:
{
"type": "object",
"properties": {
"name": {"type": "string"},
"units": {"type": ["array", "string"]},
"supermarkets": {"type": ["array", "string"]},
"category": {"type": "string"}
}
}
Example:
{
"name": "pepper",
"units": "tsp",
"supermarkets": "chinos",
"category": "spices"
}
HTTP status code 200
Media type: application/json
Type:
{
"title": "Ingredients response",
"type": "object",
"patternProperties": {
"^.*$": {
"properties": {
"name": {"type": "string"},
"category": {"type": "string"},
"supermarkets": {"type": "array"},
"units": {"type": "array"}
}
}
}
}
Example:
{
"-M9HqlUQnD7MS-W6kySH": {
"name": "Onion",
"category": "Vegetable/Fruit",
"supermarkets": [
"Aldi",
"Edeka"
],
"units": [
"u",
"g"
]
}
}
HTTP status code 404
Media type: application/json
Type: object
Properties
- message: required(string)
- code: required(number)
Example:
{
"code": 400,
"message": "Reference not found in the data base"
}
HTTP status code 409
Media type: application/json
Type: object
Properties
- message: required(string)
- code: required(number)
Example:
{
"code": 409,
"message": "The element already exists in the database"
}
Media type: application/json
Type:
{
"title": "Ingredients response",
"type": "object",
"patternProperties": {
"^.*$": {
"properties": {
"supermarkets": {"type": "array"},
"units": {"type": "array"}
}
}
}
}
Example:
{
"-M9HqlUQnD7MS-W6kySH": {
"supermarkets": [
"Aldi"
],
"units": [
"u"
]
}
}
HTTP status code 200
Media type: application/json
Type:
{
"title": "Ingredients response",
"type": "object",
"patternProperties": {
"^.*$": {
"properties": {
"supermarkets": {"type": "array"},
"units": {"type": "array"}
}
}
}
}
Example:
{
"-M9HqlUQnD7MS-W6kySH": {
"supermarkets": [
"Aldi",
"Edeka"
],
"units": [
"u",
"g"
]
}
}
HTTP status code 400
Media type: application/json
Type: object
Properties
- message: required(string)
- code: required(number)
Example:
{
"code": 400,
"message": "'u' is not of type 'array'"
}
HTTP status code 404
Media type: application/json
Type: object
Properties
- message: required(string)
- code: required(number)
Example:
{
"code": 400,
"message": "Reference not found in the data base"
}
Media type: application/json
Type:
{
"type": "object",
"properties": {
"id": {"type": "string"}
}
}
Example:
{
"id": "-M9HqlUQnD7MS-W6kySH"
}
HTTP status code 200
Media type: application/json
Type:
{
"title": "Ingredients response",
"type": "object",
"patternProperties": {
"^.*$": {
"properties": {
"name": {"type": "string"},
"category": {"type": "string"},
"supermarkets": {"type": "array"},
"units": {"type": "array"}
}
}
}
}
Example:
{
"-M9HqlUQnD7MS-W6kySH": {
"name": "Onion",
"category": "Vegetable/Fruit",
"supermarkets": [
"Aldi",
"Edeka"
],
"units": [
"u",
"g"
]
}
}
HTTP status code 400
Media type: application/json
Type: object
Properties
- message: required(string)
- code: required(number)
Example:
{
"code": 400,
"message": "'u' is not of type 'array'"
}
HTTP status code 404
Media type: application/json
Type: object
Properties
- message: required(string)
- code: required(number)
Example:
{
"code": 400,
"message": "Reference not found in the data base"
}
URI for everything related to the Recipes class
HTTP status code 200
Media type: application/json
Type:
{
"title": "Recipes response",
"type": "object",
"patternProperties": {
"^.*$": {
"properties": {
"name": {"type": "string"},
"description": {"type": "string"},
"link": {"type": "string"},
"ingredients": {
"type": "object",
"patternProperties": {
"^.*$": {
"anyOf": [{"type": "object"}],
"properties": {
"quantity": {"type": "number"},
"units": {"type": "string"}
}
}
}
}
}
}
}
}
Example:
{
"-M9HqlUQnD7MS-W6kySH": {
"name": "Pizza",
"description": "Aldi pizza with home vegetables",
"link": "http://www.mypizza.com",
"ingredients": {
"-M9HqlJkjgu85S-HGbl58": {
"quantity": 2,
"units": "g"
}
}
},
"-M9HqlUQnD7MS-DS53cKJ": {
"name": "...",
"description": "...",
"link": "...",
"ingredients": {}
},
"-M9HqlUQnD7MS-LKH4c8": {},
"-M9HqlUQnHJGF-5KJHF4": {}
}
HTTP status code 404
Media type: application/json
Type: object
Properties
- message: required(string)
- code: required(number)
Example:
{
"code": 400,
"message": "Reference not found in the data base"
}
HTTP status code 200
Media type: application/json
Type:
{
"title": "Recipes response",
"type": "object",
"patternProperties": {
"^.*$": {
"properties": {
"name": {"type": "string"},
"description": {"type": "string"},
"link": {"type": "string"},
"ingredients": {
"type": "object",
"patternProperties": {
"^.*$": {
"anyOf": [{"type": "object"}],
"properties": {
"quantity": {"type": "number"},
"units": {"type": "string"}
}
}
}
}
}
}
}
}
Example:
{
"-M9HqlUQnD7MS-W6kySH": {
"name": "Pizza",
"description": "Aldi pizza with home vegetables",
"link": "http://www.mypizza.com",
"ingredients": {
"-M9HqlJkjgu85S-HGbl58": {
"quantity": 2,
"units": "g"
},
"-M9HqlUQnD7MS-DS53cKJ": {
"quantity": 5,
"units": "cups"
},
"-M9HqlUQnD7MS-LKH4c8": {},
"-M9HqlUQnHJGF-5KJHF4": {}
}
}
}
HTTP status code 404
Media type: application/json
Type: object
Properties
- message: required(string)
- code: required(number)
Example:
{
"code": 400,
"message": "Reference not found in the data base"
}
Media type: application/json
Type:
{
"type": "object",
"properties": {
"name": {"type": "string"},
"description": {"type": "string"},
"link": {"type": "string"},
"ingredients": {
"patternProperties": {
"^.*$": {
"properties": {
"name": {"type": "string"},
"description": {"type": "string"},
"link": {"type": "string"},
"ingredients": {
"type": "object",
"patternProperties": {
"^.*$": {
"anyOf": [{"type": "object"}],
"properties": {
"quantity": {"type": "number"},
"units": {"type": "string"}
}
}
}
}
}
}
}
},
"new_ingredients": {
"type": "array",
"items": {
"properties": {
"name": {"type": "string"},
"category": {"type": "string"},
"supermarkets": {"type": "string"},
"quantity": {"type": "number"},
"units": {"type": "string"}
}
}
}
}
}
Example:
{
"name": "Pizza",
"description": "Supermarket pizza with home vegetables",
"link": "http://www.mypizza.com",
"ingredients": {
"-M9HqlJkjgu85S-HGbl58": {
"quantity": 2,
"units": "g"
},
"-M9HqlUQnD7MS-DS53cKJ": {
"quantity": 5,
"units": "cups"
},
"-M9HqlUQnD7MS-LKH4c8": {
"quantity": 7,
"units": "hand"
},
"-M9HqlUQnHJGF-5KJHF4": {
"quantity": 4,
"units": "piles"
}
},
"new_ingredients": [
{
"name": "Onion",
"category": "Vegetables/Fruits",
"supermarkets": "aldi",
"quantity": 4,
"units": "piles"
},
{
"name": "Tomato",
"category": "Vegetables/Fruits",
"supermarkets": "aldi",
"quantity": 7,
"units": "tons"
}
]
}
HTTP status code 201
Media type: application/json
Type:
{
"type": "object",
"properties": {
"name": {"type": "string"},
"description": {"type": "string"},
"link": {"type": "string"},
"ingredients": {
"patternProperties": {
"^.*$": {
"properties": {
"name": {"type": "string"},
"description": {"type": "string"},
"link": {"type": "string"},
"ingredients": {
"type": "object",
"patternProperties": {
"^.*$": {
"anyOf": [{"type": "object"}],
"properties": {
"quantity": {"type": "number"},
"units": {"type": "string"}
}
}
}
}
}
}
}
},
"new_ingredients": {
"type": "array",
"items": {
"properties": {
"name": {"type": "string"},
"category": {"type": "string"},
"supermarkets": {"type": "string"},
"quantity": {"type": "number"},
"units": {"type": "string"}
}
}
}
}
}
Example:
{
"name": "Pizza",
"description": "Supermarket pizza with home vegetables",
"link": "http://www.mypizza.com",
"ingredients": {
"-M9HqlJkjgu85S-HGbl58": {
"quantity": 2,
"units": "g"
},
"-M9HqlUQnD7MS-DS53cKJ": {
"quantity": 5,
"units": "cups"
},
"-M9HqlUQnD7MS-LKH4c8": {
"quantity": 7,
"units": "hands"
},
"-M9HqlUQnHJGF-5KJHF4": {
"quantity": 4,
"units": "piles"
}
},
"new_ingredients": [
{
"name": "Onion",
"category": "Vegetables/Fruits",
"supermarkets": "aldi",
"quantity": 4,
"units": "piles"
},
{
"name": "Tomato",
"category": "Vegetables/Fruits",
"supermarkets": "aldi",
"quantity": 7,
"units": "tons"
}
]
}
Media type: application/json
Type:
{
"title": "Ingredients response",
"type": "object",
"patternProperties": {
"^.*$": {
"properties": {
"supermarkets": {"type": "array"},
"units": {"type": "array"}
}
}
}
}
Example:
{
"-M9HqlUQnD7MS-W6kySH": {
"supermarkets": [
"Aldi"
],
"units": [
"u"
]
}
}
HTTP status code 200
Media type: application/json
Type:
{
"title": "Ingredients response",
"type": "object",
"patternProperties": {
"^.*$": {
"properties": {
"supermarkets": {"type": "array"},
"units": {"type": "array"}
}
}
}
}
Example:
{
"-M9HqlUQnD7MS-W6kySH": {
"supermarkets": [
"Aldi",
"Edeka"
],
"units": [
"u",
"g"
]
}
}
HTTP status code 400
Media type: application/json
Type: object
Properties
- message: required(string)
- code: required(number)
Example:
{
"code": 400,
"message": "'u' is not of type 'array'"
}
HTTP status code 404
Media type: application/json
Type: object
Properties
- message: required(string)
- code: required(number)
Example:
{
"code": 400,
"message": "Reference not found in the data base"
}
Media type: application/json
Type:
{
"type": "object",
"properties": {
"id": {"type": "string"}
}
}
Example:
{
"id": "-M9HqlUQnD7MS-W6kySH"
}
HTTP status code 200
Media type: application/json
Type:
{
"title": "Ingredients response",
"type": "object",
"patternProperties": {
"^.*$": {
"properties": {
"name": {"type": "string"},
"category": {"type": "string"},
"supermarkets": {"type": "array"},
"units": {"type": "array"}
}
}
}
}
Example:
{
"-M9HqlUQnD7MS-W6kySH": {
"name": "Onion",
"category": "Vegetable/Fruit",
"supermarkets": [
"Aldi",
"Edeka"
],
"units": [
"u",
"g"
]
}
}
HTTP status code 400
Media type: application/json
Type: object
Properties
- message: required(string)
- code: required(number)
Example:
{
"code": 400,
"message": "'u' is not of type 'array'"
}
HTTP status code 404
Media type: application/json
Type: object
Properties
- message: required(string)
- code: required(number)
Example:
{
"code": 400,
"message": "Reference not found in the data base"
}
Media type: application/json
Type:
{
"type": "object",
"properties": {
"recipes_ids": {
"type": "array",
"items": {"type": "string"}
}
}
}
Example:
{
"recipes_ids": [
"-M9vmiffPqRjN3zZwFyN",
"-M9vnZ4nYZ5sJXcariko"
]
}
HTTP status code 200
Media type: application/json
Type:
{
"patternProperties": {
"^.*$": {
"type": "number"
}
}
}
Examples:
banana tons:
14
ham slices:
4
oregano tbsp:
7
pinaple floz:
4
pinaple u:
4
HTTP status code 400
Media type: application/json
Type: object
Properties
- message: required(string)
- code: required(number)
Example:
{
"code": 400,
"message": "'u' is not of type 'array'"
}