Mouderly API v1

Introduction

A store, a mobile point of sale, or another application can build on Mouderly. It reads the catalog and the customers, then creates orders, delivery receipts, and invoices. Mouderly keeps the stock, the prices, and the documents.

Example: connect Mouderly, through this API, to the other applications in the company, such as an ERP or an automation tool like n8n or Zapier.

Example: A sale from a store or a mobile point of sale
Your applicationtoMouderly
  1. 1 Read the catalogProducts, prices, stock
  2. 2 Find or create the customerCustomer
  3. 3 Create the orderOrder
  4. 4 Create the delivery receiptDelivery receipt
  5. 5 Create the invoiceInvoice

Authentication

An owner or admin creates the key in Settings → API keys. Send that key as a bearer token, and send the tenant host in X-domain. A key is limited to 60 requests per minute.

Base URL

https://api.mouderly.com
https://api.mouderly.com

Scopes

catalog:readProduct groups, VAT rates, products
customers:readList and get customers
customers:writeCreate a customer
orders:readOrders, statuses, currencies
orders:writeCreate an order, set its status
delivery-receipts:readList and get delivery receipts
delivery-receipts:writeCreate a delivery receipt from an order
invoices:readList and get invoices
invoices:writeCreate an invoice from an order or a delivery receipt
GET/api/v1

API scope

Returns the name, the scopes on this key, and expires_at. expires_at is null when the key never expires.

Request
GET /api/v1
Authorization: Bearer {token}
X-domain: acme.mouderly.com
Response 200
{
  "data": {
    "name": "Online shop",
    "scopes": ["catalog:read", "customers:read", "orders:write"],
    "expires_at": "2026-03-05T12:00:00+00:00"
  }
}

Reference data

Product groups, products, customers, orders, delivery receipts, and invoices are paged. page defaults to 1. per_page defaults to 25 and cannot be greater than 100. VAT rates, order statuses, and currencies come back in full.

GET/api/v1/product-groups

List product groups

catalog:read

Paged. Use an id from here as product_group_id on the product list.

Request
GET /api/v1/product-groups?page=1&per_page=25
Authorization: Bearer {token}
X-domain: acme.mouderly.com
Response 200
{
  "data": [
    { "id": "33333333-3333-4333-8333-333333333333", "name": "Drinks" }
  ],
  "meta": {
    "current_page": 1,
    "last_page": 1,
    "per_page": 25,
    "total": 1
  }
}
GET/api/v1/vats

List VAT rates

catalog:read

The full list. A product returns the code and the rate, not this id.

Request
GET /api/v1/vats
Authorization: Bearer {token}
X-domain: acme.mouderly.com
Response 200
{
  "data": [
    { "id": "99999999-9999-4999-8999-999999999999", "vat_code": "STANDARD", "vat_rate": "20.00" }
  ]
}
GET/api/v1/order-statuses

List order statuses

orders:read

Names are English. invoiced is in the list, and only Mouderly sets it.

Request
GET /api/v1/order-statuses
Authorization: Bearer {token}
X-domain: acme.mouderly.com
Response 200
{
  "data": [
    { "key": "draft", "name": "Draft" },
    { "key": "approved", "name": "Approved" },
    { "key": "accepted", "name": "Accepted" },
    { "key": "in_progress", "name": "In progress" },
    { "key": "partial", "name": "Partial" },
    { "key": "delivered", "name": "Delivered" },
    { "key": "invoiced", "name": "Invoiced" }
  ]
}
GET/api/v1/currencies

List currencies

orders:read

Use the id when you create an order. rate is how many units of the default currency equal 1 unit of this currency.

Request
GET /api/v1/currencies
Authorization: Bearer {token}
X-domain: acme.mouderly.com
Response 200
{
  "data": [
    {
      "id": "55555555-5555-4555-8555-555555555555",
      "code": "MAD",
      "name": "Moroccan Dirham",
      "rate": "1.0000",
      "default": true
    }
  ]
}

Products

price is null when the user who created the key cannot see sale prices. Filter the list with product_group_id from the product groups call.

GET/api/v1/products

List products

catalog:read

Paged. Omit product_group_id to list every product.

