Create Livestock Invoice API

Create Livestock Invoice API

Description

Creates a new livestock invoice for the logged in distributor.  If there is an existing open account for the same dealer with the same invoice number the existing account’s document number will be returned.

Security

Available for distributor users

URL

Parameters        

Model

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:

New = 0
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
maturityDateDateTime (optional)The maturity date

Example

Notes

{                                                                                                                                         
"returnErrorIfExistingAccount": true,
"approvalCode": "string",
"bailmentDealerCode": "string",
"invoiceNumber": "string",
"invoiceDate": "2017-08-23T00:00:19.991Z",
"bailmentLoanModelCode": "string",
"condition": 0,
"divisionCode": "string",
"secondAnalysisCode": "string",
"distributorCode": "string",
"payableAccountCode": "string",
"assetDetails": {
      "description": "string",
      "securityMake": "string",
      "originalLivestockCount": 0
      },
"grossAmount": 0,
"taxAmount": 0,
"maturityDate": "2017-08-23T00:00:19.991Z"

Response

Model

FieldTypeDescription
successBooleanTrue, if the invoice was successfully created, false otherwise
errorMessageString (optional)Details the error if success is false, null otherwise
documentNumberString (optional)The trust receipt number created for this invoice, null if unsuccessful

Example

Notes

{                                                                                                                                          
"success": true,
"errorMessage": "string"
"documentNumber": "string"
}

Error Codes

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)



    • Related Articles

    • Argos API/EDI Import Tool

      This document outlines how to use the Argos API Import tool to import new Bailment Accounts from an external file through the Argos API Server. Also how raise Credit Returns and Price Adjustments. Prerequisites API Server The API Import tool requires ...
    • Create Invoice API

      Description Creates a new invoice for the logged in distributor. If there is an existing open account for the same dealer with the same VIN/HIN and invoice number the existing account’s document number will be returned. Security Available for ...
    • Installing Argos Internal API

      The Argos Internal API is used to power the Vault and Bailment applications. Note, this is available from Argos v6.0 onwards Installation Types The installer can be used to install a production instance of the Argos Internal API. Instructions to ...
    • Create External Audit API

      Description For the requested External audit, uploads the audit results matching the External System Audit Id. Security Logged in user has API > Audit> Create External Audit permissions API Version Argos API V6 URL POST ...
    • Create Client API

      Description Add a new client Security Logged in user has client API permissions URL POST http://example.com/api/clients/createClient Parameters TBC Response Create Client Request Field Type Description code String The client code name String The ...