API Reference for Disposal Software Invoicing


To access our Invoicing API, contact us so that we can provide you with the necessary credentials and API URL endpoints.


All API calls are POST request to the endpoint URL, with JSON data returned.  One thing to note on these responses is the way that multiple disposal sites are referenced in the return data - this is decidedly different than our other platform APIs as there is an additional data layer.  This API is the one place within our software that we utilize a call by name function, to allow referencing invoice status across multiple disposal sites - you just need to make sure and utilize an exact naming convention across all sites.


Using the API to retrieve all invoice status categories

Action: get_invoice_status

Values Passed: api_key, action

Return: Notice, Result (array)

Example: {API URL}?api_key={APIKEY}&action=get_invoice_status


Example Returned Data

{
    "Notice": "Success!",
    "Result": {
       "Out for Signature": [
            "DEMO Site 1",
            "DEMO Site 2"
        ],
        "Ready to be Printed": [
            "DEMO Site 2",
            "App Demo"
        ],
        "Emailed Invoice to Customer": [
            "DEMO Site 2",
            "App Demo"
        ],
    }
}



Using the API to retrieve all invoices in a specific invoice status by status name

Action: get_by_status

Values passed: api_key, action, status_name

Return: Notice, Result (array)

Example: {API URL}?api_key={APIKEY}&action=get_by_status&status_name={STATUS NAME}


Example Returned Data

{
    "Notice": "Success!",
  "Result": {
        "DEMO Site 1": [
            "40276",
            "67163",
            "67164",
            "67403",
            "67404"
        ],
        "DEMO Site 2": [
            "29947",
            "45744",
            "45745",
            "45746",
            "45747" 
        ]
    }
}



Using the API to retrieve data from a specific invoice

Action: get

Values Passed: api_key, action, invoice_no

Return: invoice_number, invoice_status, customer, customer_ext_id, lease, yard, invoice_total, invoice_processed_by, pdflink, current_status,  signed_invoice (array), ip, fieldtickets (array)

Example: {API URL}?api_key={APIKEY}&action=get&invoice_no={DSS INVOICE ID}


{
    "Notice": "Success!",
    "Result": {
        "disposal_name": "DEMO Site 2",
        "invoice_id": "66737",
        "invoice_number": "01-02-19_BulldogProductions_JackStone9",
        "invoice_status": "Out for Signature",
        "invoice_customer_name": "Bulldog Productions",
        "invoice_customer_ext_id": "",
        "invoice_total": "126",
        "processed_by": "DSS Software",
        "pdflink": {PDF LINK},
        "signed_invoice": [
            null
        ],
        "fieldTickets": [
            {
                "ticketNumber": "1383454",
                "customer": "Bulldog Productions",
                "customer_ext_id": "",
                "hauler": "Hauling Software",
                "hauler_ext_id": "hso1",
                "lease": "Jack Stone #9",
                "jobtype": "Production\/Lease Water",
                "haulerticket": "1217-32",
                "bbls": "135",
                "otherlease": "",
                "bill_billto": "Customer",
                "bill_type": "Production\/Lease Water",
                "bill_ticket": "1217-32",
                "bill_disposedamt": "135",
                "additional_charge": null,
                "pdf": {PDF LINK},
                "jpeg": {JPG LINK},
                "ticket_time": "December 17, 2018 10:00 AM"
            },
            {
                "ticketNumber": "1383500",
                "customer": "Bulldog Productions",
                "customer_ext_id": "",
                "hauler": "Hauling Software",
                "hauler_ext_id": "hso1",
                "lease": "Jack Stone #9",
                "jobtype": "Production\/Lease Water",
                "haulerticket": "1218-10",
                "bbls": "117",
                "otherlease": "",
                "bill_billto": "Customer",
                "bill_type": "Production\/Lease Water",
                "bill_ticket": "1218-10",
                "bill_disposedamt": "117",
                "additional_charge": null,
                "pdf": {PDF LINK},
                "jpeg": {JPG LINK},
                "ticket_time": "December 18, 2018 10:30 AM"
            }
        ]
    }
}


Using the API to change the status of a specific invoice using status name

Action: update

Values Passed: api_key, action, invoice_no, status_name (where the invoice status is the NEW invoice status id)

Return: Success or Fail with the new status name returned

Example: 

Example: {API URL}?api_key={APIKEY}&action=update&invoice_no={DSS INVOICE ID}&status_name={STATUS NAME}

{
    "Sucess!": "Updated Invoice Status to Out for Signature"
}