Request
GET /api/v1/products?product_group_id=33333333-3333-4333-8333-333333333333&page=1&per_page=25
Authorization: Bearer {token}
X-domain: acme.mouderly.com
Response 200
{
  "data": [
    {
      "id": "11111111-1111-4111-8111-111111111111",
      "code": "WATER-1",
      "name": "Water",
      "price": "12.00",
      "quantity": "5.00",
      "vat": { "vat_code": "STANDARD", "vat_rate": "20.00" },
      "unit": { "code": "unit", "name": "Units" },
      "product_group": { "id": "33333333-3333-4333-8333-333333333333", "name": "Drinks" },
      "variants": [
        {
          "id": "22222222-2222-4222-8222-222222222222",
          "code": "WATER-1-S",
          "name": "Small",
          "price": "12.00",
          "quantity": "2.00"
        }
      ]
    }
  ],
  "meta": {
    "current_page": 1,
    "last_page": 1,
    "per_page": 25,
    "total": 1
  }
}
GET/api/v1/products/{id}

Get a product

catalog:read

Includes variants, the sale price, and the quantity available to sell.

Request
GET /api/v1/products/11111111-1111-4111-8111-111111111111
Authorization: Bearer {token}
X-domain: acme.mouderly.com
Response 200
{
  "data": {
    "id": "11111111-1111-4111-8111-111111111111",
    "code": "WATER-1",
    "name": "Water",
    "price": "12.00",
    "quantity": "5.00",
    "vat": { "vat_code": "STANDARD", "vat_rate": "20.00" },
    "unit": { "code": "unit", "name": "Units" },
    "product_group": { "id": "33333333-3333-4333-8333-333333333333", "name": "Drinks" },
    "variants": [
      {
        "id": "22222222-2222-4222-8222-222222222222",
        "code": "WATER-1-S",
        "name": "Small",
        "price": "12.00",
        "quantity": "2.00"
      }
    ]
  }
}

Customers

Customers are client accounts. Suppliers and prospects are not included. Mouderly assigns the code.

GET/api/v1/customers

List customers

customers:read

Paged. Suppliers and prospects are left out.

Request
GET /api/v1/customers?page=1&per_page=25
Authorization: Bearer {token}
X-domain: acme.mouderly.com
Response 200
{
  "data": [
    {
      "id": "44444444-4444-4444-8444-444444444444",
      "code": "C-0001",
      "name": "Cafe Atlas",
      "email": "[email protected]",
      "phone": "+212612345678",
      "address": "12 rue des Orangers",
      "city": "Casablanca"
    }
  ],
  "meta": {
    "current_page": 1,
    "last_page": 1,
    "per_page": 25,
    "total": 1
  }
}
GET/api/v1/customers/{id}

Get a customer

customers:read

The public fields only.

Request
GET /api/v1/customers/44444444-4444-4444-8444-444444444444
Authorization: Bearer {token}
X-domain: acme.mouderly.com
Response 200
{
  "data": {
    "id": "44444444-4444-4444-8444-444444444444",
    "code": "C-0001",
    "name": "Cafe Atlas",
    "email": "[email protected]",
    "phone": "+212612345678",
    "address": "12 rue des Orangers",
    "city": "Casablanca"
  }
}
POST/api/v1/customers

Create a customer

customers:write

Request
POST /api/v1/customers
Authorization: Bearer {token}
X-domain: acme.mouderly.com
Content-Type: application/json

{
  "name": "Cafe Atlas",
  "email": "[email protected]",
  "phone": "+212612345678",
  "address": "12 rue des Orangers",
  "city": "Casablanca"
}
Response 201
{
  "data": {
    "id": "44444444-4444-4444-8444-444444444444",
    "code": "C-0001",
    "name": "Cafe Atlas",
    "email": "[email protected]",
    "phone": "+212612345678",
    "address": "12 rue des Orangers",
    "city": "Casablanca"
  },
  "message": "Customer created."
}

Orders

Send a customer id, a currency id, and at least one line. A line is a product id, an optional variant id, and a quantity. Price, VAT, and unit come from the product. Creating an order does not create a delivery receipt or an invoice. The list omits the lines. You cannot set the status to invoiced, and an invoiced order cannot be changed.

GET/api/v1/orders

List orders

orders:read

Paged. Lines are not included.

Request
GET /api/v1/orders?page=1&per_page=25
Authorization: Bearer {token}
X-domain: acme.mouderly.com
Response 200
{
  "data": [
    {
      "id": "66666666-6666-4666-8666-666666666666",
      "code": "C-0001",
      "status": "draft",
      "issue_date": "2026-12-05",
      "customer": { "id": "44444444-4444-4444-8444-444444444444", "code": "C-0001", "name": "Cafe Atlas" },
      "currency": { "code": "MAD", "rate": "1.0000" },
      "total_excluding_vat": "24.00",
      "total_vat": "4.80",
      "total_including_vat": "28.80"
    }
  ],
  "meta": {
    "current_page": 1,
    "last_page": 1,
    "per_page": 25,
    "total": 1
  }
}
GET/api/v1/orders/{id}

