Back to Melba

Overview

The Melba MCP server exposes the Melba domain as Model Context Protocol primitives so any compliant client (Claude, ChatGPT, custom agents) can call Melba operations directly. The catalogue below is generated from the live /manifest.json endpoint at build time.

Version
0.1.0
Generated at
2026-12-04T16:04:28.827Z
Endpoint
https://mcp.melba.io/mcp

Get started

New to MCP? Follow a step-by-step guide to connect Melba to your assistant in a couple of minutes.

Tools

analytics

melba_analytics_get

read-only

Get analytics Reads analytics for the current organization (one restaurant or kitchen). The response is empty unless the include parameter lists the sections wanted: dashboard, orders, stocks, recipes and articles. (scopes: read)

Scopes: read

applications

melba_applications_search

read-only

Search application Lists the applications available in Melba that match the search filters in the body (predicates, or the ids listed in includedIds), one page at a time (count and offset), sorted by sortBy and sortDirection. Changes nothing. An application is a Melba plan, add-on or integration, such as a point-of-sale connector, that an organization can install. (scopes: read)

Scopes: read

melba_applications_get

read-only

Get application Returns the application whose id is in the path. An application is a Melba plan, add-on or integration, such as a point-of-sale connector, that an organization can install. (scopes: read)

Scopes: read

catalog

melba_catalog_products_create

Create catalog product Creates a catalog product from the fields in the body and returns it. A catalog product is the link that puts one product into one catalog. (scopes: write)

Scopes: write

melba_catalog_products_bulk_delete

destructive

Bulk delete Deletes the catalog products of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds); with no filter, every one of them matches. The call is refused when nothing matches, and when more than 30 match unless count is set to 30 or less, in which case only that page (count rows from offset) is deleted. Returns the outcome, with the errors of any catalog product that could not be deleted. A catalog product is the link that puts one product into one catalog. (scopes: write)

Scopes: write

melba_catalog_products_export

Export Exports the catalog products of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds) to a file in the format given in parameters.format: xls (Excel, the default), csv, json, pdf or html. With parameters.async true, the default, the file is e-mailed to the signed-in user and the answer names the recipient; with false, the file itself is returned. Changes no data. A catalog product is the link that puts one product into one catalog. (scopes: write)

Scopes: write

melba_catalog_products_search

read-only

Search catalog product Lists the catalog products of the catalogs that the current organization owns or that are shared with it through its groups that match the search filters in the body (predicates, or the ids listed in includedIds), one page at a time (count and offset), sorted by sortBy and sortDirection. Changes nothing. A catalog product is the link that puts one product into one catalog. (scopes: read)

Scopes: read

melba_catalog_products_get

read-only

Get catalog product Returns the catalog product whose id is in the path. A catalog product is the link that puts one product into one catalog. (scopes: read)

Scopes: read

melba_catalog_products_delete

destructive

Delete catalog product Deletes the catalog product whose id is in the path. A catalog product is the link that puts one product into one catalog. (scopes: write)

Scopes: write

melba_catalog_products_reconciliation_list

List catalog products requiring reconciliation Lists, by id and name, up to 3,000 products of the catalogs that the current organization owns or that are shared with it through its groups, and that need reconciling: the organization has no copy of the product yet, its copy is older than the catalog's version, or its own product is older than the product it was copied from. The search filters in the body narrow the list. Changes nothing. (scopes: write)

Scopes: write

melba_catalog_products_pull

destructive

Pull Copies one product from a catalog shared with the organization (a set of products shared across a group of organizations). An existing copy is updated from the source, within the catalog's sync settings; otherwise a copy is created. Returns the affected products and any errors. (scopes: write)

Scopes: write

catalogs

melba_catalogs_create

Create a catalog Creates a catalog owned by the calling organization. The catalog starts empty — populate it via `POST /catalog-products` or by linking products in a group sync. (scopes: write)

Scopes: write

melba_catalogs_bulk_delete

destructive

Bulk delete Deletes the catalogs of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds); with no filter, every one of them matches. The call is refused when nothing matches, and when more than 30 match unless count is set to 30 or less, in which case only that page (count rows from offset) is deleted. Returns the outcome, with the errors of any catalog that could not be deleted. A catalog is a named set of products shared with the organizations of a group, such as the range of a central kitchen. (scopes: write)

Scopes: write

melba_catalogs_search

read-only

Search catalog Lists the catalogs that the current organization owns or that are shared with it through its groups that match the search filters in the body (predicates, or the ids listed in includedIds), one page at a time (count and offset), sorted by sortBy and sortDirection. Changes nothing. A catalog is a named set of products shared with the organizations of a group, such as the range of a central kitchen. (scopes: read)

Scopes: read

melba_catalogs_get

read-only

Get catalog Returns the catalog whose id is in the path. A catalog is a named set of products shared with the organizations of a group, such as the range of a central kitchen. (scopes: read)

Scopes: read

melba_catalogs_update

destructive

Update catalog Updates the catalog whose id is in the path with the fields sent in the body and returns it. A catalog is a named set of products shared with the organizations of a group, such as the range of a central kitchen. (scopes: write)

Scopes: write

melba_catalogs_delete

destructive

Delete catalog Deletes the catalog whose id is in the path. A catalog is a named set of products shared with the organizations of a group, such as the range of a central kitchen. (scopes: write)

Scopes: write

melba_catalogs_products_add

Add products to catalog Adds to the catalog in the path the products of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds); with no filter, every product of the organization matches. Refused when none or more than 1,500 match. Returns the new catalog products, with the errors of any product that could not be added. (scopes: write)

Scopes: write

melba_catalogs_products_delete

destructive

Delete catalog product Removes from the catalog in the path the products of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds); with no filter, every product of the organization matches. The products themselves are kept. Refused when none or more than 100 match. Returns the updated catalog. (scopes: write)

Scopes: write

melba_catalogs_sync

destructive

Sync catalog Pushes a catalog the organization owns to every organization of the groups it is shared with: each member's copies of the catalog's products are created or updated from the source. Returns the number of organizations synced and any errors per organization. (scopes: write)

Scopes: write

categories

melba_categories_create

Create category Creates a category from the fields in the body and returns it. A category is a node of the tree of categories that products are filed under. (scopes: write)

Scopes: write

melba_categories_bulk_delete

destructive

Bulk delete Deletes the categories of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds); with no filter, every one of them matches. The call is refused when nothing matches, and when more than 30 match unless count is set to 30 or less, in which case only that page (count rows from offset) is deleted. Returns the outcome, with the errors of any category that could not be deleted. A category is a node of the tree of categories that products are filed under. (scopes: write)

Scopes: write

melba_categories_search

read-only

Search category Lists the categories of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds), one page at a time (count and offset), sorted by sortBy and sortDirection. Changes nothing. A category is a node of the tree of categories that products are filed under. (scopes: read)

Scopes: read

melba_categories_get

read-only

Get category Returns the category whose id is in the path. A category is a node of the tree of categories that products are filed under. (scopes: read)

Scopes: read

melba_categories_update

destructive

Update category Updates the category whose id is in the path with the fields sent in the body and returns it. A category is a node of the tree of categories that products are filed under. (scopes: write)

Scopes: write

melba_categories_delete

destructive

Delete category Deletes the category whose id is in the path. A category is a node of the tree of categories that products are filed under. (scopes: write)

Scopes: write

clients

melba_clients_create

Create client Creates a client from the fields in the body and returns it. A client is a customer the kitchen sells to, with its legal details, payment terms, address and contacts. (scopes: write)

Scopes: write

melba_clients_bulk_delete

destructive

Bulk delete Deletes the clients of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds); with no filter, every one of them matches. The call is refused when nothing matches, and when more than 30 match unless count is set to 30 or less, in which case only that page (count rows from offset) is deleted. Returns the outcome, with the errors of any client that could not be deleted. A client is a customer the kitchen sells to, with its legal details, payment terms, address and contacts. (scopes: write)

Scopes: write

melba_clients_export

Export Exports the clients of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds) to a file in the format given in parameters.format: xls (Excel, the default), csv, json, pdf or html. With parameters.async true, the default, the file is e-mailed to the signed-in user and the answer names the recipient; with false, the file itself is returned. Changes no data. A client is a customer the kitchen sells to, with its legal details, payment terms, address and contacts. (scopes: write)

Scopes: write

melba_clients_search

read-only

Search client Lists the clients of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds), one page at a time (count and offset), sorted by sortBy and sortDirection. Changes nothing. A client is a customer the kitchen sells to, with its legal details, payment terms, address and contacts. (scopes: read)

Scopes: read

melba_clients_get

read-only

Get client Returns the client whose id is in the path. A client is a customer the kitchen sells to, with its legal details, payment terms, address and contacts. (scopes: read)

Scopes: read

melba_clients_update

destructive

Update client Updates the client whose id is in the path with the fields sent in the body and returns it. A client is a customer the kitchen sells to, with its legal details, payment terms, address and contacts. (scopes: write)

Scopes: write

melba_clients_delete

destructive

Delete client Deletes the client whose id is in the path. A client is a customer the kitchen sells to, with its legal details, payment terms, address and contacts. (scopes: write)

Scopes: write

melba_clients_contacts_add

Add contacts to client Links to the client in the path the contacts of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds); with no filter, every contact of the organization matches. Refused when none or more than 100 match. Returns the updated client. (scopes: write)

Scopes: write

melba_clients_contacts_delete

destructive

Delete client contact Unlinks from the client in the path the contacts of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds); with no filter, every contact of the organization matches. The contacts themselves are kept. Refused when none or more than 100 match. Returns the updated client. (scopes: write)

Scopes: write

config

melba_config_get_config

read-only

Get configuration Returns Melba's shared reference data (allergens, countries, currencies, nutrients, subscription plans, modules, timezones). The body is **empty (`[]`) by default**. The `include` query parameter selects the collections, e.g. `?include=allergens,currencies`; all of them: `?include=allergens,countries,currencies,nutrients,plans,modules,timezones`.

contacts

melba_contacts_create

Create contact Creates a contact from the fields in the body and returns it. A contact is a person, with name, e-mail and phone numbers, who can be linked to suppliers, clients and groups. (scopes: write)

Scopes: write

melba_contacts_bulk_delete

destructive

Bulk delete Deletes the contacts of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds); with no filter, every one of them matches. The call is refused when nothing matches, and when more than 30 match unless count is set to 30 or less, in which case only that page (count rows from offset) is deleted. Returns the outcome, with the errors of any contact that could not be deleted. A contact is a person, with name, e-mail and phone numbers, who can be linked to suppliers, clients and groups. (scopes: write)

Scopes: write

melba_contacts_export

Export Exports the contacts of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds) to a file in the format given in parameters.format: xls (Excel, the default), csv, json, pdf or html. With parameters.async true, the default, the file is e-mailed to the signed-in user and the answer names the recipient; with false, the file itself is returned. Changes no data. A contact is a person, with name, e-mail and phone numbers, who can be linked to suppliers, clients and groups. (scopes: write)

Scopes: write

melba_contacts_search

read-only

Search contact Lists the contacts of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds), one page at a time (count and offset), sorted by sortBy and sortDirection. Changes nothing. A contact is a person, with name, e-mail and phone numbers, who can be linked to suppliers, clients and groups. (scopes: read)

Scopes: read

melba_contacts_get

read-only

Get contact Returns the contact whose id is in the path. A contact is a person, with name, e-mail and phone numbers, who can be linked to suppliers, clients and groups. (scopes: read)

Scopes: read

melba_contacts_update

destructive

Update contact Updates the contact whose id is in the path with the fields sent in the body and returns it. A contact is a person, with name, e-mail and phone numbers, who can be linked to suppliers, clients and groups. (scopes: write)

Scopes: write

melba_contacts_delete

destructive

Delete contact Deletes the contact whose id is in the path. A contact is a person, with name, e-mail and phone numbers, who can be linked to suppliers, clients and groups. (scopes: write)

Scopes: write

delivery

melba_delivery_anomalies_create

Create delivery anomaly Creates a delivery anomaly from the fields in the body and returns it. A delivery anomaly is a problem found on a received order line, such as damaged, expired, missing or extra goods. (scopes: write) (credits: 10, waived by subscription: stocks_and_orders_premium; this organization's plans: melba_organizations_plan)

Scopes: write

melba_delivery_anomalies_bulk_delete

destructive

Bulk delete Deletes the delivery anomalies of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds); with no filter, every one of them matches. The call is refused when nothing matches, and when more than 30 match unless count is set to 30 or less, in which case only that page (count rows from offset) is deleted. Returns the outcome, with the errors of any delivery anomaly that could not be deleted. A delivery anomaly is a problem found on a received order line, such as damaged, expired, missing or extra goods. (scopes: write)

Scopes: write

melba_delivery_anomalies_export

Export Exports the delivery anomalies of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds) to a file in the format given in parameters.format: xls (Excel, the default), csv, json, pdf or html. With parameters.async true, the default, the file is e-mailed to the signed-in user and the answer names the recipient; with false, the file itself is returned. Changes no data. A delivery anomaly is a problem found on a received order line, such as damaged, expired, missing or extra goods. (scopes: write)

Scopes: write

melba_delivery_anomalies_bulk_print

Bulk print Generates the delivery anomaly report of one supplier (problems found when goods arrived, such as damaged or missing items), covering the anomalies matching the search filters. Returns the report as a PDF, or HTML on request; changes no data. (scopes: write)

Scopes: write

melba_delivery_anomalies_search

read-only

