Inventory

Purpose

This API allows you to retrieve your current warehouse inventory from FMT Bree.

Two views are available:

The API supports both JSON and XML.

What You Need Before You Start

FMT Bree will provide:

Authentication

Every request must include your customer API key.

Preferred method:

X-API-Key: your-api-key-here

Fallback method:

?api_key=your-api-key-here

The query parameter is supported for systems that cannot send custom headers, but the header is recommended because it is safer.

Response Format

You can request JSON or XML.

JSON

Send this header:

Accept: application/json

XML

Send this header:

Accept: application/xml

Optional format parameter

You can also force the format with:

?format=json

or:

?format=xml

If both are used, the format query parameter takes precedence.

Endpoints

1. Detailed inventory

Returns your current stock per pallet.

GET /api/customer/inventory

Example:

curl -X GET "https://wms.fmtbree.be/api/customer/inventory" \
  -H "Accept: application/json" \
  -H "X-API-Key: your-api-key-here"

XML example:

curl -X GET "https://wms.fmtbree.be/api/customer/inventory" \
  -H "Accept: application/xml" \
  -H "X-API-Key: your-api-key-here"

2. Summary inventory

Returns your current stock grouped by product and pallet type.

GET /api/customer/inventory/summary

Example:

curl -X GET "https://wms.fmtbree.be/api/customer/inventory/summary" \
  -H "Accept: application/json" \
  -H "X-API-Key: your-api-key-here"

Detailed Inventory Response

The detailed endpoint returns:

Example JSON:

{
  "customer": {
    "id": 1,
    "name": "Example Customer"
  },
  "snapshot_at": "2026-03-03T10:15:00+01:00",
  "inventory": [
    {
      "barcode": "PALLET-001",
      "external_id": "ERP-001",
      "batch": "BATCH-001",
      "status": "stock",
      "pallet_type": "EUR",
      "location_identifier": "A01 01",
      "depth": 1,
      "arrived_at": "2026-03-01",
      "produced_at": "2026-02-20",
      "frozen_at": "2026-02-21",
      "expired_at": "2027-02-21",
      "nett": 800,
      "tare": 25,
      "gross": 825,
      "quantity": 40,
      "bio": false,
      "c3": false,
      "product": {
        "id": 10,
        "customer_pid": "SKU-001",
        "name": "Chicken fillet",
        "barcode": null
      },
      "packaging": {
        "id": 2,
        "name": "Box"
      }
    }
  ]
}

Field explanation

Summary Inventory Response

The summary endpoint returns:

Example JSON:

{
  "customer": {
    "id": 1,
    "name": "Example Customer"
  },
  "snapshot_at": "2026-03-03T10:15:00+01:00",
  "summary": [
    {
      "product": {
        "id": 10,
        "customer_pid": "SKU-001",
        "name": "Chicken fillet",
        "barcode": null
      },
      "pallet_type": "EUR",
      "pallet_count": 12,
      "weights": {
        "nett": 9600,
        "tare": 300,
        "gross": 9900
      },
      "quantity": 480
    }
  ],
  "totals": {
    "pallet_count": 12,
    "nett": 9600,
    "tare": 300,
    "gross": 9900,
    "quantity": 480
  }
}

Summary meaning

Each line in summary is grouped by:

This means the same product can appear multiple times if it exists on different pallet types.

XML Responses

The XML response contains the same information as JSON.

Example request:

curl -X GET "https://wms.fmtbree.be/api/customer/inventory/summary" \
  -H "Accept: application/xml" \
  -H "X-API-Key: your-api-key-here"

Example XML:

<?xml version="1.0" encoding="UTF-8"?>
<inventorySummaryResponse>
  <customer>
    <id>1</id>
    <name>Example Customer</name>
  </customer>
  <snapshot_at>2026-03-03T10:15:00+01:00</snapshot_at>
  <summary>
    <item>
      <product>
        <id>10</id>
        <customer_pid>SKU-001</customer_pid>
        <name>Chicken fillet</name>
        <barcode></barcode>
      </product>
      <pallet_type>EUR</pallet_type>
      <pallet_count>12</pallet_count>
      <weights>
        <nett>9600</nett>
        <tare>300</tare>
        <gross>9900</gross>
      </weights>
      <quantity>480</quantity>
    </item>
  </summary>
  <totals>
    <pallet_count>12</pallet_count>
    <nett>9600</nett>
    <tare>300</tare>
    <gross>9900</gross>
    <quantity>480</quantity>
  </totals>
</inventorySummaryResponse>

Error Responses

Missing API key

Status:

401 Unauthorized

JSON example:

{
  "error": "unauthorized",
  "message": "API key is required."
}

Invalid API key

Status:

401 Unauthorized

JSON example:

{
  "error": "unauthorized",
  "message": "Invalid API key."
}

Unsupported format

Status:

406 Not Acceptable

JSON example:

{
  "error": "not_acceptable",
  "message": "Unsupported response format."
}

Practical Recommendations

Typical Integration Flow

  1. Receive your API key from FMT Bree
  2. Call /api/customer/inventory/summary if you only need totals per product and pallet type
  3. Call /api/customer/inventory if you need pallet-level detail
  4. Choose JSON or XML depending on your ERP, WMS, or EDI integration

Support

If you need:

contact FMT Bree.


Revision #5
Created 2026-03-03 12:41:22 UTC by Sven Vanderwegen
Updated 2026-03-03 12:43:41 UTC by Sven Vanderwegen