Get an order

orders:read

Includes the lines.

Request
GET /api/v1/orders/66666666-6666-4666-8666-666666666666
Authorization: Bearer {token}
X-domain: acme.mouderly.com
Response 200
{
  "data": {
    "id": "66666666-6666-4666-8666-666666666666",
    "code": "C-0001",
    "status": "draft",
    "issue_date": "2026-12-05",
    "customer": { "id": "44444444-4444-4444-8444-444444444444", "code": "C-0001", "name": "Cafe Atlas" },
    "currency": { "code": "MAD", "rate": "1.0000" },
    "total_excluding_vat": "24.00",
    "total_vat": "4.80",
    "total_including_vat": "28.80",
    "items": [
      {
        "product_id": "11111111-1111-4111-8111-111111111111",
        "variant_id": "22222222-2222-4222-8222-222222222222",
        "code": "WATER-1",
        "name": "Small",
        "quantity": "2.00",
        "price": "12.00",
        "vat_rate": "20.00"
      }
    ]
  }
}
POST/api/v1/orders

Create an order

orders:write

Status starts as draft. The code and the date are assigned by Mouderly.

Request
POST /api/v1/orders
Authorization: Bearer {token}
X-domain: acme.mouderly.com
Content-Type: application/json

{
  "customer_id": "44444444-4444-4444-8444-444444444444",
  "currency_id": "55555555-5555-4555-8555-555555555555",
  "items": [
    { "product_id": "11111111-1111-4111-8111-111111111111", "variant_id": "22222222-2222-4222-8222-222222222222", "quantity": 2 }
  ]
}
Response 201
{
  "data": {
    "id": "66666666-6666-4666-8666-666666666666",
    "code": "C-0001",
    "status": "draft",
    "issue_date": "2026-12-05",
    "customer": { "id": "44444444-4444-4444-8444-444444444444", "code": "C-0001", "name": "Cafe Atlas" },
    "currency": { "code": "MAD", "rate": "1.0000" },
    "total_excluding_vat": "24.00",
    "total_vat": "4.80",
    "total_including_vat": "28.80",
    "items": [
      {
        "product_id": "11111111-1111-4111-8111-111111111111",
        "variant_id": "22222222-2222-4222-8222-222222222222",
        "code": "WATER-1",
        "name": "Small",
        "quantity": "2.00",
        "price": "12.00",
        "vat_rate": "20.00"
      }
    ]
  },
  "message": "Order created."
}
PUT/api/v1/orders/{id}/status

Set the status

orders:write

Allowed values.

Request
PUT /api/v1/orders/66666666-6666-4666-8666-666666666666/status
Authorization: Bearer {token}
X-domain: acme.mouderly.com
Content-Type: application/json

{
  "status": "draft"
}
Response 200
{
  "data": {
    "id": "66666666-6666-4666-8666-666666666666",
    "code": "C-0001",
    "status": "draft",
    "issue_date": "2026-12-05",
    "customer": { "id": "44444444-4444-4444-8444-444444444444", "code": "C-0001", "name": "Cafe Atlas" },
    "currency": { "code": "MAD", "rate": "1.0000" },
    "total_excluding_vat": "24.00",
    "total_vat": "4.80",
    "total_including_vat": "28.80",
    "items": [
      {
        "product_id": "11111111-1111-4111-8111-111111111111",
        "variant_id": "22222222-2222-4222-8222-222222222222",
        "code": "WATER-1",
        "name": "Small",
        "quantity": "2.00",
        "price": "12.00",
        "vat_rate": "20.00"
      }
    ]
  },
  "message": "Order status updated."
}

Delivery receipts

A delivery receipt is created from an order and starts as draft. An order that was already converted is rejected.

GET/api/v1/delivery-receipts

List delivery receipts

delivery-receipts:read

Paged. Same document shape as an order, without the lines.

