Flavours API
Ingredient

Increase Ingredient Stock

POST
/api/v2/ingredients/{ingredientId}/increase

Increase the stock of an ingredient for a branch and record the history.

AuthorizationBearer <token>

You can retrieve your token by logging in.

In: header

Path Parameters

ingredientId*string

Header Parameters

X-API-Version*string

API contract version to target. See the Changelog for what changed in each version.

Default"2.0.0"
Value in"2.3.0" | "2.2.0" | "2.1.0" | "2.0.0"

Request Body

application/json

market_id*string

The id of an existing record in the markets table.

branch_id*string

The id of an existing record in the branches table.

qty*number
cost?|

Must be at least 0.

notes?|

Must not be greater than 500 characters.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "http://localhost:8000/api/v2/ingredients/blanditiis/increase" \  -H "X-API-Version: 2.3.0" \  -H "Content-Type: application/json" \  -d '{    "market_id": "adipisci",    "branch_id": "repellat",    "qty": 0.23998  }'
{
  "meta": {
    "code": 200,
    "status": "success",
    "message": "Ingredient increased successfully."
  },
  "data": {
    "ingredient_branch_id": "3026f071-4dcf-4245-9bfc-8f79fff5a55c",
    "source_id": "9b832916-3f49-4445-b142-a8857a89f32c",
    "source_type": "INGREDIENT",
    "type": "INGREDIENT_INCREASE",
    "qty": "20.00",
    "cost": 5,
    "notes": "Weekly restock",
    "created_at": 1782824836977,
    "updated_at": 1782824836977,
    "id": 3
  }
}
{
  "meta": {
    "code": 401,
    "status": "error",
    "message": "Unauthenticated."
  },
  "data": null
}
{
  "meta": {
    "code": 403,
    "status": "error",
    "message": "Unauthorized."
  },
  "data": null
}
{
  "meta": {
    "code": 404,
    "status": "error",
    "message": "Resource not found."
  },
  "data": null
}
{
  "meta": {
    "code": 500,
    "status": "error",
    "message": "Internal server error."
  },
  "data": null
}