Developer documentation
Build on Morffeus.
Connect your ERP, warehouse, POS or storefront to the platform your business already runs on. One JSON API, one token for your whole app, and your own references on every record so nothing in your systems has to change.
Start here
Three steps from an empty terminal to your first stock update. Ten minutes if the token is ready.
Get an API token
In Admin, open User › Tokens and create a token. A token belongs to your user and works for the whole app you are integrating. Use a separate token for every system that talks to us, so you can revoke one without touching the others.
AuthenticationMake your first request
Every call goes to https://api.morffeus.com/api/v2 with an Authorization: Bearer header. Start with GET /products to see your catalog the way the API sees it. Responses are JSON with the payload under data.
Push your first update
Send a stock change with PUT /int/stocks. Rows match your variants by code, barcode or your own external_ref, and your warehouse by its code. The quantity you send is added to what the warehouse holds.
# list five products of the app the token belongs to curl "https://api.morffeus.com/api/v2/products?limit=5" \ -H "Authorization: Bearer $MORFFEUS_TOKEN" \ -H "Accept: application/json"
const res = await fetch('https://api.morffeus.com/api/v2/products?limit=5', { headers: { Authorization: `Bearer ${process.env.MORFFEUS_TOKEN}` } }); const { data } = await res.json(); console.log(data.products[0].code);
$ch = curl_init('https://api.morffeus.com/api/v2/products?limit=5'); curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Authorization: Bearer ' . getenv('MORFFEUS_TOKEN'), 'Accept: application/json', ]); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $products = json_decode(curl_exec($ch), true)['data']['products'];
{
"data": {
"products": [
{
"id": 48213,
"code": "SKU-1001",
"slug": "espresso-beans-1-kg",
"variants": [
{ "id": 91120, "code": "SKU-1001", "barcode": "8600123456789", "external_ref": "ERP-778", … }
],
"prices": [ { "price": 1890.0, … } ],
…
},
…
],
"product_attributes": [ … ],
"product_data_values": [ … ]
}
}
Two APIs, one platform
Same host, same token format, same JSON. They differ in who calls them and what they are for.
Your systems talk to Morffeus
For the ERP, the warehouse, accounting and the POS. Push products, prices, attributes, stock, completed orders, customers and cards in bulk. Writes are matched by your own references, so you never need our ids.
- Products
- Attributes
- Catalogs
- Stock
- Warehouses
- Orders
- Customers
- Cards
- Locations
/api/v2/int/*You build the app or the site
For a custom web shop, a mobile app or a kiosk. Catalog and search, server-side basket, checkout and payments, the customer account, wallets and benefits, bookings. The same API our Quest sites and Flutter apps use every day.
- Sessions
- Catalog & search
- Basket
- Checkout
- Payments
- Account
- Wallets
- Bookings
/api/v2/session/*Integration API reference
The endpoints most integrations need. Each page has the object, every field, request and response samples, and the errors you can get back.
Products
Products, variants, prices and images. Create or update in bulk from your ERP.
Product attributes
Colour, size, material, brand. Define attributes once and assign values per product.
Stock
Quantity per variant per warehouse. Push changes and counts from your WMS, read totals across warehouses.
Orders
Completed receipts from your POS or web shop, with lines, payments and the loyalty card that earned points.
Customers
Profiles, contact data, consents and your own customer reference. Read and update.
Cards
Loyalty cards and their numbers. Import an existing card base or issue cards from your POS.
Locations
Stores and pickup points with opening hours and coordinates, linked to the warehouses that serve them.
Webhooks soon
Get called when an order is placed, a payment settles or a customer joins the programme.
Essentials
The four things every integration has to get right. Each has its own page.
Base URL
https://api.morffeus.com/api/v2A staging app for testing is arranged with us.
Authentication
Authorization: Bearer <token>Belongs to a user, works for one app. Created and revoked in User › Tokens.
Errors
{ "errors": { "field": "message" } }HTTP status tells you what kind. The body tells you which field.
Bulk endpoints
Lists, not loopsProducts, stock, attributes, locations and orders go in as lists, so a sync is a few calls, not thousands.
Guides
End to end, in the order a real integration happens. Each guide names the endpoints, the matching rules and the mistakes we see most.
Sync your catalog from an ERP
Products, variants, prices, attributes and images. Full load first, then deltas.
Keep stock in sync
Snapshots against movements, one warehouse or many, minimum quantities and what the storefront shows.
Send orders from your POS
Completed receipts with lines, payments and the loyalty card, so points and savings land on the customer.
Import customers and cards
Bring an existing card base over without losing history. Matching, consents and duplicates.
Build your own storefront
Sign a customer in, search the catalog, hold a basket on the server and pay. The path our own apps take.
Go-live checklist
Staging first, tokens per system, retries, monitoring and who to call when something looks wrong.
What changed
Every addition and every deprecation, dated.
GET /stocks/aggregate returns on-hand, reserved and available stock per variant and per store.AddedPUT /int/stocks changes stock per variant and warehouse, matched by your codes. min_qty sets the minimum of a new stock row.AddedPOST /stock/reconcile sets a warehouse to the quantities you counted, in one stock movement.Added