Request
GET /api/v1/delivery-receipts?page=1&per_page=25
Authorization: Bearer {token}
X-domain: acme.mouderly.com
Response 200
{
  "data": [
    {
      "id": "77777777-7777-4777-8777-777777777777",
      "code": "BL-0001",
      "status": "draft",
      "issue_date": "2026-12-05",
      "customer": { "id": "44444444-4444-4444-8444-444444444444", "code": "C-0001", "name": "Cafe Atlas" },
      "currency": { "code": "MAD", "rate": "1.0000" },
      "total_excluding_vat": "24.00",
      "total_vat": "4.80",
      "total_including_vat": "28.80"
    }
  ],
  "meta": {
    "current_page": 1,
    "last_page": 1,
    "per_page": 25,
    "total": 1
  }
}
GET/api/v1/delivery-receipts/{id}

Get a delivery receipt

delivery-receipts:read

Includes the lines.

Request
GET /api/v1/delivery-receipts/77777777-7777-4777-8777-777777777777
Authorization: Bearer {token}
X-domain: acme.mouderly.com
Response 200
{
  "data": {
    "id": "77777777-7777-4777-8777-777777777777",
    "code": "BL-0001",
    "status": "draft",
    "issue_date": "2026-12-05",
    "customer": { "id": "44444444-4444-4444-8444-444444444444", "code": "C-0001", "name": "Cafe Atlas" },
    "currency": { "code": "MAD", "rate": "1.0000" },
    "total_excluding_vat": "24.00",
    "total_vat": "4.80",
    "total_including_vat": "28.80",
    "items": [
      {
        "product_id": "11111111-1111-4111-8111-111111111111",
        "variant_id": "22222222-2222-4222-8222-222222222222",
        "code": "WATER-1",
        "name": "Small",
        "quantity": "2.00",
        "price": "12.00",
        "vat_rate": "20.00"
      }
    ]
  }
}
POST/api/v1/orders/{id}/delivery-receipts

Create a delivery receipt

delivery-receipts:write

Converts the order. A second conversion of the same order returns 403.

Request
POST /api/v1/orders/66666666-6666-4666-8666-666666666666/delivery-receipts
Authorization: Bearer {token}
X-domain: acme.mouderly.com
Response 201
{
  "data": {
    "id": "77777777-7777-4777-8777-777777777777",
    "code": "BL-0001",
    "status": "draft",
    "issue_date": "2026-12-05",
    "customer": { "id": "44444444-4444-4444-8444-444444444444", "code": "C-0001", "name": "Cafe Atlas" },
    "currency": { "code": "MAD", "rate": "1.0000" },
    "total_excluding_vat": "24.00",
    "total_vat": "4.80",
    "total_including_vat": "28.80",
    "items": [
      {
        "product_id": "11111111-1111-4111-8111-111111111111",
        "variant_id": "22222222-2222-4222-8222-222222222222",
        "code": "WATER-1",
        "name": "Small",
        "quantity": "2.00",
        "price": "12.00",
        "vat_rate": "20.00"
      }
    ]
  },
  "message": "Delivery receipt created."
}

Invoices

An invoice comes from an order or from a delivery receipt. There is no call that starts an invoice from nothing. An invoice created from an order starts as draft and the order becomes invoiced. An invoice created from a delivery receipt is approved, partial, or paid from the payments already collected.

GET/api/v1/invoices

List invoices

invoices:read

Paged. Same document shape as an order, without the lines.

Request
GET /api/v1/invoices?page=1&per_page=25
Authorization: Bearer {token}
X-domain: acme.mouderly.com
Response 200
{
  "data": [
    {
      "id": "88888888-8888-4888-8888-888888888888",
      "code": "FA-0001",
      "status": "approved",
      "issue_date": "2026-12-05",
      "customer": { "id": "44444444-4444-4444-8444-444444444444", "code": "C-0001", "name": "Cafe Atlas" },
      "currency": { "code": "MAD", "rate": "1.0000" },
      "total_excluding_vat": "24.00",
      "total_vat": "4.80",
      "total_including_vat": "28.80"
    }
  ],
  "meta": {
    "current_page": 1,
    "last_page": 1,
    "per_page": 25,
    "total": 1
  }
}
GET/api/v1/invoices/{id}

Get an invoice

invoices:read

Includes the lines.

Request
GET /api/v1/invoices/88888888-8888-4888-8888-888888888888
Authorization: Bearer {token}
X-domain: acme.mouderly.com
Response 200
{
  "data": {
    "id": "88888888-8888-4888-8888-888888888888",
    "code": "FA-0001",
    "status": "approved",
    "issue_date": "2026-12-05",
    "customer": { "id": "44444444-4444-4444-8444-444444444444", "code": "C-0001", "name": "Cafe Atlas" },
    "currency": { "code": "MAD", "rate": "1.0000" },
    "total_excluding_vat": "24.00",
    "total_vat": "4.80",
    "total_including_vat": "28.80",
    "items": [
      {
        "product_id": "11111111-1111-4111-8111-111111111111",
        "variant_id": "22222222-2222-4222-8222-222222222222",
        "code": "WATER-1",
        "name": "Small",
        "quantity": "2.00",
        "price": "12.00",
        "vat_rate": "20.00"
      }
    ]
  }
}
POST/api/v1/orders/{id}/invoice

