Field | Type | Description |
| bailmentDealerCode | String | The Distributor invoice number, stored for reference |
invoiceNumber | String | The Distributor invoice number, stored for reference |
invoiceDate | String | The date of the invoice |
bailmentLoanModelCode | String | The bailment loan model code |
condition | Integer | The asset condition: Used = 1 Demo = 2 Race = 3 |
divisionCode | String | The details of the asset |
assetDetails | LivestockAssetDetails | The details of the asset |
grossAmount | Number | Amount invoiced for the unit (GST inclusive) |
taxAmount | Number | Tax amount invoiced for the unit (must match the gross amount correctly) |
returnErrorIfExistingAccount | Boolean | If the invoice number and bailment dealer code match an existing open
account and the value is false then the Trust Receipt number of the existing
account is returned If this field is
set to true then an error is returned If not specified the default is false. |
distributorCode | String | The distributor code Required if logging in as a staff user |
payableAccountCode | String | The payable account code |
secondAnalysisCode | String | The second analysis code |
| maturityDate | DateTime (optional) | The maturity date |

| Field | Type | Description |
| success | Boolean | True, if the invoice was successfully created, false otherwise |
| errorMessage | String (optional) | Details the error if success is false, null otherwise |
| documentNumber | String (optional) | The trust receipt number created for this invoice, null if unsuccessful |

HTTP Status Code | Type |
400 | Invalid Request (error will be detailed in response) |
403 | Forbidden (invalid Authorisation) |
404 | Dealer not found or Order not found (error will be detailed in response) |
503 | Service Unavailable (due to maintenance) |