Search delivery anomaly Lists the delivery anomalies of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds), one page at a time (count and offset), sorted by sortBy and sortDirection. Changes nothing. A delivery anomaly is a problem found on a received order line, such as damaged, expired, missing or extra goods. (scopes: read)

Scopes: read

melba_delivery_anomalies_get

read-only

Get delivery anomaly Returns the delivery anomaly whose id is in the path. A delivery anomaly is a problem found on a received order line, such as damaged, expired, missing or extra goods. (scopes: read)

Scopes: read

melba_delivery_anomalies_update

destructive

Update delivery anomaly Updates the delivery anomaly whose id is in the path with the fields sent in the body and returns it. A delivery anomaly is a problem found on a received order line, such as damaged, expired, missing or extra goods. (scopes: write)

Scopes: write

melba_delivery_anomalies_delete

destructive

Delete delivery anomaly Deletes the delivery anomaly whose id is in the path. A delivery anomaly is a problem found on a received order line, such as damaged, expired, missing or extra goods. (scopes: write)

Scopes: write

melba_delivery_anomalies_medias_add

Attach media to delivery anomaly Attaches to the delivery anomaly in the path the media files (photos or documents) of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds); with no filter, every media file of the organization matches. Refused when none or more than 100 match. Returns the updated delivery anomaly. (scopes: write)

Scopes: write

melba_delivery_anomalies_medias_delete

destructive

Delete delivery anomaly media Detaches from the delivery anomaly in the path the media files of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds); with no filter, every media file of the organization matches. The files themselves are kept. Refused when none or more than 100 match. Returns the updated delivery anomaly. (scopes: write)

Scopes: write

group

melba_group_catalogs_create

Create group catalog Creates a group catalog from the fields in the body and returns it. A group catalog is the link that shares one catalog with one group. (scopes: write)

Scopes: write

melba_group_catalogs_bulk_delete

destructive

Bulk delete Deletes the group catalogs of the groups that the current organization owns that match the search filters in the body (predicates, or the ids listed in includedIds); with no filter, every one of them matches. The call is refused when nothing matches, and when more than 30 match unless count is set to 30 or less, in which case only that page (count rows from offset) is deleted. Returns the outcome, with the errors of any group catalog that could not be deleted. A group catalog is the link that shares one catalog with one group. (scopes: write)

Scopes: write

melba_group_organizations_create

Create group organization Creates a group organization from the fields in the body and returns it. A group organization is the link that puts one organization in one group. (scopes: write)

Scopes: write

melba_group_organizations_bulk_delete

destructive

Bulk delete Deletes the group organizations of the groups that the current organization owns that match the search filters in the body (predicates, or the ids listed in includedIds); with no filter, every one of them matches. The call is refused when nothing matches, and when more than 30 match unless count is set to 30 or less, in which case only that page (count rows from offset) is deleted. Returns the outcome, with the errors of any group organization that could not be deleted. A group organization is the link that puts one organization in one group. (scopes: write)

Scopes: write

melba_group_catalogs_export

Export Exports the group catalogs of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds) to a file in the format given in parameters.format: xls (Excel, the default), csv, json, pdf or html. With parameters.async true, the default, the file is e-mailed to the signed-in user and the answer names the recipient; with false, the file itself is returned. Changes no data. A group catalog is the link that shares one catalog with one group. (scopes: write)

Scopes: write

melba_group_catalogs_search

read-only

Search group catalog Lists the group catalogs of the groups that the current organization owns or belongs to that match the search filters in the body (predicates, or the ids listed in includedIds), one page at a time (count and offset), sorted by sortBy and sortDirection. Changes nothing. A group catalog is the link that shares one catalog with one group. (scopes: read)

Scopes: read

melba_group_catalogs_get

read-only

Get group catalog Returns the group catalog whose id is in the path. A group catalog is the link that shares one catalog with one group. (scopes: read)

Scopes: read

melba_group_catalogs_delete

destructive

Delete group catalog Deletes the group catalog whose id is in the path. A group catalog is the link that shares one catalog with one group. (scopes: write)

Scopes: write

melba_group_organizations_export

Export Exports the group organizations of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds) to a file in the format given in parameters.format: xls (Excel, the default), csv, json, pdf or html. With parameters.async true, the default, the file is e-mailed to the signed-in user and the answer names the recipient; with false, the file itself is returned. Changes no data. A group organization is the link that puts one organization in one group. (scopes: write)

Scopes: write

melba_group_organizations_search

read-only

Search group organization Lists the group organizations of the groups that the current organization owns that match the search filters in the body (predicates, or the ids listed in includedIds), one page at a time (count and offset), sorted by sortBy and sortDirection. Changes nothing. A group organization is the link that puts one organization in one group. (scopes: read)

Scopes: read

melba_group_organizations_get

read-only

Get group organization Returns the group organization whose id is in the path. A group organization is the link that puts one organization in one group. (scopes: read)

Scopes: read

melba_group_organizations_delete

destructive

Delete group organization Deletes the group organization whose id is in the path. A group organization is the link that puts one organization in one group. (scopes: write)

Scopes: write

groups

melba_groups_create

Create group Creates a group from the fields in the body and returns it. A group is a named set of organizations that share catalogs, suppliers and contacts. (scopes: write)

Scopes: write

melba_groups_bulk_delete

destructive

Bulk delete Deletes the groups of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds); with no filter, every one of them matches. The call is refused when nothing matches, and when more than 30 match unless count is set to 30 or less, in which case only that page (count rows from offset) is deleted. Returns the outcome, with the errors of any group that could not be deleted. A group is a named set of organizations that share catalogs, suppliers and contacts. (scopes: write)

Scopes: write

melba_groups_search

read-only

Search group Lists the groups that the current organization owns or belongs to that match the search filters in the body (predicates, or the ids listed in includedIds), one page at a time (count and offset), sorted by sortBy and sortDirection. Changes nothing. A group is a named set of organizations that share catalogs, suppliers and contacts. (scopes: read)

Scopes: read

melba_groups_get

read-only

Get group Returns the group whose id is in the path. A group is a named set of organizations that share catalogs, suppliers and contacts. (scopes: read)

Scopes: read

melba_groups_update

destructive

Update group Updates the group whose id is in the path with the fields sent in the body and returns it. A group is a named set of organizations that share catalogs, suppliers and contacts. (scopes: write)

Scopes: write

melba_groups_delete

destructive

Delete group Deletes the group whose id is in the path. A group is a named set of organizations that share catalogs, suppliers and contacts. (scopes: write)

Scopes: write

melba_groups_copy_suppliers

destructive

Copy suppliers from groups Copies the suppliers shared through the organization's groups, with their contacts, into the organization's own supplier list. Suppliers copied before are updated from the group's version, replacing local edits. Returns the synchronized suppliers. (scopes: write)

Scopes: write

melba_groups_contacts_add

Share contacts with group Shares with the group in the path the contacts of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds); with no filter, every contact of the organization matches. Refused when none or more than 100 match. Returns the updated group. (scopes: write)

Scopes: write

melba_groups_contacts_delete

destructive

Delete group contact Stops sharing with the group in the path the contacts of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds); with no filter, every contact of the organization matches. The contacts themselves are kept. Refused when none or more than 100 match. Returns the updated group. (scopes: write)

Scopes: write

melba_groups_suppliers_add

Share suppliers with group Shares with the group in the path the suppliers of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds); with no filter, every supplier of the organization matches. Refused when none or more than 100 match. Returns the updated group. (scopes: write)

Scopes: write

melba_groups_suppliers_delete

destructive

Delete group supplier Stops sharing with the group in the path the suppliers of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds), and their contacts with them; with no filter, every supplier of the organization matches. The suppliers themselves are kept. Refused when none or more than 100 match. Returns the updated group. (scopes: write)

Scopes: write

hygiene

melba_hygiene_records_create

Create hygiene record Creates a hygiene record from the fields in the body and returns it. A hygiene record is one HACCP check made at a storage location, such as a temperature reading, a cleaning or an oil check. (scopes: write) (credits: 2, waived by subscription: traceability_standard; this organization's plans: melba_organizations_plan)

Scopes: write

melba_hygiene_records_bulk_delete

destructive

Bulk delete Deletes the hygiene records of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds); with no filter, every one of them matches. The call is refused when nothing matches, and when more than 30 match unless count is set to 30 or less, in which case only that page (count rows from offset) is deleted. Returns the outcome, with the errors of any hygiene record that could not be deleted. A hygiene record is one HACCP check made at a storage location, such as a temperature reading, a cleaning or an oil check. (scopes: write)

Scopes: write

melba_hygiene_templates_create

Create hygiene template Creates a hygiene template from the fields in the body and returns it. A hygiene template is a recurring HACCP check, with its type and frequency, on a storage location; hygiene records are generated from it. (scopes: write)

Scopes: write

melba_hygiene_templates_bulk_delete

destructive

Bulk delete Deletes the hygiene templates of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds); with no filter, every one of them matches. The call is refused when nothing matches, and when more than 30 match unless count is set to 30 or less, in which case only that page (count rows from offset) is deleted. Returns the outcome, with the errors of any hygiene template that could not be deleted. A hygiene template is a recurring HACCP check, with its type and frequency, on a storage location; hygiene records are generated from it. (scopes: write)

Scopes: write

melba_hygiene_records_export

Export Exports the hygiene records of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds) to a file in the format given in parameters.format: xls (Excel, the default), csv, json, pdf or html. With parameters.async true, the default, the file is e-mailed to the signed-in user and the answer names the recipient; with false, the file itself is returned. Changes no data. A hygiene record is one HACCP check made at a storage location, such as a temperature reading, a cleaning or an oil check. (scopes: write)

Scopes: write

melba_hygiene_records_search

read-only

Search hygiene record Lists the hygiene records of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds), one page at a time (count and offset), sorted by sortBy and sortDirection. Changes nothing. A hygiene record is one HACCP check made at a storage location, such as a temperature reading, a cleaning or an oil check. (scopes: read)

Scopes: read

melba_hygiene_records_get

read-only

Get hygiene record Returns the hygiene record whose id is in the path. A hygiene record is one HACCP check made at a storage location, such as a temperature reading, a cleaning or an oil check. (scopes: read)

Scopes: read

melba_hygiene_records_update

destructive

Update hygiene record Updates the hygiene record whose id is in the path with the fields sent in the body and returns it. A hygiene record is one HACCP check made at a storage location, such as a temperature reading, a cleaning or an oil check. (scopes: write)

Scopes: write

melba_hygiene_records_delete

destructive

Delete hygiene record Deletes the hygiene record whose id is in the path. A hygiene record is one HACCP check made at a storage location, such as a temperature reading, a cleaning or an oil check. (scopes: write)

Scopes: write

melba_hygiene_templates_export

Export Exports the hygiene templates of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds) to a file in the format given in parameters.format: xls (Excel, the default), csv, json, pdf or html. With parameters.async true, the default, the file is e-mailed to the signed-in user and the answer names the recipient; with false, the file itself is returned. Changes no data. A hygiene template is a recurring HACCP check, with its type and frequency, on a storage location; hygiene records are generated from it. (scopes: write)

Scopes: write

melba_hygiene_templates_search

read-only

Search hygiene template Lists the hygiene templates of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds), one page at a time (count and offset), sorted by sortBy and sortDirection. Changes nothing. A hygiene template is a recurring HACCP check, with its type and frequency, on a storage location; hygiene records are generated from it. (scopes: read)

Scopes: read

melba_hygiene_templates_get

read-only

Get hygiene template Returns the hygiene template whose id is in the path. A hygiene template is a recurring HACCP check, with its type and frequency, on a storage location; hygiene records are generated from it. (scopes: read)

Scopes: read

melba_hygiene_templates_update

destructive

Update Updates the hygiene template whose id is in the path with the fields sent in the body and returns it. A hygiene template is a recurring HACCP check, with its type and frequency, on a storage location; hygiene records are generated from it. (scopes: write)

Scopes: write

melba_hygiene_templates_delete

destructive

Delete Deletes the hygiene template whose id is in the path. A hygiene template is a recurring HACCP check, with its type and frequency, on a storage location; hygiene records are generated from it. (scopes: write)

Scopes: write

invoice

melba_invoice_analyses_enrich

destructive

Enrich invoice analysis For a completed invoice analysis, an AI model structures the extracted lines (packaging, quantities, units) and the result replaces the lines stored on the analysis. Returns the updated analysis; it can take 30 seconds or more. (scopes: write)

Scopes: write

invoices

melba_invoices_analyze

Analyze invoice Starts reading a supplier invoice already uploaded as a media file (image or PDF) with a text-recognition service, to extract the supplier, the invoice details and its lines. Returns the invoice analysis with its id and status; the analysis is then read until it is completed. (scopes: ai:invoke) (credits: 1; this organization's plans: melba_organizations_plan)

Scopes: ai:invoke

melba_invoices_import

Import invoice Turns a completed invoice analysis into Melba data: creates a supplier order with one line per invoice item and, in items mode, the products that do not exist yet. Existing products are left unchanged. Returns the new order id and the created, skipped and failed items. (scopes: write)

Scopes: write

melba_invoices_get_analysis

Get invoice analysis Returns an invoice analysis: its status (processing, completed or failed) and, once completed, the supplier, the invoice details and the extracted lines. While it is processing, each read checks the text-recognition job once and stores its result when ready. (scopes: read)

Scopes: read

melba_invoices_auto_match

Auto match invoice For a completed invoice analysis (the id in the path), an AI model proposes which of the organization's existing products matches each invoice line. Returns the suggested matches with a confidence level; no product is changed. (scopes: write) (credits: 1; this organization's plans: melba_organizations_plan)

