Receipt Lines - Field Naming Issues

Testing receipt creation via POST to `/receipt-form` and found some inconsistencies:

  1. LineDescription vs Description: When creating receipt lines, use “LineDescription” for the line’s description which then appears as “Description” in the actual form. The “Description” field on lines is ignored. Is this field unused?
  2. UnitPrice not settable: Passing UnitPrice as an object `{“Value”: 100, “Currency”: “AUD”}` results in UnitPrice being omitted from the created line entirely. Only Account, LineDescription, and Qty appear in the result.
  3. Receipt Amount not reflecting line totals: The main Amount field shows as 0 in list responses even when lines are provided.

Example input that worked:

HTTP POST /receipt-form 
{
  "Date":"2026-03-15",
  "ReceivedIn":"d1489e95-bb28-4f5d-b42e-67d3291b3893",
  "Reference":"TEST6-RECEIPT-WITH-LINES",
  "Description":"Test 6 receipt with 2 lines",
  "Amount":275,
  "Lines":[
    {
      "Account":"d1489e95-bb28-4f5d-b42e-67d3291b3893",
      "Description":"Line 1",
      "LineDescription":"Line 1L",
      "Qty":2,
      "UnitPrice":{"Value":100,"Currency":"AUD"}
    },
    {
      "Account":"d1489e95-bb28-4f5d-b42e-67d3291b3893",
      "Description":"Line 2",
      "LineDescription":"Line 2L",
      "Qty":1,
      "UnitPrice":{"Value":75,"Currency":"AUD"}
    }]
}
Result: {
  "status": "success",
  "data": {
    "Date": "2026-03-15T00:00:00",
    "Reference": "TEST6-RECEIPT-WITH-LINES",
    "ReceivedIn": "d1489e95-bb28-4f5d-b42e-67d3291b3893",
    "Description": "Test 6 receipt with 2 lines",
    "Lines": [
      {
        "Account": "d1489e95-bb28-4f5d-b42e-67d3291b3893",
        "LineDescription": "Line 1L",
        "Qty": 2
      },
      {
        "Account": "d1489e95-bb28-4f5d-b42e-67d3291b3893",
        "LineDescription": "Line 2L",
        "Qty": 1
      }
    ],
    "Key": "019cef75-7aa4-7ba1-999e-1034bca90a8d"
  }
}

Can anyone confirm the correct way to set UnitPrice on receipt lines? Is there a different field name or structure required?

The destinction is made to make users life easier. So your first thoughts are correct.

I believe you are trying to replicate the response you get from GET requests which will give you an object to let you know the currency.

For POST on the other hand, the currency of the amount depends on the ReceivedIn/PaidFrom account and is not free selection. So, you will have to simply enter a numeric value and it should work just fine.

That’s another issue altogether. Manager has 3 options for line amount entry:

  1. Enter Amount
  2. Enter Qty and Amount.
  3. Enter Qty and UnitPrice and Manager will calculate Amount for you.

For option 1, you don’t need to do anything extra.

For option 2, you need to include this field in your main object:

"QuantityColumn": true

For option 3, you need to include this:

"QuantityColumn": true,
"UnitPriceColumn": true

I am unable to get this to work.

Creating receipt with data: {
  "Date": "2026-03-15",
  "ReceivedIn": "d1489e95-bb28-4f5d-b42e-67d3291b3893",
  "Reference": "TEST6-RECEIPT-WITH-LINES",
  "Description": "Test 6 receipt with 2 lines",
  "QuantityColumn": true,
  "UnitPriceColumn": true,
  "Lines": [
    {
      "Account": "d1489e95-bb28-4f5d-b42e-67d3291b3893",
      "Description": "Line 1",
      "LineDescription": "Line 1L",
      "Qty": 2,
      "UnitPrice": 100
    },
    {
      "Account": "d1489e95-bb28-4f5d-b42e-67d3291b3893",
      "Description": "Line 2",
      "LineDescription": "Line 2L",
      "Qty": 1,
      "UnitPrice": 75
    }
  ]
}
[TRACE] HTTP POST /receipt-form {"Date":"2026-03-15","ReceivedIn":"d1489e95-bb28-4f5d-b42e-67d3291b3893","Reference":"TEST6-RECEIPT-WITH-LINES","Description":"Test 6 receipt with 2 lines","QuantityColumn":true,"UnitPriceColumn":true,"Lines":[{"Account":"d1489e95-bb28-4f5d-b42e-67d3291b3893","Description":"Line 1","LineDescription":"Line 1L","Qty":2,"UnitPrice":100},{"Account":"d1489e95-bb28-4f5d-b42e-67d3291b3893","Description":"Line 2","LineDescription":"Line 2L","Qty":1,"UnitPrice":75}]}
[TRACE] HTTP POST /receipt-form - success
Result: {
  "status": "success",
  "data": {
    "Date": "2026-03-15T00:00:00",
    "Reference": "TEST6-RECEIPT-WITH-LINES",
    "ReceivedIn": "d1489e95-bb28-4f5d-b42e-67d3291b3893",
    "Description": "Test 6 receipt with 2 lines",
    "Lines": [
      {
        "Account": "d1489e95-bb28-4f5d-b42e-67d3291b3893",
        "LineDescription": "Line 1L",
        "Qty": 2
      },
      {
        "Account": "d1489e95-bb28-4f5d-b42e-67d3291b3893",
        "LineDescription": "Line 2L",
        "Qty": 1
      }
    ],
    "QuantityColumn": true,
    "UnitPriceColumn": true,
    "Key": "019cf024-3a9a-794d-a473-141ea9d816ee"
  }
}

After closer inspection, it turns out that not all objects are the same afterall, at least for unit price so, if you post this to payments, it should work:

{
  "Date": "2026-03-15",
  "ReceivedIn": "d1489e95-bb28-4f5d-b42e-67d3291b3893",
  "Reference": "TEST6-RECEIPT-WITH-LINES",
  "Description": "Test 6 receipt with 2 lines",
  "QuantityColumn": true,
  "UnitPriceColumn": true,
  "Lines": [
    {
      "Account": "d1489e95-bb28-4f5d-b42e-67d3291b3893",
      "LineDescription": "Line 1L",
      "Qty": 2,
      "SalesUnitPrice": 100,
      "Amount": 200
    },
    {
      "Account": "d1489e95-bb28-4f5d-b42e-67d3291b3893",
      "LineDescription": "Line 2L",
      "Qty": 1,
      "SalesUnitPrice": 75,
      "Amount": 75
    }
  ]
}

What I have done is this:

  1. Removed Description from within the lines sincw there’s no such thing.
  2. Replaced UnitPrice with SalesUnitPrice. At some point, this was introduced.
  3. Added Amount as a redundancy

@lubos, don’t you believe that a single UnitPrice should be exposed to the user, but then the database can later calculate SalesUnitPrice and PurchaseUnitPrice without users having to worry about it

Thanks so much for your help here. I’m struggling a bit with the lack of documentation for the API.

As a bit of background, I’m building a work flow using LLMs to allow me to take a lot of PDF documents and ingest them into the accounting system.

In order to do this I need to build an MCP server to map the services and parameters in a meaningful way so that the LLM can know how to create receipts, purchase order invoices, etc. All of this requires a well-documented specification so that we know what API interface to call, but also what fields are required, their format and purpose.

I’ve been building scripts that probe and test each interface to validate the information required by creating and verifying objects in the system.

I’m hoping to be able to generate a full swagger document including accurate object descriptions that can then be fed into the MCP and I’ll publish that once it’s been thoroughly tested.

1 Like