MaterialsHub
REST APIs, webhooks, public endpoints

Plug MaterialsHub into the systems you already run

Documented REST APIs, signed outbound webhooks and two key-less public endpoints, so your ERP, website or spreadsheet works from the same data as your team.

MaterialsHub runs on two APIs you can call directly: MIVAA, the backend that processes supplier PDFs, runs the material search and serves the price, mention and job tracking APIs, and the Supabase API over your own workspace data, with row-level security on every request. Outbound webhooks push 27 event types to your own endpoints, and the public Jobs and Price APIs answer without any key.

A paid invoice, delivered to your ERPSee it run
Webhook · invoice_paid → your HTTPS endpoint
Event fired
Signed POST
Signature verified
Duplicates dropped
Posted to ERP
Webhook · invoice_paid → your HTTPS endpoint
Delivered · HTTP 200 in the delivery log
01 / What it does

API & Integrations, in practice

Stop exporting spreadsheets between systems: your ERP hears about a paid invoice the moment it is paid, your website shows a live market price, and your careers page lists open roles — each from one documented call.

01 / 04

Hear the moment money moves

Webhooks post a signed JSON payload when an invoice is paid, a payment arrives, an order ships or a quote is approved — straight into your ERP, Zapier or Make scenario.

Each POST carries event, timestamp, signature and a stable delivery id.

02 / 04

Show a live market price anywhere

The public price API returns the median, lowest and highest price for a product query, each with its retailer, with no key — and never a zero standing in for unknown.

Choose which figure answers: verified in stock, median, lowest or highest.

03 / 04

Read and write your own records safely

The REST API runs every request as the caller under row-level security, so an integration sees exactly your workspace's rows and nothing more.

The anon key is not a master key; your session token grants access.

04 / 04

Build against a spec that cannot drift

Swagger, ReDoc and OpenAPI are generated from the running service, and every edge function and action is in one machine-readable spec.

132 edge functions and 584 actions in one OpenAPI document.

Outbound webhooksHMAC-SHA256 signaturesDelivery log and retriesSupabase REST APIRow-level securityRealtime subscriptionsMIVAA catalogue processingPrice and mention tracking APIskai_ partner keysPublic price APIPublic Jobs APILive OpenAPI specs
02 / How it works
01

Choose

Pick the surface: webhooks to listen, REST to read and write, public endpoints for prices and open roles.

  • Use the Supabase API for your own records and for realtime changes; use MIVAA for catalogue processing, search and tracking.
  • To publish open roles or show a market price, the public endpoints are a plain GET.
02

Authenticate

Generate a kai_ partner key or sign in for a session token — the public endpoints need neither.

  • kai_ keys are generated in Profile → Subscription → API Keys and act for the workspace that owns them.
  • A session JWT comes from signing in through Auth and is sent as a bearer token with the public anon key.
03

Build

Try every endpoint in Swagger first, then watch real deliveries arrive in the webhook log.

  • Swagger's Try it out shows the exact request and response for every endpoint before you write code.
  • The webhook delivery log lists every attempt with its status and HTTP code, kept for 30 days.
03 / Going deeper

Documented REST APIs, signed outbound webhooks and two key-less public endpoints, so your ERP, website or spreadsheet works from the same data as your team.

01Listen

Your systems hear about it the moment it happens

Register an HTTPS endpoint, tick the events it should receive and the platform posts a signed JSON payload as each one occurs: an invoice issued or paid, a payment received, an order dispatched, a quote approved, stock running low. There are 27 event types and deliberately no «all events» option, so you receive exactly what you subscribe to. Each delivery carries a stable id for de-duplication, and the delivery log shows every attempt for 30 days.

  • 27 event types, up to 10 endpoints
  • HMAC-SHA256 signature on every POST
  • Retries, auto-disable and a 30-day log
02Read and write

Your own data, behind row-level security

The Supabase API is REST over your workspace's tables, with authentication, file storage, realtime and the edge functions behind the platform's actions. Every request runs as the caller and is filtered by row-level security, so an integration sees exactly your rows and none you could bypass. When the platform should do heavy work, MIVAA processes a supplier PDF into structured products, runs the material search and serves the price, mention and job tracking APIs.

  • REST, auth, storage and realtime
  • Row-level security on every request
  • Catalogue processing and search on MIVAA
03No key at all

Public endpoints for prices and open roles

Two endpoints answer without any credential. The price endpoint takes a product query and returns the median, lowest and highest price, each with its retailer, plus a status that never passes off unknown as zero; anonymous callers get 30 requests a minute. The Jobs API lists the roles you publish from HR, only while they are open, each with a direct link to its posting and an updated time for incremental polling.

  • Median, lowest and highest with the retailer
  • Refreshed every 15 days, hourly with a key
  • Open roles with a link to apply