Create an invoice from an order

invoices:write

The new invoice is draft. The order status becomes invoiced.

Request
POST /api/v1/orders/66666666-6666-4666-8666-666666666666/invoice
Authorization: Bearer {token}
X-domain: acme.mouderly.com
Response 201
{
  "data": {
    "id": "88888888-8888-4888-8888-888888888888",
    "code": "FA-0001",
    "status": "draft",
    "issue_date": "2026-12-05",
    "customer": { "id": "44444444-4444-4444-8444-444444444444", "code": "C-0001", "name": "Cafe Atlas" },
    "currency": { "code": "MAD", "rate": "1.0000" },
    "total_excluding_vat": "24.00",
    "total_vat": "4.80",
    "total_including_vat": "28.80",
    "items": [
      {
        "product_id": "11111111-1111-4111-8111-111111111111",
        "variant_id": "22222222-2222-4222-8222-222222222222",
        "code": "WATER-1",
        "name": "Small",
        "quantity": "2.00",
        "price": "12.00",
        "vat_rate": "20.00"
      }
    ]
  },
  "message": "Invoice created."
}
POST/api/v1/delivery-receipts/{id}/invoice

Create an invoice from a delivery receipt

invoices:write

The invoice status follows the payments already collected. The receipt becomes invoiced.

Request
POST /api/v1/delivery-receipts/77777777-7777-4777-8777-777777777777/invoice
Authorization: Bearer {token}
X-domain: acme.mouderly.com
Response 201
{
  "data": {
    "id": "88888888-8888-4888-8888-888888888888",
    "code": "FA-0001",
    "status": "approved",
    "issue_date": "2026-12-05",
    "customer": { "id": "44444444-4444-4444-8444-444444444444", "code": "C-0001", "name": "Cafe Atlas" },
    "currency": { "code": "MAD", "rate": "1.0000" },
    "total_excluding_vat": "24.00",
    "total_vat": "4.80",
    "total_including_vat": "28.80",
    "items": [
      {
        "product_id": "11111111-1111-4111-8111-111111111111",
        "variant_id": "22222222-2222-4222-8222-222222222222",
        "code": "WATER-1",
        "name": "Small",
        "quantity": "2.00",
        "price": "12.00",
        "vat_rate": "20.00"
      }
    ]
  },
  "message": "Invoice created."
}

Errors

A missing or expired key returns 401. A login token, or a key without the scope, returns 403. An unknown id returns 404. A wrong method returns 405 with the message “This method is not supported.” A rejected value returns 422.

GET/api/v1

Missing key

No bearer token, an unknown key, or an expired key.

Request
GET /api/v1
X-domain: acme.mouderly.com
Response 401
{
  "message": "Unauthenticated."
}
POST/api/v1/orders

Missing scope

orders:write

The key is valid and does not include the scope this call needs.

Request
POST /api/v1/orders
Authorization: Bearer {token}
X-domain: acme.mouderly.com
Response 403
{
  "message": "This API key does not include orders:write."
}
GET/api/v1/orders/{id}

Unknown resource

orders:read

The id is missing or is not a uuid.

Request
GET /api/v1/orders/not-an-order
Authorization: Bearer {token}
X-domain: acme.mouderly.com
Response 404
{
  "message": "Not found."
}
PUT/api/v1/orders/{id}/status

Rejected value

orders:write

invoiced cannot be sent. The order status stays unchanged.

Request
PUT /api/v1/orders/66666666-6666-4666-8666-666666666666/status
Authorization: Bearer {token}
X-domain: acme.mouderly.com
Content-Type: application/json

{
  "status": "invoiced"
}
Response 422
{
  "message": "status must be draft, approved, accepted, in_progress, partial, or delivered.",
  "errors": {
    "status": [
      "status must be draft, approved, accepted, in_progress, partial, or delivered."
    ]
  }
}
Mouderly
Devinweb, Avenue Ali Yaeta, Wilaya Center, n31, Tetuan, Morocco.
Conditions
Company

Copyright © 2026 Mouderly. All rights reserved.