Skip to main content

Endpoint

GET /items Local URL example: https://sam.aragon.morabaa.com/api/items

Authentication

This endpoint requires app authentication headers:
  • X-App-Id: <APP_ID_GUID>
  • X-App-Secret: <APP_SECRET>
If either is invalid or missing, the response is 401 Unauthorized.

Request example

curl -G "https://sam.aragon.morabaa.com/api/items" \
  -H "X-App-Id: <APP_ID_GUID>" \
  -H "X-App-Secret: <APP_SECRET>" \
  --data-urlencode "name=Paracetamol" \
  --data-urlencode "barcode=123456789" \
  --data-urlencode "groupId=00000000-0000-0000-0000-000000000000" \
  --data-urlencode "minBuyPrice=10" \
  --data-urlencode "maxBuyPrice=100" \
  --data-urlencode "minSellPrice=12" \
  --data-urlencode "maxSellPrice=120" \
  --data-urlencode "buyCurrencyId=1" \
  --data-urlencode "sellCurrencyId=1" \
  --data-urlencode "exchangeCurrency=true" \
  --data-urlencode "query=pain" \
  --data-urlencode "limit=25" \
  --data-urlencode "offset=0"

Query parameters

All query parameters are optional.
  • name (string): Filter by item name.
  • barcode (string): Filter by barcode.
  • groupId (guid): Filter by group ID.
  • minBuyPrice (decimal): Minimum buy price.
  • maxBuyPrice (decimal): Maximum buy price.
  • minSellPrice (decimal): Minimum sell price.
  • maxSellPrice (decimal): Maximum sell price.
  • buyCurrencyId (int): Buy currency ID.
  • sellCurrencyId (int): Sell currency ID.
  • exchangeCurrency (bool): Include exchange currency context when true.
  • query (string): General text search.
  • limit (int): Page size. Defaults to 25, clamped to 1..100.
  • offset (int): Skip count. Defaults to 0 and never below 0.
Notes:
  • businessId is derived from the authenticated app and is not expected from the client.
  • A successful response returns 200 OK.

Response

The response type is an array of items:
[
  {
    "id": "7f8f6d3b-2b93-4af3-9f65-7ea7d5ab79f1",
    "businessId": "9c7f3b9d-0809-4f5e-b8f2-b6e46a4eb3af",
    "name": "Paracetamol 500mg",
    "quantityWithFill": "100 box",
    "expiresAt": "2027-01-01T00:00:00+00:00",
    "images": {
      "cover": "https://cdn.example.com/item-cover.jpg"
    },
    "scientificName": "Acetaminophen",
    "batchNumber": "BATCH-001",
    "notes": "Store below 25C",
    "barcodes": ["123456789"],
    "buyPriceObject": {
      "price": 10,
      "currencyId": 1
    },
    "sellPriceObject": {
      "price": 12.5,
      "currencyId": 1
    },
    "quantity": 100,
    "packages": [
      {
        "itemId": "7f8f6d3b-2b93-4af3-9f65-7ea7d5ab79f1",
        "packageId": 1,
        "packageName": "Box",
        "price": 12.5,
        "buyPrice": 10,
        "isDefault": true,
        "packageIndex": 0,
        "packageQuantity": 1,
        "numberInParent": 1,
        "wholeSalePrice": 11,
        "privateSalePrice": 12
      }
    ],
    "privateSalePrice": 12,
    "wholeSalePrice": 11,
    "quantityPerStore": {
      "store-1": 60,
      "store-2": 40
    },
    "stores": {
      "store-1": {
        "id": "72a5508c-b9d6-4025-889b-20e6b8f8f2e9",
        "morabaaId": 101,
        "name": "Main Store"
      }
    },
    "quantityDetails": [
      {
        "id": "8c172f75-a1e5-4d6f-9e9f-3e58f2ad0e91",
        "morabaaId": 9001,
        "number": 100,
        "createdAt": "2026-02-18T10:30:00+00:00",
        "details": "Initial stock"
      }
    ]
  }
]