POST
/
ingredients
curl --request POST \
  --url https://reimagined-journey-g45xxv4v6gwhvrrr-80.app.github.dev/ingredients \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "Carrot",
  "in_stock_qty": 3,
  "price": 999
}'
{
  "id": "674d0bf5c28b69001f8e03a1",
  "created_at": "2024-04-22T10:00:00Z",
  "updated_at": "2024-04-22T10:00:00Z",
  "name": "Carrot",
  "in_stock_qty": 3,
  "price": 999
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

The request body to create an ingredient to be included with dishes requires the following properties: name, price, and in_stock_qty.

The body is of type object.

Response

201
application/json

Ingredient created successfully

The response is of type object.

POST
/
ingredients
curl --request POST \
  --url https://reimagined-journey-g45xxv4v6gwhvrrr-80.app.github.dev/ingredients \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "Carrot",
  "in_stock_qty": 3,
  "price": 999
}'
{
  "id": "674d0bf5c28b69001f8e03a1",
  "created_at": "2024-04-22T10:00:00Z",
  "updated_at": "2024-04-22T10:00:00Z",
  "name": "Carrot",
  "in_stock_qty": 3,
  "price": 999
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

The request body to create an ingredient to be included with dishes requires the following properties: name, price, and in_stock_qty.

The body is of type object.

Response

201
application/json

Ingredient created successfully

The response is of type object.