API Reference for Roustabout 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.
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": { "2": { "invoice_status": "104", "name": "Bill at Month End", "order_num": "2" }, "1": { "invoice_status": "105", "name": "Out for Signature", "order_num": "1" } } }
Using the API to retrieve all invoices in a specific invoice status
Action: get_by_id
Values passed: api_key, action, invoice_status
Return: Notice, Result (array)
Example: {API URL}?api_key={APIKEY}&action=get_by_id&invoice_status={RS STATUS ID}
Example Returned Data
{ "Notice": "Success!", "Result": [ "117446", "217076", "217077", "217078", "217389", "217390", "217391", "217507", "217508" ] }
Using the API to retrieve data from a specific invoice
Action: get
Values Passed: api_key, action, invoice_no
Return: Notice, Result (Array): 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={HS INVOICE ID}
{ "Notice": "Success!", "Result": { "invoice_id": "4532", "invoice_number": "32445", "invoice_status": "For Submit", "invoice_customer": "Bulldog Production", "customer_ext_id": "11", "lease": "Denver #2", "yard": "Oklahoma", "date": "09\/28\/2018 12:49 AM", "invoice_total": "1028.00", "invoice_processed_by": "Raffy - RS", "pdflink": {PDF LINK}, "signed_invoice": [ null ], "ip": "10.150.45.102", "fieldTickets": [ { "ticketNumber": "12188", "created_date": "09\/27\/2018 2:51 AM", "ticket_scan": {PDF LINK}, "ticket_type": "Job Ticket", "yard": "Oklahoma", "company": "Bulldog Production", "lease": "Denver #2", "po_number": "Dg", "paperticket": "900026", "starttime": "09\/27\/2018 2:48 AM", "endtime": "09\/27\/2018 2:48 AM", "ticket_status": "Invoice Created", "total_asset_cost": "1028.00", "total_asset_hours": "20.00", "admin_approved_date": "09\/28\/2018 12:46 AM", "qb_billto": "122", "ticket_assets": [ { "name": "Freshwater Hauling", "hours": "5.00", "fee": "85.00", "user": "Raffy - RS", "notes": "3", "cost": "425" }, { "name": "60 minute one way", "hours": "3.00", "fee": "1.00", "user": "Raffy - RS", "notes": "2", "cost": "3" }, { "name": "1.5 hours one way", "hours": "12.00", "fee": "50.00", "user": "Raffy - RS", "notes": "1", "cost": "600" } ], "jobs": [ { "description": "Single Tank Battery", "name": "New Tank Battery" } ], "photos": [ {JPG LINK}, {JPG LINK} ], "custom_fields": { "Rig -Custom": null } } ] } }
Using the API to change the status of a specific invoice
Action: update
Values Passed: api_key, action, invoice_no, invoice_status (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={HS INVOICE ID}&invoice_status={RS STATUS ID}
{ "Sucess!": "Updated Invoice Status to Out for Signature" }