Scopes: write

macro

melba_macro_recipe_create_from_text

Creates a recipe from a structured description: a name, an optional number of servings and ingredients with quantities and units. Each ingredient is matched to a catalog product by name and its unit is resolved against the units of that product; matched ingredients become composition lines of the new recipe (type food). Ingredients with no matching product, or a unit the product does not have, are listed and left out. Without confirm: true the call returns a preview of the matches and writes nothing. With confirm: true nothing is created (status refused) when a recipe with exactly that name already exists or when no ingredient matched a product; status partial means some composition lines could not be created. Routes touched: - POST /products/search — Match each ingredient to a catalog product by name and read its units - POST /products — Create the recipe product (type food, recipe true) - POST /elements — Create one composition line per matched ingredient Confirmation gate: a call without `confirm: true` returns a preview and changes nothing; the same call with `confirm: true` executes it.

melba_macro_recipe_create_from_photo

Creates a recipe from the name, ingredients and servings read from a photo of a recipe (handwritten card, book page, packaging), supplied in extractedRecipe. The server receives no image. Ingredient matching and creation follow melba_macro_recipe_create_from_text: without confirm: true the call returns a preview, with confirm: true the recipe is created (refused when a recipe of that name exists or no ingredient matched). Routes touched: - POST /products/search — Match each extracted ingredient to a catalog product by name and read its units - POST /products — Create the recipe product (type food, recipe true) - POST /elements — Create one composition line per matched ingredient Confirmation gate: a call without `confirm: true` returns a preview and changes nothing; the same call with `confirm: true` executes it.

melba_macro_recipe_compute_cost

read-only

Returns the cost of a recipe per unit (portion, whole recipe, kg...) as computed by Melba, with a per-ingredient breakdown (quantity x unit cost of each composition line). When a selling price excluding VAT is supplied, also returns the margin amount, margin percentage and food-cost percentage for the selected unit. The macro only reads data. Routes touched: - GET /products/{id} — The recipe with its units (computed costs) and composition lines

melba_macro_production_plan_day

read-only

Lists the production tasks due on one day (YYYY-MM-DD), optionally only the scheduled or the done ones. Returns each task with its product, quantity, unit, status and cost, plus the quantities totalled per product and unit. Read-only. Routes touched: - POST /tasks/search — List the production tasks due on the day, with their product and unit

melba_macro_stock_reorder_low

Finds the stock lines whose quantity is below their minimum and works out what to order to reach the target quantity (the minimum when no target is set). Lines are grouped per supplier through their supplying item. Without confirm: true it returns a preview: the lines per supplier, estimated amounts and the draft orders already open, writing nothing. With confirm: true it creates one draft order per supplier with its lines, leaving out the products already on an open draft order; the orders are not sent to the suppliers. Routes touched: - POST /stock-items/search — List the stock lines that have a minimum quantity, with their product and supplying item - POST /supplying-items/search — Find the supplying item of the low lines that have none - POST /suppliers/search — Name the suppliers - POST /orders/search — List the draft orders already open - POST /order-lines/search — Lines of those draft orders - POST /orders — Create one draft order per supplier on confirm - POST /order-lines — Create the lines of each draft order on confirm Confirmation gate: a call without `confirm: true` returns a preview and changes nothing; the same call with `confirm: true` executes it.

melba_macro_stock_takeover

Applies an inventory count; each product (or stock line) may appear once, duplicates are rejected. For each {productId, countedQuantity} line (and an optional stockItemId for a product held in several places) it compares the count with the quantity Melba holds and, with confirm: true, creates one "correction" stock transaction per non-zero difference (fractional quantities allowed). Without confirm, it returns the per-line differences and writes nothing. If a write fails part-way, the corrections already recorded are returned with status "partial" and the failure. Routes touched: - POST /stock-items/search — Current quantity of the counted products - POST /stock-transactions — Write one correction per non-zero difference on confirm Confirmation gate: a call without `confirm: true` returns a preview and changes nothing; the same call with `confirm: true` executes it.

melba_macro_sales_compare_periods

read-only

Compares two date ranges of sales. Reads the sale lines sold in each range and returns revenue (excluding VAT), quantity and margin in total and per product, the change between the periods, and the products that gained or lost the most revenue. Inputs: current and baseline ranges (inclusive YYYY-MM-DD days) and topN. Read-only. Routes touched: - POST /sale-lines/search — Sale lines (with product and sale) sold in the current period - POST /sale-lines/search — Sale lines (with product and sale) sold in the baseline period

melba_macro_margin_audit

read-only

Audits product margins over a period. For each product sold it sums the sale lines' revenue (excluding VAT), cost and margin, derives the margin rate, and flags products below marginThresholdPct. Returns products ordered from lowest to highest margin rate, with the price a flagged product would need to reach the threshold. Inputs: period (inclusive YYYY-MM-DD days), marginThresholdPct, topN. Read-only. Routes touched: - POST /sale-lines/search — Sale lines (with product and sale) sold during the period

melba_macro_sales_anomalies

read-only

Finds unusual sales in a period. Each product's quantity and revenue are compared with its own average over the previous periods of the same length (periods with no sales are ignored) and flagged when they differ by at least thresholdPct. Also lists sale lines that look wrong: sold below cost, zero revenue for a positive quantity, or no product. Inputs: period (inclusive YYYY-MM-DD days), baselinePeriods, thresholdPct. Read-only. Routes touched: - POST /sale-lines/search — Sale lines (with product and sale) of the period and of the baseline periods before it

melba_macro_csv_import

Imports a base64-encoded CSV of products, recipes or suppliers. Without confirm: true it parses the file, maps columns to Melba fields (proposed from the header unless a mapping is given), validates each row against the create endpoint, flags rows whose name already exists or repeats an earlier row, and writes nothing. With confirm: true it creates one record per valid row that does not already exist and reports the rows it could not create. Existing names are read up to a row cap: when that list is truncated the result says so, and duplicates beyond it may be missed. Product fields: name, code, type (food, packaging, other), commercialName, composition. Recipe fields: name, code, commercialName, composition, servings. Supplier fields: name, legalName, code, vatNumber, siretNumber, clientCode, shippingCost, minAmount. Routes touched: - POST /products/search — List existing product or recipe names to flag duplicates (kind products or recipes) - POST /suppliers/search — List existing supplier names to flag duplicates (kind suppliers) - POST /products — Create one product or recipe per valid row - POST /suppliers — Create one supplier per valid row Confirmation gate: a call without `confirm: true` returns a preview and changes nothing; the same call with `confirm: true` executes it.

melba_macro_haccp_weekly_report

read-only

HACCP report for one ISO week (default: the current week) built from the hygiene records: temperature readings that fall outside the range of their storage location (default temperature plus or minus the allowed difference; readings of a location with no allowed difference or default temperature are counted as not judged, never as failures), records not marked done (for example skipped cleaning tasks), monitored storage locations with no temperature reading that week, and a per-location summary. Returns structured data and a markdown report. The macro only reads data. Routes touched: - POST /hygiene-records/search — Hygiene records recorded during the week, with their storage location - POST /storage-locations/search — Storage locations, to spot monitored locations with no temperature reading

melba_macro_invoice_to_draft_order

Creates a draft order from structured invoice data (supplier name, lines) supplied in extractedInvoice; the photo or PDF itself is not read by the server. The supplier is found by name among the organization's suppliers and each line is matched by description to a product that supplier sells; lines with no match are listed and left out. Without confirm: true the call returns a preview of the matches; with confirm: true the draft order (named "Invoice <number>") and its lines are created. If the supplier already has an order with that name nothing is created and the existing order is reported; if some lines fail after the order was created, the order id and the failed lines are returned with status "partial". Invoice unit prices are shown next to the catalog price but not compared. The order is not sent to the supplier. Routes touched: - POST /suppliers/search — Find the invoice supplier among the organization's suppliers - POST /supplying-items/search — Match each invoice line to a product the supplier sells - POST /orders/search — Look for an order of this supplier already created from the same invoice - POST /orders — Create the draft order on confirm - POST /order-lines — Create one order line per matched product on confirm Confirmation gate: a call without `confirm: true` returns a preview and changes nothing; the same call with `confirm: true` executes it.

melba_macro_delivery_slip_check

Compares the delivered quantities read from a delivery slip (observedLines) with the lines of an order and reports, per order line, whether it matches, is short ("missing") or over-delivered ("extra"); delivered lines that are not on the order are listed separately. Without confirm: true nothing is written. With confirm: true one delivery anomaly (type missing or extra) is recorded per discrepancy, except on order lines that already carry an anomaly (reported as alreadyRecorded); the anomaly quantity is the exact absolute difference. A delivered line that fits several order lines needs an orderLineId, otherwise it is reported as ambiguous and nothing is recorded for those lines. Melba accepts anomalies on orders marked as received by the client only: any other order is reported and refused. A discrepancy on a line whose supplying item has no unit is reported, not recorded. If a write fails after others succeeded, the anomalies already recorded are reported (status partial) with the failed line and the lines not attempted; a failure of the first write is raised as an error. Routes touched: - GET /orders/{id} — Status of the order - POST /order-lines/search — Ordered quantities, with the product and supplying item (unit) of each line - POST /delivery-anomalies — Record one anomaly per discrepancy on confirm (orders received by the client only) Confirmation gate: a call without `confirm: true` returns a preview and changes nothing; the same call with `confirm: true` executes it.

melba_macro_draft_supplier_email

read-only

Drafts an English e-mail to a supplier about an order or an issue (order follow-up, late delivery, quality issue, price discussion, general). It reads the supplier, its contacts, the chosen order (or the supplier's latest) with its lines and any delivery anomalies, and returns a recipient, subject and body. The draft is returned for the user to review; nothing is sent. The macro only reads data. Routes touched: - GET /suppliers/{id} — The supplier record - POST /contacts/search — Contacts of the supplier, for the recipient - GET /orders/{id} — The order the e-mail is about (when orderId is given) - POST /orders/search — Latest order of the supplier (when no orderId is given) - POST /order-lines/search — Lines of the order, with their products - POST /delivery-anomalies/search — Delivery anomalies of the order (when it has any)

melba_macro_draft_weekly_digest

read-only

Writes a short digest of one ISO week for the owner: sales revenue, quantity and best sellers against the previous week, stock lines whose quantity is under their minimum, and temperature records outside their storage location's allowed range. Returns the digest text and the figures behind it. Input: isoWeek, for example 2026-W46. Read-only. Routes touched: - POST /sale-lines/search — Sale lines of the week and of the week before - POST /stock-items/search — Stock lines, to find those under their minimum quantity - POST /hygiene-records/search — Temperature records of the week, with their storage location

media

melba_media_create

Create media Uploads a file, up to 10 MB, under the given name into the media library of the current organization and returns the new media record. A media is an uploaded file, such as a photo or a document, that can be attached to products, delivery anomalies and other records. (scopes: write)

Scopes: write

melba_media_download_external

Download external Downloads an image from a public web address (JPEG, PNG, WebP or GIF, up to 10 MB) and saves it in the organization's media library under the given name. Returns the new media record. (scopes: write)

Scopes: write

melba_media_search_images

Search images Searches the web for images matching a text query, such as a dish or an ingredient, through an outside image search service. Returns about a dozen results with image address, thumbnail, size and title; nothing is saved in Melba. (scopes: write)

Scopes: write

nutrition

melba_nutrition_fact_reference_search

read-only

Search nutrition fact reference Searches the reference table of nutrition values (for each food: nutrients with their quantities and source) with the search filters in the body, grouped by food name, one page at a time. This reference data is the same for every organization and is used to fill in the nutrition facts of products. Changes nothing. (scopes: read)

Scopes: read

order

melba_order_lines_create

Create order line Creates an order line from the fields in the body and returns it. An order line is one product line of a supplier order, with its quantity and reception status. (scopes: write)

Scopes: write

melba_order_lines_bulk_delete

destructive

Bulk delete Deletes the order lines of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds); with no filter, every one of them matches. The call is refused when nothing matches, and when more than 30 match unless count is set to 30 or less, in which case only that page (count rows from offset) is deleted. Returns the outcome, with the errors of any order line that could not be deleted. An order line is one product line of a supplier order, with its quantity and reception status. (scopes: write)

Scopes: write

melba_order_lines_reduce_by_stock

destructive

Reduce order lines by stock on hand Lowers the quantity to order on the supplier order lines matching the search filters by the stock already held of each ingredient, and recalculates the lines; orders already received are skipped. Records no stock movement. Returns the updated lines and any errors per line. (scopes: write) (credits: 1 per created item, waived by subscription: stocks_and_orders_standard; this organization's plans: melba_organizations_plan)

Scopes: write

melba_order_lines_export

Export Exports the order lines of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds) to a file in the format given in parameters.format: xls (Excel, the default), csv, json, pdf or html. With parameters.async true, the default, the file is e-mailed to the signed-in user and the answer names the recipient; with false, the file itself is returned. Changes no data. An order line is one product line of a supplier order, with its quantity and reception status. (scopes: write)

Scopes: write

melba_order_lines_restock

Restock Adds the quantities of the supplier order lines matching the search filters to the stock of their ingredients, recording one stock movement per line and marking it restocked. Lines in a status that cannot be restocked, or already restocked unless force is set, are skipped. Returns the stock movements and analytics. (scopes: write) (credits: 1 per created item, waived by subscription: stocks_and_orders_standard; this organization's plans: melba_organizations_plan)

Scopes: write

melba_order_lines_round

destructive

Round order line Rounds up to the next whole number the quantity of the supplier order lines matching the search filters, so that partial packs become full ones. Lines measured by weight or volume are left unchanged unless weight_and_volume is true. Returns the updated lines. (scopes: write)

Scopes: write

melba_order_lines_search

read-only

Search order line Lists the order lines of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds), one page at a time (count and offset), sorted by sortBy and sortDirection. Changes nothing. An order line is one product line of a supplier order, with its quantity and reception status. (scopes: read)

