Skip to main content
GET
/
items
Get items
curl --request GET \
  --url https://sam.aragon.morabaa.com/api/items \
  --header 'X-App-Id: <x-app-id>' \
  --header 'X-App-Secret: <x-app-secret>'

Endpoint

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

Authentication

This endpoint requires app authentication headers:
  • X-App-Id: <APP_ID>
  • X-App-Secret: <APP_SECRET>

Required headers

X-App-Id
string
required
App ID credential.
X-App-Secret
string
required
App secret credential.
Need credentials? Contact info@morabaa.com.
If either is invalid or missing, the response is 401 Unauthorized. Do not send Content-Type: application/json for this GET request. Only include a Content-Type header when the request has a JSON body.

Request example

curl -G "https://sam.aragon.morabaa.com/api/items" \
  -H "X-App-Id: <APP_ID>" \
  -H "X-App-Secret: <APP_SECRET>" \
  --data-urlencode "name=Paracetamol" \
  --data-urlencode "businessId=9c7f3b9d-0809-4f5e-b8f2-b6e46a4eb3af" \
  --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.
businessId
guid
Filter by business ID. If omitted, the first business ID from the authenticated app is used.
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 must belong to the authenticated app if it is supplied.
  • A successful response returns 200 OK.

Response

The response type is an array of items:
id
guid
Item ID.
businessId
guid
Business ID associated with the item.
name
string
Item name.
barcodes
array
Barcodes associated with the item.
buyPriceObject
object
Buy price and currency details.
sellPriceObject
object
Sell price and currency details.
quantity
decimal
Available quantity.
packages
array
Package options and package-level prices.
stores
object
Store details keyed by store identifier.
quantityDetails
array
Quantity movement details.
[
  {
    "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"
      }
    ]
  }
]

Headers

X-App-Id
string
required

App ID credential.

X-App-Secret
string
required

App secret credential.

Query Parameters

name
string

Filter by item name.

barcode
string

Filter by barcode.

businessId
string<uuid>

Filter by business ID. If omitted, the first business ID from the authenticated app is used.

groupId
string<uuid>

Filter by group ID.

minBuyPrice
number<decimal>

Minimum buy price.

maxBuyPrice
number<decimal>

Maximum buy price.

minSellPrice
number<decimal>

Minimum sell price.

maxSellPrice
number<decimal>

Maximum sell price.

buyCurrencyId
integer

Buy currency ID.

sellCurrencyId
integer

Sell currency ID.

exchangeCurrency
boolean

Include exchange currency context when true.

query
string

General text search.

limit
integer
default:25

Page size. Defaults to 25, clamped to 1..100.

Required range: 1 <= x <= 100
offset
integer
default:0

Skip count. Defaults to 0 and never below 0.

Required range: x >= 0

Response

Items returned successfully.