04 / In depth

Two APIs, one rule of thumb

Choosing the wrong API costs a week of integration work. The Supabase API is the data layer: REST over your tables, authentication, file storage, realtime and the edge functions behind the platform's actions, such as issuing an invoice or sending email. Use it for your own data and for reacting to changes. MIVAA is the Python backend that does the heavy work: processing a supplier PDF into structured products, running the multi-vector material search, and serving the partner tracking APIs for prices, brand mentions and jobs.

Webhooks your receiver can trust

An ERP that posts a payment on a forged message is worse than one that waits. Every webhook is an HTTPS POST signed with HMAC-SHA256 over the timestamp and the raw body, with a delivery id that stays the same across retries so you can de-duplicate. Endpoints are checked against internal addresses at registration and again at delivery. The signing secret is shown once and rotating it invalidates the old one immediately. Failed deliveries retry with increasing delays, and a run of failures disables the endpoint with a visible reason.

Public endpoints that never fake a number

A price shown on your website has to be right or absent. The public price endpoint returns the whole band for a product query — median, lowest and highest, each with its retailer — and a status of ok, no data, not collected or collector failed, never a zero meant as unknown. Without a key, a price is refreshed every 15 days; a kai_ key's own interval goes down to hourly. The Jobs API lists the roles you publish from HR, only while they are open, with a direct link to each posting.

05 / Before and after

The same job, done two ways.

01
A customer pays
Without MaterialsHub

Someone re-enters the payment in the ERP

With MaterialsHub

A signed invoice_paid webhook posts it automatically

02
Market price on your website
Without MaterialsHub

Copied by hand and out of date in a week

With MaterialsHub

A public GET returns the band and its retailers

03
Open roles on your site
Without MaterialsHub

Retyped from the careers page

With MaterialsHub

The Jobs API feed, rendered at build time

04
Integration reference
Without MaterialsHub

A PDF that drifted from the real API

With MaterialsHub

Swagger, ReDoc and OpenAPI generated from the running service

05
Trusting a webhook
Without MaterialsHub

Any POST to the URL is believed

With MaterialsHub

Signature, timestamp and delivery id checked

06 / Use cases

Where API & Integrations earns its place

01 / 03

Notify your ERP when a customer pays

Subscribe an endpoint to invoice_paid and payment_received, verify each signature against the raw body and post the payment into your books.

02 / 03

A live «from €X» on your site

Call the public price endpoint with the product name and show the lowest or median price with the retailer it came from — no account needed.

03 / 03

Open roles on your own careers page

Fetch the Jobs API at build time, render each role and link it to its posting, where the apply form lives.

07 / Who it's for

API & Integrations is built for the people who specify, buy and sell materials.

Documented REST APIs, signed outbound webhooks and two key-less public endpoints, so your ERP, website or spreadsheet works from the same data as your team.

Developers and integrators

Businesses running an ERP or webshop

No-code automation builders

08 / Questions

Frequently asked

Do the public endpoints need a key?+

No. The Jobs API and the Price API are public GET requests. Anonymous price calls are limited to 30 a minute per IP; send a kai_ key and that key's own limit and refresh interval apply instead.

Does calling the API cost credits?+

Partner API calls are metered: billable operations debit credits from the key owner's balance, and each endpoint documents its cost. A public price call never triggers a paid scan, so it stays free to call.

How do I verify a webhook delivery?+

Recompute HMAC-SHA256 with your signing secret over the timestamp, a dot and the exact raw body, compare it with the X-MaterialKai-Signature header, reject a timestamp more than a few minutes old, and de-duplicate on X-MaterialKai-Delivery.

Which events can I subscribe to?+

27 event types across invoicing and payments, orders, quotes and contracts, purchasing and RFQs, inventory, CRM, projects and bookings — for example invoice_paid, order_dispatched, quote_approved and inventory_low_stock. There is deliberately no «all events» option, and a workspace can have up to 10 endpoints.

Can an integration see another workspace's data?+

No. Every Supabase request runs as the caller and is filtered by row-level security. The public anon key only identifies the project and sees only what is public; your session token is what grants your workspace's rows.

Where is the full reference?+

The MIVAA API publishes Swagger at v1api.materialshub.gr/docs, ReDoc at /redoc and the OpenAPI spec at /openapi.json, all generated from the running service. The edge functions — 132 functions and 584 actions — are in one OpenAPI spec of their own.