Scopes: read

melba_order_lines_get

read-only

Get order line Returns the order line whose id is in the path. An order line is one product line of a supplier order, with its quantity and reception status. (scopes: read)

Scopes: read

melba_order_lines_update

destructive

Update order line Updates the order line whose id is in the path with the fields sent in the body and returns it. An order line is one product line of a supplier order, with its quantity and reception status. (scopes: write)

Scopes: write

melba_order_lines_delete

destructive

Delete order line Deletes the order line whose id is in the path. An order line is one product line of a supplier order, with its quantity and reception status. (scopes: write)

Scopes: write

melba_order_lines_parcel_labels_add

Add parcel labels to order line Links to the order line in the path the parcel labels (traceability labels) of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds); with no filter, every parcel label of the organization matches. Refused when none or more than 100 match. Returns the updated order line. (scopes: write)

Scopes: write

melba_order_lines_parcel_labels_delete

destructive

Delete parcel labels from order line Unlinks from the order line in the path the parcel labels of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds); with no filter, every parcel label of the organization matches. The labels themselves are kept. Refused when none or more than 100 match. Returns the updated order line. (scopes: write)

Scopes: write

orders

melba_orders_list

read-onlyhandcrafted

Returns a paginated list of purchase orders, filterable by status (created, sentByClient, receivedByClient) or supplier. Each entry carries the order uuid; the response carries totalCount and nextOffset. Cost: 1 API call.

melba_orders_get

read-onlyhandcrafted

Fetches a single order by uuid. `include=orderLines` expands the order lines, `include=orderLines,supplier` expands both. Cost: 1 API call.

melba_orders_create

Create order Creates an order from the fields in the body and returns it. An order is a purchase order to one supplier, with its lines and status. (scopes: write) (credits: 10, waived by subscription: stocks_and_orders_standard; this organization's plans: melba_organizations_plan)

Scopes: write

melba_orders_bulk_delete

destructive

Bulk delete Deletes the orders of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds); with no filter, every one of them matches. The call is refused when nothing matches, and when more than 30 match unless count is set to 30 or less, in which case only that page (count rows from offset) is deleted. Returns the outcome, with the errors of any order that could not be deleted. An order is a purchase order to one supplier, with its lines and status. (scopes: write)

Scopes: write

melba_orders_duplicate

Duplicate Copies each supplier order matching the search filters, with its lines. Each copy is a new draft order with a new number, its name marked as a copy, and no sending date; nothing is sent. Returns the new orders. (scopes: write) (credits: 10 per created item, waived by subscription: stocks_and_orders_standard; this organization's plans: melba_organizations_plan)

Scopes: write

melba_orders_export

Export Exports the orders of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds) to a file in the format given in parameters.format: xls (Excel, the default), csv, json, pdf or html. With parameters.async true, the default, the file is e-mailed to the signed-in user and the answer names the recipient; with false, the file itself is returned. Changes no data. An order is a purchase order to one supplier, with its lines and status. (scopes: write)

Scopes: write

melba_orders_search

read-only

Search order Lists the orders of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds), one page at a time (count and offset), sorted by sortBy and sortDirection. Changes nothing. An order is a purchase order to one supplier, with its lines and status. (scopes: read)

Scopes: read

melba_orders_update

destructive

Update order Updates the order whose id is in the path with the fields sent in the body and returns it. An order is a purchase order to one supplier, with its lines and status. (scopes: write)

Scopes: write

melba_orders_delete

destructive

Delete order Deletes the order whose id is in the path. An order is a purchase order to one supplier, with its lines and status. (scopes: write)

Scopes: write

melba_orders_get_emails

read-only

Get emails order Returns the emails linked to the supplier order in the path, such as the order sent to the supplier and the supplier's replies. Changes no data. (scopes: read)

Scopes: read

melba_orders_print

Print order Generates a printable document of the supplier order in the path, with its lines and the supplier's details, as a PDF or HTML; display options such as costs or logo are set in the body. Changes no data and sends nothing. (scopes: write)

Scopes: write

melba_orders_send

destructive

Send order Sends the supplier order in the path: by email to the supplier, with the order attached as a PDF unless excluded, and to the internal sales of an internal supplier. The order is marked sent with its sending date, zero-quantity lines are removed and supplier fees added. An order already sent is not sent again. (scopes: write)

Scopes: write

melba_orders_spreadsheet

read-only

Order excel Exports the supplier order in the path as an Excel spreadsheet (.xlsx) with its lines and the supplier's and organization's details; lines can be sorted by product name or category. Changes no data. (scopes: read)

Scopes: read

organizations

melba_organizations_create

Create organization Creates a new organization (a separate kitchen business account) from the fields in the body, loads Melba's default roles and starting data into it, and makes the signed-in user its administrator. Returns the new organization. (scopes: write)

Scopes: write

melba_organizations_search

read-only

Search organization Lists the organizations that the signed-in user can see: the current organization, its parent organization, the organizations attached to either of them, and every organization the user belongs to that match the search filters in the body (predicates, or the ids listed in includedIds), one page at a time (count and offset), sorted by sortBy and sortDirection. Changes nothing. An organization is a kitchen business account, such as one restaurant, with its company details, currency and time zone. (scopes: read)

Scopes: read

melba_organizations_get

read-only

Get organization Returns the organization whose id is in the path. An organization is a kitchen business account, such as one restaurant, with its company details, currency and time zone. (scopes: read)

Scopes: read

melba_organizations_update

destructive

Update organization Updates the organization whose id is in the path with the fields sent in the body and returns it. An organization is a kitchen business account, such as one restaurant, with its company details, currency and time zone. (scopes: write)

Scopes: write

melba_organizations_plan

read-only

Get the current organization's plans and credit costs Read-only. The subscriptions the organization holds (names), the writes they make free (labels), the writes it pays in credits per created item with the subscriptions that would make each free, and its credit balance. The credit costs quoted in tool descriptions are the price without a subscription: this route says which ones apply to this organization. (scopes: read)

Scopes: read

melba_organizations_switch

Switch the active organization Switches the caller's active organization to the one in the path. For X-API-KEY / MCP clients the response carries the target organization's api-key (generated on the fly when the user has a role there but no key yet); adopting that key makes every subsequent call operate on the new organization until switched again. (scopes: write)

Scopes: write

parcel

melba_parcel_labels_create

Create parcel label Creates a parcel label from the fields in the body and returns it. A parcel label is a traceability label for goods received on an order line or made by a production task, with expiry date and storage temperature. (scopes: write) (credits: 5, waived by subscription: traceability_standard; this organization's plans: melba_organizations_plan)

Scopes: write

melba_parcel_labels_bulk_delete

destructive

Bulk delete Deletes the parcel labels of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds); with no filter, every one of them matches. The call is refused when nothing matches, and when more than 30 match unless count is set to 30 or less, in which case only that page (count rows from offset) is deleted. Returns the outcome, with the errors of any parcel label that could not be deleted. A parcel label is a traceability label for goods received on an order line or made by a production task, with expiry date and storage temperature. (scopes: write)

Scopes: write

melba_parcel_labels_export

Export Exports the parcel labels of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds) to a file in the format given in parameters.format: xls (Excel, the default), csv, json, pdf or html. With parameters.async true, the default, the file is e-mailed to the signed-in user and the answer names the recipient; with false, the file itself is returned. Changes no data. A parcel label is a traceability label for goods received on an order line or made by a production task, with expiry date and storage temperature. (scopes: write)

Scopes: write

melba_parcel_labels_print

Print Generates the parcel labels (packaging stickers) of the production labels matching the search filters from a chosen print template: a new Google Slides presentation is created in the organization's Google Drive, one slide per label copy. Returns the presentation's id and address. (scopes: write)

Scopes: write

melba_parcel_labels_search

read-only

Search parcel label Lists the parcel labels of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds), one page at a time (count and offset), sorted by sortBy and sortDirection. Changes nothing. A parcel label is a traceability label for goods received on an order line or made by a production task, with expiry date and storage temperature. (scopes: read)

Scopes: read

melba_parcel_labels_get

read-only

Get parcel label Returns the parcel label whose id is in the path. A parcel label is a traceability label for goods received on an order line or made by a production task, with expiry date and storage temperature. (scopes: read)

Scopes: read

melba_parcel_labels_update

destructive

Update parcel label Updates the parcel label whose id is in the path with the fields sent in the body and returns it. A parcel label is a traceability label for goods received on an order line or made by a production task, with expiry date and storage temperature. (scopes: write)

Scopes: write

melba_parcel_labels_delete

destructive

Delete parcel label Deletes the parcel label whose id is in the path. A parcel label is a traceability label for goods received on an order line or made by a production task, with expiry date and storage temperature. (scopes: write)

Scopes: write

print

melba_print_templates_create

Create print template Creates a print template from one of Melba's default Google Slides layouts, given in googleSlideId: the layout is copied into the organization's Google Drive under the given name, and the new template can be made the default one. Returns the new template. A print template is a Google Slides layout used to print labels. (scopes: write)

Scopes: write

melba_print_templates_bulk_delete

destructive

Bulk delete Deletes the print templates of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds); with no filter, every one of them matches. The call is refused when nothing matches, and when more than 30 match unless count is set to 30 or less, in which case only that page (count rows from offset) is deleted. Returns the outcome, with the errors of any print template that could not be deleted. A print template is a Google Slides layout used to print labels. (scopes: write)

Scopes: write

melba_print_templates_search

read-only

Search print template Lists the print templates of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds), one page at a time (count and offset), sorted by sortBy and sortDirection. Changes nothing. A print template is a Google Slides layout used to print labels. (scopes: read)

Scopes: read

melba_print_templates_get

read-only

Get print template Returns the print template whose id is in the path. A print template is a Google Slides layout used to print labels. (scopes: read)

Scopes: read

melba_print_templates_update

destructive

Update print template Updates the print template whose id is in the path with the fields sent in the body and returns it. A print template is a Google Slides layout used to print labels. (scopes: write)

Scopes: write

melba_print_templates_delete

destructive

Delete Deletes the print template whose id is in the path. A print template is a Google Slides layout used to print labels. (scopes: write)

Scopes: write

melba_print_templates_duplicate

Duplicate print template Copies the print template in the path (the layout used to print labels) under the name given in the body: its Google Slides file is copied into the organization's Google Drive and the new template points to the copy. The original is unchanged. Returns the new template. (scopes: write)

Scopes: write

products

melba_products_create

Create product Creates a product from the fields in the body and returns it. A product is an ingredient, a recipe, a packaging or another item the organization buys, makes or sells. (scopes: write)

Scopes: write

melba_products_bulk_delete

destructive

Bulk delete Deletes the products of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds); with no filter, every one of them matches. The call is refused when nothing matches, and when more than 30 match unless count is set to 30 or less, in which case only that page (count rows from offset) is deleted. Returns the outcome, with the errors of any product that could not be deleted. A product is an ingredient, a recipe, a packaging or another item the organization buys, makes or sells. (scopes: write)

Scopes: write

melba_products_ai_create_recipe

AI create recipe Asks an AI model to write a new recipe from a free-text prompt and saves it in the organization's Melba catalog. Ingredients missing from the catalog are created as new products unless the mode says to link existing products only. Returns the new recipe's id and name. (scopes: ai:invoke)

Scopes: ai:invoke

melba_products_ai_recipe_content

AI recipe content Asks an AI model to draft recipe content (the text of a recipe) from a free-text prompt, and returns that text as a preview. Nothing is saved in the organization's recipes or products. (scopes: ai:invoke)

Scopes: ai:invoke

melba_products_allergens_sheet

Allergens product Generates an allergen sheet document (PDF by default) listing the allergens of the organization's products that match the search filters in the body, sorted by name, up to 200 products. Returns the generated document. Changes no data. (scopes: write)

Scopes: write

melba_products_assign_categories

destructive

Assign categories Asks an AI model to pick a category for each listed product name (1 to 50) from the organization's existing category tree. Products given with an id are updated with the chosen category, replacing their current one. New categories are created only if allowed in the request. Returns the category chosen per product. (scopes: write)

Scopes: write

melba_products_backup

Backup Exports a backup file of the organization's products (recipes excluded) matching the search filters in the body. By default the export runs in the background and the file is emailed; with async off, the file is returned directly. Changes no data. (scopes: write)

Scopes: write

melba_products_detect_allergens

Detect allergens Starts a background AI job that detects the allergens of up to 20 food ingredients (not recipes or non-food products) listed by id. Returns a job id to poll for the result. The detected allergens are returned in the job result and are not saved on the products. (scopes: write)

Scopes: write

melba_products_duplicate

Duplicate Copies the products matching the search filters in the body, together with their child records such as a recipe's lines, into the same organization or into another of the user's organizations when an organization id is given. The originals are unchanged. Returns the new products. (scopes: write)

Scopes: write

melba_products_estimate_nutrition

destructive

Estimate nutrition Starts a background AI job that estimates nutrition values for up to 20 food ingredients (not recipes or non-food products) listed by id. When the job finishes, the estimated nutrient quantities are saved on those products, replacing existing values for the same nutrient. Returns a job id to poll. (scopes: write)

Scopes: write

melba_products_export

