Index

Get an invoice

Path: api/v1/invoices

This API is JSON:API compliant.

This endpoint supports the following methods:
GET

The resource type for this endpoint is Invoice
The identifier is invno
Supported inclusions are user,customer,jobs

The Invoice resource type attributes are as follows:

{
"invNo":integer
"invoiceType":string
optional
"invoiceDate":string (DateTime in ISO format)
"status":string
"amount":number
"tax":number
optional
"taxPaid":boolean
"currencyCode":string
"exchRate":number
"rateLocked":boolean
"accountFee":{
"amount":number
"tax":number
"taxCode":string
}
"companyCode":string
"gLDeptCode":string
"branchCode":string
"subBranchCode":string
"invoiceDetails":{
"customer":{
"attn":string
"name":string
optional
"isAddressResidential":boolean
"streetAddress":string
"suburb":string
"state":string
"postCode":string
"country":string
"orderNo":string
}
"ship":{
"attn":string
"name":string
optional
"isAddressResidential":boolean
"streetAddress":string
"suburb":string
"state":string
"postCode":string
"country":string
}
"freight":{
"amount":number
"tax":number
"taxCode":string
"dispatch":{
}
}
}
}

Example GET (Return specific)

Path: api/v1/invoices/101?include=customer,jobs

Response:

{
  "data": {
    "id": "1234",
    "type": "Invoice",
    "attributes": {
      "invoiceType": "Invoice",
      "invoiceDate": "2023-11-20T11:45:00",
      "status": "FINISH",
      "amount": 200.00,
      "tax": 20.00,
      "subBranchCode": "SA",
      "branchCode": "4HB",
      "gLDeptCode": "OTH",
      "taxPaid": true,
      "currencyCode": "AUD",
      "exchRate": 1.0,
      "rateLocked": true,
      "accountFee": {
        "amount": 200.0,
        "tax": 10.0,
        "taxCode": "G"
      },
      "invoiceDetails": {
        "customer": {
          "attn": "Joe",
          "name": "Soap",
          "isAddressResidential": true,
          "streetAddress": "1 Nowhere Rd",
          "suburb": "Nowhere",
          "state": "NSW",
          "postCode": "0000",
          "country": "AUS",
          "orderNo": "ABC123"
        },
        "ship": {
          "attn": "Jane",
          "name": "Doe",
          "isAddressResidential": false,
          "streetAddress": "2 Somewhere St",
          "suburb": "Somewhere",
          "state": "VIC",
          "postCode": "0001",
          "country": "AUS"
        },
        "freight": {
          "amount": 200.0,
          "tax": 10.0,
          "taxCode": "G",
          "dispatch": [
            {
              "shipVia": "Machship",
              "shipRef": "MACH-1234"
            }
          ]
        }
      }
    },
    "relationships": {
      "user": {
        "data": {
          "type": "CardFile",
          "id": "12457"
        },
        "links": {
          "related": "/{URL ROOT}/api/v1/cardfiles/12457"
        }
      },
      "customer�": {
        "data": {
          "type": "CardFile",
          "id": "12458"
        },
        "links": {
          "related": "/{URL ROOT}/api/v1/cardfiles/12458"
        }
      },
      "jobs�": {
        "data": [
         {
            "type": "Job",
            "id": "15"
          },
          {
            "type": "Job",
            "id": "28"
          }
       ]
      }
    },
    "links": {
      "self": "/{URL ROOT}/api/v1/invoices/1234"
    }
  }
}