Export Exports the products of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds) to a file in the format given in parameters.format: xls (Excel, the default), csv, json, pdf or html. With parameters.async true, the default, the file is e-mailed to the signed-in user and the answer names the recipient; with false, the file itself is returned. Changes no data. A product is an ingredient, a recipe, a packaging or another item the organization buys, makes or sells. (scopes: write)

Scopes: write

melba_products_bulk_generate_description

Bulk generate description Starts a background AI job that writes descriptions (with storage instructions, typical usage and origin) for up to 20 products or recipes listed by id. Returns a job id to poll for the generated texts. The texts are returned in the job result and are not saved on the products. (scopes: ai:invoke)

Scopes: ai:invoke

melba_products_bulk_create

Bulk create Creates several products (ingredients, recipes or other items) at once from the list of items in the body, checking each item on its own: valid items are created and invalid ones are returned with their errors. Returns the created products and the errors per item. (scopes: write)

Scopes: write

melba_products_bulk_import_composition

destructive

Bulk import composition Asks an AI model to find the composition (ingredient list text) of up to 20 food ingredients listed by id. The composition found is saved on each product, replacing any existing one; products without a result are left unchanged. Returns the composition per product. (scopes: write)

Scopes: write

melba_products_print_list

Product print Generates one printable document with the recipe or product sheets of the products matching the search filters in the body, for the quantities and display options given. Returns the document; changes no data. (scopes: write)

Scopes: write

melba_products_search

read-only

Search product Lists the products of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds), one page at a time (count and offset), sorted by sortBy and sortDirection. Changes nothing. A product is an ingredient, a recipe, a packaging or another item the organization buys, makes or sells. (scopes: read)

Scopes: read

melba_products_select

destructive

Select Adds the products matching the search filters in the body to an existing selection (a saved list of products with quantities). It can first empty the selection, expand recipes into ingredients or sub-recipes, and merge identical lines. Returns the updated selection. (scopes: write)

Scopes: write

melba_products_suggest_categories

Suggest categories Asks an AI model to suggest a category for each of up to 500 product names, based on the organization's category tree. Returns the suggestions only; no product or category is created or changed. (scopes: write)

Scopes: write

melba_products_get

read-only

Get product Returns the product whose id is in the path. A product is an ingredient, a recipe, a packaging or another item the organization buys, makes or sells. (scopes: read)

Scopes: read

melba_products_update

destructive

Update product Updates the product whose id is in the path with the fields sent in the body and returns it. A product is an ingredient, a recipe, a packaging or another item the organization buys, makes or sells. (scopes: write)

Scopes: write

melba_products_delete

destructive

Delete product Deletes the product whose id is in the path. A product is an ingredient, a recipe, a packaging or another item the organization buys, makes or sells. (scopes: write)

Scopes: write

melba_products_ai_jobs_status

read-only

Get AI job status Returns the status of a background AI job started for the organization (for example allergen detection, nutrition estimation or description generation): its type, status, creation and completion dates, and the result when completed or the error message when failed. (scopes: read)

Scopes: read

melba_products_generate_description

destructive

Generate description Asks an AI model to write a description for one product or recipe of the organization. The text is saved in the product's comment field, replacing its current content. Returns the generated description. (scopes: write) (credits: 1; this organization's plans: melba_organizations_plan)

Scopes: write

melba_products_import_composition

destructive

Import composition Asks an AI model to find the composition (ingredient list text) of one food ingredient of the organization. The composition found is saved on the product, replacing any existing one. Returns the composition. (scopes: write) (credits: 1; this organization's plans: melba_organizations_plan)

Scopes: write

melba_products_print

Print product Generates a printable recipe or product sheet (HTML by default, other formats by option) for the product in the path, for a given quantity and unit, with options for steps, costs, picture, ingredient list and quantity rounding. Returns the document; changes no data. (scopes: write)

Scopes: write

melba_products_produce

Produce Creates a scheduled production task for the product in the path, for a given quantity, unit and due date. It can subtract the stock on hand from the quantity, expand sub-recipes into their own tasks, and with merge add the quantity to an existing task of the same product and date. Records no stock movement. Returns the tasks. (scopes: write) (credits: 10 per created item, waived by subscription: recipes_and_sales_premium, traceability_premium; this organization's plans: melba_organizations_plan)

Scopes: write

melba_products_pull

destructive

Pull Updates the organization's copy of a product from the original product it was cloned from, overwriting the copy's fields with the source's current values within the sync settings. Returns the created or updated products, with any errors listed. (scopes: write)

Scopes: write

melba_products_tags_add

Add tags to product Puts on the product in the path the tags of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds); with no filter, every tag of the organization matches. Refused when none or more than 100 match. Returns the updated product. (scopes: write)

Scopes: write

melba_products_tags_delete

destructive

Delete product tag Takes off the product in the path the tags of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds); with no filter, every tag of the organization matches. The tags themselves are kept. Refused when none or more than 100 match. Returns the updated product. (scopes: write)

Scopes: write

recipe

melba_recipe_lines_create

Create recipe line Adds one line (an "element") to a recipe's composition: an ingredient or sub-recipe with its quantity and unit, or a named separator line. The recipe's cost is recalculated. Returns the created recipe line. (scopes: write)

Scopes: write

melba_recipe_lines_get

read-only

Get recipe line Returns one line (an "element") of a recipe's composition: the ingredient or sub-recipe it points to, its quantity and unit, its display name and its position in the recipe. (scopes: read)

Scopes: read

melba_recipe_lines_update

destructive

Update recipe line Changes a line (an "element") of a recipe's composition: its quantity, unit, ingredient or sub-recipe, display name or position. Only the fields sent change, and the recipe's cost is recalculated. Returns the updated recipe line. (scopes: write)

Scopes: write

melba_recipe_lines_delete

destructive

Delete recipe line Removes one line (an "element") from a recipe's composition and recalculates the recipe's cost; removing the last line also resets the recipe's computed units. Returns no content. (scopes: write)

Scopes: write

recipes

melba_recipes_list

read-onlyhandcrafted

Returns a paginated list of recipes owned by the calling Melba organization. Each recipe carries id, name and category id; the response carries totalCount and nextOffset. Cost: 1 API call (debited from the credits batch counter if no API subscription).

melba_recipes_get

read-onlyhandcrafted

Fetches a single recipe by its uuid. `include` expands related entities (childElements: the ingredient lines, allergens: the allergen list, etc.). Cost: 1 API call.

roles

melba_roles_create

Create role Creates a role from the fields in the body and returns it. A role is a named set of application modules that the users holding it may open in the organization. (scopes: write)

Scopes: write

melba_roles_search

read-only

Search role Lists the roles of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds), one page at a time (count and offset), sorted by sortBy and sortDirection. Changes nothing. A role is a named set of application modules that the users holding it may open in the organization. (scopes: read)

Scopes: read

melba_roles_get

read-only

Get role Returns the role whose id is in the path. A role is a named set of application modules that the users holding it may open in the organization. (scopes: read)

Scopes: read

melba_roles_update

destructive

Update role Updates the role whose id is in the path with the fields sent in the body and returns it. A role is a named set of application modules that the users holding it may open in the organization. (scopes: write)

Scopes: write

melba_roles_delete

destructive

Delete role Deletes the role whose id is in the path. A role is a named set of application modules that the users holding it may open in the organization. (scopes: write)

Scopes: write

melba_roles_modules_grant

Grant modules to role Gives the role in the path access to the application modules (the parts of Melba a role can open, such as recipes, stock or orders) matching the search filters in the body. Every user holding that role gains that access. Returns the updated role. (scopes: write)

Scopes: write

melba_roles_modules_delete

destructive

Delete role module Removes from the role in the path its access to the application modules (the parts of Melba a role can open) matching the search filters in the body; users holding that role lose that access. Returns the updated role. (scopes: write)

Scopes: write

sale

melba_sale_items_create

Create sale item Creates a sale item from the fields in the body and returns it. A sale item is the selling terms of a product: sale price, VAT and margin, in a given unit. (scopes: write)

Scopes: write

melba_sale_items_bulk_delete

destructive

Bulk delete Deletes the sale items of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds); with no filter, every one of them matches. The call is refused when nothing matches, and when more than 30 match unless count is set to 30 or less, in which case only that page (count rows from offset) is deleted. Returns the outcome, with the errors of any sale item that could not be deleted. A sale item is the selling terms of a product: sale price, VAT and margin, in a given unit. (scopes: write)

Scopes: write

melba_sale_lines_create

Create sale line Creates a sale line from the fields in the body and returns it. A sale line is one product line of a sale, with its quantity. (scopes: write)

Scopes: write

melba_sale_lines_bulk_delete

destructive

Bulk delete Deletes the sale lines of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds); with no filter, every one of them matches. The call is refused when nothing matches, and when more than 30 match unless count is set to 30 or less, in which case only that page (count rows from offset) is deleted. Returns the outcome, with the errors of any sale line that could not be deleted. A sale line is one product line of a sale, with its quantity. (scopes: write)

Scopes: write

melba_sale_items_export

Export Exports the sale items of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds) to a file in the format given in parameters.format: xls (Excel, the default), csv, json, pdf or html. With parameters.async true, the default, the file is e-mailed to the signed-in user and the answer names the recipient; with false, the file itself is returned. Changes no data. A sale item is the selling terms of a product: sale price, VAT and margin, in a given unit. (scopes: write)

Scopes: write

melba_sale_items_search

read-only

Search sale item Lists the sale items of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds), one page at a time (count and offset), sorted by sortBy and sortDirection. Changes nothing. A sale item is the selling terms of a product: sale price, VAT and margin, in a given unit. (scopes: read)

Scopes: read

melba_sale_items_get

read-only

Get sale item Returns the sale item whose id is in the path. A sale item is the selling terms of a product: sale price, VAT and margin, in a given unit. (scopes: read)

Scopes: read

melba_sale_items_update

destructive

Update sale item Updates the sale item whose id is in the path with the fields sent in the body and returns it. A sale item is the selling terms of a product: sale price, VAT and margin, in a given unit. (scopes: write)

Scopes: write

melba_sale_items_delete

destructive

Delete Deletes the sale item whose id is in the path. A sale item is the selling terms of a product: sale price, VAT and margin, in a given unit. (scopes: write)

Scopes: write

melba_sale_lines_destock

Destock Takes the ingredients of the sale lines matching the search filters out of stock, recording stock movements. Stock never goes below zero, and lines already destocked are skipped unless force is set. Returns the stock movements and analytics. (scopes: write) (credits: 1 per created item, waived by subscription: stocks_and_orders_standard; this organization's plans: melba_organizations_plan)

Scopes: write

melba_sale_lines_export

Export Exports the sale lines of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds) to a file in the format given in parameters.format: xls (Excel, the default), csv, json, pdf or html. With parameters.async true, the default, the file is e-mailed to the signed-in user and the answer names the recipient; with false, the file itself is returned. Changes no data. A sale line is one product line of a sale, with its quantity. (scopes: write)

Scopes: write

melba_sale_lines_bulk_create

Bulk create Creates many sale lines at once from the list of items in the body, grouped into new sales (typically one per customer and delivery date). Valid items are created and invalid ones are returned with their errors. Returns the created sale lines and the errors per item. (scopes: write) (credits: 10 per created item, waived by subscription: recipes_and_sales_standard; this organization's plans: melba_organizations_plan)

Scopes: write

melba_sale_lines_order

Order sale lines Creates draft supplier orders for the ingredients of the sale lines matching the search filters, grouped by supplier; with merge, the lines are added to an existing draft order of that supplier. Nothing is sent to suppliers. Returns the order lines created. (scopes: write) (credits: 10 per created item, waived by subscription: stocks_and_orders_standard; this organization's plans: melba_organizations_plan)

Scopes: write

melba_sale_lines_print

Print Generates a production sheet (recipes, ingredients and quantities) for the sale lines matching the search filters, in the format requested. Returns the document; changes no data. (scopes: write)

Scopes: write

melba_sale_lines_produce

destructive

Produce sale line Creates production tasks for the recipes and ingredients of the sale lines matching the search filters, skipping sales already sold or canceled, and marks those lines as produced. With merge, quantities are added to an existing task of the same product and date. Returns the tasks. (scopes: write) (credits: 10 per created item, waived by subscription: recipes_and_sales_premium, traceability_premium; this organization's plans: melba_organizations_plan)

Scopes: write

melba_sale_lines_restock

Restock Puts the ingredients of the sale lines matching the search filters back into stock, recording stock movements and creating the stock item of an ingredient not yet tracked. Lines already restocked are skipped unless force is set. Returns the stock movements and analytics. (scopes: write) (credits: 1 per created item, waived by subscription: stocks_and_orders_standard; this organization's plans: melba_organizations_plan)

Scopes: write

melba_sale_lines_search

read-only

Search sale line Lists the sale lines of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds), one page at a time (count and offset), sorted by sortBy and sortDirection. Changes nothing. A sale line is one product line of a sale, with its quantity. (scopes: read)

Scopes: read

melba_sale_lines_select

destructive

Select sale line Copies the products and quantities of the sale lines matching the search filters into an existing selection (a saved list of products with quantities). With emptyDestination, the selection's current lines are removed first. Returns the updated selection. (scopes: write)

Scopes: write

melba_sale_lines_get

read-only

Get sale line Returns the sale line whose id is in the path. A sale line is one product line of a sale, with its quantity. (scopes: read)

Scopes: read

melba_sale_lines_update

destructive

Update sale line Updates the sale line whose id is in the path with the fields sent in the body and returns it. A sale line is one product line of a sale, with its quantity. (scopes: write)

Scopes: write

melba_sale_lines_delete

destructive

Delete sale line Deletes the sale line whose id is in the path. A sale line is one product line of a sale, with its quantity. (scopes: write)

Scopes: write

sales

melba_sales_create

Create sale Creates a sale from the fields in the body and returns it. A sale is a sale to a client, with its lines and status. (scopes: write) (credits: 10, waived by subscription: recipes_and_sales_standard; this organization's plans: melba_organizations_plan)

Scopes: write

melba_sales_bulk_delete

destructive

Bulk delete Deletes the sales of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds); with no filter, every one of them matches. The call is refused when nothing matches, and when more than 30 match unless count is set to 30 or less, in which case only that page (count rows from offset) is deleted. Returns the outcome, with the errors of any sale that could not be deleted. A sale is a sale to a client, with its lines and status. (scopes: write)

Scopes: write

melba_sales_duplicate

Duplicate sale Copies each customer sale matching the search filters, with its lines, as a new sale with a new number and its name marked as a copy. The originals are unchanged. Returns the new sales. (scopes: write) (credits: 10 per created item, waived by subscription: recipes_and_sales_standard; this organization's plans: melba_organizations_plan)

Scopes: write

melba_sales_export

Export Exports the sales of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds) to a file in the format given in parameters.format: xls (Excel, the default), csv, json, pdf or html. With parameters.async true, the default, the file is e-mailed to the signed-in user and the answer names the recipient; with false, the file itself is returned. Changes no data. A sale is a sale to a client, with its lines and status. (scopes: write)

Scopes: write

melba_sales_order

Order sales Creates supplier order lines for the ingredients needed by the customer sales matching the search filters, grouped by supplier, optionally after subtracting the stock on hand. Lines go into draft orders, added by default to an existing draft order of the supplier; nothing is sent. Returns the order lines. (scopes: write) (credits: 10 per created item, waived by subscription: stocks_and_orders_standard; this organization's plans: melba_organizations_plan)

Scopes: write

melba_sales_produce

destructive

Produce sale Creates production tasks for the food lines of the customer sales matching the search filters, skipping sales already sold or canceled. The sales are set to pending and their lines marked as produced. Returns the tasks. (scopes: write) (credits: 10 per created item, waived by subscription: recipes_and_sales_premium, traceability_premium; this organization's plans: melba_organizations_plan)

Scopes: write

melba_sales_search

read-only

Search sale Lists the sales of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds), one page at a time (count and offset), sorted by sortBy and sortDirection. Changes nothing. A sale is a sale to a client, with its lines and status. (scopes: read)

Scopes: read

melba_sales_get

read-only

Get sale Returns the sale whose id is in the path. A sale is a sale to a client, with its lines and status. (scopes: read)

Scopes: read

melba_sales_update

destructive

Update sale Updates the sale whose id is in the path with the fields sent in the body and returns it. A sale is a sale to a client, with its lines and status. (scopes: write)

Scopes: write

melba_sales_delete

destructive

Delete sale Deletes the sale whose id is in the path. A sale is a sale to a client, with its lines and status. (scopes: write)

Scopes: write

melba_sales_get_emails

read-only

Get emails sale Returns the emails linked to the customer sale in the path. Changes no data. (scopes: read)

Scopes: read

melba_sales_print

Print sale Generates a printable document of the customer sale in the path, with its lines and amounts, as a PDF or HTML; display options are set in the body. Changes no data and sends nothing. (scopes: write)

Scopes: write

selected

melba_selected_products_create

Create selected product Creates a selected product from the fields in the body and returns it. A selected product is one product, with its quantity and unit, inside a selection (a saved list of products). (scopes: write)

Scopes: write

melba_selected_products_bulk_delete

destructive

Bulk delete Deletes the selected products of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds); with no filter, every one of them matches. The call is refused when nothing matches, and when more than 30 match unless count is set to 30 or less, in which case only that page (count rows from offset) is deleted. Returns the outcome, with the errors of any selected product that could not be deleted. A selected product is one product, with its quantity and unit, inside a selection (a saved list of products). (scopes: write)

Scopes: write

melba_selected_products_allergens_sheet

Allergens selected product Generates an allergen sheet listing the allergens of each product among the selection lines matching the search filters (a selection is a saved list of products with quantities). Returns the document, PDF by default or HTML; changes no data. (scopes: write)

Scopes: write

melba_selected_products_reduce_by_stock

destructive

Reduce selection lines by stock on hand Lowers the quantity of each selection line matching the search filters by what is already in stock, leaving what remains to buy or make, and recalculates the line and selection costs. The previous quantities are not kept and no stock movement is recorded. Returns the updated lines. (scopes: write) (credits: 1 per created item, waived by subscription: stocks_and_orders_standard; this organization's plans: melba_organizations_plan)

Scopes: write

melba_selected_products_destock

Destock Takes the ingredients of the selection lines matching the search filters out of stock, recording stock movements. Stock never goes below zero, and lines already destocked are skipped unless force is set. Returns the stock movements and analytics. (scopes: write) (credits: 1 per created item, waived by subscription: stocks_and_orders_standard; this organization's plans: melba_organizations_plan)

Scopes: write

melba_selected_products_export

Export Exports the selected products of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds) to a file in the format given in parameters.format: xls (Excel, the default), csv, json, pdf or html. With parameters.async true, the default, the file is e-mailed to the signed-in user and the answer names the recipient; with false, the file itself is returned. Changes no data. A selected product is one product, with its quantity and unit, inside a selection (a saved list of products). (scopes: write)

Scopes: write

melba_selected_products_flatten

destructive

Flatten selected product Breaks the selection lines matching the search filters down into their ingredients or sub-recipes and writes the result into a destination selection, whose current content is replaced. Identical products can be merged, and with cleanup the source lines are deleted. Returns the destination selection. (scopes: write)

Scopes: write

melba_selected_products_bulk_order

destructive

Order selected product Creates draft supplier orders for the selection lines matching the search filters, grouped by supplier; with merge, lines are added to an existing draft order. Nothing is sent to suppliers. With cleanup, the ordered selection lines are deleted afterwards. Returns the order lines. (scopes: write) (credits: 10 per created item, waived by subscription: stocks_and_orders_standard; this organization's plans: melba_organizations_plan)

Scopes: write

melba_selected_products_print

Print selected products Generates a recipe and ingredient sheet with quantities for the selection lines matching the search filters, in the format requested. Returns the document; changes no data. (scopes: write)

Scopes: write

melba_selected_products_produce

destructive

Produce selected product Creates production tasks for the recipes and ingredients of the selection lines matching the search filters, due on the given date, today by default; with merge, quantities are added to an existing task of the same product and date. With cleanup, the selection lines are deleted afterwards. Returns the tasks. (scopes: write) (credits: 10 per created item, waived by subscription: recipes_and_sales_premium, traceability_premium; this organization's plans: melba_organizations_plan)

Scopes: write

melba_selected_products_restock

Restock Adds the ingredients of the selection lines matching the search filters into stock, recording stock movements and creating the stock item of an ingredient not yet tracked. Lines already restocked are skipped unless force is set. Returns the stock movements and analytics. (scopes: write) (credits: 1 per created item, waived by subscription: stocks_and_orders_standard; this organization's plans: melba_organizations_plan)

Scopes: write

melba_selected_products_search

read-only

Search selected product Lists the selected products of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds), one page at a time (count and offset), sorted by sortBy and sortDirection. Changes nothing. A selected product is one product, with its quantity and unit, inside a selection (a saved list of products). (scopes: read)

Scopes: read

melba_selected_products_sell

destructive

Sell selected product Turns the selection lines matching the search filters into sale lines of a new sale, or of the sale given, priced from each product's sale item; products without one are reported as errors. Stock movements are recorded when that sale is marked sold. With cleanup, the selection lines are deleted afterwards. (scopes: write)

Scopes: write

melba_selected_products_get

read-only

Get selected product Returns the selected product whose id is in the path. A selected product is one product, with its quantity and unit, inside a selection (a saved list of products). (scopes: read)

Scopes: read

melba_selected_products_update

destructive

Update selected product Updates the selected product whose id is in the path with the fields sent in the body and returns it. A selected product is one product, with its quantity and unit, inside a selection (a saved list of products). (scopes: write)

Scopes: write

melba_selected_products_delete

destructive

Delete selected product Deletes the selected product whose id is in the path. A selected product is one product, with its quantity and unit, inside a selection (a saved list of products). (scopes: write)

Scopes: write

selections

melba_selections_create

Create selection Creates a selection from the fields in the body and returns it. A selection is a saved list of products with quantities. (scopes: write)

Scopes: write

melba_selections_bulk_delete

destructive

Bulk delete Deletes the selections of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds); with no filter, every one of them matches. The call is refused when nothing matches, and when more than 30 match unless count is set to 30 or less, in which case only that page (count rows from offset) is deleted. Returns the outcome, with the errors of any selection that could not be deleted. A selection is a saved list of products with quantities. (scopes: write)

Scopes: write

melba_selections_duplicate

Duplicate Copies each selection (a saved list of products with quantities) matching the search filters, with all its lines, under the original name marked as a copy. The originals are unchanged. Returns the new selections. (scopes: write)

Scopes: write

melba_selections_search

read-only

Search selection Lists the selections of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds), one page at a time (count and offset), sorted by sortBy and sortDirection. Changes nothing. A selection is a saved list of products with quantities. (scopes: read)

Scopes: read

melba_selections_get

read-only

Get selection Returns the selection whose id is in the path. A selection is a saved list of products with quantities. (scopes: read)

Scopes: read

melba_selections_update

destructive

Update selection Updates the selection whose id is in the path with the fields sent in the body and returns it. A selection is a saved list of products with quantities. (scopes: write)

Scopes: write

melba_selections_delete

destructive

Delete selection Deletes the selection whose id is in the path. A selection is a saved list of products with quantities. (scopes: write)

Scopes: write

steps

melba_steps_create

Create step Creates a step from the fields in the body and returns it. A step is one written instruction of a product's recipe method. (scopes: write)

Scopes: write

melba_steps_get

read-only

Get step Returns the step whose id is in the path. A step is one written instruction of a product's recipe method. (scopes: read)

Scopes: read

melba_steps_update

destructive

Update step Updates the step whose id is in the path with the fields sent in the body and returns it. A step is one written instruction of a product's recipe method. (scopes: write)

Scopes: write

melba_steps_delete

destructive

Delete step Deletes the step whose id is in the path. A step is one written instruction of a product's recipe method. (scopes: write)

Scopes: write

stock

melba_stock_items_create

Create stock item Creates a stock item from the fields in the body and returns it. A stock item is the stock of one product in one storage location. (scopes: write)

Scopes: write

melba_stock_items_bulk_delete

destructive

Bulk delete Deletes the stock items of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds); with no filter, every one of them matches. The call is refused when nothing matches, and when more than 30 match unless count is set to 30 or less, in which case only that page (count rows from offset) is deleted. Returns the outcome, with the errors of any stock item that could not be deleted. A stock item is the stock of one product in one storage location. (scopes: write)

Scopes: write

melba_stock_transactions_create

Create stock transaction Records a stock movement on a stock item from the fields in the body and changes that stock item's quantity by the movement's quantity; a movement of quantity 0 is not recorded. Returns the movement. A stock transaction is a stock movement on a stock item, such as goods received, a sale, a use in production, a correction or a loss. (scopes: write) (credits: 1 when type=correction, waived by subscription: stocks_and_orders_standard; this organization's plans: melba_organizations_plan)

Scopes: write

melba_stock_transactions_bulk_delete

destructive

Bulk delete Deletes every stock movement of the current organization: the search filters in the body are checked but not applied. Refused while any stock item of the organization still holds a quantity, so the stock has to be emptied first. Returns no content. A stock transaction is a stock movement on a stock item, such as goods received, a sale, a use in production, a correction or a loss. (scopes: write)

Scopes: write

melba_stock_items_empty

destructive

Empty stock item Sets to zero the quantity on hand of every stock item matching the search filters in the body, recording one 'empty' stock movement per item that held a quantity. Returns those movements, which can be reverted one by one. (scopes: write)

Scopes: write

melba_stock_items_export

Export Exports the stock items of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds) to a file in the format given in parameters.format: xls (Excel, the default), csv, json, pdf or html. With parameters.async true, the default, the file is e-mailed to the signed-in user and the answer names the recipient; with false, the file itself is returned. Changes no data. A stock item is the stock of one product in one storage location. (scopes: write)

Scopes: write

melba_stock_items_order

Order stock item Creates supplier order lines that bring the stock items matching the search filters up to their target or minimum level (optionally minus the stock already held), in draft orders grouped by supplier, or added to an existing draft order when merge is set. Nothing is sent to suppliers. Returns the order lines. (scopes: write) (credits: 10 per created item, waived by subscription: stocks_and_orders_standard; this organization's plans: melba_organizations_plan)

Scopes: write

melba_stock_items_produce

Produce stock item Creates production tasks that bring the stock items matching the search filters up to their target or minimum level (optionally minus the stock already held), due on the given date, today by default. With merge, the quantity is added to an existing task of the same recipe and date. Returns the tasks. (scopes: write) (credits: 10 per created item, waived by subscription: recipes_and_sales_premium, traceability_premium; this organization's plans: melba_organizations_plan)

Scopes: write

melba_stock_items_search

read-only

Search stock item Lists the stock items of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds), one page at a time (count and offset), sorted by sortBy and sortDirection. Changes nothing. A stock item is the stock of one product in one storage location. (scopes: read)

Scopes: read

melba_stock_items_sell

Sell Turns the stock items with a positive quantity matching the search filters into sale lines, in a new sale or in the sale given by destinationSale, priced from each product's sale item. Stock movements are recorded when that sale is marked sold. Returns the sale lines, errors per line, stock movements and analytics. (scopes: write)

Scopes: write

melba_stock_items_get

read-only

Get stock item Returns the stock item whose id is in the path. A stock item is the stock of one product in one storage location. (scopes: read)

Scopes: read

melba_stock_items_update

destructive

Update stock item Updates the stock item whose id is in the path with the fields sent in the body and returns it. A stock item is the stock of one product in one storage location. (scopes: write)

Scopes: write

melba_stock_items_delete

destructive

Delete stock item Deletes the stock item whose id is in the path. A stock item is the stock of one product in one storage location. (scopes: write)

Scopes: write

melba_stock_transactions_export

Export Exports the stock transactions of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds) to a file in the format given in parameters.format: xls (Excel, the default), csv, json, pdf or html. With parameters.async true, the default, the file is e-mailed to the signed-in user and the answer names the recipient; with false, the file itself is returned. Changes no data. A stock transaction is a stock movement on a stock item, such as goods received, a sale, a use in production, a correction or a loss. (scopes: write)

Scopes: write

melba_stock_transactions_search

read-only

Search stock transaction Lists the stock transactions of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds), one page at a time (count and offset), sorted by sortBy and sortDirection. Changes nothing. A stock transaction is a stock movement on a stock item, such as goods received, a sale, a use in production, a correction or a loss. (scopes: read)

Scopes: read

melba_stock_transactions_get

read-only

Get stock transaction Returns the stock transaction whose id is in the path. A stock transaction is a stock movement on a stock item, such as goods received, a sale, a use in production, a correction or a loss. (scopes: read)

Scopes: read

melba_stock_transactions_update

destructive

Update stock transaction Updates the stock transaction whose id is in the path with the fields sent in the body and returns it. A stock transaction is a stock movement on a stock item, such as goods received, a sale, a use in production, a correction or a loss. (scopes: write)

Scopes: write

melba_stock_items_transfer

Transfer stock item Moves a quantity of the stock item in the path to another storage location and unit, creating the destination stock item when needed. Records two stock movements, out of the source and into the destination. Returns the destination stock item and the movements. (scopes: write)

Scopes: write

melba_stock_transactions_revert

destructive

Revert stock transaction Cancels the stock movement in the path by recording the opposite movement, linked to it, which puts the stock quantity back. Returns the new movement and analytics. (scopes: write)

Scopes: write

stocks

melba_stocks_import

Import stock Adds stock in bulk, up to 500 rows. Each row names an existing product by internal code or name, with a quantity and an optional unit, and records a stock movement that raises its quantity on hand. Returns the products updated and the rows that failed. (scopes: write)

Scopes: write

storage

melba_storage_locations_create

Create storage location Creates a storage location from the fields in the body and returns it. A storage location is a named place, such as a fridge or a storeroom, that holds stock and where hygiene checks are made. (scopes: write)

Scopes: write

melba_storage_locations_bulk_delete

destructive

Bulk delete Deletes the storage locations of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds); with no filter, every one of them matches. The call is refused when nothing matches, and when more than 30 match unless count is set to 30 or less, in which case only that page (count rows from offset) is deleted. Returns the outcome, with the errors of any storage location that could not be deleted. A storage location is a named place, such as a fridge or a storeroom, that holds stock and where hygiene checks are made. (scopes: write)

Scopes: write

melba_storage_locations_search

read-only

Search storage location Lists the storage locations of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds), one page at a time (count and offset), sorted by sortBy and sortDirection. Changes nothing. A storage location is a named place, such as a fridge or a storeroom, that holds stock and where hygiene checks are made. (scopes: read)

Scopes: read

melba_storage_locations_get

read-only

Get storage location Returns the storage location whose id is in the path. A storage location is a named place, such as a fridge or a storeroom, that holds stock and where hygiene checks are made. (scopes: read)

Scopes: read

melba_storage_locations_update

destructive

Update Updates the storage location whose id is in the path with the fields sent in the body and returns it. A storage location is a named place, such as a fridge or a storeroom, that holds stock and where hygiene checks are made. (scopes: write)

Scopes: write

melba_storage_locations_delete

destructive

Delete Deletes the storage location whose id is in the path. A storage location is a named place, such as a fridge or a storeroom, that holds stock and where hygiene checks are made. (scopes: write)

Scopes: write

suppliers

melba_suppliers_create

Create supplier Creates a supplier from the fields in the body and returns it. A supplier is a vendor the kitchen buys from, with its legal details, contacts and order-sending options. (scopes: write)

Scopes: write

melba_suppliers_bulk_delete

destructive

Bulk delete Deletes the suppliers of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds); with no filter, every one of them matches. The call is refused when nothing matches, and when more than 30 match unless count is set to 30 or less, in which case only that page (count rows from offset) is deleted. Returns the outcome, with the errors of any supplier that could not be deleted. A supplier is a vendor the kitchen buys from, with its legal details, contacts and order-sending options. (scopes: write)

Scopes: write

melba_suppliers_export

Export Exports the suppliers of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds) to a file in the format given in parameters.format: xls (Excel, the default), csv, json, pdf or html. With parameters.async true, the default, the file is e-mailed to the signed-in user and the answer names the recipient; with false, the file itself is returned. Changes no data. A supplier is a vendor the kitchen buys from, with its legal details, contacts and order-sending options. (scopes: write)

Scopes: write

melba_suppliers_search

read-only

Search supplier Lists the suppliers of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds), one page at a time (count and offset), sorted by sortBy and sortDirection. Changes nothing. A supplier is a vendor the kitchen buys from, with its legal details, contacts and order-sending options. (scopes: read)

Scopes: read

melba_suppliers_get

read-only

Get supplier Returns the supplier whose id is in the path. A supplier is a vendor the kitchen buys from, with its legal details, contacts and order-sending options. (scopes: read)

Scopes: read

melba_suppliers_update

destructive

Update supplier Updates the supplier whose id is in the path with the fields sent in the body and returns it. A supplier is a vendor the kitchen buys from, with its legal details, contacts and order-sending options. (scopes: write)

Scopes: write

melba_suppliers_delete

destructive

Delete supplier Deletes the supplier whose id is in the path. A supplier is a vendor the kitchen buys from, with its legal details, contacts and order-sending options. (scopes: write)

Scopes: write

melba_suppliers_contacts_add

Add contacts to supplier Links to the supplier in the path the contacts of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds); with no filter, every contact of the organization matches. Refused when none or more than 100 match. Returns the updated supplier. (scopes: write)

Scopes: write

melba_suppliers_contacts_delete

destructive

Delete supplier contact Unlinks from the supplier in the path the contacts of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds); with no filter, every contact of the organization matches. The contacts themselves are kept. Refused when none or more than 100 match. Returns the updated supplier. (scopes: write)

Scopes: write

supplying

melba_supplying_items_create

Create supplying item Creates a supplying item from the fields in the body and returns it. A supplying item is the purchase terms of a product at one supplier: supplier code, price, VAT and packaging unit. (scopes: write)

Scopes: write

melba_supplying_items_bulk_delete

destructive

Bulk delete Deletes the supplying items of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds); with no filter, every one of them matches. The call is refused when nothing matches, and when more than 30 match unless count is set to 30 or less, in which case only that page (count rows from offset) is deleted. Returns the outcome, with the errors of any supplying item that could not be deleted. A supplying item is the purchase terms of a product at one supplier: supplier code, price, VAT and packaging unit. (scopes: write)

Scopes: write

melba_supplying_items_export

Export Exports the supplying items of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds) to a file in the format given in parameters.format: xls (Excel, the default), csv, json, pdf or html. With parameters.async true, the default, the file is e-mailed to the signed-in user and the answer names the recipient; with false, the file itself is returned. Changes no data. A supplying item is the purchase terms of a product at one supplier: supplier code, price, VAT and packaging unit. (scopes: write)

Scopes: write

melba_supplying_items_search

read-only

Search supplying item Lists the supplying items of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds), one page at a time (count and offset), sorted by sortBy and sortDirection. Changes nothing. A supplying item is the purchase terms of a product at one supplier: supplier code, price, VAT and packaging unit. (scopes: read)

Scopes: read

melba_supplying_items_get

read-only

Get supplying item Returns the supplying item whose id is in the path. A supplying item is the purchase terms of a product at one supplier: supplier code, price, VAT and packaging unit. (scopes: read)

Scopes: read

melba_supplying_items_update

destructive

Update Updates the supplying item whose id is in the path with the fields sent in the body and returns it. A supplying item is the purchase terms of a product at one supplier: supplier code, price, VAT and packaging unit. (scopes: write)

Scopes: write

melba_supplying_items_delete

destructive

Delete Deletes the supplying item whose id is in the path. A supplying item is the purchase terms of a product at one supplier: supplier code, price, VAT and packaging unit. (scopes: write)

Scopes: write

system

melba_system_get_root

read-only

API root Checks that the Melba API answers and that the connection is signed in. Returns only the current server time as a Unix timestamp; no kitchen, recipe, stock or organization data. (scopes: read)

Scopes: read

tags

melba_tags_create

Create tag Creates a tag from the fields in the body and returns it. A tag is a colored text label that can be put on products and sale lines. (scopes: write)

Scopes: write

melba_tags_bulk_delete

destructive

Bulk delete Deletes the tags of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds); with no filter, every one of them matches. The call is refused when nothing matches, and when more than 30 match unless count is set to 30 or less, in which case only that page (count rows from offset) is deleted. Returns the outcome, with the errors of any tag that could not be deleted. A tag is a colored text label that can be put on products and sale lines. (scopes: write)

Scopes: write

melba_tags_search

read-only

Search tag Lists the tags of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds), one page at a time (count and offset), sorted by sortBy and sortDirection. Changes nothing. A tag is a colored text label that can be put on products and sale lines. (scopes: read)

Scopes: read

melba_tags_get

read-only

Get tag Returns the tag whose id is in the path. A tag is a colored text label that can be put on products and sale lines. (scopes: read)

Scopes: read

melba_tags_update

destructive

Update tag Updates the tag whose id is in the path with the fields sent in the body and returns it. A tag is a colored text label that can be put on products and sale lines. (scopes: write)

Scopes: write

melba_tags_delete

destructive

Delete tag Deletes the tag whose id is in the path. A tag is a colored text label that can be put on products and sale lines. (scopes: write)

Scopes: write

task

melba_task_used_parcel_labels_add

Add used parcel labels to task Records that the production task in the path used the parcel labels (packaging labels) matching the search filters in the body, by linking them to the task. Returns the updated task. (scopes: write)

Scopes: write

melba_task_used_parcel_labels_delete

destructive

Delete used parcel labels from task Unlinks the parcel labels (packaging labels) matching the search filters in the body from the production task in the path. Deletes neither the task nor the labels. Returns the updated task. (scopes: write)

Scopes: write

tasks

melba_tasks_create

Create task Creates a task from the fields in the body and returns it. A task is a production task: making a given quantity of a product, scheduled or done. (scopes: write) (credits: 10, waived by subscription: recipes_and_sales_premium, traceability_premium; this organization's plans: melba_organizations_plan)

Scopes: write

melba_tasks_bulk_delete

destructive

Bulk delete Deletes the tasks of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds); with no filter, every one of them matches. The call is refused when nothing matches, and when more than 30 match unless count is set to 30 or less, in which case only that page (count rows from offset) is deleted. Returns the outcome, with the errors of any task that could not be deleted. A task is a production task: making a given quantity of a product, scheduled or done. (scopes: write)

Scopes: write

melba_tasks_bulk_update

destructive

Bulk update Changes the quantity, due date or status of every production task matching the search filters in the body. Setting a task to done records the stock movements of that production; setting it back to scheduled reverts them. A finished task's quantity and date cannot change. Returns the tasks, the stock movements and analytics. (scopes: write)

Scopes: write

melba_tasks_reduce_by_stock

destructive

Reduce tasks by stock on hand Lowers the quantity of the unfinished production tasks matching the search filters by what is already in stock, merges tasks of the same recipe, unit and status, and deletes the tasks left with nothing to produce. Records no stock movement. Returns the tasks. (scopes: write) (credits: 1 per created item, waived by subscription: stocks_and_orders_standard; this organization's plans: melba_organizations_plan)

Scopes: write

melba_tasks_destock

Destock Takes the ingredients needed by the production tasks matching the search filters out of stock, recording one stock movement per stock item. Stock never goes below zero and a task is never destocked twice. Returns the stock movements and analytics. (scopes: write) (credits: 1 per created item, waived by subscription: stocks_and_orders_standard; this organization's plans: melba_organizations_plan)

Scopes: write

melba_tasks_duplicate

Duplicate task Copies the production tasks matching the search filters. The copies keep their dates, take a given due date, or are shifted by an offset from the original start date; the originals are unchanged. Returns the new tasks. (scopes: write) (credits: 10 per created item, waived by subscription: recipes_and_sales_premium, traceability_premium; this organization's plans: melba_organizations_plan)

Scopes: write

melba_tasks_export

Export Exports the tasks of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds) to a file in the format given in parameters.format: xls (Excel, the default), csv, json, pdf or html. With parameters.async true, the default, the file is e-mailed to the signed-in user and the answer names the recipient; with false, the file itself is returned. Changes no data. A task is a production task: making a given quantity of a product, scheduled or done. (scopes: write)

Scopes: write

melba_tasks_flatten

destructive

Flatten task Breaks the production tasks matching the search filters down into the sub-recipes they contain: one task per sub-recipe, with the quantities of the same recipe added together. Returns the resulting tasks. (scopes: write)

Scopes: write

melba_tasks_order

Order task Creates supplier order lines for the ingredients of the scheduled production tasks matching the search filters (optionally minus the stock already held), in draft orders grouped by supplier, or added to an existing draft order when merge is set. Nothing is sent to suppliers. Returns the order lines. (scopes: write) (credits: 10 per created item, waived by subscription: stocks_and_orders_standard; this organization's plans: melba_organizations_plan)

Scopes: write

melba_tasks_print

Print task Generates a production sheet for the tasks matching the search filters: the recipes to make with their quantities and, as chosen, pictures, steps and costs. Returns the document, HTML by default or another format through the format option. Changes no data. (scopes: write)

Scopes: write

melba_tasks_restock

Restock Adds what the production tasks matching the search filters produce into stock, recording one stock movement per stock item and creating the stock item of a product that has none. Returns the stock movements and analytics. (scopes: write) (credits: 1 per created item, waived by subscription: stocks_and_orders_standard; this organization's plans: melba_organizations_plan)

Scopes: write

melba_tasks_search

read-only

Search task Lists the tasks of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds), one page at a time (count and offset), sorted by sortBy and sortDirection. Changes nothing. A task is a production task: making a given quantity of a product, scheduled or done. (scopes: read)

Scopes: read

melba_tasks_select

destructive

Select task Copies the production tasks matching the search filters into an existing selection (a saved list of products with quantities) given by destinationSelection, one line per task. With emptyDestination, the selection's current lines are removed first. Returns the selection. (scopes: write)

Scopes: write

melba_tasks_sell

Sell task Turns the production tasks matching the search filters into sale lines, in a new sale or in the sale given by destinationSale, priced from each product's sale item. Stock movements are recorded when that sale is marked sold; the tasks are unchanged. Returns the sale lines, errors per line, stock movements and analytics. (scopes: write)

Scopes: write

melba_tasks_get

read-only

Get task Returns the task whose id is in the path. A task is a production task: making a given quantity of a product, scheduled or done. (scopes: read)

Scopes: read

melba_tasks_update

destructive

Update task Updates the task whose id is in the path with the fields sent in the body and returns it. A task is a production task: making a given quantity of a product, scheduled or done. (scopes: write)

Scopes: write

melba_tasks_delete

destructive

Delete task Deletes the task whose id is in the path. A task is a production task: making a given quantity of a product, scheduled or done. (scopes: write)

Scopes: write

melba_tasks_attach_sale_lines

Link existing sale lines to a production Links existing sale lines (saleLineIds) to the production task in the path and marks them as produced, so production planning no longer proposes them. Moves no stock. Returns the updated task. (scopes: write)

Scopes: write

melba_tasks_detach_sale_lines

destructive

Unlink sale lines from a production Unlinks the sale lines given by saleLineIds from the production task in the path; a line linked to no other task becomes available for production planning again. Deletes neither the task nor the sale lines, and moves no stock. Returns the updated task. (scopes: write)

Scopes: write

units

melba_units_create

Create unit Creates a unit from the fields in the body and returns it. A unit is a unit of measure defined on one product, such as kg, litre, portion or a custom pack, with its conversion to the product's reference unit. (scopes: write)

Scopes: write

melba_units_get

read-only

Get unit Returns the unit whose id is in the path. A unit is a unit of measure defined on one product, such as kg, litre, portion or a custom pack, with its conversion to the product's reference unit. (scopes: read)

Scopes: read

melba_units_update

destructive

Update unit Updates the unit whose id is in the path with the fields sent in the body and returns it. A unit is a unit of measure defined on one product, such as kg, litre, portion or a custom pack, with its conversion to the product's reference unit. (scopes: write)

Scopes: write

melba_units_delete

destructive

Delete unit Deletes the unit whose id is in the path. A unit is a unit of measure defined on one product, such as kg, litre, portion or a custom pack, with its conversion to the product's reference unit. (scopes: write)

Scopes: write

melba_units_convert

read-only

Get unit factor For the unit in the path, lists every unit defined on the same product with its id, name and the conversion factor from that unit. Returns an empty list when the unit belongs to no product. (scopes: read)

Scopes: read

users

melba_users_me

read-only

Get current authenticated user + organization snapshot Returns the signed-in user's profile and a detailed snapshot of the organization (one restaurant or kitchen) currently active for that user. (scopes: read)

Scopes: read

melba_users_create

Create user Invites a person to an organization, the current one unless organizationId is given, with the role given in roleId or, when none is given, the organization's administrator role. A Melba account that already uses this e-mail address is added to the organization; otherwise a new account is created. An invitation e-mail is sent to the person. Returns the user. (scopes: users:write)

Scopes: users:write

melba_users_bulk_delete

destructive

Bulk delete Removes from the current organization the users who are its members and match the search filters in the body (predicates, or the ids listed in includedIds); with no filter, every member matches. Their Melba accounts are not deleted, signed-in users cannot remove themselves. The call is refused when nothing matches, and when more than 30 match unless count is set to 30 or less, in which case only that page (count rows from offset) is removed. Returns the outcome, with the errors of any user that could not be removed. (scopes: users:write)

Scopes: users:write

melba_users_list_views_get

read-only

Get list views Lists the signed-in user's saved list views for the list screen named in the listKey query parameter. A list view is a saved filter, column and sort layout of a list screen. Changes nothing. (scopes: read)

Scopes: read

melba_users_list_views_create

Create list view Saves a new list view for the signed-in user from the body: its list screen, name, columns, filters and sort. Returns the new view. A list view is a saved filter, column and sort layout of a list screen. (scopes: write)

Scopes: write

melba_users_export

Export Exports the users who are members of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds) to a file in the format given in parameters.format: xls (Excel, the default), csv, json, pdf or html. With parameters.async true, the default, the file is e-mailed to the signed-in user and the answer names the recipient; with false, the file itself is returned. Changes no data. A user is a person who signs in to Melba, with name, e-mail and language. (scopes: users:write)

Scopes: users:write

melba_users_search

read-only

Search user Lists the users who are members of the current organization that match the search filters in the body (predicates, or the ids listed in includedIds), one page at a time (count and offset), sorted by sortBy and sortDirection. Changes nothing. A user is a person who signs in to Melba, with name, e-mail and language. (scopes: users:write)

Scopes: users:write

melba_users_get

read-only

Get user Returns the user whose id is in the path. A user is a person who signs in to Melba, with name, e-mail and language. (scopes: read)

Scopes: read

melba_users_update

destructive

Update user Updates the user whose id is in the path and returns the user. The signed-in user may change their own name, e-mail, telephone, language and picture; a new e-mail address takes effect once confirmed through the link mailed to it. A role that manages users may also change the role, language or picture of another member of the current organization, never their name, e-mail or telephone. Nobody changes their own role, and the password is not changed here: each person resets their own in the Melba app. (scopes: users:write)

Scopes: users:write

melba_users_delete

destructive

Delete user Removes the user whose id is in the path from the current organization, or from the organization given in organizationId. The user's Melba account is not deleted, and signed-in users cannot remove themselves from the current organization this way. A user is a person who signs in to Melba, with name, e-mail and language. (scopes: users:write)

Scopes: users:write

melba_users_list_views_update

destructive

Update list view Updates one of the signed-in user's list views, whose id is in the path, with the fields sent in the body and returns it. A list view is a saved filter, column and sort layout of a list screen. (scopes: write)

Scopes: write

melba_users_list_views_delete

destructive

Delete list view Deletes one of the signed-in user's list views, whose id is in the path. A list view is a saved filter, column and sort layout of a list screen. (scopes: write)

Scopes: write

melba_users_list_views_set_default

destructive

Set default list view Makes one of the user's own list views (a saved filter and column layout of a list screen) the default for its list; the view that was default before for that list stops being so. Returns the updated view. (scopes: write)

Scopes: write

Prompts

production

  • Production: planning, tasks, expiry and INCO labels

    Daily planning via the production_plan_day macro (lists the production tasks due on a date and totals their quantities per product and unit), manual production (POST /products/{id}/produce), sub-recipe handling via extractRecipes, expiry-date (DLC) and INCO label generation from composition and allergens.

    melba_production

stocks

  • Stock and inventory: levels, movements, analytics

    Stock level reads (articles and recipes), stock transactions with direction derived from the type (Production restocks, Theft destocks, etc.), restock-before-destock pattern, batch physical inventory via the stock_takeover macro, automatic reordering via the stock_reorder_low macro.

    melba_stocks

data

  • Import: invoices, POS exports, CSV/Excel files

    External data ingestion workflow: paper invoice (photo/PDF) to draft order via the invoice_to_draft_order macro, point-of-sale export to bulk sales, CSV file to new products, recipes or suppliers via the csv_import macro (creation only, no updates). Every batch write has a preview mode.

    melba_import

misc

  • Session dashboard

    Session dashboard: read-only overview of recent anomalies, sales, production, stock and pending tasks, built from the digest, compare and anomalies macros. Mirrors the frontend home screen.

    melba_tableau_de_bord
  • Selections: grouped product catalogues

    Selection management (product sets for a seasonal menu, a supplier catalogue, a children menu, etc.): creation, enrichment by search and add, duplication for the next period, markdown export.

    melba_modeles
  • Articles: creation from instructions or a file

    Creation and management of articles (non-recipe products) from free-form instructions, a packaging photo, a technical-sheet PDF or a supplier CSV catalogue. Covers duplicate detection, category and allergen resolution confirmed by the user, supplier prices (supplyingItems) and sale prices (saleItems). Mirrors the Modals/Articles/Manager.tsx screen.

    melba_articles
  • Recipes: creation from a description, photo or PDF

    Creation and management of recipes from a free-form description (recipe_create_from_text macro), a photo (recipe_create_from_photo macro) or a technical-sheet PDF. Covers the two-step AI mode mirroring the frontend, COGS calculation via the compute_cost macro, per-recipe allergen table, sub-recipes and production via /products/{id}/produce. Mirrors the Modals/Recipes/Manager.tsx screen.

    melba_recettes
  • Orders: creation from instructions, an invoice or a CSV

    Creation and tracking of supplier orders from free-form instructions (orders_create plus order lines), an invoice photo/PDF (invoice_to_draft_order macro), a CSV/Excel file, a pasted email or quote, or automatic reordering. Covers active supplyingItems per supplier, delivery anomalies via the delivery_slip_check macro, and sending to the supplier. Mirrors the Modals/Orders/Create.tsx and OrderLines/Manager.tsx screens.

    melba_commandes
  • Sales: till, quotes, invoices, margin audit

    Sales entry with discount rescaling from 0-100 to 0-1, quotes (status: quote), PDF invoices, period comparison via the sales_compare_periods macro, anomaly detection via the sales_anomalies macro, margin audit via the margin_audit macro. Mirrors Modals/Sales/Manager.tsx.

    melba_ventes
  • Hygiene and traceability: records, temperatures, labels, HACCP

    Hygiene record entry (immutable type, photo, signatory), temperature cycle, parcel and INCO/DLC labels, weekly HACCP audit via the haccp_weekly_report macro. Legal signature (done marker) requires explicit user confirmation. Mirrors Modals/HygieneRecords/Manager.tsx.

    melba_hygiene
  • Settings: categories, clients, suppliers, HACCP, multi-site, zones

    Organization configuration: hierarchical categories, clients, suppliers (minimal creation with name and legalName, then enrichment), HACCP templates with expected ranges, multi-site, hierarchical storage zones. Duplicate check before every create.

    melba_parametres

Resources

  • Units catalogue

    JSON array of every Unit in the organization's catalogue. Each entry carries id, name, symbol and conversion metadata (unit uuids are the ones the mutation tools expect).

    melba://catalogs/units
  • Allergens catalogue

    JSON array of every Allergen tracked by Melba (EU-14 + extras). Each entry carries id, name and i18n keys. The ids are the canonical uuids used on Product and Recipe records.

    melba://catalogs/allergens
  • Status enums

    Static catalogue of status enum values for Sale / Order / Task / Inventory. Hardcoded in the MCP server until the backend exposes a /api/status-values endpoint. Values match the `status` argument of the mutation tools.

    melba://catalogs/status-values
  • Currencies catalogue

    Reference list of currencies known to Melba (ISO 4217 code, name, symbol). Sourced from `GET /config?include=currencies`, with a hardcoded ISO 4217 subset as fallback when the upstream response is empty.

    melba://catalogs/currencies
  • Organizations the current session can access

    JSON array of organizations the authenticated user belongs to. Sourced from POST /organizations/search (count=100, sort=name asc). Requires an authenticated session; anonymous reads fail. Cache is scoped to the session (1h), so a different api key sees a different list.

    melba://catalogs/organizations
  • Top-100 suppliers of the current organization

    JSON listing of the organization's top-100 suppliers (sorted by name asc), via POST /suppliers/search. Organizations with more than 100 suppliers are truncated to the first 100. Cache is session-scoped (1h) because the supplier set is organization-specific.

    melba://catalogs/suppliers
  • Cross-catalog index of products, recipes and suppliers

    Aggregated index of products + recipes + suppliers (cap 5 000 items) — each entry carries kind, id, name, aliases, tags. Session-cached 1h.

    melba://catalogs/full-index
  • Last 7 days of operational anomalies

    Aggregated "what is wrong this week" signal — HACCP failed records + delivery anomalies from the last 7 days, in a single payload. Session-cached 1h.

    melba://catalogs/recent-anomalies