HireHop Equipment Rental Software API Documentation

The HireHop Rest API lets you read and write data from an external source using a generated token obtained from within HireHop settings.

As HireHop was written on top of an API, these are the API calls that the HireHop Software uses.

API Version

The HireHop API is available as version 1.0. The API might be subject to slight changes due to enhancements, new features and bug fixes, however HireHop will always try and make any changes backwards compatible.

Any changes that will affect backwards compatibility, will be documented here.

API Endpoints

HireHop is running simultaneously on three domains, thus the API endpoints that can be used are:

						https://hirehop.net
						https://myhirehop.com
						https://myhirehop.co.uk
					

API Token

To use the API, you need to pass a token. The token can be a GET parameter, a POST parameter, in the JSON post body or you can set the X-TOKEN header. A token is unique for each user and never expires. A token will become invalid if the user the token is for logs in again or changes their email or password. It is recommended that you have an "API" user that is only used for API calls, thus the token will never become invalid with a subsequent login.

It goes without saying, that a token must never be disclosed or published, like putting it in JavaScript or HTML code, as a hacker can use this token to get and write data to your account. A token must only be used within private server side code, that is only accessible to your programmer.

To get a token, while in administrator mode, go to Settings then click the Users tab. Select the user you want the token for and then click the Menu button and select API Token.

Rate Limits

You are limited to a maximum of 60 requests within a minute and/or 3 each second, and if exceeded, you will receive an error, being a 429 response code and/or a HireHop 327 error code.

HireHop will also send the header X-Request-Count which tells you haw many requests (including all 429 failed requests) you have made within the last 60 seconds. The header X-RateLimit-Available tells you when the next connection is available.

It is highly discouraged to send requests in a loop as you will be rate limited for too many requests too quickly. If you are sending requests in a loop, it is recommended to add a five second delay within each cycle.

Errors

Error codes in HireHop are mostly a numeric number and on very rare occasions, a text message. Errors are in very simple JSON, like {"error":3}, in this case means "Missing parameters".

Error codes are in the language files for the particular language you are using in the errors section at the end, for example https://myhirehop.com/lang/en-US.js.

Date and Time values

All date and time values are sent and received in an ISO 8601 format string, being YYYY-MM-DD hh:mm:ss.

Some API calls return HireHop generated dates and times in the UTC timezone. Dates and times set by the user directly in jobs, purchase orders, invoices, etc. are not in a timezone, and deemed in the timezone of the depot the job is assigned to.

Currency

All currency values are sent and received in the base currency. They are converted and displayed accordingly using the job, invoice, etc. currency settings.

Pagination

Retrieving some data is limited to how many rows are returned. The limit is set with the rows parameter (limits vary). The page is sent and returned using the page parameter.

Custom Fields

HireHop can store custom fields throughout the system. Custom fields can also be included and formatted within documents. More information on custom fields can be found here.

POST data

When an endpoint accepts post data, it can either be JSON in the body (standard REST) or a url encoded post (standard ajax). HireHop will automatically establish which one you have used.

Example

As an example, below will get the job data for job 1, which can be a simple curl http request. Please note, that you need to encode all special characters in the token, e.g. "abc&def" would be "abc%26def".

						curl https://myhirehop.com/php_functions/job_refresh.php?job=1&token=your_url_encoded_token_here
					

Note

In the parameters below, "{" denotes the start of an associative array and "[" denotes the start of an indexed array. "}" and "]" denote the ends.



Jobs

Get job data

Get the job data.

get/api/job_data.php
Send parameters:
NameDescription
jobID of the job. {integer}.
Return parameters:
NameDescription
ACCOUNT_REFERENCEReference of the customer from the address book
ACCOUNT_SUSPENDEDIs the account suspended (yes=1 or no=0).
ACC_PACKAGE_IDThe ID of the accounting package to use
ADDRESSAddress of the job
ALLOW_EARLY_RETURNSDiscount for early returns (yes=1 or no=0).
ARCHIVESHow many quotes saved
CALC_LATE_FEESAdd late fees option, (yes=1 or no=0).
CLIENT_ASSIGNClient company or name in the address book the job is assigned to
CLIENT_IDClient company ID in the address book the job is assigned to
CLIENT_MEMOMemo from the address book
CLIENT_REFReference for the job from the client
COLLECTOption on collection (customer collect=0, we deliver=1, courier delivery=2, other=3).
COLOURThe colour of the job in HEX
COMPANYCompany name of the customer
CREATED_BYName of the user who created the job
CREATED_BY_EMAILEmail of the user who created the job
CREATED_BY_IMAGE_IDImage ID of the user who created the job
CREATED_BY_JOBJob role of the user who created the job
CREATED_BY_TELEPHONETelephone number of the user who created the job
CREATE_DATEDate the job was created (YYYY-MM-DD hh:mm:ss)
CREATE_USERID of the user who created the job
CREDIT_LIMITCredit limit of the customer
CREDIT_PERIODCredit time in days for the customer
CURRENCY: {
CODEThe international currency code for the default currency used for the job
DECIMALSHow many decimal places does the currency have
DECIMAL_SEPARATORThe character used to separate the decimals
MULTIPLIERThe multiplier used to get the exchange rate
NAMEName of the currency
NEGATIVE_FORMATHow a negative should be displayed
SYMBOLThe currency symbol
SYMBOL_POSITIONThe position of the currency symbol (0=before, 1=after)
THOUSAND_SEPARATORThe character used to separate thousands
}
CUSTOM_INDEXThe indexable custom field value
DEFAULT_DISCOUNTThe default discount percentage to give to the customer.
DEFAULT_SALES_TAXThe default sales tax percentage
DELIVEROption on delivery (customer return=0, we collect=1, courier collection=2, other=3).
DEPOTName of the depot the job is in
DEPOT_IDID of the depot the job is in
DETAILSJob memo about the job
DO_PRIORITYUse priority availability calculation for the job (yes=1 or no=0).
DURATION_DAYSHow many chargeable days from JOB_DATE.
DURATION_HRSHow many chargeable hours from JOB_DATE.
DURATION_LOCKEDSet to '1' if changing the dates when editing a job does not change the duration.
DURATION_SCHEMEThe price structure to be used on the job code
EMAILEmail address of the client
FILESHow many files attached to the job
IDThe job number
INTERNALIs this an internal hire (yes=1 or no=0).
INTERNAL_DEPOTThe ID of the other depot if it is an internal rental.
INTERNAL_DEPOT_NAMEThe name of the other depot if it is an internal rental.
INV_ADDRESSAddress for invoicing
INV_EMAILEmail for invoicing
JOB_DATEDate the job starts charging from (YYYY-MM-DD hh:mm).
JOB_ENDDate the job ends (YYYY-MM-DD hh:mm).
JOB_NAMEName of the job
JOB_TYPEWhat type of job it is
LATITUDEThe latitude of the job depot.
LOCKEDIs the job locked (yes=1 or no=0).
LONGITUDEThe longitude of the job depot.
MOBILEMobile/celluar telephone number of the customer
NAMEName number of the customer
NOTESHow many notes on the job
OUT_DATEThe date and time the equipment used in the job is reserved from (YYYY-MM-DD hh:mm).
POP_UPA note that pops up when the job is opened
PRICE_GROUPWhich price group to use (A=0, B=1, & C=2).
PRICE_STRUCTUREThe price structure name to be used on the job
PROJECT_IDThe ID of the project the job belongs to.
PROJECT_NAMEThe name of the project the job belongs to.
RETURN_DATEThe date and time that all equipment on the job will become available again (YYYY-MM-DD hh:mm).
STATUSThe status code of the job
SUB_IDThe ID of the internal cross depot rental
SUB_MAIN_IDThe ID of the Job, Project or stand alone purchase order the internal rental is for.
SUB_TYPEWhat the internal rental is for (1=job, 6=project, 11=stand alone purchase order).
SUSPENDED_NOTEIf account warning or suspended, a note saying why.
TASKSHow many tasks in the job
TELEPHONETelephone number of the client.
USERID of manager 1
USER2ID of manager 2
USER2_EMAILEmail of manager 2
USER2_IMAGE_IDImage ID of manager 2
USER2_JOBJob role of manager 2
USER2_NAMEName of manager 2
USER2_TELEPHONETelephone number of manager 2
USER_EMAILEmail address of manager 1
USER_IMAGE_IDImage ID of manager 1
USER_JOBJob role of manager 1
USER_NAMEName of manager 1
USER_TELEPHONETelephone number of manager 1
USE_SALES_TAXUse sales tax or not (yes=1 or no=0).
VENUEName of the job delivery building
VENUE_ADDRESSID of the venue in the address book
VENUE_TELEPHONEDelivery address phone number
VIRTUAL_DEPOT_IDIf the depot is a virtual depot, it's ID
CUSTOM_FIELDSObject array of custom field objects. {object}
fieldsSame as 'CUSTOM_FIELDS' (kept for legacy purposes). WARNING: Will be deprecated.
multipliersArray of multipliers to be applied to items (one off, per hour, per day, per week, per month, every day & every week)
root_depot_idThe ID if the depot is a standard depot
standard_tax_ratesArray of tax rates data.

Save job & items

Save a job and items in a single call.

post/api/save_job.php
Send parameters:
NameDescription
jobID of the job or zero creates a new job (default 0) {integer}.
nameName of the customer (required for new). {string}
companyCompany name of the customer. {string}
addressAddress of the customer. {text}
telephoneTelephone number of the customer. {string}
emailEmail address of the customer. {string}
mobileMobile/cellular telephone number of the customer. {string}
typeWhat the job is. {string}
venueDelivery location name. {string}
venue_addressDelivery address. {text}
venue_idID of the venue in the address book. {integer}
venue_telephoneDelivery address phone number. {string}
job_nameName of the job (default=company + venue). {string}
client_refReference for the job from the client. {string}
detailsJob memo about the job. {text}
duration_schemePrice structure code (default=7dw). {string}
custom_indexCustom indexable field. {string}
inv_addressAddress for sending invoices. {text}
client_idID of the client company in the address book. {integer}
projThe ID of the project the job belongs to. {integer}
duration_daysHaw many chargeable days from JOB_DATE. {integer}
duration_hrsHaw many chargeable hours from JOB_DATE. {integer}
price_groupWhich price group to use (A=0, B=1, & C=2). {integer}
calc_late_feesAdd late fees option, (yes=1 or no=0). {integer}
deliverOption on delivery (customer return=0, we collect=1, courier collection=2, other=3). {integer}
collectOption on collection (customer collect=0, we deliver=1, courier delivery=2, other=3). {integer}
default_discThe default discount percentage to give to the customer. {float}
do_priorityUse priority availability calculation for the job (yes=1 or no=0). {integer}
allow_early_returnsDiscount for early returns (yes=1 or no=0). {integer}
intIs this an internal hire (yes=1 or no=0). {integer}
outThe date and time the equipment used in the job is reserved from (YYYY-MM-DD hh:mm). {string}
startDate the job starts charging from (YYYY-MM-DD hh:mm). {string}
endDate the job ends (YYYY-MM-DD hh:mm). {string}
toThe date and time that all equipment on the job will become available again (YYYY-MM-DD hh:mm). {string}
custom_fieldsObject array of custom field objects. {object}
fieldsSame as 'custom_fields' (kept for legacy purposes). WARNING: Will be deprecated.
userID of manager 1. If not set on new job, then it is the user who created the job (zero leaves it unassigned). {integer}
user2ID of manager 2 (zero is unassigned). {integer}
itemsObject of items to add. The key is a letter prefix + the item ID and the value is the quantity, eg. {"b123":4, "a12":3.5, "c34":2.2} where the prefix a=sales, b=hire & c=labour.
Return parameters:
NameDescription
ACCOUNT_REFERENCEReference of the customer from the address book
ACCOUNT_SUSPENDEDIs the account suspended (yes=1 or no=0).
ACC_PACKAGE_IDThe ID of the accounting package to use
ADDRESSAddress of the job
ALLOW_EARLY_RETURNSDiscount for early returns (yes=1 or no=0).
ARCHIVESHow many quotes saved
CALC_LATE_FEESAdd late fees option, (yes=1 or no=0).
CLIENT_ASSIGNClient company or name in the address book the job is assigned to
CLIENT_IDClient company ID in the address book the job is assigned to
CLIENT_MEMOMemo from the address book
CLIENT_REFReference for the job from the client
COLLECTOption on collection (customer collect=0, we deliver=1, courier delivery=2, other=3).
COLOURThe colour of the job in HEX
COMPANYCompany name of the customer
CREATED_BYName of the user who created the job
CREATED_BY_EMAILEmail of the user who created the job
CREATED_BY_IMAGE_IDImage ID of the user who created the job
CREATED_BY_JOBJob role of the user who created the job
CREATED_BY_TELEPHONETelephone number of the user who created the job
CREATE_DATEDate the job was created (YYYY-MM-DD hh:mm:ss)
CREATE_USERID of the user who created the job
CREDIT_LIMITCredit limit of the customer
CREDIT_PERIODCredit time in days for the customer
CURRENCY: {
CODEThe international currency code for the default currency used for the job
DECIMALSHow many decimal places does the currency have
DECIMAL_SEPARATORThe character used to separate the decimals
MULTIPLIERThe multiplier used to get the exchange rate
NAMEName of the currency
NEGATIVE_FORMATHow a negative should be displayed
SYMBOLThe currency symbol
SYMBOL_POSITIONThe position of the currency symbol (0=before, 1=after)
THOUSAND_SEPARATORThe character used to separate thousands
}
CUSTOM_INDEXThe indexable custom field value
DEFAULT_DISCOUNTThe default discount percentage to give to the customer.
DEFAULT_SALES_TAXThe default sales tax percentage
DELIVEROption on delivery (customer return=0, we collect=1, courier collection=2, other=3).
DEPOTName of the depot the job is in
DEPOT_IDID of the depot the job is in
DETAILSJob memo about the job
DO_PRIORITYUse priority availability calculation for the job (yes=1 or no=0).
DURATION_DAYSHow many chargeable days from JOB_DATE.
DURATION_HRSHaw many chargeable hours from JOB_DATE.
DURATION_SCHEMEThe price structure to be used on the job code
EMAILEmail address of the client
FILESHow many files attached to the job
IDThe job number
INTERNALIs this an internal hire (yes=1 or no=0).
INTERNAL_DEPOTThe ID of the other depot if it is an internal rental.
INTERNAL_DEPOT_NAMEThe name of the other depot if it is an internal rental.
INV_ADDRESSAddress for invoicing
INV_EMAILEmail for invoicing
JOB_DATEDate the job starts charging from (YYYY-MM-DD hh:mm).
JOB_ENDDate the job ends (YYYY-MM-DD hh:mm).
JOB_NAMEName of the job
JOB_TYPEWhat type of job it is
LATITUDEThe latitude of the job depot.
LOCKEDIs the job locked (yes=1 or no=0).
LONGITUDEThe longitude of the job depot.
MOBILEMobile/celluar telephone number of the customer
NAMEName number of the customer
NOTESHow many notes on the job
OUT_DATEThe date and time the equipment used in the job is reserved from (YYYY-MM-DD hh:mm).
POP_UPA note that pops up when the job is opened
PRICE_GROUPWhich price group to use (A=0, B=1, & C=2).
PRICE_STRUCTUREThe price structure name to be used on the job
PROJECT_IDThe ID of the project the job belongs to.
PROJECT_NAMEThe name of the project the job belongs to.
RETURN_DATEThe date and time that all equipment on the job will become available again (YYYY-MM-DD hh:mm).
STATUSThe status code of the job
SUB_IDThe ID of the internal cross depot rental
SUB_MAIN_IDThe ID of the Job, Project or stand alone purchase order the internal rental is for.
SUB_TYPEWhat the internal rental is for (1=job, 6=project, 11=stand alone purchase order).
SUSPENDED_NOTEIf account warning or suspended, a note saying why.
TASKSHow many tasks in the job
TELEPHONETelephone number of the client.
USERID of manager 1
USER2ID of manager 2
USER2_EMAILEmail of manager 2
USER2_IMAGE_IDImage ID of manager 2
USER2_JOBJob role of manager 2
USER2_NAMEName of manager 2
USER2_TELEPHONETelephone number of manager 2
USER_EMAILEmail address of manager 1
USER_IMAGE_IDImage ID of manager 1
USER_JOBJob role of manager 1
USER_NAMEName of manager 1
USER_TELEPHONETelephone number of manager 1
USE_SALES_TAXUse sales tax or not (yes=1 or no=0).
VENUEName of the job delivery building
VENUE_ADDRESSID of the venue in the address book
VENUE_TELEPHONEDelivery address phone number
VIRTUAL_DEPOT_IDIf the depot is a virtual depot, it's ID
CUSTOM_FIELDSObject array of custom field objects. {object}
fieldsSame as 'CUSTOM_FIELDS' (kept for legacy purposes). WARNING: Will be deprecated.
multipliersArray of multipliers to be applied to items (one off, per hour, per day, per week, per month, every day & every week)
root_depot_idThe ID if the depot is a standard depot
standard_tax_ratesArray of tax rates data.
itemsArray of items
errorSet if an error has occurred, either an error message or error number.

Save status

Change a job status.

post/frames/status_save.php
Send parameters:
NameDescription
jobID of the job (required) {integer}.
statusThe new status value (required) {float}.
no_webhookSet to anything but zero to prevent a webhook (default 0). {integer}
Return parameters:
NameDescription
statusThe new status value {float}
colourThe hex colour that the job has been set to or left as {string}
errorError code or message if something went wrong

Save list to archive

Save the job supplying list to a new archive/quote

post/php_functions/archive_insert.php
Send parameters:
NameDescription
jobID of the job (compulsory) {integer or array of integers}.
descDecsription of the archive {string}.
Return parameters:
NameDescription
pageHow many pages in total for all of the rows
recordsHow many rows in total found.
totalHow many pages there are of data.
rows: [
0: {
idUnique ID of the note
cells: {
idUnique ID of the archive {integer}
userName of the user {string}
createdThe date and time it was created. {datetime ISO string}
descriptionA short HTML formatted description of the archive. {string}.
data: {
USER_IDThe ID of the user who created the archive. {integer}
DESCRIPTIONA short description of the archive. {string}.
DEPOT_LIMITSAn array of depot IDs that the archive can be used in. {array}
}
}
}
]
errorSet if an error has occurred, either an error message or error number.

Add item by barcode

Saves an item into the supplying list depending on it's barcode and then either reserves it or checks it out.

post/php_functions/items_barcode_save.php
Send parameters:
NameDescription
jobID of the job (required) {integer}.
barcodeBarcode of the item to add (required). {string}
actionWhether to reserve (0), checkout (1) or nothing (2) (default 0). {integer}
parentThe ID of the to be parent heading (# or empty is no heading) {integer}
sidThe ID of the to be previous sibling {integer}
skindThe type of the to be previous sibling (1=sales, 2=hire stock, etc.) {integer}
no_availabilitySet to 1 to prevent availability for all items being calculated. {integer}
no_stock_availabilityDo not show hire stock availability only if set to 1 {integer}
barcodesSet to 1 to list barcodes used for the item. {integer}
localThe local date and time of the client (not required).
tzThe timezone of the client (not required).
Return parameters:
NameDescription
itms: [
0: {
IDID of the item. {integer}
kindWhat the item is (0=heading, 1=sales, 2=hire, 3=custom, 4=labour, 5=inline, 6=calculated). {integer}
qtyHow many. {integer or float}
titleThe name of the item. {string}
alt_titleThe alternative name of the item. {string}
ADDITIONALThe additional information of the item. {string}
TECHNICALThe technical information of the item. {string}
UNIT_PRICEThe unit base price of the item. {float}
PRICEThe base price of the item. {float}
VAT_RATEThe percentage tax rate of the item. {float}
ACC_NOMINALThe nominal group ID of the item. {integer}
NO_SCANSet to 1 if the item does not need checking out. {integer}
NO_SHORTFALLSet to 1 if the item is never short. {integer}
LIST_IDThe ID from the stock, sales or labour list of the item. {integer}
PRICE_TYPEWhat is the price type (0=One off, 1=hourly, 2=daily, 3=weekly, 4=monthly, 5=every day, 6=every week, others are custom). {integer}
OUTGOING_DATEThe outgoing date of the item if set. {date}
START_DATEThe start date of the item if set. {date}
END_DATEThe end date of the item if set. {date}
RETURNING_DATEThe returning date of the item if set. {date}
DURATIONThe duration of the item. {float}
LFTThe left value in the nested tree structure of the item. {integer}
RGTThe right value in the nested tree structure of the item. {integer}
AUTOPULLThe autopull ID of the item. {integer}
FLAGThe flag value of the item. {integer}
CUSTOM_FIELDSThe custom fields of the item. {JSON}
COUNTRY_ORIGINThe country of origin of the item. {string}
PART_NUMBERThe part number of the item. {string}
parentThe parent ID of the item. {integer}
availHow many available. {float or integer}
remainderHow many available depending on priority. {integer}
lateHow many are late. {integer}
flaggedHow many are flagged (only if there is an availability conflict). {integer}
reservedHow many have been reserved. {integer}
weightThe weight of a single item. {float}
VIRTUAL1 if the item is virtual or 2 if it is a grouped item. {integer}
sub_details: {
sub_qtyThe quantity subbed in. {float}
sub_priceThe total price of the subs. {float}
cost_priceThe cost price to buy one sales item. {float}
job_total_qtyThe total quantity of the item subbed in throughout the job {float}
}
valueThe value of a single item. {float}
DEPOT_LIMITSAn array of depot IDs the stock item is limited to (empty means all) {array of integers}
}
]
price_structures: [
0: {
YYYY-MM-DD hh:mm:ss_DURATION_DAYS_DURATION_HOURS: [
0One off price ratio {float}
1Hourly ratio {float}
2Daily ratio {float}
3Weekly ratio {float}
4Monthly ratio {float}
5Every day ratio {float}
6Every week ratio {float}
]
}
]
errorSet if there was an error, either a message or error number. {string or integer}

Get picklist availability

Get the availability for picklist and autopull rental items - DEPRICATED

get/php_functions/items_picklist_avail.php
Send parameters:
NameDescription
jobID of the job. {integer}.
globalThe ID of the other depot or 0 for all depots. {integer}
itemsArray of items IDs preceeded with a letter (a=sales, b=rental) to get availability for (max 50) (compulsory). {array|JSON array}.
localThe local date and time of the client (used to establish late items). {ISO datetime string}
only_availIf set to 1, then only 'available' will be calculated and 'global' and 'late' will always be zero. {integer}
Return parameters:
NameDescription
_item id_: {
availableHow many available. {integer}
globalHow many available globally or at a selected depot. {integer}
lateHow many are late. {integer}
}
errorSet if an error has occurred, either an error message or error number.

Duplicate a job

Duplicate a job and optional extras requested.

post/php_functions/job_duplicate.php
Send parameters:
NameDescription
idThe ID/job number of the job to copy from. {integer}
notesSet to '1' if you want to copy the notes (dates will NOT be updated). {integer}
tasksSet to '1' if you want to copy the tasks (dates will be updated). {integer}
subcontractorsSet to '1' if you want to copy the subcontractors (dates will be updated). {integer}
transportSet to '1' if you want to copy the transport (dates will be updated). {integer}
supplyingSet to '1' if you want to copy the supplying list (dates will be updated). {integer}
reservedSet to '1' if you want to copy the reserved list (conflicts will be ommitted). {integer}
updateSet to '1' if you want to update prices to the current price. {integer}
job_nameThe job name for the new job. {string}
localThe local date and time of the client (required).
tzThe timezone of the client (not required).
Return parameters:
NameDescription
jobThe ID/job number of the new job. {integer}
errorSet if an error has occurred, either an error message or error number.

Get job(s) costings

Returns data about job or project income and expenses to enable profit and margin calculations. Hire items are not estimated as there are too many workflow conflicts, eg. if all jobs don't use priority, estimated costs would be incorrectly and repeatedly included in numerous jobs, etc.

get/php_functions/job_margins.php
Send parameters:
NameDescription
job_idID of the job (compulsory if project_id empty) {integer}.
project_idID of the project (compulsory if job_id empty) {integer}.
Return parameters:
NameDescription
sales_revenueTotal revenue of all sales stock
hire_revenueTotal revenue of all hire stock
labour_revenueTotal revenue of all labour items
custom_revenueTotal revenue of all custom items
calculated_revenueTotal revenue of all calculated items
additional_revenueTotal revenue of all late fees less any early returns if applicable
total_revenueTotal revenue of all items
sales_approved_costTotal cost of all approved purchase order sales line items
hire_approved_costTotal cost of all approved purchase order hire line items
custom_approved_costTotal cost of all approved purchase order custom line items
labour_approved_costTotal cost of all approved purchase order labour line items
sales_unapproved_costTotal cost of all unapproved purchase order sales line items
hire_unapproved_costTotal cost of all unapproved purchase order hire line items
custom_unapproved_costTotal cost of all unapproved purchase order custom line items
labour_unapproved_costTotal cost of all unapproved purchase order labour line items
sales_estimated_costTotal cost of all unapproved sales line items with shortfall not fullfield with a purchase order
custom_estimated_costTotal cost of all unapproved custom line items with shortfall not fullfield with a purchase order
labour_estimated_costTotal cost of all unapproved labour line items with shortfall not fullfield with a purchase order
errorSet if an error has occurred, either an error message or error number.

Save job

Save a new job or save a job edit. You can omit any fields you don't want to update or add (the default value will be used), however the 'job' parameter must always be set. The posting data field names are not case sensitive.

post/php_functions/job_save.php
Send parameters:
NameDescription
addressAddress of the customer. {text}
allow_early_returnsDiscount for early returns (yes=1 or no=0). {integer}
calc_late_feesAdd late fees option, (yes=1 or no=0). {integer}
client_idID of the client company in the address book. {integer}
client_refReference for the job from the client. {string}
collectOption on collection (customer collect=0, we deliver=1, courier delivery=2, other=3). {integer}
collection_fromName of where it is to be collected from. {text}
collection_addressCollection address. {text}
collection_telephoneTelephone number of where it is to be collected. {text}
companyCompany name of the customer. {string}
custom_fieldsObject array of custom field objects. {object}
custom_indexCustom indexable field. {string}
default_discThe default discount percentage to give to the customer. {float}
deliverOption on delivery (customer return=0, we collect=1, courier collection=2, other=3). {integer}
detailsJob memo about the job. {text}
do_priorityUse priority availability calculation for the job (yes=1 or no=0). {integer}
duration_daysHaw many chargeable days from JOB_DATE. {integer}
duration_hrsHaw many chargeable hours from JOB_DATE. {integer}
duration_lockedIf set to 1, the job duration will not change when dates are changed (not for open ended) {integer}
duration_schemePrice structure code (default=7dw). {string}
emailEmail address of the customer. {string}
endDate the job ends (YYYY-MM-DD hh:mm). {string}
extra_dates: [
0: {
NAMEUnique field name of the extra date (required if not DEFAULT). {string}
LABELLabel to display when whowing the date (required if not DEFAULT). {string}
DEFAULTMust be set to 'OUT', 'START', 'FINISH' or 'RETURN' only if it is a standard default date. {string}
REQUIREDSet to 1 if compulsory, if VALUE is empty and compulsory, an error 3 (missing paramaters) will be returned. {integer}
VALUEThe value in 'YYYY-MM-DD hh:mm:ss' format or null if empty (required but not for DEFAULT dates). {string}
}
]
fieldsDEPRECATED: Same as 'custom_fields', so use 'custom_fields' instead.
intIs this an internal hire (yes=1 or no=0). {integer}
inv_addressAddress for sending invoices. {text}
no_vatSet to 1 to set no VAT/Tax. {integer}
jobID of the job or zero creates a new job (default 0) {integer}.
job_nameName of the job (default=company + venue). {string}
mobileMobile/cellular telephone number of the customer. {string}
nameName of the customer (required for new). {string}
no_empty_date_checkSet to 1 to stop checks for required empty extra dates (only used for editing the extra dates structure in a job). {integer}
no_webhookSet to 1 prevent a webhook from triggering. {integer}
outThe date and time the equipment used in the job is reserved from (YYYY-MM-DD hh:mm) (compulsory when new). {string}
overwriteUSE WITH CAUTION. If set to '1', this will overwrite ALL custom fields with the current 'custom_fields' parameter. {integer}
price_groupWhich price group to use (A=0, B=1, & C=2). {integer}
projThe ID of the project the job belongs to. {integer}
startDate the job starts charging from (YYYY-MM-DD hh:mm) (compulsory when new). {string}
telephoneTelephone number of the customer. {string}
typeWhat the job is. {string}
toThe date and time that all equipment on the job will become available again (YYYY-MM-DD hh:mm). {string}
use_atName of where it is being used. {text}
use_at_addressCollection address. {text}
use_at_telephoneTelephone number of where it is being used. {text}
userID of manager 1. If not set on new job, then it is the user who created the job (zero leaves it unassigned). {integer}
user2ID of manager 2 (zero is unassigned). {integer}
venueDelivery location name. {string}
venue_addressDelivery address. {text}
venue_idID of the company in the address book that the venue was last selected from. {integer}
venue_telephoneDelivery address phone number. {string}
localThe local date and time of the client (not required).
tzThe timezone of the client (not required).
Return parameters:
NameDescription
ACCOUNT_REFERENCEReference of the customer from the address book
ACCOUNT_SUSPENDEDIs the account suspended (yes=1 or no=0).
ACC_PACKAGE_IDThe ID of the accounting package to use
ADDRESSAddress of the job
ALLOW_EARLY_RETURNSDiscount for early returns (yes=1 or no=0).
ARCHIVESHow many quotes saved
CALC_LATE_FEESAdd late fees option, (yes=1 or no=0).
CLIENT_ASSIGNClient company or name in the address book the job is assigned to
CLIENT_IDClient company ID in the address book the job is assigned to
CLIENT_MEMOMemo from the address book
CLIENT_REFReference for the job from the client
COLLECTOption on collection (customer collect=0, we deliver=1, courier delivery=2, other=3).
COLLECTION_FROMName of where it is to be collected from.
COLLECTION_ADDRESSCollection address.
COLLECTION_TELEPHONETelephone number of where it is to be collected.
COLOURThe colour of the job in HEX
COMPANYCompany name of the customer
CREATED_BYName of the user who created the job
CREATED_BY_EMAILEmail of the user who created the job
CREATED_BY_IMAGE_IDImage ID of the user who created the job
CREATED_BY_JOBJob role of the user who created the job
CREATED_BY_TELEPHONETelephone number of the user who created the job
CREATE_DATEDate the job was created (YYYY-MM-DD hh:mm:ss)
CREATE_USERID of the user who created the job
CREDIT_LIMITCredit limit of the customer
CREDIT_PERIODCredit time in days for the customer
CURRENCY: {
CODEThe international currency code for the default currency used for the job
DECIMALSHow many decimal places does the currency have
DECIMAL_SEPARATORThe character used to separate the decimals
MULTIPLIERThe multiplier used to get the exchange rate
NAMEName of the currency
NEGATIVE_FORMATHow a negative should be displayed
SYMBOLThe currency symbol
SYMBOL_POSITIONThe position of the currency symbol (0=before, 1=after)
THOUSAND_SEPARATORThe character used to separate thousands
}
CUSTOM_FIELDSObject array of custom field objects. {object}
CUSTOM_INDEXThe indexable custom field value
DEFAULT_DISCOUNTThe default discount percentage to give to the customer.
DEFAULT_SALES_TAXThe default sales tax percentage
DELIVEROption on delivery (customer return=0, we collect=1, courier collection=2, other=3).
DEPOTName of the depot the job is in
DEPOT_IDID of the depot the job is in
DETAILSJob memo about the job
DO_PRIORITYUse priority availability calculation for the job (yes=1 or no=0).
DURATION_DAYSHow many chargeable days from JOB_DATE.
DURATION_HRSHaw many chargeable hours from JOB_DATE.
DURATION_SCHEMEThe price structure to be used on the job code
EMAILEmail address of the client
EXTRA_DATES: [
0: {
NAMEUnique field name of the extra date (required if not DEFAULT). {string}
LABELLabel to display when whowing the date (required if not DEFAULT). {string}
DEFAULTMust be set to 'OUT', 'START', 'FINISH' or 'RETURN' only if it is a standard default date. {string}
REQUIREDSet to 1 if compulsory, if VALUE is empty and compulsory, an error 3 (missing paramaters) will be returned. {integer}
VALUEThe value in 'YYYY-MM-DD hh:mm:ss' format or null if empty (required but not for DEFAULT dates). {string}
}
]
FILESHow many files attached to the job
IDThe job number
INTERNALIs this an internal hire (yes=1 or no=0).
INTERNAL_DEPOTThe ID of the other depot if it is an internal rental.
INTERNAL_DEPOT_NAMEThe name of the other depot if it is an internal rental.
INV_ADDRESSAddress for invoicing
NO_VATSet to one, otherwise zero, if there is no VAT/Tax applied to the job
INV_EMAILEmail for invoicing
JOB_DATEDate the job starts charging from (YYYY-MM-DD hh:mm).
JOB_ENDDate the job ends (YYYY-MM-DD hh:mm).
JOB_NAMEName of the job
JOB_TYPEWhat type of job it is
LATITUDEThe latitude of the job depot.
LOCKEDIs the job locked (yes=1 or no=0).
LONGITUDEThe longitude of the job depot.
MOBILEMobile/celluar telephone number of the customer
NAMEName number of the customer
NOTESHow many notes on the job
OUT_DATEThe date and time the equipment used in the job is reserved from (YYYY-MM-DD hh:mm).
POP_UPA note that pops up when the job is opened
PRICE_GROUPWhich price group to use (A=0, B=1, & C=2).
PRICE_STRUCTUREThe price structure name to be used on the job
PROJECT_IDThe ID of the project the job belongs to.
PROJECT_NAMEThe name of the project the job belongs to.
RETURN_DATEThe date and time that all equipment on the job will become available again (YYYY-MM-DD hh:mm).
STATUSThe status code of the job
SUB_IDThe ID of the internal cross depot rental
SUB_MAIN_IDThe ID of the Job, Project or stand alone purchase order the internal rental is for.
SUB_TYPEWhat the internal rental is for (1=job, 6=project, 11=stand alone purchase order).
SUSPENDED_NOTEIf account warning or suspended, a note saying why.
TASKSHow many tasks in the job
TELEPHONETelephone number of the client.
USE_ATName of where it is being used.
USE_AT_ADDRESSCollection address.
USE_AT_TELEPHONETelephone number of where it is being used.
USERID of manager 1
USER2ID of manager 2
USER2_EMAILEmail of manager 2
USER2_IMAGE_IDImage ID of manager 2
USER2_JOBJob role of manager 2
USER2_NAMEName of manager 2
USER2_TELEPHONETelephone number of manager 2
USER_EMAILEmail address of manager 1
USER_IMAGE_IDImage ID of manager 1
USER_JOBJob role of manager 1
USER_NAMEName of manager 1
USER_TELEPHONETelephone number of manager 1
USE_SALES_TAXUse sales tax or not (yes=1 or no=0).
VENUEName of the job delivery building
VENUE_ADDRESSDelivery location address
VENUE_IDID of the delivery location address in the address book
VENUE_TELEPHONEDelivery address phone number
VIRTUAL_DEPOT_IDIf the depot is a virtual depot, it's ID
multipliersArray of multipliers to be applied to items (one off, per hour, per day, per week, per month, every day & every week)
root_depot_idThe ID if the depot is a standard depot
standard_tax_ratesArray of tax rates data.
transport_clashesThe quantity of date warnings in the transport management for the job.
errorSet if an error has occurred, either an error message or error number.

Get jobs totals

This is an API call that returns the totals for upto 50 jobs

get/php_functions/jobs_totals.php
Send parameters:
NameDescription
jobsArray of job IDs (numbers) (required) {array of integer}.
Return parameters:
NameDescription
jobs: {
quotedThe quoted total from the supplying list, or upto today if open ended {float}
lateThe total of any late fees {float}
early_returnsCredit amount that should be decusted from 'quoted' for any early returns, if early returns allowed on the job {float}
totalquoted + late - early_returns
}
job_dataJSON of job data
errorSet if an error has occurred, either an error message or error number.


General

Execute SQL

Execute a select SQL statement. This is DEPRECATED and will be replaced with a remote database replication plugin, meaning your data will be replicated onto a server of your choice.

post/api/sql_execute.php
Send parameters:
NameDescription
formatWhat format the data should be in ('csv', 'xml' or the default 'json') {string}.
sqlA select only SQL statement, anything else will fail (required). {string}
Return parameters:
NameDescription
rowsAn array of data fields matching the SQL statement if successful. {array}
sqlThe SQL statement if successful. {string}
errorSet if an error has occurred, either an error message or error number.

Upload files

Add multiple files at once, with info, to an owner

post/php_functions/attach_files_upload.php
Send parameters:
NameDescription
typeThe owner type (1=job, 6=project, etc.) (compulsory) {integer}.
main_idID of the of the owner, like job or project ID (compulsory) {integer}.
deatilsArray of objects, being 'name' and 'description' of each image in sequence (compulsory) {array of obejcts}
custom_fieldsJSON data of custom fields data (optional) {array, object or JSON string)
latitudeThe current latitude sent from the device, otherwise obtained from IP address. (optional). {float}
longitudeThe current longitude sent from the device, otherwise obtained from IP address. (optional). {float}
filesArray of files files data to upload (compulsory) {objects}
Return parameters:
NameDescription
successArray of details with ids or errors.
errorSet if an error has occurred, either an error message or error number.

Get depots

Get a list depot names and IDs.

any/php_functions/get_depots.php
Send parameters:
None
Return parameters:
NameDescription
0: {
IDThe ID of the depot. {integer}
DEPOTThe name of the depot. {string}
VIRTUALIf the depot is virtual or not. {boolean}
}

Return current user information

Returns data and settings about the currently logged in user. There is only a http header if there is an error.

any/php_functions/get_user_info.php
Send parameters:
None
Return parameters:
NameDescription
NAMEName of the user. {string}
EMAILLogin email of the user. {string}
IDThe user ID. {integer}
DATE_FORMATThe date format the user uses(0='d m y', 1='y m d', 2='m d y'). {integer}
TIME_FORMATThe time format the user uses(0=24 hour, 1=12 hour). {integer}
DEFAULT_DEPOTThe ID of the depot the user is assigned to (can be a virtual depot). {integer}
VIRTUAL_DEPOT_IDThe ID of the virtual depot the user is assigned to (null if none). {integer}
root_depot_idThe ID of the root depot the user is assigned. {integer}
COMPANY_IDThe unique ID of the company within HireHop (same for all users). {integer}
LENGTH_FORMATThe format the user uses for length (0=metric, 1=imperial). {integer}
WEIGHT_FORMATThe format the user uses for weight (0=metric, 1=imperial). {integer}
SUPERUSERIf the user is an administrator and if they are in administrator mode (0=normal, 1=in admin mode, 2=is an admin user). {integer}
NEW_TABSDoes the user open pages in new tabs. (0=no, 1=yes). {integer}
SHOW_ENQUIRIESOption is enquiries grid is shown on availability popup. {integer}
DEFAULT_STARTThe default start time for new jobs in 24 hour clock. {string}
DEFAULT_DURATIONThe default hours fo a new job. {integer}
DEFAULT_EXTRAS_CHECKThe default setting for 'Allow extras' in checking out. (0=no, 1=yes). {integer}
DEFAULT_CHARGE_ADDITIONALThe default setting for 'Charge for additional' in checking out (0=no, 1=yes). {integer}
DEFAULT_EARLY_RETURNSThe default setting for selecting 'Allow early returns' for new jobs (0=no, 1=yes). {integer}
DEFAULT_LATE_FEESThe default setting for selecting 'Charge late fees' for new jobs (0=no, 1=yes). {integer}
DEFAULT_DATES_UNLINKEDThe default setting for having the dates linked or unliked for new jobs (0=linked, 1=unlinked). {integer}
DEFAULT_OPEN_ENDEDThe setting in new jobs for setting dates as open ended by default (0=no, 1=yes). {integer}
DEFAULT_ALL_OWING_ITEMSThe setting in new invoices for selecting 'Include all owing items' by default (0=no, 1=yes). {integer}
DEFAULT_AGGREGATEDThe setting in new invoices for selecting 'Aggregated items' by default (0=no, 1=yes). {integer}
DEFAULT_CALCULATED_PRE_DISCThe default setting for new invoices calculated items being pre or post discount (0=pre, 1=post). {integer}
PERMISSIONSAn array of numbers, each one signifies a user permission. {array}
PERMISSION_GROUPThe ID of the permission group the user belongs to. {string}
GRID_COLUMNSThe settings for certain grids and which columns to show and where to position them. {array}
CURRENCY: {
CODEThe international currency code for the default currency used for the job. {string}
DECIMALSHow many decimal places does the currency have. {integer}
DECIMAL_SEPARATORThe character used to separate the decimals. {string}
MULTIPLIERThe multiplier used to get the exchange rate. {float}
NAMEName of the currency. {string}
NEGATIVE_FORMATHow a negative should be displayed. {integer}
SYMBOLThe currency symbol. {string}
SYMBOL_POSITIONThe position of the currency symbol (0=before, 1=after). {integer}
THOUSAND_SEPARATORThe character used to separate thousands. {string}
}
BASE_CURRENCY: {
CODEThe international currency code for the default currency used for the job. {string}
DECIMALSHow many decimal places does the currency have. {integer}
DECIMAL_SEPARATORThe character used to separate the decimals. {string}
MULTIPLIERThe multiplier used to get the exchange rate. {float}
NAMEName of the currency. {string}
NEGATIVE_FORMATHow a negative should be displayed. {integer}
SYMBOLThe currency symbol. {string}
SYMBOL_POSITIONThe position of the currency symbol (0=before, 1=after). {integer}
THOUSAND_SEPARATORThe character used to separate thousands. {string}
}
DATE_CHECKWhen editing a job, does HireHop check dates as they are edited or just throw an error when trying to save (0=no, 1=yes). {integer}
PLUGINSA list of plugin links. {array}
DEFAULT_PRIORITYThe setting in new jobs for setting priority by default (0=no, 1=yes). {integer}
TAX_TYPESA list of the VAT/GST, etc. types. {array}
THEMEThe name of the HireHop theme for the user. {string}
DEFAULT_TAX_GROUPThe index of the default tax type to use (0 is the first. {integer}
AGENTUsed internally by HireHop.
AVAILABILITY_RANGEWithin how many days until after a job starts should availability be automatically enabled in the supplying list. TO BE DEPRECATED {integer}
AVAILABILITY_RANGE_ENABLEEnable AVAILABILITY_RANGE (0=no, 1=yes). TO BE DEPRECATED {integer}
DELIVERThe setting in new jobs for setting the delivery field. {integer}
COLLECTThe setting in new jobs for setting the collection field. {integer}
CALENDARThe user's calendar settings. {array}
fieldsArray of custom fields and their names and values. {array}
FIELD_DEFINITIONSList of the company wide custom fields and what they are. {array}

Get info by part number

Get the details of a hire or sales stock item depending on it's barcode.

get/php_functions/items_get_part_number_details.php
Send parameters:
NameDescription
idTemporary ID of the item that will be returned. (required) {string}.
job_idID of the job (required if package_id not set) {integer}.
package_idID of the package (required if job_id not set) {integer}.
qtyThe quantity needed (can be 0 just to return data). {float}
part_numberThe part number of the item to add (required). {string}
no_availabilitySet to 1 to prevent availability for all items being calculated. {integer}
price_groupWhich price group (0=price a, 1= price b & 2= price c) {integer}
localThe local date and time of the client (not required).
tzThe timezone of the client (not required).
Return parameters:
NameDescription
old_idThe temporary ID of the item. {string}
IDID of the item. {integer}
TYPEWhat the item is (1=sales or 2=hire). {integer}
PART_NUMBERThe part number of the item. {string}
QTYThe quantity needed. {float}
TITLEThe name of the item. {string}
PRICEThe base unit base price of the item. {float}
AVAILHow many available. {float or integer}
errorSet if there was an error, either a message or error number. {string or integer}

Get notes

Get a list of notes for the respective page (job, project, asset, stock, etc.).

get/php_functions/notes_list.php
Send parameters:
NameDescription
main_idID of the thing it is for, like a job or project ID (compulsory) {integer}.
typeWhat is the thing, being the doc_type variable on each page (0=nothing, 1=job, 2=stock, 3=assets, etc.) (compulsory) {integer}.
pageStarting from 1, the page number of notes to return (option, but 1 if not set)) {string}
rowsHow many rows of notes to return for each page (optional, minimum and default is 25, max is 500) {integer}
sordSort order, either 'asc' (default) or 'desc' {string}
sidxColumn to sort by ('CREATE_DATE', 'NAME' or 'JOB') {string}
Return parameters:
NameDescription
pageHow many pages in total for all of the rows
recordsHow many rows in total found.
totalHow many pages there are of data.
rows: [
0: {
idUnique ID of the note
cells: {
idUnique ID of the note {integer}
user_idID of the user who created or last edited the note. {integer}
usernameName of the user {string}
noteThe note in HTML {string}
jobThe project ID if for a project (6), the job ID if the note belongs to a job, or empty if not {integer}.
}
}
]
errorSet if an error has occurred, either an error message or error number.

Save note(s)

Save a new note or save a note edit to an ID or group of IDs.

post/php_functions/notes_save.php
Send parameters:
NameDescription
main_idThe ID(s) of the item (job, asset, consumable, etc) to apply the note to (required only for new). {integer|array|JSON string}.
typeThe 'doc_type' of the page to save it to (see 'types' in the language files) (required only for new). {integer}
idThe ID of the note to edit. If empty or zero, a new note will be created. (optional). {integer}
noteThetext of the note to save (can't be empty). (compulsory). {string}
localThe local time of the user (not needed or used) {datetime string}
tzThe timezone of the user (not needed or used) {string}
Return parameters:
NameDescription
pageHow many pages in total for all of the rows (will be 1)
recordsHow many rows in total found (will be 1.
totalHow many pages there are of data (will be 1).
rows: {
idUnique ID of the edited note
cells: {
idUnique ID of the note {integer}
user_idID of the user who created or last edited the note. {integer}
usernameName of the user {string}
noteThe note in HTML {string}
jobThe project ID if for a project (6), the job ID if the note belongs to a job, or empty if not {integer}.
}
}
errorSet if an error has occurred, either an error message or error number.

Get tasks

Get a list of tasks. The return data might include custom fields, all of which start with a '~' character.

get/php_functions/todo_list.php
Send parameters:
NameDescription
main_idThe ID of the parent (required) {integer}.
typeWhat the parent is (the doc_type) (required) {integer}.
pageWhich page of data your want (default is 1) {integer}
rowsHow many rows of data per page (minimum and default is 20, maximum is 500) (optional). {integer}
sidxThe column index field to sort by ('ID', 'DTSTART' is default, 'DUE', 'USER_ID', 'STATUS' or 'PRIORITY') (optional). {string}
sordThe order the index field is to be sorted, either 'asc' (default) or 'desc'. {string}
Return parameters:
NameDescription
pageWhat page this is (the first page is 1)
recordsHow many rows in total found.
totalHow many pages there are of data.
rows: [
0: {
idUnique ID of the task
cells: {
IDID of the of the task.
MAIN_IDThe ID of the parent.
TYPEWhat the parent is (the doc_type).
USER_IDThe ID of the user who the task is assigned to.
USER_NAMEThe name of the user who the task is assigned to.
DTSTARTThe start date of the task.
DUEThe due date of the task.
SUMMARYThe description of the task.
STATUSThe status of the task.
PRIORITYThe priority of the task.
data: {
IDID of the of the task. If empty a new task is created.
MAIN_IDThe ID of the parent.
TYPEWhat the parent is (the doc_type).
USER_IDThe ID of the user who the task is assigned to.
DTSTARTThe start date of the task.
DUEThe due date of the task.
SUMMARYThe description of the task.
STATUSThe status of the task.
PRIORITYThe priority of the task.
CUSTOM_FIELDSThe array of custom fields. {JSON array}
}
}
}
]
errorSet if an error has occurred, either an error message or error number.

Save task

Save a task. The return data might include custom fields, all of which start with a '~' character.

post/php_functions/todo_save.php
Send parameters:
NameDescription
idID of the of the task. If empty a new task is created (optional) {integer}.
main_idThe ID of the parent (required) {integer}.
typeWhat the parent is (the doc_type) (required) {integer}.
user_idThe ID of the user who the task is assigned to (required) {integer}
dtstartThe start date of the task (required) {date string}
dueThe due date of the task (optional) {date string}
summaryThe description of the task (optional) {string}
statusThe status of the task (optional) {integer}.
priorityThe priority of the task (optional) {integer}.
custom_fieldsThe array of custom fields (optional) {array or JSON string}
Return parameters:
NameDescription
pageWill always be 1
recordsWill always be 1
totalWill always be 1
rows: {
idUnique ID of the task
cells: {
IDID of the of the task. If empty a new task is created.
MAIN_IDThe ID of the parent (required).
TYPEWhat the parent is (the doc_type).
USER_IDThe ID of the user who the task is assigned to.
USER_NAMEThe name of the user who the task is assigned to.
DTSTARTThe start date of the task.
DUEThe due date of the task.
SUMMARYThe description of the task.
STATUSThe status of the task.
PRIORITYThe priority of the task.
data: {
IDID of the of the task. If empty a new task is created.
MAIN_IDThe ID of the parent (required).
TYPEWhat the parent is (the doc_type).
USER_IDThe ID of the user who the task is assigned to.
DTSTARTThe start date of the task.
DUEThe due date of the task.
SUMMARYThe description of the task.
STATUSThe status of the task.
PRIORITYThe priority of the task.
CUSTOM_FIELDSThe array of custom fields (optional) {array or JSON string}
}
}
}
errorSet if an error has occurred, either an error message or error number.

Upload multiple files

Add multiple files at once, with info, to an owner

post/modules/driver_app/files_upload.php
Send parameters:
NameDescription
typeThe owner type (1=job, 6=project, etc.) (compulsory) {integer}.
main_idID of the of the owner, like job or project ID (compulsory) {integer}.
deatilsArray of objects, being 'name' and 'description' of each image in sequence (compulsory) {array of obejcts}
custom_fieldsJSON data of custom fields data (optional) {array, object or JSON string)
waypointID of the waypoint the upload is against (optional) {integer}
filesArray of files files data to upload (compulsory) {objects}
latitudeThe current latitude sent from the device, otherwise obtained from IP address. (optional). {float}
longitudeThe current longitude sent from the device, otherwise obtained from IP address. (optional). {float}
Return parameters:
NameDescription
successArray of details with ids or errors.
STATUSSet if upload successful and 'waypoint' parameter sent, being the new status value of 2.
WAYPOINT_IDSet if upload successful and 'waypoint' parameter sent, being the ID of the waypoint.
errorSet if an error has occurred, either an error message or error number.

Save note

Save a note to the waypoint owner and update position

post/modules/driver_app/notes_upload.php
Send parameters:
NameDescription
typeThe owner type (1=job, 6=project, etc.) (compulsory) {integer}.
main_idID of the of the owner, like job or project ID (compulsory) {integer}.
noteThe note to save. (compulsory) {string}
waypointID of the waypoint the upload is against (optional) {integer}
route_idsID or IDs of the routes the update is for (required if no waypoint or registration) {integer|JSON|array}
latitudeThe current latitude sent from the device, otherwise obtained from IP address. (optional). {float}
longitudeThe current longitude sent from the device, otherwise obtained from IP address. (optional). {float}
timeThe time the last geolocation was taken. {ISO date string}
Return parameters:
NameDescription
successArray of details with ids or errors.
STATUSSet if upload successful and 'waypoint' parameter sent, being the new status value of 2.
WAYPOINT_IDSet if upload successful and 'waypoint' parameter sent, being the ID of the waypoint.
errorSet if an error has occurred, either an error message or error number.


Packages

List of packages/archives

Get a list of all available packages or archives in a job.

get/php_functions/archive_list.php
Send parameters:
NameDescription
jobID of the job to limit the archives to, otherwise if not set or 0, it will return a list of packages (default=0). {integer}.
_searchSet to true to enable filters.
descriptionDecsription filter. {string}.
pageStarting from 1, the page number of notes to return (option, but 1 if not set)) {string}
rowsHow many rows of notes to return for each page (optional, minimum and default is 25, max is 500) {integer}
sordSort order, either 'asc' (default) or 'desc' {string}
sidxColumn to sort by (''NAME', 'CREATED' or 'DESCRIPTION') {string}
Return parameters:
NameDescription
pageHow many pages in total for all of the rows
recordsHow many rows in total found.
totalHow many pages there are of data.
rows: [
0: {
idUnique ID of the note
cells: {
idUnique ID of the archive {integer}
userName of the user {string}
createdThe date and time it was created. {datetime ISO string}
descriptionA short HTML formatted description of the archive. {string}.
job_typeThe job type name the package will be applied to for new jobs. {string}
data: {
USER_IDThe ID of the user who created the archive. {integer}
DESCRIPTIONA short description of the archive. {string}.
DEPOT_LIMITSAn array of depot IDs that the archive can be used in. {array}
JOB_TYPEThe job type name the package will be applied to for new jobs. {string}
}
}
}
]
errorSet if an error has occurred, either an error message or error number.


Billing

Move invoice & credit note line items

Move invoice & credit note line items to another position in the list.

post/php_functions/billing_items_move.php
Send parameters:
NameDescription
billThe ID of the the invoice/credit notes the line items belong to (required). {integer}.
nodes: [
0: {
idID of the line item to move (required).
sidID of the new previous sibling line item (required).
prntThe ID of the immediate parent line item (required).
}
]
Return parameters:
NameDescription
items: [
0: {
IDID of the line item {integer}.
MAIN_IDThe sales, hire, labour, custom item, etc. ID. {integer}.
KINDWhat the line item is (0=heading, 1= sales, 2=hire, 3=custom, 4=labour, 5=comment & 6=calculated). {integer}.
QTYThe quantity of the line item. {float}.
FROMThe date the line item is billed from. {string}.
UPTOThe date the line item is billed upto.. {string}.
DESCRIPTIONName given to the line item. {string}.
MEMOA memo for the item. {string}.
CUSTOM_FIELDSThe custom fields assigned to the line item. {array}.
ITEMName of item in supplying list (if linked). {string}.
PART_NUMBERPart number of the line item (if linked). {string}.
UNIT_PRICEThe unit price for each line item for the duration of the invoice. {float}.
VAT_RATEThe VAT/Tax/GST rate percentage applied to the line item. {float}.
PRICEThe total price charged for the line item. {float}.
BASE_UNIT_PRICEThe unit price for the line item for each day, week, etc.. {float}.
MULTIPLIERThe multiplier used to get the UNIT_PRICE and PRICE for the duration. {float}.
ACC_NOMINAL_IDThe ID of the nominal code for the line item. {integer}.
ACC_TAX_RATE_IDThe ID of the tax rate for the line item. {integer}.
LFTThe nested tree left value of the item. {integer}.
RGTThe nested tree right value of the item.. {integer}.
}
]
errorSet if an error has occurred, either an error message or error number.

Get billing info

Get a list of invoices, deposits, credit notes and payments for a job or project. THIS WILL BE CHANGED COMPLETELY IN THE NOT SO DISTANT FUTURE!

get/php_functions/billing_list.php
Send parameters:
NameDescription
main_idID of the thing it is for, like a job or project ID (compulsory) {integer}.
typeWhat is the thing, being the doc_type variable on each page (1=job or 6=project) (compulsory) {integer}.
fixSet to '1' to do a reapir on the invoice and credit notes item tree {integer}
Return parameters:
NameDescription
banks: [
0: {
IDThe unique ID of the bank account. {integer}
DEFAULTThis will be '1' if this is the default bank account. {integer}
NAMEThe name of the bank account. {string}
}
]
currency: {
CODEThe international currency code for the default currency used for the job. {string}
DECIMALSHow many decimal places does the currency have. {integer}
DECIMAL_SEPARATORThe character used to separate the decimals. {string}
MULTIPLIERThe multiplier used to get the exchange rate. {float}
NAMEName of the currency. {string}
NEGATIVE_FORMATHow a negative should be displayed. {integer}
SYMBOLThe currency symbol. {string}
SYMBOL_POSITIONThe position of the currency symbol (0=before, 1=after). {integer}
THOUSAND_SEPARATORThe character used to separate thousands. {string}
}
default_sales_taxThe zero based index in 'tax_codes' of the default sales tax rate. {integer}
nominal_codes: [
0: {
IDThe unique ID of the nominal code. {integer}
DEFAULTThis will be '1' if this is the default nominal code. {integer}
NAMEThe name of the nominal code. {string}
CODEThe code of the nominal code. {string}
HIDDENIf '1' then this is a deleted nominal code that is not used anymore. {integer}
assignedIf '0' then it is not assigned to a nominal group item. {integer}
}
]
package_nameThe name of the accounting package assigned to the job/project. {string}
subsThe cost of all the purchase orders in the base currency. {float}
use_sales_taxIf '1', then the USA sales tax should be used.
totalIgnore
pageIgnore
recordsHow many rows returned
rows: [
0: {
kind'0' means it is a job total. {integer}
currencyThe currency code of the job. {string}
idThe job number preceeded by the letter 'a'. {string}
jobThe job number/ID. {integer}
accruedThe gross total of the job or the total amount accrued on the job is to date if it is open eneded. {float}
data: {
DEPOT_IDThe job depot ID. {integer}
JOB_NAMEThe job name. {string}
TOTALThe gross total of the job or the total amount accrued on the job is to date if it is open eneded. {float}
TYPEWill always be 0 like the 'kind' field. {integer}
}
}
1: {
kind'1' means it is an invoice. {integer}
currencyThe currency code of the job. {string}
dataDetailed data of the invoice. {associative array}.
dateThe tax point or issue date of the invoice. {date time string}
debitThe amount of the invoice. {float}
expandedWill always be true. {boolean}
idThe invoice ID preceeded by the letter 'b'. {string}
isLeafWill be false to signify that it is not a child. {boolean}
jobThe job number/ID the invoice is for. {integer}
levelWill be 0 to signify that it is a root item at tree level 0. {integer}
loadedWill always be true. {boolean}
numberThe invoice number. {string}
owingHow much is owing on the invoice in the base currency. {float}
statusThe status of the invoice. {float}
}
2: {
kind'2' means it is a credit note. {integer}
currencyThe currency code of the job. {string}
dataDetailed data of the credit note. {associative array}.
dateThe tax point or issue date of the credit note. {date time string}
creditThe amount of the credit note. {float}
idThe credit note ID preceeded by the letter 'c'. {string}
isLeafWill be true to signify that it is a child. {boolean}
levelWill be 1 to signify that it is a child of a root item. {integer}
numberThe credit note number. {string}
ownerThe ID of the owner invoice. {string}
statusThe status of the credit note. {float}
}
3: {
kind'3' means it is a payment. {integer}
creditHow much the payment is for in the base currency. {float}
currencyThe currency code of the job. {string}
dataDetailed data of the payment. {associative array}.
dateThe date of the payment. {date string}
idThe payment ID preceeded by the letter 'd' and suffixed by a '_' and the invoice number. {string}
isLeafWill be true to signify that it is a child. {boolean}
levelWill be 1 to signify that it is a child item at tree level 1. {integer}
ownerThe ID of the invoice that the payment belongs to. {string}
}
]
errorSet if an error has occurred, either an error message or error number.

Change status

Change the status of an invoice or credit note.

post/php_functions/billing_save_status.php
Send parameters:
NameDescription
idID of the invoice or credit note (compulsory). {integer}.
typeWhat are we changing, an invoice or credit note (1=invoice, 2=credit note) (compulsory) {integer}.
statusThe new status of the invoice/credit note (0=Draft, 1=Awaiting Approval, 2=Approved, 3=Paid) (compulsory). {integer}
periodThe amount of days credit (optional and for invoices only). {integer}
dateThe invoice issue date. If not set, then uses 'local', and if that not set, the it will use the UTC date (optional) {ISO date string}
due_dateThe date the invoice must be paid by. This will override 'period' (optional and for invoices only). {ISO date string}
localThe local date and time of the client (optional). {ISO datetime string}
tzThe timezone of the client (not required).
no_webhookSet to '1' to prevent a webhook from triggering
Return parameters:
NameDescription
pageHow many pages in total for all of the rows (will always be one).
recordsHow many rows in total found (will always be 1).
totalHow many pages there are of data (will always be 1).
rows: [
0: {
idUnique ID of the billing item {integer}
jobThe number of the job it belongs to. {integer}
kindWhat it is (1=invoice, 2=credit note) {integer}
dateThe date of the invoice/credit note. {ISO datetime string}
currencyThe currency of the invoice/credit note. {JSON}.
debitTotal of the invoice. {float}
owingHow much of the invoice is owing. {float}
isLeafWill be set if it is a credit note or payment. {boolean}
level0 for an invoice or deposit, 1 for a credit note or payment. {integer}
loadedWill always be true
numberThe number of the credit note or invoice. {string}
statusThe status of the invoice/credit note (0=Draft, 1=Awaiting Approval, 2=Approved, 3=Paid). {integer}
dataThe full data of the invoice, credit note, payment and/or deposit (fields vary). {array}
}
]
errorSet if an error has occurred, either an error message or error number.


Items

Get autopulls

Gets & adds autopulls for items and deletes non-relevant ones

post/php_functions/items_autopull.php
Send parameters:
NameDescription
jobID of the job (optional) {integer}.
archID of the package (optional) {integer}.
no_availabilityDo not calculate availability if set to 1 (optional) {integer}
grpWhich price group to use when adding new (0=A, 1=B & 2=C) {integer}
dataParent data {array or JSON string}
Return parameters:
NameDescription
pull: [
0: {
AVAILABLEWill always be '?' for rental and sale items and 0 for anything else. {string}
CHECKEDIf the item is selected then it will be 1, otherwise 0. {integer}
DESCRIPTIONIf it is a custom item, it will be the custom item name. {string}
FLAGThe value of the flag for the item. {integer}
IDThis is the hms_autopulls.ID {integer}
ITEM_IDThe ID in hms_items_xxxx.ID or hms_archive_xxxx.ID (0 if not set) {integer}
MAIN_IDThe ID of the stock, sale or labour management item. {integer}
NO_SCANSet to '1' if no scan is needed. {integer}
OWNER_IDThe ID of the rental item in the list. {integer}
PRICEPrice in the base currency {float}
PRICE_TYPEPrice duration to use (0=one off, 1=hourly, 2=daily, 3=weekly, 4=monthly, 5=every day, 6=every week, + custom) {integer}
PROMPTThe prompt setting for the autopull (0=no prompt, 1=prompt selected, etc.). {integer}
QTYHow many of the autopull are to be added. {float}
REPLACE_COSTThe cost of replacing the autopull in the base currency. {float}
STOCK_IDThe stock management ID (owner) that this autopull is for {integer}
TYPEWhat it is (0=heading, 1=sales, 2=hire, 3=custom, 4=labour, etc.) {integer}
UNIT_PRICEUnit price in the base currency {float}
VAT_RATEThe VAT/TAX group of the item. {integer}
WEIGHTThe weight of the item. {float}
childrenAn array of autopulls for this item, using this structure (excludes 'children'). {array}
hideSet to 1 if the autopull is hidden by default. {integer}
m_titleThe name of the owner. {string}
titleThe name of the item {string}
}
]
errorSet if an error has occurred, either an error message or error number.

Delete items

Delete items from the supplying list or a package.

post/php_functions/items_delete.php
Send parameters:
NameDescription
jobID of the job the supplying list belongs to. (compulsory if arch not set) {integer}.
archID of the package the supplying list belongs to. (compulsory if job not set) {integer}.
idsComma list of item IDs, prefixed by the type (a=heading, b=consumable, c=stock, d=custom, e=service, f=comment, g=calculated). (compulsory) {string}.
Return parameters:
NameDescription
successArray of deleted ID's, preceeded with a letter for the type of item (a=heading, b=sales, c=rental, d=custom, e=labour, f=comment, g=calculated). {array}
errorSet if an error has occurred, either an error message or error number.

Import items

Import and save a list of items to the supplying list or a package.

post/php_functions/items_import.php
Send parameters:
NameDescription
job_idID of the job the supplying list belongs to. (compulsory if arch not set) {integer}.
archive_idID of the package the supplying list belongs to. (compulsory if job not set) {integer}.
sibling_idID of the sibling that the items will be inserted after. {integer}
sibling_kindWhat is the sibling that the items will be inserted after (0=heading, 1=sales, 2=rental, 3=custom, 4=labour, 5=inline, 6=calculated)). {integer}
parent_idID of the parent heading the items will be inserted into. {integer}
rows: [
0: {
STOCK_IDID of the rental stock item. {integer}
SALES_IDID of the sales stock item. {integer}
LABOUR_IDID of the labour item. {integer}
QTYThe quantity to add. If stock, sales or labour it will default to 1. If custom and 0 or missing, it will be an inline comment. {float}
PART_NUMBERThe part number to match. Priority is the last item added and will search rental stock first then sales if there are no matches. {string}
BARCODEThe group rental or sales stock unique barcode. {string}
TITLEThe name to match. Priority is the last item added and will search rental stock first then sales and then labour if there are no previous matches. {string}
UNIT_PRICEThe unit price for the item (will default to UNIT_PRICE/QTY or 0 if either are zero). {float}
PRICEThe price for the item (will default to UNIT_PRICE * QTY or 0 if either are zero). {float}
NO_SHORTFALLFor custom or labour items to mark them as never having a shortfall with a value of 1. {integer}
NOTEThe additional inline comment for the item. {string}
MEMOThe memo for the item. {string}
}
]
Return parameters:
NameDescription
itemsArray of items added. {array}
autopullsAutopull data. {array}
availA list of other items (not in this edit) whose availability is affected by these being added (a=heading, b=sales, c=rental, d=custom, e=labour, f=comment, g=calculated). {array}
errorSet if an error has occurred, either an error message or error number.


Contacts

Save job or project to contact

Save a job or project customer or delivery address to the address book.

post/php_functions/job_save_contact.php
Send parameters:
NameDescription
CLIENT_IDID of the client company in the address book. If not set a new company will be created. If set the company name, address and telephone will be updated {integer}
JOB_IDID of the job {integer}.
PROJECT_IDID of the project {integer}.
NAMEName of the customer (required). {string}
COMPANYCompany name of the customer. {string}
ADDRESSAddress of the customer. {text}
TELEPHONETelephone number of the customer. {string}
EMAILEmail address of the customer. {string}
MOBILEMobile/cellular telephone number of the customer. {string}
CLIENTSet to 1 if a customer (default 1). {integer}
VENUESet to 1 if a delivery address (default 0). {integer}
SUBCONTRACTORSet to 1 if a subcontractor (default 0). {integer}
no_webhookSet to anything but zero to prevent a webhook (default 0). {integer}
Return parameters:
NameDescription
idID of the customer's company in the address book (CLIENT_ID field)
errorError code or message if something went wrong

List contacts

Get a list of contacts or a single contact

get/modules/contacts/list.php
Send parameters:
NameDescription
unqIf set, the ID of the company to filter contacts in. {integer}.
catIf set, the ID of the category to filter by. {integer}
delIf set to 1, include all hidden/deleted contacts. {integer}
_searchIf set to 'true', more search filters can be set. {string}.
COMPANYIf set, filter by the company name. {string}
NAMEIf set, filter by the person's name. {string}
EMAILIf set, filter by the email address. {string}
TELEPHONEIf set, filter by all the telephone numbers. {string}
RATINGIf set, filter by the rating. {string}. {integer}
LISTSIf set, fileter by a list (1=client, 2=delivery address or 3=supplier). {integer}
pageStarting from 1, the page number of notes to return (option, but 1 if not set)) {string}
rowsHow many rows of notes to return for each page (optional, minimum and default is 25, max is 500) {integer}
sordSort order, either 'asc' (default) or 'desc' {string}
sidxColumn to sort by (COMPANY', 'NAME', 'TELEPHONE', 'RATING' or 'EMAIL') {string}
Return parameters:
NameDescription
pageHow many pages in total for all of the rows
recordsHow many rows in total found.
totalHow many pages there are of data.
rows: [
0: {
idUnique ID of the person
cell: {
idUnique ID of the person {integer}
COMPANYThe name of the company. {string}.
NAMEThe name of the person. {string}.
TELEPHONEThe direct phone number of the person, if empty then the mobile/cell number, if that is empty then the company telephone number. {string}.
RATINGThe rating out of 5 of the person. {float}.
EMAILThe email address of the person. {string}.
LISTSA number present for each list to include the contact in (1=client, 2=delivery & 3=supplier). So if '13' then it is in the client and supplier list. {string}
ACC_IDS: [
0: {
IDID of the accounts package contact is included in. {string}
PACKAGEThe name of the accounts package contact is included in. {string}
ACC_IDThe reference from the accounts package for the contact. {string}
ACC_ID_2The second reference from the accounts package for the contact (used on some for supplier if a contact can't be a contact and supplier in the accounts package). {string}
}
]
data: {
IDUnique ID of the person {integer}
cIDUnique ID of the company {integer}
COMPANYThe name of the company. {string}.
NAMEThe name of the person. {string}.
JOBThe job description of the person. {string}.
ADDRESSThe address of the company. {string}.
TELEPHONEThe phone number of the company. {string}.
FAXThe fax number of the company. {string}.
VAT_NUMBERThe VAT/GST/Tax number of the company. {string}.
SOURCEA short description of how the company came to be in the address book. {string}.
WEBWebsite of the company. {string}.
MEMOMemo for the company. {string}.
CLIENTSet to 1 to include the company in the client list. {integer}.
VENUESet to 1 to include the company in the list of delivery addresses. {integer}.
SUBSet to 1 to include the company in the supplier list. {integer}.
DDThe direct phone number of the person. {string}.
CELLThe mobile/cell phone number of the person. {string}.
EMAILThe email address of the person. {string}.
pMEMOA memo for the person. {string}.
MAILSet to 1 to include the person in mailing lists/bulk emails. {integer}.
STATUSThe status of the person. {string}.
IMAGE_IDThe ID of the image for the person. {integer}.
names: [
0: {
IDUnique ID of the person in the company {integer}
NAMESimon Mitchell
}
]
heads: [
0: {
IDUnique ID of the category. {integer}
HEADThe name of the person in the company. {string}.
}
]
PRICE_GROUPWhich price group to use (0=price A, 1=price B & 2=price C). {integer}
CREDIT_PERIODHow many days credit the company has. {integer}
CREDIT_LIMITWhat is the maximum amount of credit given to the company. {float}
ACCOUNT_SUSPENDEDSet to 1 if the company is on a warning, or 2 if it is suspended. {integer}
SUSPENDED_NOTEThe text to show as warning for the reason for the warning or suspension. {string}
DEFAULT_DISCOUNTThe percentage default discount given to the company. {float}
INV_EMAILEmail address used as default to send invoices to. {string}
PAY_EMAILEmail address used as default to send purchase orders to. {string}
INV_ADDRESSAddress to be used in invoices. {string}
PAY_ADDRESSAddress to be used in purchase orders. {string}
RATINGThe rating out of 5 of the person. {float}.
ACCOUNT_REFERENCEA reference the user uses for this company. {string}
ACC_IDS: [
0: {
IDID of the accounts package contact is included in. {string}
PACKAGEThe name of the accounts package contact is included in. {string}
ACC_IDThe reference from the accounts package for the contact. {string}
ACC_ID_2The second reference from the accounts package for the contact (used on some for supplier if a contact can't be a contact and supplier in the accounts package). {string}
}
]
DEPOT_LIMITSArray of depot IDs where the contact can be seen (including virtual depots), or empty for all. {array}.
CUSTOM_FIELDSThe custom fields for the company. {array}.
PERSON_CUSTOM_FIELDSThe custom fields for the person. {array}.
TASKSHow many tasks assigned to the company. {integer}
NOTESHow many notes linked to the company. {integer}
FILESHow many files attached to the company. {integer}
}
}
}
]
errorSet if an error has occurred, either an error message or error number.

Save a contact

Save a new or edit of a contact, being the company, person or both.

post/modules/contacts/save.php
Send parameters:
NameDescription
IDThe ID of the person or 0 (default) for new. {integer}.
cIDThe ID of the company or 0 (default) for new. {integer}.
NAMEThe name of the person (required). {string}.
JOBThe job description of the person. {string}.
DDThe direct phone number of the person. {string}.
CELLThe mobile/cell phone number of the person. {string}.
EMAILThe email address of the person. {string}.
pMEMOA memo for the person. {string}.
MAILSet to 1 to include the person in mailing lists/bulk emails. {integer}.
STATUSThe status of the person. {string}.
RATINGThe rating out of 5 of the person. {float}.
PERSON_CUSTOM_FIELDSThe custom fields for the company. {array}.
COMPANYThe name of the company. {string}.
ADDRESSThe address of the company. {string}.
TELEPHONEThe phone number of the company. {string}.
FAXThe fax number of the company. {string}.
VAT_NUMBERThe VAT/GST/Tax number of the company. {string}.
SOURCEA short description of how the company came to be in the address book. {string}.
WEBWebsite of the company. {string}.
MEMOMemo for the company. {string}.
CLIENTSet to 1 to include the company in the client list. {integer}.
VENUESet to 1 to include the company in the list of delivery addresses. {integer}.
SUBSet to 1 to include the company in the supplier list. {integer}.
DEPOT_LIMITSArray of depot IDs where the contact can be seen (including virtual depots), or empty for all. {array}.
CUSTOM_FIELDSThe custom fields for the company. {array}.
Return parameters:
NameDescription
pageHow many pages in total for all of the rows
recordsHow many rows in total found.
totalHow many pages there are of data.
rows: [
0: {
idUnique ID of the person
cell: {
idUnique ID of the person {integer}
COMPANYThe name of the company. {string}.
NAMEThe name of the person. {string}.
TELEPHONEThe direct phone number of the person, if empty then the mobile/cell number, if that is empty then the company telephone number. {string}.
RATINGThe rating out of 5 of the person. {float}.
EMAILThe email address of the person. {string}.
LISTSA number present for each list to include the contact in (1=client, 2=delivery & 3=supplier). So if '13' then it is in the client and supplier list. {string}
ACC_IDS: [
0: {
IDID of the accounts package contact is included in. {string}
PACKAGEThe name of the accounts package contact is included in. {string}
ACC_IDThe reference from the accounts package for the contact. {string}
ACC_ID_2The second reference from the accounts package for the contact (used on some for supplier if a contact can't be a contact and supplier in the accounts package). {string}
}
]
data: {
IDUnique ID of the person {integer}
cIDUnique ID of the company {integer}
COMPANYThe name of the company. {string}.
NAMEThe name of the person. {string}.
JOBThe job description of the person. {string}.
ADDRESSThe address of the company. {string}.
TELEPHONEThe phone number of the company. {string}.
FAXThe fax number of the company. {string}.
VAT_NUMBERThe VAT/GST/Tax number of the company. {string}.
SOURCEA short description of how the company came to be in the address book. {string}.
WEBWebsite of the company. {string}.
MEMOMemo for the company. {string}.
CLIENTSet to 1 to include the company in the client list. {integer}.
VENUESet to 1 to include the company in the list of delivery addresses. {integer}.
SUBSet to 1 to include the company in the supplier list. {integer}.
DDThe direct phone number of the person. {string}.
CELLThe mobile/cell phone number of the person. {string}.
EMAILThe email address of the person. {string}.
pMEMOA memo for the person. {string}.
MAILSet to 1 to include the person in mailing lists/bulk emails. {integer}.
STATUSThe status of the person. {string}.
IMAGE_IDThe ID of the image for the person. {integer}.
names: [
0: {
IDUnique ID of the person in the company {integer}
NAMESimon Mitchell
}
]
heads: [
0: {
IDUnique ID of the category. {integer}
HEADThe name of the person in the company. {string}.
}
]
PRICE_GROUPWhich price group to use (0=price A, 1=price B & 2=price C). {integer}
CREDIT_PERIODHow many days credit the company has. {integer}
CREDIT_LIMITWhat is the maximum amount of credit given to the company. {float}
ACCOUNT_SUSPENDEDSet to 1 if the company is on a warning, or 2 if it is suspended. {integer}
SUSPENDED_NOTEThe text to show as warning for the reason for the warning or suspension. {string}
DEFAULT_DISCOUNTThe percentage default discount given to the company. {float}
INV_EMAILEmail address used as default to send invoices to. {string}
PAY_EMAILEmail address used as default to send purchase orders to. {string}
INV_ADDRESSAddress to be used in invoices. {string}
PAY_ADDRESSAddress to be used in purchase orders. {string}
RATINGThe rating out of 5 of the person. {float}.
ACCOUNT_REFERENCEA reference the user uses for this company. {string}
ACC_IDS: [
0: {
IDID of the accounts package contact is included in. {string}
PACKAGEThe name of the accounts package contact is included in. {string}
ACC_IDThe reference from the accounts package for the contact. {string}
ACC_ID_2The second reference from the accounts package for the contact (used on some for supplier if a contact can't be a contact and supplier in the accounts package). {string}
}
]
DEPOT_LIMITSArray of depot IDs where the contact can be seen (including virtual depots), or empty for all. {array}.
CUSTOM_FIELDSThe custom fields for the company. {array}.
PERSON_CUSTOM_FIELDSThe custom fields for the person. {array}.
TASKSHow many tasks assigned to the company. {integer}
NOTESHow many notes linked to the company. {integer}
FILESHow many files attached to the company. {integer}
}
}
}
]
errorSet if an error has occurred, either an error message or error number.


Payment Suspensions

Delete payment holiday

Delete a payment holiday permanently.

post/php_functions/pays_suspend_delete.php
Send parameters:
NameDescription
idID of the payment holiday item (compulsory). {integer}.
job_idID of the job the payment holiday belongs to. (optional). {integer}
no_webhookSet to '1' to prevent a webhook from triggering
Return parameters:
NameDescription
idOld ID of the payment holiday item if successful. {integer}.
errorSet if an error has occurred, either an error message or error number.

Get payment holidays

Get a list of payment holidays assigned to a job.

get/php_functions/pays_suspend_list.php
Send parameters:
NameDescription
job_idID of the job the payment holiday belongs to (compulsory). {integer}.
pageStarting from 1, the page number of notes to return (optional, default is 1)) {string}
rowsHow many rows of notes to return for each page (optional, minimum and default is 25, max is 500) {integer}
sordSort order, either 'asc' (default) or 'desc' {string}
sidxColumn to sort by ('FROM', 'UNTIL', 'UNIT_DEDUCTION', 'QTY' or 'TITLE') {string}
Return parameters:
NameDescription
pageHow many pages in total for all of the rows
recordsHow many rows in total found.
totalHow many pages there are of data.
rows: [
0: {
IDUnique ID of the payment holiday line item {integer}
TITLEName of the item {string}
QUANTITYHow many are in the supplying list. {numeric}
FROMThe date and time the payment holiday starts in ISO format. {string}
PRICEThe base price (base unit price * qty) of the supplying list item. {float}
PRICE_TYPEThe price type of the supplying list item. {integer}
UNTILThe date and time the payment holiday ends in ISO format. {string}
UNIT_DEDUCTIONThe amount per item to be reduced by {float}
DESCRIPTIONDescription of the payment holiday in HTML {string}
data: {
IDUnique ID of the payment holiday line item {integer}
CREATE_DATEThe date and time the payment holiday was created. {string}
JOB_IDThe job number the payment holiday belongs to. {integer}
ITEM_STOCK_IDThe stock supplying item the payment holiday is assigned to. {integer}
ITEM_CUSTOM_IDThe custom supplying item the payment holiday is assigned to. {integer}
ITEM_LABOUR_IDThe labour supplying item the payment holiday is assigned to. {integer}
TYPEWhat type of item the payment holiday is for (2=Hire stock, 3=Custom and 4=Labour). {integer}
TITLEName of the item {string}
FROMThe date and time the payment holiday starts in ISO format. {string}
UNTILThe date and time the payment holiday ends in ISO format. {string}
QUANTITYHow many are in the supplying list. {numeric}
UNIT_DEDUCTIONThe amount per item to be reduced by {float}
PRICEThe base price (base unit price * qty) of the supplying list item. {float}
PRICE_TYPEThe price type of the supplying list item. {integer}
DESCRIPTIONThe description for the payment holiday. {string}
MEMOThe memo for the payment holiday. {string}
USER_IDThe ID of the user who created the payment holiday. {integer}
CUSTOM_FIELDSCustom fields assigned to the payment holiday. {JSON}
}
}
]
errorSet if an error has occurred, either an error message or error number.

Save payment holiday edit

Save a single payment holiday edit.

post/php_functions/pays_suspend_save_edit.php
Send parameters:
NameDescription
IDID of the payment holiday (required) {integer}.
UNIT_DEDUCTIONThe amount per item to be reduced by {float}
DESCRIPTIONDescription of the payment holiday (required). {string}
MEMOThe memo for the payment holiday. {string}
FROMThe date and time the payment holiday starts in ISO format. {string}
UNTILThe date and time the payment holiday ends in ISO format. {string}
no_webhookSet to '1' to prevent a webhook from triggering
Return parameters:
NameDescription
IDUnique ID of the payment holiday line item {integer}
TITLEName of the item {string}
QUANTITYHow many are in the supplying list. {numeric}
FROMThe date and time the payment holiday starts in ISO format. {string}
PRICE_TYPEThe price type used (0=One off (default), 1=Hours, 2=Days, 3=Weeks, 4=Months, etc.). {integer}
UNTILThe date and time the payment holiday ends in ISO format. {string}
UNIT_DEDUCTIONThe amount per item to be reduced by {float}
DESCRIPTIONDescription of the payment holiday in HTML {string}
INVOICE_IDThe invoice the payment holiday is used in. {integer}
data: {
IDUnique ID of the payment holiday line item {integer}
CREATE_DATEThe date and time the payment holiday was created. {string}
JOB_IDThe job number the payment holiday belongs to. {integer}
ITEM_STOCK_IDThe stock supplying item the payment holiday is assigned to. {integer}
ITEM_CUSTOM_IDThe custom supplying item the payment holiday is assigned to. {integer}
ITEM_LABOUR_IDThe labour supplying item the payment holiday is assigned to. {integer}
TYPEWhat type of item the payment holiday is for (2=Hire stock, 3=Custom and 4=Labour). {integer}
TITLEName of the item {string}
INVOICE_IDThe invoice the payment holiday is used in. {integer}
FROMThe date and time the payment holiday starts in ISO format. {string}
UNTILThe date and time the payment holiday ends in ISO format. {string}
QUANTITYHow many are in the supplying list. {numeric}
UNIT_DEDUCTIONThe amount per item to be reduced by {float}
PRICE_TYPEThe price type used in the supplying list (0=One off, 1=Hours, 2=Days, 3=Weeks, 4=Months, etc.). {integer}
DESCRIPTIONDescription of the payment holiday. {string}
MEMOThe memo for the payment holiday. {string}
USER_IDThe ID of the user who created the payment holiday. {integer}
CUSTOM_FIELDSCustom fields assigned to the payment holiday. {JSON}
}
errorSet if an error has occurred, either an error message or error number.

Save a new payment holiday

Create multiple payment holidays for a job or multiple jobs.

post/php_functions/pays_suspend_save_new.php
Send parameters:
NameDescription
FROMThe date and time the payment holiday starts in ISO format (required). {string}
UNTILThe date and time the payment holiday ends in ISO format (required). {string}
DESCRIPTIONThe note for the payment holiday (required). {string}
MEMOThe memo for the payment holiday (optional). {string}
price_typeThe price type to filter by (0=all, 1=hourly, 2=daily, 3=weekly, 4=monthly, 5=every day, 6=every week, 7=propertioned week, ...) (optional). {integer}.
duration_schemeThe name of the job DURATION_SCHEME filter (optional). {string}.
statusThe job status filter (optional). {float}.
depotThe ID of the job depot or virtual depot ID filter (optional). {integer}.
selected_stock_idsThe IDs of the stock items to include (optional). {array|json|integer}.
selected_custom_idsThe IDs of the custom items to include (optional). {array|json|integer}.
selected_labour_idsThe IDs of the labour items to include (optional). {array|json|integer}.
selected_jobsThe IDs of the jobs to include (optional). {array|json|integer}.
days_per_weekThe chargeable days per week (optional, default 7). {integer}.
multiplierThe amount to multiply the base price for each item by (required). {float}.
no_webhookSet to '1' to prevent a webhook from triggering
Return parameters:
NameDescription
0: {
IDUnique ID of the payment holiday line item {integer}
TITLEName of the item {string}
QUANTITYHow many are in the supplying list. {numeric}
FROMThe date and time the payment holiday starts in ISO format. {string}
PRICE_TYPEThe price type used (0=One off (default), 1=Hours, 2=Days, 3=Weeks, 4=Months, etc.). {integer}
UNTILThe date and time the payment holiday ends in ISO format. {string}
UNIT_DEDUCTIONThe amount per item to be reduced by {float}
DESCRIPTIONDescription of the payment holiday in HTML. {string}
INVOICE_IDThe invoice the payment holiday is used in. {integer}
data: {
IDUnique ID of the payment holiday line item {integer}
CREATE_DATEThe date and time the payment holiday was created. {string}
JOB_IDThe job number the payment holiday belongs to. {integer}
ITEM_STOCK_IDThe stock supplying item the payment holiday is assigned to. {integer}
ITEM_CUSTOM_IDThe custom supplying item the payment holiday is assigned to. {integer}
ITEM_LABOUR_IDThe labour supplying item the payment holiday is assigned to. {integer}
TYPEWhat type of item the payment holiday is for (2=Hire stock, 3=Custom and 4=Labour). {integer}
TITLEName of the item {string}
INVOICE_IDThe invoice the payment holiday is used in. {integer}
FROMThe date and time the payment holiday starts in ISO format. {string}
UNTILThe date and time the payment holiday ends in ISO format. {string}
QUANTITYHow many are in the supplying list. {numeric}
UNIT_DEDUCTIONThe amount per item to be reduced by {float}
PRICE_TYPEThe price type used in the supplying list (0=One off, 1=Hours, 2=Days, 3=Weeks, 4=Months, etc.). {integer}
DESCRIPTIONDescription of the payment holiday. {string}
MEMOThe memo for the payment holiday. {string}
USER_IDThe ID of the user who created the payment holiday. {integer}
CUSTOM_FIELDSCustom fields assigned to the payment holiday. {JSON}
}
}


Projects

Get project data

Load the data for a specific project by passing the project ID (number).

get/php_functions/project_get_data.php
Send parameters:
NameDescription
idThe project ID (number) to get the data for (compulsory) {integer}.
Return parameters:
NameDescription
IDThe project number. {integer}
USERThe user ID of manager 1. {integer}
USER_NAMEThe name of manger 1. {string}
USER_EMAILThe email of manger 1. {string}
USER2The user ID of manager 2. {integer}
USER2_NAMEThe name of manger 2. {string}
USER2_EMAILThe email of manger 2. {string}
CREATE_USERThe user ID who created the project. {integer}
CREATED_BYThe user name who created the project. {string}
CREATE_DATEThe date and time the the project was created (YYYY-MM-DD hh:mm). {string}
NAMEName number of the customer. {string}
COMPANYCompany name of the customer. {string}
ADDRESSAddress of the customer. {string}
TELEPHONETelephone number of the client. {string}
MOBILEMobile/celluar telephone number of the customer. {string}
EMAILEmail address of the client. {string}
STATUSThe status code of the project. {float}
JOB_TYPEWhat type of job it is. {string}
DELIVER_TOName of the job delivery building. {string}
DELIVERY_ADDRESSDelivery location address. {string}
DELIVERY_TELEPHONEDelivery address phone number. {string}
OUT_DATEThe date and time the equipment used in the job is reserved from (YYYY-MM-DD hh:mm).
START_DATEDate the job starts charging from (YYYY-MM-DD hh:mm). {date string}
END_DATEDate the job ends (YYYY-MM-DD hh:mm). {date string}
RETURN_DATEThe date and time that all equipment on the job will become available again (YYYY-MM-DD hh:mm). {date string}
COLOURThe colour of the job in HEX. {string}
PROJECT_NAMEName of the project. {string}
DETAILSMemo about the project. {string}
DEPOT_IDID of the depot the project is in (virtual if not root). {integer}
root_depot_idThe ID if the depot is a standard depot. {integer}
VIRTUAL_DEPOT_IDIf the depot is a virtual depot, it's ID. {integer}
DEFAULT_DISCOUNTThe default discount percentage to give to the customer. {float}
PRICE_GROUPWhich price group to use (A=0, B=1, & C=2). {integer}
DEPOTName of the depot the project is in. {string}
CLIENT_IDClient company ID in the address book the job is assigned to. {integer}
ACCOUNT_SUSPENDEDIs the account suspended (yes=1 or no=0). {integer}
SUSPENDED_NOTEIf account warning or suspended, a note saying why. {string}
NOTESHow many notes on the job. {integer}
TASKSHow many tasks in the job. {integer}
FILESHow many files attached to the job. {integer}
CREDIT_PERIODCredit time in days for the customer. {integer}
INV_ADDRESSAddress for invoicing. {string}
INV_EMAILEmail for invoicing. {string}
CURRENCY: {
CODEThe international currency code for the default currency used for the job. {string}
DECIMALSHow many decimal places does the currency have. {integer}
DECIMAL_SEPARATORThe character used to separate the decimals. {string}
MULTIPLIERThe multiplier used to get the exchange rate. {float}
NAMEName of the currency. {string}
NEGATIVE_FORMATHow a negative should be displayed. {integer}
SYMBOLThe currency symbol. {string}
SYMBOL_POSITIONThe position of the currency symbol (0=before, 1=after). {integer}
THOUSAND_SEPARATORThe character used to separate thousands. {string}
}
CUSTOM_FIELDSObject array of custom field objects. {object}
CUSTOM_INDEXThe indexable custom field value. {string}
CLIENT_MEMOMemo from the address book. {string}
ACC_PACKAGE_IDThe ID of the accounting package to use. {integer}
errorSet if an error has occurred, either an error message or error number.

Save job ammendments in bulk

Save values to a multitude of jobs at once. The 'project_id' is optional, however the 'jobs' field must be set, as well as at least one of the other fields. If you are setting dates, you must send all the date parameters. Only jobs not locked and without an account suspension will update.

post/php_functions/project_job_bulk_change_save.php
Send parameters:
NameDescription
job_idsA list of job numbers to update {integer | array of integers | JSON string}.
project_idThe project ID the jobs belong to (optional) {integer}.
OUT_DATEThe new outgoing date & time to apply to the jobs (YYYY-MM-DD hh:mm). {string}.
JOB_DATEThe new job date & time to apply to the jobs (YYYY-MM-DD hh:mm). {string}.
JOB_ENDThe new outgoing date & time to apply to the jobs or empty for open ended (YYYY-MM-DD hh:mm). {string}.
RETURN_DATEThe new outgoing date & time to apply to the jobs or empty for open ended (YYYY-MM-DD hh:mm). {string}.
STATUSThe new status value to apply to the jobs. {float}
VENUEThe new deliver to name to apply to the jobs. {string}.
VENUE_ADDRESSThe new delivery address to apply to the jobs. {string}.
VENUE_TELEPHONEThe new delivery phone number to apply to the jobs. {string}.
no_webhookSet to 1 prevent a webhook from triggering. {integer}
Return parameters:
NameDescription
rows: {
job_id: {
OUT_DATEThe date and time the equipment used in the job is reserved from (YYYY-MM-DD hh:mm).
JOB_DATEDate the job starts charging from (YYYY-MM-DD hh:mm).
JOB_ENDDate the job ends (YYYY-MM-DD hh:mm).
RETURN_DATEThe date and time that all equipment on the job will become available again (YYYY-MM-DD hh:mm).
STATUSThe status code of the job
COLOURThe colour of the job in HEX
VENUEName of the job delivery building
VENUE_ADDRESSDelivery location address
VENUE_TELEPHONEDelivery address phone number
}
}
errorSet if an error has occurred, either an error message or error number.

Save project

Save a new or edited project details. The posting data field names are not case sensitive.

post/php_functions/project_save.php
Send parameters:
NameDescription
addressThe address of the customer {multiline string}
client_idThe ID of the customer's company in the address book (optional) {integer}
client_refThe client's reference for the project {string}
collection_fromName of where it is to be collected from. {text}
collection_addressCollection address. {text}
collection_telephoneTelephone number of where it is to be collected. {text}
companyThe company name of the customer {string}
currencyDefault currency object of the project (optional and only if multi-currency plugin enabled) {json array or json string}
custom_fieldsObject array of custom field objects (optional). {json array or json string}
custom_indexA custom field that is indexed in the database for faster searching {string}
delivery_addressThe address of the delivery location {multiline string}
delivery_telephoneThe telephone number of the delivery location {string}
deliver_toThe name of the delivery location {string}
depotThe ID of the depot (compulsory for new) {integer}
detailsDetails memo of the project {multiline string}
emailThe email of the customer {string}
endThe finish date and time (YYYY-MM-DD hh:mm:ss) of the project (optional) {string}
extra_dates: [
0: {
NAMEUnique field name of the extra date (required if not DEFAULT). {string}
LABELLabel to display when whowing the date (required if not DEFAULT). {string}
DEFAULTMust be set to 'OUT', 'START', 'FINISH' or 'RETURN' only if it is a standard default date. {string}
REQUIREDSet to 1 if compulsory, if VALUE is empty and compulsory, an error 3 (missing paramaters) will be returned. {integer}
VALUEThe value in 'YYYY-MM-DD hh:mm:ss' format or null if empty (required but not for DEFAULT dates). {string}
}
]
fieldsDepricated custom fields (see custom_fields).
idNumber of the project or empty for a new project (optional) {integer}.
inv_addressThe invoice address for the customer {multiline string}
mobileThe mobile/cell of the customer {string}
nameThe contact name of the customer {string}
no_empty_date_checkSet to 1 to stop checks for required empty extra dates (only used for editing the extra dates structure in a job). {integer}
outThe outgoing date and time (YYYY-MM-DD hh:mm:ss) of the project (compulsory for new) {string}
project_nameThe name of the project {string}
startThe start date and time (YYYY-MM-DD hh:mm:ss) of the project (compulsory for new) {string}
statusThe status of the project, being 0 for active and 1 for closed (optional) {integer}.
telephoneThe telephone number of the customer {string}
toThe return date and time (YYYY-MM-DD hh:mm:ss) of the project (optional) {string}
typeThe type of project {string}
use_atName of where it is being used. {text}
use_at_addressCollection address. {text}
use_at_telephoneTelephone number of where it is being used. {text}
Return parameters:
NameDescription
IDNumber of the project or empty for a new project {integer}.
USERThe ID of the project manager {integer}
USER_NAMEThe name of the project manager {string}
USER_EMAILThe email of the project manager {string}
USER2The ID of the second project manager {integer}
USER2_NAMEThe name of the second project manager {string}
USER2_EMAILThe email of the second project manager {string}
CREATE_USERThe ID of the user who created the project {integer}
CREATED_BYThe name of the user who created the project {string}
CREATE_DATEThe date and time (YYYY-MM-DD hh:mm:ss) the project was created {string}
COLLECTION_FROMName of where it is to be collected from (only if set).
COLLECTION_ADDRESSCollection address (only if set).
COLLECTION_TELEPHONETelephone number of where it is to be collected (only if set).
NAMEThe contact name of the customer {string}
COMPANYThe company name of the customer {string}
ADDRESSThe address of the customer {multiline string}
TELEPHONEThe telephone number of the customer {string}
MOBILEThe mobile/cell of the customer {string}
EMAILThe email of the customer {string}
STATUSThe status of the project, being 0 for active and 1 for closed {integer}.
JOB_TYPEThe type of project {string}
DELIVER_TOThe name of the delivery location {string}
DELIVERY_ADDRESSThe address of the delivery location {multiline string}
DELIVERY_TELEPHONEThe telephone number of the delivery location {string}
OUT_DATEThe outgoing date and time (YYYY-MM-DD hh:mm:ss) of the project {string}
START_DATEThe start date and time (YYYY-MM-DD hh:mm:ss) of the project {string}
END_DATEThe end date and time (YYYY-MM-DD hh:mm:ss) of the project {string}
RETURN_DATEThe return date and time (YYYY-MM-DD hh:mm:ss) of the project {string}
COLOURThe colour in hexidecimal assigned to the project {string}
PROJECT_NAMEThe name of the project {string}
DETAILSDetails memo of the project {multiline string}
DEPOT_IDThe ID of the depot the project is assigned to {integer}
root_depot_idThe root ID of the depot the project is assigned to {integer}
VIRTUAL_DEPOT_IDThe virtual ID of the depot the project is assigned to {integer}
DEFAULT_DISCOUNTThe default discount automatically given to new jobs {float}
PRICE_GROUPWhich price group new jobs will default to (0=price A, 1=price B and 2=price C) {integer}
DEPOTThe name of the depot the project is assigned to {string}
CLIENT_IDThe ID of the customer's company in the address book {integer}
INV_ADDRESSThe invoice address of the customer {multiline string}
ACCOUNT_SUSPENDEDIs the account suspended (2) or just has a warning (1) {integer}
SUSPENDED_NOTEThe note that will appear if the account is suspended or has a warning {string}
NOTESHow many notes in the project {integer}
TASKSHow many tasks in the project {integer}
FILESHow many files in the project {integer}
CREDIT_PERIODThe default credit period in days for new jobs {integer}
INV_EMAILThe email of the accounts payable {string}
EXTRA_DATES: [
0: {
NAMEUnique field name of the extra date (required if not DEFAULT). {string}
LABELLabel to display when whowing the date (required if not DEFAULT). {string}
DEFAULTMust be set to 'OUT', 'START', 'FINISH' or 'RETURN' only if it is a standard default date. {string}
REQUIREDSet to 1 if compulsory, if VALUE is empty and compulsory, an error 3 (missing paramaters) will be returned. {integer}
VALUEThe value in 'YYYY-MM-DD hh:mm:ss' format or null if empty (required but not for DEFAULT dates). {string}
}
]
USE_ATName of where it is being used (only if set).
USE_AT_ADDRESSCollection address (only if set).
USE_AT_TELEPHONETelephone number of where it is being used (only if set).
CURRENCYCurrency object of the project {json}
fieldsCustom fields to {json}
CUSTOM_INDEXA custom field that is indexed in the database for faster searching {string}
CLIENT_MEMOThe memo assigned to the customer in the address book {multiline string}
ACC_PACKAGE_IDThe ID of the default accounting package assigned to the project {integer}
errorSet if an error has occurred, either an error message or error number.

Get a list of jobs in a project

Returns a list of jobs that are in a project. This uses paging and returns a minimum of 25 jobs and a maximum of 500 per call.

get/php_functions/projects_jobs_list.php
Send parameters:
NameDescription
idThe project ID the jobs belong to (compulsory) {integer}.
pageStarting from 1, the page number of notes to return (optional, default is 1) {string}
rowsHow many rows of notes to return for each page (optional, default is 25) {integer}
sordSort order, either 'asc' (default) or 'desc' {string}
sidxColumn to sort by ('CUSTOM_INDEX', 'JOB_DATE', 'JOB_END', 'ID', 'JOB_NAME', 'VENUE','STATUS' or 'JOB_TYPE') (default is JOB_DATE) {string}
Return parameters:
NameDescription
pageThe page number of the data (starting from 1). {integer}
totalThe total number of pages. {integer}
recordsHow many jobs in total in the project. {integer}
rows: [
0: {
idA unique id for the row made by appending the job number after the string 'jobs_'. {string}
cell: {
IDThe job number. {integer}
OUT_DATEThe date and time the equipment used in the job is reserved from (YYYY-MM-DD hh:mm). {string}
JOB_DATEDate the job starts charging from (YYYY-MM-DD hh:mm). {string}
JOB_ENDDate the job ends (YYYY-MM-DD hh:mm). {string}
RETURN_DATEThe date and time that all equipment on the job will become available again (YYYY-MM-DD hh:mm). {string}
JOB_NAMEThe name given to the job {string}
VENUEName of the job delivery building {string}
JOB_TYPEThe name given to the type of the job {string}
STATUSThe status code of the job {float}
COLOURThe colour of the job in HEX {string}
DEPOTThe depot ID the job belongs to {integer}
CUSTOM_INDEXThe optional custom index field. {string}
}
}
]
errorSet if an error has occurred, either an error message or error number.


Suppliers

Save purchase order

Save a new purchase order or save a purchase order edit.

post/php_functions/subcontractors_save.php
Send parameters:
NameDescription
idThe ID of the purchase order to save. If empty or zero, a new purchase order will be created. {integer}
main_idThe ID of the owner (job, project or empty) of the purchase order (required only for new and if 'type' is 1 or 6). {integer}.
typeThe 'doc_type' of the page to save it to (1=job, 6=project, 0=no owner) (required only for new). {integer}
persThe ID of the person in the address book the PO is made to. {integer}.
internalThe ID of the job the internal PO is for (-1 = new internal job, 0 = normal subcontractor, >0 means internal job id). {integer}.
depotThe ID of the root depot the PO is for. {integer}.
descThe description of the PO. {string}
kindWhat type of PO is this (0=Rental, 1=Labour, 2=Service, 3=Purchase, 4=Transport, 5=Internal, 6=Travel). {integer}
refThe supplier reference of the PO. {string}
tax_totalThe total of the tax to charge if using USA tax. {float}
memoThe memo of the PO. {string}
addrThe delivery address of the PO. {string}
checkinSet to 1 if the PO needs to be checked in. {integer}.
checkoutSet to 1 if the PO needs to be checked out. {integer}.
sceduledSet to 1 to include the PO in the job schedule. {integer}.
fulfilSet to 1 to exclude the PO from checking if it encapsulates the job dates. {integer}.
collectSet to 1 if the PO needs to be collected. {integer}.
returnSet to 1 if the PO needs to be returned. {integer}.
update_itemsSet to 1 to to calculate new prices if the dates have been changed. {integer}.
no_vatSet to 1 to exclude the PO from VAT, Tax, GST, etc.. {integer}.
zero_codeThe ID of the xero rated tax code. {integer}
vat_rateThe rate of tax if using USA tax. {float}
resThe ID of the resource the PO is assigned to. {integer}.
acc_idThe ID of the accounts package ID. If not set, the owner accounts package will be used. {integer}.
startThe start date of the PO. {date string}.
finishThe end date of the PO. {date string}.
currencyThe currency settings of the PO. {currency object}.
localThe local time of the user (not needed or used) {datetime string}
tzThe timezone of the user (not needed or used) {string}
Return parameters:
NameDescription
deafult_package_nameThe name of the default accounting package
nominal_codes: [
0: {
IDThe ID of the nominal
CODEThe code of the nominal
NAMEThe name to describe the nominal
DEFAULTIf 1 then it is the default
HIDDENIf set to 1 then it is deleted
assignedThe nominal group ID the nominal is assigned to
}
]
packages: [
0: {
IDThe ID of the accounts package
NAMEThe name of the accounts package
}
]
rowsArray of PO data
tax_codes: [
0: {
IDThe ID of the tax code
DESCRIPTIONThe name to describe the nominal
DEFAULTIf 1 then it is the default
HIDDENIf set to 1 then it is deleted
RATEThe total rate of the tax/VAT/GST.
assignedThe nominal group ID the nominal is assigned to
}
]
use_sales_taxIf 1, then by default all new purchase orders should use sales tax
errorSet if an error has occurred, either an error message or error number.


Subcontractors

Save PO line item

Save or edit a purchase order line item to a purchase order

post/php_functions/subcontractors_save_item.php
Send parameters:
NameDescription
idID of the line item (optional, default 0) {integer}.
kindWhat it is (heading, sales, hire,custom, etc.) (optional) {integer}
subPurchase order ID the line item is linked to (compulsory) {integer}
qtyThe quantity (optional, default 1) {float}
unitThe unit price in the base currency (optional, default 0) (float)
priceThe total price in the base currency (optional, default 0) (float)
descDescription of the item (compulsory) {string}
price_typeWhat is the pricing (one off, daily, weekly, etc. See 'price types') (optional, default 0) {integer}
base_unit_priceThe unit price before duration multiplying, eg. the price of one item for a day (optional, default 0) (float)
memoMemo for the waypoint (optional) {multiline string}
vat_rateThe percentage of the VAT/Tax/GST (optional, default 0) (float)
vat_idID of the VAT/Tax/GST rate (optional, default 0) {integer}.
nominalID of the nominal code (optional, default 0) {integer}.
selectedID of the selected line item so HireHop can position new line items (optional, default 0) {integer}.
tzThe timezone the user is in (optional but recommended) {string}
localThe local date and time (optional but recommended) {string}
custom_fieldsThe custom fields JSON (optional) {json}
Return parameters:
NameDescription
IDUnique ID of the line item
errorSet if an error has occurred, either an error message or error number.


Purchase orders

Get purchase orders

Get a list of item shortages to be added to a purchase order in a job, or just a list for projects and purchase order screen.

get/php_functions/subcontractors_short_list.php
Send parameters:
NameDescription
jobThe job number the list is for. {integer}.
headThe name of the category to filter by. {string}.
kindA string of characters telling what to include in the list ('1'=sales, '2'=hire, '3'=custom, '4'=labour & 's'=only list shortfalls). {string}.
supplierThe ID of the supplying company in the address book. {integer}
pageStarting from 1, the page number of notes to return (option, but 1 if not set)) {string}
rowsHow many rows of notes to return for each page (optional, minimum and default is 25, max is 500) {integer}
sordSort order, either 'asc' (default) or 'desc' {string}
sidxColumn to sort by ('TITLE', 'SHORT' or 'KIND') {string}
Return parameters:
NameDescription
pageHow many pages in total for all of the rows
recordsHow many rows in total found.
totalHow many pages there are of data.
rows: [
0: {
idUnique ID of the note
cells: {
IDUnique ID of the line item {string}
MAIN_IDID of the linked item. {integer}
TYPEWhat the item is (1=sales, 2=hire, 3=custom & 4=labour). {integer}
TITLEThe name of the item. {string}
ESTIMATED_COSTThe estimated cost of the item. {float}.
PREVIOUS_COSTThe latest agreed cost of the item from the supplier for the item. {float}.
UNIT_PRICEIf no previous cost, then estimated cost is used. {float}.
TOTALThe UNIT_PRICE * SHORT. {float}.
SHORTHow many are short. {float}.
}
}
]
errorSet if an error has occurred, either an error message or error number.


Sales stock

Get sales stock

DEPRICATED Get a list of sales stock items (this will soon be changing).

post/modules/consumables/list.php
Send parameters:
NameDescription
headID of the heading to filter by (a parent will include all child heading items) (default 0) {integer}.
unqID of the item to filter by. {integer}
delSet to false to hide deleted items. {boolean}
_searchSet to 'true' to enable further filtering (optional). {boolean}
TITLEName to filter by (optional). {string}
ALT_TITLEName to filter by (optional). {string}
PART_NUMBERPart number to filetr by (optional). {string}
pageThe page number of data to return. (optional) {integer}
rowsHow many rows to return (min 20, max 200). (optional) {integer}
sordIf the data should be ascending (asc) or descending (desc). (optional) {string}
sidxThe field name to sort by (TITLE, ALT_TITLE, PRICE1, PRICE2, PRICE3, WEIGHT, PART_NUMBER, LOCATION, HEIGHT, LENGTH, WIDTH, BARCODE, QUANTITY) (optional) {string}
Return parameters:
NameDescription
heads: [
0: {
LFTThe left value of the category. {integer}
CATAGORYThe ID of the category. {integer}
HEADINGThe name of the category. {string}
}
]
pageThe page number returned. {integer}
recordsHow many rows in all the pages. {integer}
totalTotal amount of pages for the result. {integer}
rows: [
0: {
idThe ID of the item (integer).
cell: [
0: {
idThe ID of the item (integer).
TITLEName of the item. {string}
ALT_TITLEThe alternative name of the item. {string}
PRICE1Price A of the item. {float}
PRICE2Price B of the item. {float}
PRICE3Price C of the item. {float}
WEIGHTThe weight of the item in KG. {float}
PART_NUMBERThe part number of the item. {string}
LOCATIONThe location description of the item in the warehouse, like shelf number (optional). {string}
WIDTHThe width of the item in meters. {float}
LENGTHThe length of the item in meters. {float}
HEIGHTThe height of the item in meters. {float}
BARCODEThe group barcode of the item. {string}
data: {
IDThe ID of the item (integer).
QUANTITYHow many are currently on the shelf. {float}
TITLEName of the item. {string}
ALT_TITLEThe alternative name of the item. {string}
CATAGORYThe category ID of the item. {integer}
PRICE1Price A of the item. {float}
PRICE2Price B of the item. {float}
PRICE3Price C of the item. {float}
MAX_DISCOUNTThe maximum discount percentage allowed for the item (optional, 0 to 100). {float}
VAT_RATEThe tax/GST/VAT type to use. {integer}
STATUSThe status index of the item (0=Active, 1=Hidden in picklist, 2=Deleted)(optional). {float}
IMAGE_IDThe ID of the image for the item. {integer}
MEMOThe memo of the item. {string}
COST_PRICEThe cost to rent this item in. {float}
BOUGHT_FROMThe name of the supplier the item was bought from. {string}
WEIGHTThe weight of the item in KG. {float}
WIDTHThe width of the item in meters. {float}
LENGTHThe length of the item in meters. {float}
HEIGHTThe height of the item in meters. {float}
VOLUMEThe volume of the item in m3. {float}
LOCATIONThe location description of the item in the warehouse, like shelf number. {string}
ACC_NOMINALThe sales nominal group ID for the item. {integer}
ACC_NOMINAL_POThe purchase nominal group ID for the item. {integer}
BARCODEThe group barcode of the item (optional). {string}
PART_NUMBERThe part number of the item. {string}
COUNTRY_ORIGINThe country of origin of the item. Used on carnet documents. {string}
HS_CODEThe customs code of the item. {string}
REORDER_LEVELThe reorder level the item has to be to appear in the reorder report. {float}
REORDER_QTYThe quantity to reorder on each purchase. {float}
DEPOT_LIMITSAn array or string of depot ID's the item is limited to. {array or array-string
FLAGThe deafult flag to set when adding a new item into a supplying list (0=none, 1=Not important, 2=Important & 3=Technical). {integer}
CUSTOM_FIELDSCustom fields of the item {array}.
crumbsThe breadcrumb details of the category the item is in {JSON array}
}
}
]
}
]
errorSet if an error has occurred, either an error message or error number.

Save sales stock

DEPRICATED Save changes or create a new sales stock item. (this will soon be changing)

post/modules/consumables/save.php
Send parameters:
NameDescription
IDID of the sales stock item or zero creates a new item (default 0) {integer}.
TITLEName of the item (required for new). {string[85]}
ALT_TITLEThe alternative name of the item (optional). {string[85]}
BARCODEThe group barcode of the item (optional). {string[45]}
CATAGORY(DEPRICATED) This is the ID of the category and will be replaced with a new global category field called 'CATEGORY_ID'. {integer}
DESCRIPTIONThe description of the item (optional). {string}
PRICE1Price A of the item (optional). {float}
PRICE2Price B of the item (optional). {float}
PRICE3Price C of the item (optional). {float}
MAX_DISCOUNTThe maximum discount percentage allowed for the item (optional, 0 to 100). {float}
VAT_RATEThe tax/GST/VAT type to use (optional). {integer}
STATUSThe status index of the item (0=Active, 1=Hidden in picklist, 2=Deleted)(optional). {float}
MEMOThe memo of the item (optional). {string}
COST_PRICEThe cost to rent this item in (optional). {float}
WEIGHTThe weight of the item in KG (optional). {float}
WIDTHThe width of the item in meters (optional). {float}
LENGTHThe length of the item in meters (optional). {float}
HEIGHTThe height of the item in meters (optional). {float}
LOCATIONThe location description of the item in the warehouse, like shelf number (optional). {string[45]}
BOUGHT_FROMThe name of merchant where the item is bought from (optional). {string}
REORDER_LEVELWhen this quantity or lower is all that remains in stock it will appear in the shortfall report (optional). {float/empty string}
REORDER_QTYHow many need should be re-ordered when re-ordering. {float}
ACC_NOMINALThe sales nominal group ID for the item (optional). {integer}
ACC_NOMINAL_POThe purchase nominal group ID for the item (optional). {integer}
PART_NUMBERThe part number of the item (optional). {string[25]}
COUNTRY_ORIGINThe country of origin of the item. Used on carnet documents. (optional). {string[45]}
HS_CODEThe customs code of the item. {string}
FLAGThe deafult flag to set when adding a new item into a supplying list (0=none, 1=Not important, 2=Important & 3=Technical) (optional). {integer}
DEPOT_LIMITSAn array or string of depot ID's the item is limited to (optional). {array or array-string}
IMAGE_IDThe ID of the image for the item (optional). {integer}
IMAGEThe image data of the new image (optional). {BASE 64}
CUSTOM_FIELDSCustom fields of the item (array).
Return parameters:
NameDescription
heads: [
0: {
LFTThe left value of the category. {integer}
CATAGORYThe ID of the category. {integer}
HEADINGThe name of the category. {string}
}
]
pageThe page number returned. {integer}
recordsHow many rows in all the pages. {integer}
totalTotal amount of pages for the result. {integer}
rows: [
0: {
idThe ID of the item (integer).
cell: [
0: {
idThe ID of the item (integer).
TITLEName of the item. {string}
ALT_TITLEThe alternative name of the item. {string}
PRICE1Price A of the item. {float}
PRICE2Price B of the item. {float}
PRICE3Price C of the item. {float}
WEIGHTThe weight of the item in KG. {float}
PART_NUMBERThe part number of the item. {string}
LOCATIONThe location description of the item in the warehouse, like shelf number (optional). {string}
WIDTHThe width of the item in meters. {float}
LENGTHThe length of the item in meters. {float}
HEIGHTThe height of the item in meters. {float}
BARCODEThe group barcode of the item. {string}
data: {
IDThe ID of the item (integer).
QUANTITYHow many are currently on the shelf. {float}
TITLEName of the item. {string}
ALT_TITLEThe alternative name of the item. {string}
CATAGORYThe category ID of the item. {integer}
PRICE1Price A of the item. {float}
PRICE2Price B of the item. {float}
PRICE3Price C of the item. {float}
MAX_DISCOUNTThe maximum discount percentage allowed for the item (optional, 0 to 100). {float}
VAT_RATEThe tax/GST/VAT type to use. {integer}
STATUSThe status index of the item (0=Active, 1=Hidden in picklist, 2=Deleted)(optional). {float}
IMAGE_IDThe ID of the image for the item. {integer}
MEMOThe memo of the item. {string}
COST_PRICEThe cost to rent this item in. {float}
BOUGHT_FROMThe name of the supplier the item was bought from. {string}
WEIGHTThe weight of the item in KG. {float}
WIDTHThe width of the item in meters. {float}
LENGTHThe length of the item in meters. {float}
HEIGHTThe height of the item in meters. {float}
VOLUMEThe volume of the item in m3. {float}
LOCATIONThe location description of the item in the warehouse, like shelf number. {string}
ACC_NOMINALThe sales nominal group ID for the item. {integer}
ACC_NOMINAL_POThe purchase nominal group ID for the item. {integer}
BARCODEThe group barcode of the item (optional). {string}
PART_NUMBERThe part number of the item. {string}
COUNTRY_ORIGINThe country of origin of the item. Used on carnet documents. {string}
HS_CODEThe customs code of the item. {string}
REORDER_LEVELThe reorder level the item has to be to appear in the reorder report. {float}
REORDER_QTYThe quantity to reorder on each purchase. {float}
DEPOT_LIMITSAn array or string of depot ID's the item is limited to. {array or array-string
FLAGThe deafult flag to set when adding a new item into a supplying list (0=none, 1=Not important, 2=Important & 3=Technical). {integer}
CUSTOM_FIELDSCustom fields of the item {array}.
crumbsThe breadcrumb details of the category the item is in {JSON array}
}
}
]
}
]
errorSet if an error has occurred, either an error message or error number.

Save stock adjustment

Save a stock level adjustment.

post/modules/consumables/tally_save.php
Send parameters:
NameDescription
idThe ID of the existing adjustment or zero (default) for new (optional). {integer}
qtyThe quantity to adjust the stock level by (compulsory). {float}
consThe ID of the Sales Item (compulsory). {integer}
detailsA short description of the reason for the stock adjustment (compulsory). {string}
localThe local time of the user (not needed or used) {datetime string}
tzThe timezone of the user (not needed or used) {string}
Return parameters:
NameDescription
pageHow many pages in total for all of the rows
recordsHow many rows in total found.
totalHow many pages there are of data.
rows: [
0: {
idThe ID of the item (integer).
cell: [
0: {
idThe ID of the adjustment (integer).
kindWhat is the adjustment. {integer}
dateThe date and time of the adjustment (ISO). {string}
qtyThe amount of the adjustment. {float}
detailsA short description of the adjustment. {string}
userName of the user who did the adjustment. {string}
data: {
IDThe ID of the adjustment (integer).
KINDWhat is the adjustment. {integer}
JOBThe job ID the adjustment is assigned to. {integer}
PROJECTThe job ID the adjustment is assigned to. {integer}
USERID of the user who did the adjustment. {integer}
QTYThe amount of the adjustment. {float}
DETAILSA short description of the adjustment. {string}
DATEThe date and time of the adjustment (ISO). {string}
REPAIRThe ID of the repair/maintenance it was used in. {integer}
}
}
]
}
]
errorSet if an error has occurred, either an error message or error number.


Address Book

Delete contact

Delete a company or a person from a company in the address book. All deletions are soft deletes, meaning a person linked to the company will have their STATUS set to 1.

post/modules/contacts/delete.php
Send parameters:
NameDescription
idID of the person to delete, or 0 if you want to delete the company. If this is the last person attached to the company, the 'con' parameter must be set to 1 as this person being deleted will delete the company. (optional, default 0) {integer}.
cidID of the company to delete or the company the person is attached to (compulsory) {integer}
conIf deleting a company, this must be set to 1 to confirm it is to be deleted. This is to prevent accidental deletion of a company. (optional) {integer}
no_webhookThis will prevent a webhook from being triggered for the event.
tokenThe API token is required if being called from outside of HireHop (optional) {string}
Return parameters:
NameDescription
successWill be present and true if all went well {boolean}
errorWill have the error number or message {integer or string}
confirmWill be present and true if the 'con' field needs to be set to 1 to delete a company. {boolean}
name_countHow many people will be deleted in the company. Only present if confirm set. {integer}
namesA JSON array of people's names and their ID's that will be deleted if the company is deleted. Only present if confirm set. {associative array}


Route Planner

Get user waypoints

Get the vehicles/routes for a given date for the current user. This gets all deliveries for the logged in driver on date 'start'.

get/modules/driver_app/list.php
Send parameters:
NameDescription
waypoint_idID of the waypoint to get (optional) {integer}.
route_idID of the route (vehicle) to get (optional) {integer}.
startThe date (YYYY-MM-DD hh:mm:ss) to limit the search to (compulsory if no route_id or waypoint_id) {string}
depotThe depot ID to limit the search to (optional) {integer}
Return parameters:
NameDescription
waypoints: {
typeWill be 'waypoint' {string}
IDUnique ID of the waypoint
JOB_IDThe job number
SUB_IDThe unique ID of the purchase order
DEPOT_IDThe unique ID of the root depot (not a virtual depot)
ROUTE_IDThe unique ID of the vehicle route it is attached to.
DIRECTIONWhich direction it is going (0=delivery, 1=collection, 2=service)
DATEThe date and time the waypoint needs to take place
POSITIONThe numeric order in a vehicle that it will be placed.
ADDRESSThe waypoint address.
OWNER_ADDRESSThe delivery address of the job or subcontractor that the waypoint belongs to.
LATITUDEThe latitude of the waypoint.
LONGITUDEThe longitude of the waypoint.
DESCRIPTIONA brief description of the waypoint.
WEIGHTWeight set by user assigned to the vehicle in kg
OWNER_WEIGHTSum of weight of all items in the job or purchase order in kg
MEMOA memo of the waypoint
CUSTOM_FIELDSThe custom fields attached to the waypoint.
JOB_NAMEThe name of the job attached to the waypoint
VENUEThe delivery address name of the destination.
DEPOT_NAMEThe name of the depot the waypoint is part of.
OUT_DATEThe outgoing date of the job the waypoint is part of.
JOB_DATEThe job start date of the job the waypoint is part of.
JOB_ENDThe job end date of the job the waypoint is part of.
RETURN_DATEThe date the equipment will be returned in the job the waypoint is part of.
JOB_CUSTOM_FIELDSThe custom fields attached to the waypoint's job.
items: [
0: {
item_indexA unique index for the tree node. {string}
IDID of the item with a prefix {string}
TYPEWhat type it is (0=heading, 1=sales, 2=stock, 3=custom, 4=labour, 5=comment). {integer}
QUANTITYHow many of the line item {float}
NAMEName of the item {string}
ADDITIONALAdditional note for the item {string}
MEMOMemo of the item {string}
WEIGHTTotal weight of all the items {float}
AUTOPULLThe autopull ID if the item is an autopull {integer}
LFTLeft nested tree value {integer}
RGTRight nested tree value {integer}
}
]
}
routes: {
typeWill be 'route' {string}
IDID of the route/vehicle {integer}
VEHICLE_IDThe ID of the vehicle if not a custom one. {integer}
DRIVERDriver's user ID assigned to the route/vehicle {integer}
DRIVER_NAMEDriver's name assigned to the route/vehicle {string}
DRIVER_EMAILDriver's email assigned to the route/vehicle {string}
DRIVER_TELEPHONEDriver's telephone number assigned to the route/vehicle {string}
ASSISTANT_1First assistant's user ID assigned to the route/vehicle {integer}
ASSISTANT_1_NAMEFirst assistant's name assigned to the route/vehicle {string}
ASSISTANT_1_EMAILFirst assistant's email assigned to the route/vehicle {string}
ASSISTANT_1_TELEPHONEFirst assistant's telephone number assigned to the route/vehicle {string}
ASSISTANT_2Second assistant's user ID assigned to the route/vehicle {integer}
ASSISTANT_2_NAMESecond assistant's name assigned to the route/vehicle {string}
ASSISTANT_2_EMAILSecond assistant's email assigned to the route/vehicle {string}
ASSISTANT_2_TELEPHONESecond assistant's telephone number assigned to the route/vehicle {string}
DESCRIPTIONDescription of the route/vehicle {string}
MEMOMemo of the route/vehicle {multiline string}
VEHICLE_REGRegistration of the vehicle {string}
DEPOT_IDDepot ID the vehicle/route is assigned to {integer}
DEPOT_NAMEName of the depot the vehicle/route is assigned to {string}
DATEDate the vehicle/route is set to {string}
DATAAdditional vehicle/route data {array}
CUSTOM_FIELDSCustom fields for the vehicle/route {array}
}
errorSet if an error has occurred, either an error message or error number.

Save route geolocations

Save the geolocation of routes and/or a saved vehicle only if the time is greater than the last saved time.

post/modules/driver_app/save_geolocations.php
Send parameters:
NameDescription
waypointID of a waypoint that is part of a route (required if no route or registration) {integer}
route_idsID or IDs of the routes the update is for (required if no waypoint or registration) {integer|JSON|array}
registrationIf no waypoint or route, the coordinates will be saved to the vehicles with a matching registration. {string}
latitudeThe current latitude sent from the device, otherwise obtained from IP address. (optional). {float}
longitudeThe current longitude sent from the device, otherwise obtained from IP address. (optional). {float}
timeThe time the geolocation was taken in UTC. {ISO datetime string}
geolocation_timeSame as 'time'. {ISO datetime string}
localThe local time of the client device (if time not set, this will be used). {ISO datetime string}
tzThe timezone of the client device (required if time or local set). {string}
Return parameters:
NameDescription
success: {
TRACKING_LATITUDEThe current latitude sent from the device, otherwise obtained from IP address. (optional). {float}
TRACKING_LONGITUDEThe current longitude sent from the device, otherwise obtained from IP address. (optional). {float}
TRACKING_TIMEThe time the geolocation was taken. {ISO datetime string}
TRACKING_USER_IDThe ID of the user. {integer}
}
errorSet if an error has occurred, either an error message or error number.

Save waypoint status

Save the status of a waypoint and update the owner vehicle coordinates

post/modules/driver_app/status_save.php
Send parameters:
NameDescription
IDID of the waypoint to save (required) {integer}.
STATUSStatus value of the new status (required) {float}.
Return parameters:
NameDescription
IDThe ID of the waypoint) {integer}.
STATUSThe status of the waypoint {integer}
errorSet if an error has occurred, either an error message or error number.

Delete vehicle route

Permanently deletes a vehicle route from a date in the route planner. It must be empty and not contain any waypoints otherwise it won't delete.

post/modules/route_planner/delete_route.php
Send parameters:
NameDescription
IDID of the empty vehicle route to delete (compulsory) {integer}.
Return parameters:
NameDescription
IDOld ID of the deleted route
errorSet if an error has occurred, either an error message or error number.

Delete vehicle

Delete a template vehicle from your list of vehicles.

post/modules/route_planner/delete_vehicle.php
Send parameters:
NameDescription
IDID of the vehicle to delete (compulsory) {integer}.
Return parameters:
NameDescription
IDOld ID of the deleted vehicle
errorSet if an error has occurred, either an error message or error number.

Delete waypoint

Permanently deletes a waypoint.

post/modules/route_planner/delete_waypoint.php
Send parameters:
NameDescription
IDID of the empty vehicle route to delete (compulsory) {integer}.
Return parameters:
NameDescription
IDOld ID of the deleted vehicle
errorSet if an error has occurred, either an error message or error number.

Calculate route

Calculates directions and timings for a vehicle route.

post/modules/route_planner/geolocate_directions.php
Send parameters:
NameDescription
idID of the vehicle route (required). {integer}
optimizeArrange the waypoints in a more efficient order (0=no [default], 1=yes) {integer}
start_atWhat time to start calculating the directions from {datetime string}
Return parameters:
NameDescription
DIRECTIONSA Google Maps directions JSON object.
waypoints_data: [
0: {
IDID of the waypoint
LATITUDELatitude of the coordinates of the waypoint
LONGITUDELongitude of the coordinates of the waypoint
ADDRESSAddress of the coordinates of the waypoint
POSITIONPosition in the order of deliveries
}
]
errorSet if an error has occurred, either an error message or error number.

Geolocate waypoints

Calculates and then saves waypoint coordinates, using up mapping credits on the user's account

post/modules/route_planner/geolocate_waypoints.php
Send parameters:
NameDescription
idsAn array of a maximum of 15 waypoint IDs (compulsory) {JSON or array}.
regionThe region ccTLD code to prioritise (optional default 'us' for USA) {string}
Return parameters:
NameDescription
waypointsArray of waypoint objects that got a successful geolocation with ID, LONGITUDE, LATITUDE and ADDRESS {array}
errorSet if an error has occurred, either an error message or error number.

Get route locations

Get the last logged location for routes.

get/modules/route_planner/get_route_locations.php
Send parameters:
NameDescription
route_idID of the route to get. This will limit the results to just this route (optional). {integer}.
startThe start date and time (YYYY-MM-DD hh:mm:ss) of the search criteria (compulsory if no route_id) {string}
finishThe finish date and time (YYYY-MM-DD hh:mm:ss) of the search criteria (compulsory if no route_id) {string}
depotThe depot ID to limit the search to (0 is all depots) (optional, default 0) {integer}
localThe local time of the client device (not used). {ISO datetime string}
tzThe timezone of the client device (not used). {string}
Return parameters:
NameDescription
routes: {
IDID of the route/vehicle {integer}
TRACKING_LATITUDEThe last known latitude of the vehicle. {float}
TRACKING_LONGITUDEThe last known longitude of the vehicle. {float}
DATAAdditional vehicle/route data {array}
CUSTOM_FIELDSCustom fields for the vehicle/route {array}
}
errorSet if an error has occurred, either an error message or error number.

Get waypoints

Get waypoints for a specific job or purchase order

get/modules/route_planner/get_waypoints.php
Send parameters:
NameDescription
JOB_IDID of the job (optional) {integer}.
SUB_IDID of the purchase order (optional) {integer}.
Return parameters:
NameDescription
waypoints: {
IDUnique ID of the waypoint
JOB_IDThe job number
SUB_IDThe unique ID of the purchase order
DEPOT_IDThe unique ID of the root depot (not a virtual depot)
ROUTE_IDThe unique ID of the vehicle route it is attached to or NULL for unasigned.
DIRECTIONWhich direction it is going (0=delivery, 1=collection, 2=service)
DATEThe date and time the waypoint needs to take place
POSITIONThe numeric order in a vehicle that it will be done.
ADDRESSThe waypoint address.
OWNER_ADDRESSThe delivery address of the job or subcontractor that the waypoint belongs to.
LATITUDEThe latitude of the waypoint.
LONGITUDEThe longitude of the waypoint.
DESCRIPTIONA brief description of the waypoint.
WEIGHTWeight set by user assigned to the vehicle in kg
OWNER_WEIGHTSum of weight of all items in the job or purchase order in kg. {float}
MEMOA memo of the waypoint
CUSTOM_FIELDSThe custom fields attached to the waypoint.
JOB_NAMEThe name of the job attached to the waypoint
VENUEThe delivery address name of the destination.
DEPOT_NAMEThe name of the depot the waypoint is part of.
OUT_DATEThe outgoing date of the job the waypoint is part of.
JOB_DATEThe job start date of the job the waypoint is part of.
JOB_ENDThe job end date of the job the waypoint is part of.
RETURN_DATEThe date the equipment will be returned in the job the waypoint is part of.
JOB_CUSTOM_FIELDSThe custom fields attached to the waypoint's job.
DRIVERThe name of the driver if one has been assigned
ASSISTANT_1The name of the first assistant if one has been assigned
ASSISTANT_2The name of the second assistant if one has been assigned
}
owner_weightSum of weight of all items in the job or purchase order in kg. {float}
errorSet if an error has occurred, either an error message or error number.

Get waypoints and vehicles

Get waypoints and vehicles over a given period, or get a specific waypoint.

get/modules/route_planner/list.php
Send parameters:
NameDescription
waypoint_idID of the waypoint to get (optional) {integer}.
route_idID of the route (vehicle) to get (optional) {integer}.
startThe start date and time (YYYY-MM-DD hh:mm:ss) of the search criteria (compulsory if no route_id or waypoint_id) {string}
finishThe finish date and time (YYYY-MM-DD hh:mm:ss) of the search criteria (compulsory if no route_id or waypoint_id) {string}
depotThe depot ID to limit the search to (0 is all depots) (optional, default 0) {integer}
Return parameters:
NameDescription
waypoints: {
typeWill be 'waypoint' {string}
IDUnique ID of the waypoint
JOB_IDThe job number the waypoint is linked to.
SUB_IDThe unique ID of the purchase order
DEPOT_IDThe unique ID of the root depot (not a virtual depot)
ROUTE_IDThe unique ID of the vehicle route it is attached to or NULL for unasigned.
DIRECTIONWhich direction it is going (0=delivery, 1=collection, 2=service)
DATEThe date and time the waypoint needs to take place
POSITIONThe numeric order in a vehicle that it will be done.
ADDRESSThe waypoint address.
OWNER_ADDRESSThe delivery address of the job or subcontractor that the waypoint belongs to.
LATITUDEThe latitude of the waypoint.
LONGITUDEThe longitude of the waypoint.
DESCRIPTIONA brief description of the waypoint.
WEIGHTWeight set by user assigned to the vehicle in kg
OWNER_WEIGHTSum of weight of all items in the job or purchase order in kg
MEMOA memo of the waypoint
CUSTOM_FIELDSThe custom fields attached to the waypoint.
JOB_NAMEThe name of the job attached to the waypoint
VENUEThe delivery address name of the destination.
DEPOT_NAMEThe name of the depot the waypoint is part of.
OUT_DATEThe outgoing date of the job the waypoint is part of.
JOB_DATEThe job start date of the job the waypoint is part of.
JOB_ENDThe job end date of the job the waypoint is part of.
RETURN_DATEThe date the equipment will be returned in the job the waypoint is part of.
JOB_CUSTOM_FIELDSThe custom fields attached to the waypoint's job.
}
routes: {
typeWill be 'route' {string}
IDID of the route/vehicle {integer}
DRIVERDriver's user ID assigned to the route/vehicle {integer}
DRIVER_NAMEDriver's name assigned to the route/vehicle {string}
DRIVER_EMAILDriver's email assigned to the route/vehicle {string}
DRIVER_TELEPHONEDriver's telephone number assigned to the route/vehicle {string}
ASSISTANT_1First assistant's user ID assigned to the route/vehicle {integer}
ASSISTANT_1_NAMEFirst assistant's name assigned to the route/vehicle {string}
ASSISTANT_1_EMAILFirst assistant's email assigned to the route/vehicle {string}
ASSISTANT_1_TELEPHONEFirst assistant's telephone number assigned to the route/vehicle {string}
ASSISTANT_2Second assistant's user ID assigned to the route/vehicle {integer}
ASSISTANT_2_NAMESecond assistant's name assigned to the route/vehicle {string}
ASSISTANT_2_EMAILSecond assistant's email assigned to the route/vehicle {string}
ASSISTANT_2_TELEPHONESecond assistant's telephone number assigned to the route/vehicle {string}
DESCRIPTIONDescription of the route/vehicle {string}
MEMOMemo of the route/vehicle {multiline string}
VEHICLE_REGRegistration of the vehicle {string}
DEPOT_IDDepot ID the vehicle/route is assigned to {integer}
DEPOT_NAMEName of the depot the vehicle/route is assigned to {string}
DATEDate the vehicle/route is set to {string}
TRACKING_LATITUDEThe last known latitude of the vehicle. {float}
TRACKING_LONGITUDEThe last known longitude of the vehicle. {float}
TRACKING_TIMEThe time the last known coordinates of the vehicle were obtained in UTC. {datetime string}
DATAAdditional vehicle/route data {array}
CUSTOM_FIELDSCustom fields for the vehicle/route {array}
}
vehicles: [
0: {
IDID of the vehicle in the list {integer}
DESCRIPTIONDescription of the route/vehicle {string}
MEMOMemo of the route/vehicle {multiline string}
VEHICLE_REGRegistration of the vehicle {string}
STATUSStatus of the vehicle (0=Available, 1=Unavaileable, 2=Sold {decimal}
DEPOT_IDDepot ID the vehicle/route is assigned to {integer}
CUSTOM_FIELDSCustom fields for the vehicle/route {array}
}
]
errorSet if an error has occurred, either an error message or error number.

Save waypoint coordinates

Save the coordinates for a waypoint

post/modules/route_planner/save_coordinates.php
Send parameters:
NameDescription
IDID of the waypoint (compulsory) {integer}.
LATITUDELatitude of the waypoint (compulsory) {float}
LONGITUDELongitude of the waypoint (compulsory) {float}
Return parameters:
NameDescription
waypointID of the successfully saved waypoint {integer}
errorSet if an error has occurred, either an error message or error number.

Change waypoint parents

Change the parent of waypoints to a vehicle or nothing

post/modules/route_planner/save_parents.php
Send parameters:
NameDescription
idsID of the waypoints to re-assign (compulsory) {integer or array of integers}.
siblingID of the sibling it is to be inserted after {integer}.
route_idID of the vehicle route the waypoint is to be assigned to (0 means no route) {integer}
Return parameters:
NameDescription
ROUTE_IDThe ID of the new vehicle route
errorSet if an error has occurred, either an error message or error number.

Save vehicle route

Saves a vehicle route data

post/modules/route_planner/save_route.php
Send parameters:
NameDescription
IDID of the vehicle route to edit or 0 to add a new one (optional, default 0) {integer}.
STATUSStatus of the waypoint 0=Active, 1=Delivered (optional, default 0) {integer}
DESCRIPTIONDescription of the vehicle route (optional but recommended) {string}
MEMOMemo for the waypoint (optional) {multiline string}
VEHICLE_REGRegistration of the vehicle (optional but recommended) {string}
WEIGHTThe weight of the vehicle in KG. {float}
DATEThe date the route is due to take place (compulsory) {date}
DEPOT_IDDepot ID the delivery is linked to (compulsory for new) {integer}
USER_IDUser ID assigned to the route/vehicle {integer}
ASSISTANT_1First assistant's user ID assigned to the route/vehicle {integer}
ASSISTANT_2Second assistant's user ID assigned to the route/vehicle {integer}
CUSTOM_FIELDSThe custom fields JSON (optional) {json}
Return parameters:
NameDescription
IDID of the route/vehicle {integer}
DRIVERDriver's user ID assigned to the route/vehicle {integer}
DRIVER_NAMEDriver's name assigned to the route/vehicle {string}
DRIVER_EMAILDriver's email assigned to the route/vehicle {string}
DRIVER_TELEPHONEDriver's telephone number assigned to the route/vehicle {string}
ASSISTANT_1First assistant's user ID assigned to the route/vehicle {integer}
ASSISTANT_1_NAMEFirst assistant's name assigned to the route/vehicle {string}
ASSISTANT_1_EMAILFirst assistant's email assigned to the route/vehicle {string}
ASSISTANT_1_TELEPHONEFirst assistant's telephone number assigned to the route/vehicle {string}
ASSISTANT_2Second assistant's user ID assigned to the route/vehicle {integer}
ASSISTANT_2_NAMESecond assistant's name assigned to the route/vehicle {string}
ASSISTANT_2_EMAILSecond assistant's email assigned to the route/vehicle {string}
ASSISTANT_2_TELEPHONESecond assistant's telephone number assigned to the route/vehicle {string}
DESCRIPTIONDescription of the route/vehicle {string}
MEMOMemo of the route/vehicle {multiline string}
VEHICLE_REGRegistration of the vehicle {string}
WEIGHTThe weight of the vehicle in KG. {float}
DEPOT_IDDepot ID the vehicle/route is assigned to {integer}
DEPOT_NAMEName of the depot the vehicle/route is assigned to {string}
DATEDate the vehicle/route is set to {string}
DATAAdditional vehicle/route data {array}
CUSTOM_FIELDSCustom fields for the vehicle/route {array}
errorSet if an error has occurred, either an error message or error number.

Save vehicle route

Saves a vehicle route data

post/modules/route_planner/save_vehicle.php
Send parameters:
NameDescription
IDID of the vehicle to edit or 0 to add a new one (optional, default 0) {integer}.
DESCRIPTIONDescription of the vehicle (compulsory) {string}
MEMOMemo for the vehicle (optional) {multiline string}
VEHICLE_REGRegistration of the vehicle (optional but recommended) {string}
WEIGHTThe weight of the vehicle in KG. {float}
DEPOT_IDDepot ID the vehicle is linked to (compulsory for new) {integer}
STATUSStatus of the vehicle 0=Available, 1=Unavailable (optional, default 0) {integer}
CUSTOM_FIELDSThe custom fields JSON (optional) {json}
Return parameters:
NameDescription
IDID of the vehicle {integer}
DESCRIPTIONDescription of the vehicle {string}
MEMOMemo of the vehicle {multiline string}
VEHICLE_REGRegistration of the vehicle {string}
WEIGHTThe weight of the vehicle in KG. {float}
DEPOT_IDDepot ID the vehicle is assigned to {integer}
STATUSStatus of the vehicle (0=available, 1=unavailable) {integer}
CUSTOM_FIELDSCustom fields for the vehicle {array}
errorSet if an error has occurred, either an error message or error number.

Save waypoint

Saves a waypoint (delivery or collection) data

post/modules/route_planner/save_waypoint.php
Send parameters:
NameDescription
IDID of the waypoint to edit or 0 to add a new one (optional, default 0) {integer}.
JOB_IDJob number the waypoint is linked to (optional) {integer}
SUB_IDPurchase order ID the waypoint is linked to (optional) {integer}
DEPOT_IDDepot ID the delivery is linked to (compulsory for new) {integer}
ROUTE_IDVehicle route the waypoint is assigned to. 0 removes it from a vehicle route (optional, defgault 0) (integer)
DESCRIPTIONDescription of the waypoint (optional but recommended) {string}
DIRECTIONThe waypoint direction (0=Delivery, 1=Collection, 2=Service, 100=Comment or others for custom values) (optional, default 0) {integer}
STATUSStatus of the waypoint 0=Active, 1=Delivered (optional, default 0) {integer}
POSITIONThe position in the order of deliveries of the waypoint in the route (optional, default 0) {integer}
DATEThe date and time the delivery or collection is due to take place (compulsory) {datetime}
ADDRESSAddress of the waypoint (optional but recommended) {multiline string}
WEIGHTWeight set by user assigned to the vehicle in kg. An empty string means use the job or PO total weight. {float or empty string}
LATITUDEThe latitude of the delivery location (optional but recommended) {float}
LONGITUDEThe longitude of the delivery location (optional but recommended) {float}
MEMOMemo for the waypoint (optional) {multiline string}
CUSTOM_FIELDSThe custom fields JSON (optional) {json}
Return parameters:
NameDescription
IDUnique ID of the waypoint
JOB_IDThe job number
SUB_IDThe unique ID of the purchase order
DEPOT_IDThe unique ID of the root depot (not a virtual depot)
ROUTE_IDThe unique ID of the vehicle route it is attached to or NULL for unasigned.
DIRECTIONWhich direction it is going (0=delivery, 1=collection, 2=service, 100=comment)
DATEThe date and time the waypoint needs to take place
POSITIONThe numeric order in a vehicle that it will be done.
ADDRESSThe waypoint address.
OWNER_ADDRESSThe delivery address of the job or subcontractor that the waypoint belongs to.
LATITUDEThe latitude of the waypoint.
LONGITUDEThe longitude of the waypoint.
DESCRIPTIONA brief description of the waypoint.
WEIGHTWeight set by user assigned to the vehicle in kg
OWNER_WEIGHTSum of weight of all items in the job or purchase order in kg
MEMOA memo of the waypoint
CUSTOM_FIELDSThe custom fields attached to the waypoint.
JOB_NAMEThe name of the job attached to the waypoint
VENUEThe delivery address name of the destination.
DEPOT_NAMEThe name of the depot the waypoint is part of.
OUT_DATEThe outgoing date of the job the waypoint is part of.
JOB_DATEThe job start date of the job the waypoint is part of.
JOB_ENDThe job end date of the job the waypoint is part of.
RETURN_DATEThe date the equipment will be returned in the job the waypoint is part of.
JOB_CUSTOM_FIELDSThe custom fields attached to the waypoint's job.
errorSet if an error has occurred, either an error message or error number.

Duplicate waypoint

Save duplicate copies of a waypoint a certain amount of times seperated by a period.

post/modules/route_planner/waypoint_duplicate.php
Send parameters:
NameDescription
idID of the waypoint to duplicate {integer}.
multiplyHow many times the waypoint will be duplicated (1 to 99) {integer}
periodThe period to multiply by {string}
localThe client browser local date and time (optional). {string}
tzThe client browser local timezone (optional). {string}
Return parameters:
NameDescription
waypoints: {
IDUnique ID of the waypoint
JOB_IDThe job number
SUB_IDThe unique ID of the purchase order
DEPOT_IDThe unique ID of the root depot (not a virtual depot)
ROUTE_IDThe unique ID of the vehicle route it is attached to or NULL for unasigned.
DIRECTIONWhich direction it is going (0=delivery, 1=collection, 2=service)
DATEThe date and time the waypoint needs to take place
POSITIONThe numeric order in a vehicle that it will be done.
ADDRESSThe waypoint address.
OWNER_ADDRESSThe delivery address of the job or subcontractor that the waypoint belongs to.
LATITUDEThe latitude of the waypoint.
LONGITUDEThe longitude of the waypoint.
DESCRIPTIONA brief description of the waypoint.
WEIGHTWeight set by user assigned to the vehicle in kg
OWNER_WEIGHTSum of weight of all items in the job or purchase order in kg
MEMOA memo of the waypoint
CUSTOM_FIELDSThe custom fields attached to the waypoint.
JOB_NAMEThe name of the job attached to the waypoint
VENUEThe delivery address name of the destination.
DEPOT_NAMEThe name of the depot the waypoint is part of.
OUT_DATEThe outgoing date of the job the waypoint is part of.
JOB_DATEThe job start date of the job the waypoint is part of.
JOB_ENDThe job end date of the job the waypoint is part of.
RETURN_DATEThe date the equipment will be returned in the job the waypoint is part of.
JOB_CUSTOM_FIELDSThe custom fields attached to the waypoint's job.
}
errorSet if an error has occurred, either an error message or error number.

Get transports/waypoints

Get a list of transports/waypoints (deliveries, collections and service runs) over a date period and subject to filters.

get/reports/waypoints_list.php
Send parameters:
NameDescription
fromThe date the report is from (compulsory) {string}.
uptoThe date the report is upto (compulsory) {string}.
depotThe depot ID to report on (default is the user depot if not set. 0 is all depots) {integer}
directionWhich direction it is going (empty=all, 0=delivery, 1=collection, 2=service). {integer}
Return parameters:
NameDescription
waypoints: [
0: {
IDUnique ID of the waypoint
JOB_IDThe job number the waypoint is linked to.
SUB_IDThe unique ID of the purchase order the waypoint is linked to.
DEPOT_IDThe unique ID of the root depot (not a virtual depot)
ROUTE_IDThe unique ID of the vehicle route it is attached to or NULL for unasigned.
DIRECTIONWhich direction it is going (0=delivery, 1=collection, 2=service)
DATEThe date and time the waypoint needs to take place
POSITIONThe numeric order in the vehicle starting from 0.
ADDRESSThe waypoint address.
OWNER_ADDRESSThe delivery address of the job or subcontractor that the waypoint belongs to.
LATITUDEThe latitude of the waypoint.
LONGITUDEThe longitude of the waypoint.
DESCRIPTIONA brief description of the waypoint.
WEIGHTWeight set by user assigned to the vehicle in kg
OWNER_WEIGHTSum of weight of all items in the job or purchase order in kg
MEMOA memo of the waypoint
CUSTOM_FIELDSThe custom fields attached to the waypoint.
JOB_NAMEThe name of the job attached to the waypoint
VENUEThe delivery address name of the destination.
DEPOT_NAMEThe name of the depot the waypoint is part of.
OUT_DATEThe outgoing date of the job the waypoint is part of.
JOB_DATEThe job start date of the job the waypoint is part of.
JOB_ENDThe job end date of the job the waypoint is part of.
RETURN_DATEThe date the equipment will be returned in the job the waypoint is part of.
JOB_CUSTOM_FIELDSThe custom fields attached to the waypoint's job.
DRIVERThe user ID of the driver.
DRIVER_NAMEThe name of the driver.
ASSISTANT_1The user ID of the first assistant.
ASSISTANT_1_NAMEThe name of the first assistant.
ASSISTANT_2The user ID of the second assistant.
ASSISTANT_2_NAMEThe name of the second assistant.
VEHICLE_REGThe registration of the vehicle used to do the waypoint
}
]
errorSet if an error has occurred, either an error message or error number.


Depots

Delete a depot

Soft delete a depot and all virtual depots within it.

post/modules/locations/delete.php
Send parameters:
NameDescription
IDID of the depot to delete (compulsory). {integer}.
no_webhookSet to '1' to prevent a webhook from triggering
Return parameters:
NameDescription
IDID of the of the deleted depot. {integer}
errorSet if an error has occurred, either an error message or error number.

Get depot data

Get data for the depots.

get/modules/locations/list.php
Send parameters:
NameDescription
delShow deleted depots ('true' or 'false') (optional). {string}.
_searchSet to 'true' if there is to be filtering. {string}
sidxThe row index field name (optional) {string}
sordThe order the index field is to be sorted, either 'asc' or 'desc' (optional) {string}
filtersThe filters to apply to the results (optional). {JSON or JSON string}
Return parameters:
NameDescription
pageAlways 1
recordsHow many depots and virtual depots in total
totalAlways 1
rows: [
0: {
IDID of the of the depot. {integer}
ADDRESSThe address of the depot. {string}
DEPOTThe name of the depot. {string}
EMAILThe email of the depot. {string}
TELEPHONEThe telephone number of the depot. {string}
data: {
IDID of the of the depot. {integer}
ADDRESSThe address of the depot. {string}
CURRENCY: {
CODEThe international currency code for the default currency used for the job
DECIMALSHow many decimal places does the currency have
DECIMAL_SEPARATORThe character used to separate the decimals
MULTIPLIERThe multiplier used to get the exchange rate
NAMEName of the currency
NEGATIVE_FORMATHow a negative should be displayed
SYMBOLThe currency symbol
SYMBOL_POSITIONThe position of the currency symbol (0=before, 1=after)
THOUSAND_SEPARATORThe character used to separate thousands
}
CUSTOM_FIELDSThe array of custom fields {array or JSON string}
DEPOTThe name of the depot. {string}
EMAILThe email of the depot. {string}
IMAGE_IDThe image ID of the company logo. {integer}
LATITUDEThe latitude of the depot. {float}
LONGITUDEThe longitude of the depot. {float}
MEMOThe memo for the depot. {string}
OWNERIf a virtual depot, the ID of the parent depot. {integer}
PREFIXThe default prefix to add to barcodes to assets assigned to the depot. {string}
STATUSThe status of the depot (0=active, 1=deleted). {integer}
SUFIXThe default suffix to add to barcodes to assets assigned to the depot. {string}
TELEPHONEThe telephone number of the depot. {string}
VAT_NUMThe VAT/GST/Tax number of the depot. {string}
TASKSHow many tasks assigned to this depot. {integer}
NOTESHow many notes assigned to this depot. {integer}
FILESHow many files assigned to this depot. {integer}
}
expandedTrue if depot is a virtual depots
isLeafTrue for virtual depots only
loadedAlways true
parentID of the parent depot if it is a virtual depot
}
]
errorSet if an error has occurred, either an error message or error number.

Save a depot

Save a new or edit depot.

post/modules/locations/save.php
Send parameters:
NameDescription
IDID of the depot or set to '0' for new (compulsory) {integer}.
LATITUDEThe latitude of the depot (not set for virtual depots). {float}
LONGITUDEThe longitude of the depot (not set for virtual depots). {float}
IMAGE_IDThe image ID of the company logo (optional). {integer}
OWNERIf a virtual depot, the ID of the parent depot (compulsory for virtual depots). {integer}
DEPOTThe name of the depot (compulsory). {string}
ADDRESSThe address of the depot (optional). {string}
TELEPHONEThe telephone number of the depot (optional). {string}
EMAILThe email of the depot (optional). {string}
MEMOThe memo for the depot (optional). {string}
VAT_NUMThe VAT/GST/Tax number of the depot (optional). {string}
PREFIXThe default prefix to add to barcodes to assets assigned to the depot (optional). {string}
SUFIXThe default suffix to add to barcodes to assets assigned to the depot (optional). {string}
STATUSThe status of the depot (0=active, 1=deleted) (optional). {integer}
CURRENCY: {
CODEThe international currency code for the default currency used for the job
DECIMALSHow many decimal places does the currency have
DECIMAL_SEPARATORThe character used to separate the decimals
MULTIPLIERThe multiplier used to get the exchange rate
NAMEName of the currency
NEGATIVE_FORMATHow a negative should be displayed
SYMBOLThe currency symbol
SYMBOL_POSITIONThe position of the currency symbol (0=before, 1=after)
THOUSAND_SEPARATORThe character used to separate thousands
}
localThe local time of the user (optional) {ISO datetime string}
tzThe timezone of the user (optional) {string}
no_webhookSet to '1' to prevent a webhook from triggering
Return parameters:
NameDescription
pageThe page of the data
recordsHow many depots and virtual depots in total
totalHow many pages in total
rows: [
0: {
IDID of the of the depot. {integer}
ADDRESSThe address of the depot. {string}
DEPOTThe name of the depot. {string}
EMAILThe email of the depot. {string}
TELEPHONEThe telephone number of the depot. {string}
data: {
IDID of the of the depot. {integer}
ADDRESSThe address of the depot. {string}
CURRENCY: {
CODEThe international currency code for the default currency used for the job
DECIMALSHow many decimal places does the currency have
DECIMAL_SEPARATORThe character used to separate the decimals
MULTIPLIERThe multiplier used to get the exchange rate
NAMEName of the currency
NEGATIVE_FORMATHow a negative should be displayed
SYMBOLThe currency symbol
SYMBOL_POSITIONThe position of the currency symbol (0=before, 1=after)
THOUSAND_SEPARATORThe character used to separate thousands
}
CUSTOM_FIELDSThe array of custom fields {array or JSON string}
DEPOTThe name of the depot. {string}
EMAILThe email of the depot. {string}
IMAGE_IDThe image ID of the company logo. {integer}
LATITUDEThe latitude of the depot. {float}
LONGITUDEThe longitude of the depot. {float}
MEMOThe memo for the depot. {string}
OWNERIf a virtual depot, the ID of the parent depot. {integer}
PREFIXThe default prefix to add to barcodes to assets assigned to the depot. {string}
STATUSThe status of the depot (0=active, 1=deleted). {integer}
SUFIXThe default suffix to add to barcodes to assets assigned to the depot. {string}
TELEPHONEThe telephone number of the depot. {string}
VAT_NUMThe VAT/GST/Tax number of the depot. {string}
}
expandedAlways true
isLeafTrue for virtual depots only
loadedAlways true
parentID of the parent depot if it is a virtual depot. {integer}
}
]
errorSet if an error has occurred, either an error message or error number.

Get users in depot

Get a list of active users who are assigned to a specific depot.

get/modules/locations/user_list.php
Send parameters:
NameDescription
depotThe ID of the depot (required). {integer}.
_searchSet to 'true' to enable filtering (optional). {string}.
NAMEA name of the user filter (optional). {string}.
JOBA job of the user filter (optional). {string}.
EMAILAn email of the user filter (optional). {string}.
pageWhich page of data your want (default is 1) {integer}
rowsHow many rows of data per page (minimum of 20 & maximum of 500) (required) {integer}
sidxThe column index field to sort by ('NAME' is default, 'JOB' or 'EMAIL') (optional). {string}
sordThe order the index field is to be sorted, either 'asc' (default) or 'desc'. (optional) {string}
Return parameters:
NameDescription
pageWhat page this is (the first page is 1)
recordsHow many rows in total found.
totalHow many pages there are of data.
rows: [
0: {
IDID of the of the user.
NAMEThe name of the user.
JOBThe job of the user.
EMAILThe email of the user.
}
]
errorSet if an error has occurred, either an error message or error number.


Maintenance

Bulk edit asset settings

Save and update status, depot/virtual depot and STOCK_ID to one or multiple assets.

post/modules/maintenance/bulk_save_assets.php
Send parameters:
NameDescription
ASSET_IDSThe IDs of the asset the maintenance is for (required). {integer|array|JSON string}.
STATUSThe new status of the assets (optional). {float}
DEPOT_IDThe new depot/virtual depot ID of the assets (optional). {integer}
STOCK_IDThe new owner stock ID of the assets (optional). {integer}
localThe local time of the user (not needed or used) {datetime string}
tzThe timezone of the user (not needed or used) {string}
Return parameters:
NameDescription
ASSET_IDSThe ID of the asset the maintenance is for (compulsory) {array}.
STATUSThe new status of the assets (if changed). {float}
DEPOT_IDThe new depot/virtual depot ID of the assets (if changed). {integer}
STOCK_IDThe new owner stock ID of the assets (if changed). {integer}
errorSet if an error has occurred, either an error message or error number.

Get asset details

Get the basic details of asset(s) for the maintenace app. Either BARCODES or ASSET_IDS must be set

get/modules/maintenance/get_assets_details.php
Send parameters:
NameDescription
BARCODESThe barcode of the asset to get details for {string | array of string | JSON string}.
ASSET_IDSThe asset IDs to get the details for {integer | array of integer | JSON string}
Return parameters:
NameDescription
ASSET_IDSUnique number of the assets {array of integer}
STOCK_IDID of the stock line it belongs to if all assets and barcodes belong to the same stock line {integer}
TITLEName of the stock line it belongs to if all assets and barcodes are of the same stock line {string}
DEPOT_IDDepot ID if all assets belong to the same depot {integer}
STATUSStatus if all assets have the same status {integer}
BARCODEBarcode of the asset if just one asset found {string}
DO_LOGGINGSignifies if usage logging can be done on the asset (0=no, 1=yes). {integer}
MAINTENANCE: [
0: {
IDUnique ID of the maintenance, asset or task {integer}
TYPEWhat type of maintenance it is (0 = Service, 1 = PAT Test, 2=Test, etc.) {integer}
DESCRIPTIONDescription of the maintenance, test or task {string}.
}
]
ASSETS_FOUND: [
0: {
ASSET_IDID of the asset. {integer}
BARCODEBarcode of the asset {string}
}
]
errorSet if an error has occurred, either an error message or error number.

Get logging data

Get the logging data for an asset.

get/modules/maintenance/get_logging_data.php
Send parameters:
NameDescription
ASSET_IDID of the asset to get the logging data for. {integer}
BARCODEThe barcode of the asset to get the logging data for. {string}.
Return parameters:
NameDescription
ASSET_IDID of the asset to get the logging data for. {integer}
STOCK_IDID of the stock item the asset belongs to. {integer}
TITLEThe name of the stock item. {string}
BARCODEThe barcode of the asset to get the logging data for. {string}
LOGGING: {
PROMPTA descriptive prompt to ask the user. {string}
RESETABLECan the value be reset (0=No, 1=Yes). {integer}
COMPULSORYWhen checking in, entering a value is compulsory (0=No, 1=Yes). {integer}
VALIDATIONCheck needed with new value (0=None, 1=Less or equal and 2=More or equal). {integer}
PREFIX_UNITSThe prefix before the value, like 'r' as in 'r10'. {string}
SUFFIX_UNITSThe suffix after the value, like 'kg' as in '10kg'. {string}
}
LAST_LOG: {
USER_IDID of the user who entered the log. {integer}
JOB_IDThe job number (if any) the log was done against. {integer}
CREATE_DATEThe date and time in ISO format in the UTC timezone the log was created. {datetime string}
VALUEThe value entered. {float}
DETAILSNote made when entering the value. {string}
}
errorSet if an error has occurred, either an error message or error number.

Get maintenence order

Get the details of a maintenance order.

get/modules/maintenance/get_maintenance_data.php
Send parameters:
NameDescription
NUMBERThe number/ID of the maintenance order {integer}
BARCODEThe barcode of the asset to get the last open maintenance order for {string}.
ASSET_IDThe asset ID to get the last open maintennace order for {integer}
MAINTENANCE_TYPEWhat maintenance type is needed for a barcode or asset id (0=Service, 1=PAT Test, 2=Test, 3=Repair, 4=Maintenance, 5=Other OR service, pat_test, test, repair, maintenance, other_maintenance) {integer or string}.
Return parameters:
NameDescription
IDUnique number of the maintenance order {integer}
MAINTENANCE_TYPEWhat is the maintenance (0=Service, 1=PAT Test, 2=Test, 3=Repair, 4=Maintenance, 5=Other) {integer}.
ASSET_IDThe ID of the asset the maintenance is for (compulsory) {integer}.
USER_IDThe ID of the user who created the maintenance order {integer}
DESCRIPTIONA brief description of the maintenance order {string}
TECHNICIAN_1The ID of the user who is the first technician assigned to the maintennace order {integer}
TECHNICIAN_2The ID of the user who is the second technician assigned to the maintennace order {integer}
DATEThe date the maintenance order was started {datetime string}
PAUSE_UNTIL_DATEThe date the maintennace order is postponed to {date string}.
END_DATEThe date the maintenance order was completed (NOT USED YET) {datetime string}
STATUSThe status of the maintenance order. {integer}
ITEMS: {
ID: {
IDID of the line item
CONSUMABLE_IDSales stock ID the line item appertains to
LABOUR_IDLabour item ID the line item appertains to.
TITLESales stock or labour name the line item appertains to
QTYQuatity used
DESCRIPTIONDescription of the line item
COSTThe cost of the line item
PRICENet charge of the line item
MEMOMemo for the line item
CUSTOM_FIELDSCustom fields for the line item
}
}
QUOTED_PRICEThe quoted estimated price of the maintenance order {float}
COSTThe cost of the maintenance order {float}
JOB_IDThe ID of the job the maintenance is linked to {integer}.
CUSTOM_ITEM_IDThe ID of the custom item the maintenance is linked to for applying a charge to a job {integer}.
MEMOA memo for the maintenance order {string}
METER_READINGA current logging meter reading of the asset that is recorded in the maintenance order {float}
PASSIf the maintennace order is a pass(1) or fail (0) if it is for a test or service {integer}
BARCODEThe barcode of the asset {string}.
TITLEThe name of the stock item {string}.
CUSTOM_FIELDSThe custom fields for the maintenance order {json}.
errorSet if an error has occurred, either an error message or error number.

Get maintenace lists

Get a list of equipment in need of maintenance. The result is limited to 10,000 rows of data. THIS IS BETA SO DO NOT USE AS IT IS SUBJECT TO CHANGE!!

get/modules/maintenance/list.php
Send parameters:
NameDescription
typeWhat is the list of ('maintenance', 'damaged', 'tests', 'tasks') (compulsory) {string}.
test_typeIf type is 'tests', which type (0=service, 1=pat test, 2=test). {integer}
due_dateIf type is 'tests', what is the due date (YYYY-MM-DD HH:mm:ss). {ISO datetime string}
tzThe timezone of the user (optional). {string}
localThe current date and time in the user's timezone (optional). {ISO datetime string}
Return parameters:
NameDescription
rows: [
0: {
IDUnique ID of the maintenance, asset or task {integer}
NUMBERNumber of the maintenance order {integer}
TYPEWhat type of maintenance it is (0 = Service, 1 = PAT Test, 2=Test, etc.) {integer}
USER_NAMESTechnician names {string}
TITLEWhat the stock name is of the asset {string}.
BARCODEThe barcode of the asset {string}.
DATEThe date of the maintennace order was created, the date the test is due or the date of the task {date string}.
PAUSE_UNTIL_DATEThe date the maintennace order is postponed to {date string}.
DESCRIPTIONDescription of the maintenance, test or task {string}.
data: {
IDUnique ID of the row {string}
NUMBERID of the maintenance order, if applicable. {integer}
TYPEType of test (0=Service, 1=PAT Test, 2=Test, 3=Repair, 4=Maintenance, 5=Other) {integer}
USER_NAMESTechnician names {string}
STOCK_IDID of the stock line asset belongs to {integer}
TITLEName of the stock item {string}
BARCODEBarcode of the asset {string}
DATEDate of the maintenence in UTC {string}
PAUSE_UNTIL_DATEDate that the maintenance is on hold until {string}
DESCRIPTIONMaintenance order description {string}
ASSET_IDID of the asset the maintenance order is for {integer}
STATUSStatus of the maintenence or asset or task, etc. {integer}
JOB_IDID of the job the maintenence order is linked to {integer}
}
}
]
errorSet if an error has occurred, either an error message or error number.

Save maintenance order

Save a new or existing maintenance order.

post/modules/maintenance/save.php
Send parameters:
NameDescription
IDNumber of the maintenance order, or 0 if new one needs to be created {integer}
MAINTENANCE_TYPEWhat is the maintenance (0=Service, 1=PAT Test, 2=Test, 3=Repair, 4=Maintenance, 5=Other) {integer}.
ASSET_IDSThe IDs of the asset the maintenance is for (only for new) {integer|array|JSON string}.
DESCRIPTIONA brief description of the maintenance order {string}
TECHNICIAN_1The ID of the user who is the first technician assigned to the maintennace order {integer}
TECHNICIAN_2The ID of the user who is the second technician assigned to the maintennace order {integer}
DATEThe date the maintenance order was started in UTC. {datetime string}
PAUSE_UNTIL_DATEThe date the maintenance order is postponed until {datetime string}
END_DATEThe date the maintenance order was completed NOT USED YET (defaults to DATE) {datetime string}
STATUSThe status of the maintenance order. {integer}
QUOTED_PRICEThe quoted estimated price of the maintenance order {float}
COSTThe cost of the maintenance order {float}
METER_READINGA current logging meter reading of the asset that is recorded in the maintenance order {float}
JOB_IDThe ID of the job the maintenance is linked to {integer}.
CUSTOM_ITEM_IDThe ID of the custom item the maintenance is linked to for applying a charge to a job {integer}.
MEMOA memo for the maintenance order {string}
PASSIf the maintennace order is a pass(1) or fail (0) if it is for a test or service {integer}
ITEMSJSON of line items as '[{"ID":0,"QTY":1,"DESCRIPTION":"Desc","PRICE":0,"COST":0,"MEMO":"Memo"},{"ID"....}]'. If not set, line items won't be changed. All line items must be passed for any changes otherwise missing ones will be deleted. {json or json string}.
CUSTOM_FIELDSThe custom fields for the maintenance order {json or json string}.
status_in_stockSetting to 1 will make sure the asset status' for the assets linked to the maintenance are 'in stock'. {integer}
localThe local time of the user (not needed or used) {datetime string}
tzThe timezone of the user (not needed or used) {string}
Return parameters:
NameDescription
rows: [
0: {
IDUnique identifier for the maintenance order {html string}
kindAlways set to 'maintenance'. {html string}.
NUMBERThe unique number of the maintenance order. {integer}.
TYPEWhat is the maintenace order. (0=Service, 1=PAT Test, 2=Test, 3=Repair, 4=Maintenance, 5=Other) {integer}.
USER_NAMESNames of the technicians assigned to the maintenance order. {html string}
BARCODEBarcode of the asset maintenance belongs to, or the job number in brackets. {html string}
DATEThe date the maintenance order was started {datetime string}
PAUSE_UNTIL_DATEThe date the maintenance order is postponed until {datetime string}
DESCRIPTIONA brief description of the maintenance order {html string}
data: {
kindAlways set to 'maintenance'. {string}.
IDThe unique number of the maintenance order. {integer}.
ASSET_IDThe ID of the asset the maintenance is for. {integer}.
JOB_IDThe ID of the job the maintenance is for. {integer}.
DATEThe date the maintenance order was started {datetime string}
PAUSE_UNTIL_DATEThe date the maintenance order is postponed until {datetime string}
USER_NAMESNames of the technicians assigned to the maintenance order. {string}
DESCRIPTIONA brief description of the maintenance order. {string}
TYPEWhat is the maintenace order. (0=Service, 1=PAT Test, 2=Test, 3=Repair, 4=Maintenance, 5=Other) {integer}.
STATUSThe status of the maintenance order. {integer}
BARCODEThe barcode of the asset {string}.
CUSTOM_FIELDSThe custom fields for the maintenance order {json}.
}
}
]
errorSet if an error has occurred, either an error message or error number.


Resources

Get resources

Get a list of resources. This uses paging, with a minimum of 20 items and a maximum of 100 per page.

get/modules/resources/list.php
Send parameters:
NameDescription
depot_idThe root depot ID filter to apply to the list {integer}.
nameThe name filter to apply to the list {string}
statusThe status value to filter (0=All, 1=Active, 2=Deleted) (optional, default 0) {integer}
pageWhich page of data your want (required) {integer}
rowsHow many rows of data per page (required) {integer}
sidxThe row index field name (optional) {string}
sordThe order the index field is to be sorted, either 'asc' or 'desc' (optional) {string}
Return parameters:
NameDescription
pageHow many pages in total for all of the rows
recordsHow many rows in total found.
totalHow many pages there are of data.
rows: {
idUnique ID of the resource
cells: {
idUnique ID of the resource {integer}
nameName of the resource {string}
userThe user name if the resource is a HireHop user. {string}
contactName from the address book if resource assigned to an address book contact person. {string}
emailEmail of the resource {string}.
depot_idID of the root depot the resource belongs to. {integer}.
statusThe status of the resource (0=Active, 1=Deleted) {integer}.
data: [
0: {
IDUnique ID of the resource {integer}
STATUSThe status of the resource (0=Active, 1=Deleted) {integer}.
NAMEName of the resource {string}
DEPOT_IDID of the root depot the resource belongs to. {integer}.
USER_IDThe user ID if the resource is a HireHop user. {integer}
CONATCT_PERS_IDID of a person in the address book if resource assigned to an address book entry. {integer}
MEMOA memo for the resource. {string}
EMAILEmail of the resource. {string}
COSTThe default cost of using the resource. {float}
TAGSA list of string tags associated with the resource {array}
skills: [
0: {
SERVICE_IDID of a labour item the resource can do {integer}
TITLEName of a labour item the resource can do {string}
}
]
certs: [
0: {
certName of certification. {string}
expireDate the certification will expire (YYYY-MM-DD hh:mm:ss) {string}
}
]
}
]
}
}
errorSet if an error has occurred, either an error message or error number.


Labour

Get labour

Get a list of labour and all the details.

get/modules/services/list.php
Send parameters:
NameDescription
localThe local date and time of the user in 'YYYY-MM-DD hh:mm:ss' format (optional). {string}.
headThe ID of the category to filter by (optional). {integer}
delIf '1', include deleted/hidden items in the search (optional). {integer}
_searchIf set to anything, allow filtering on TITLE and ALT_TITLE
unqID of the hire stock item (returns only one item if set) (optional) {integer}.
pageThe page number of data to return. (optional) {integer}
rowsThe number of records to return for the requested page. (optional) {integer}
sordIf the data should be ascending (asc) or descending (desc). (optional) {string}
sidxThe field name to sort by (TITLE, ALT_TITLE, PRICE1, PRICE2, PRICE3, PRICE_TYPE, FLAG) (optional) {string}
Return parameters:
NameDescription
rows: [
0: {
idThe ID of the item (integer).
cell: [
0: {
idThe ID of the asset (integer).
TITLEName of the item. {string}
ALT_TITLEThe alternative name of the item. {string}
PRICE1Price A of the item. {float}
PRICE2Price B of the item. {float}
PRICE3Price C of the item. {float}
PRICE_TYPE1The item price type (0=One off, 1=hourly, 2=daily, 3=weekly, 4=monthly, 5=every day, 6=every week, 7=Proportional week, others are custom). {integer}
PRICE_TYPE2The item price type (0=One off, 1=hourly, 2=daily, 3=weekly, 4=monthly, 5=every day, 6=every week, 7=Proportional week, others are custom). {integer}
PRICE_TYPE3The item price type (0=One off, 1=hourly, 2=daily, 3=weekly, 4=monthly, 5=every day, 6=every week, 7=Proportional week, others are custom). {integer}
COST_PRICEThe estimated cost to hire in this person. {float}
FLAGThe deafult flag to set when adding a new item into a supplying list (0=none, 1=Not important, 2=Important & 3=Technical). {integer}
data: {
IDThe ID of the asset (integer).
TITLEName of the item. {string}
ALT_TITLEThe alternative name of the item. {string}
MEMOThe memo of the item. {string}
CATAGORYThe ID of the category the item is part of. {integer}
PRICE1Price A of the item. {float}
PRICE2Price B of the item. {float}
PRICE3Price C of the item. {float}
PRICE_TYPE1The item price type (0=One off, 1=hourly, 2=daily, 3=weekly, 4=monthly, 5=every day, 6=every week, 7=Proportional week, others are custom). {integer}
PRICE_TYPE2The item price type (0=One off, 1=hourly, 2=daily, 3=weekly, 4=monthly, 5=every day, 6=every week, 7=Proportional week, others are custom). {integer}
PRICE_TYPE3The item price type (0=One off, 1=hourly, 2=daily, 3=weekly, 4=monthly, 5=every day, 6=every week, 7=Proportional week, others are custom). {integer}
MAX_DISCOUNTThe maximum discount percentage allowed for the item (optional, 0 to 100). {float}
COST_PRICEThe estimated cost to hire in this person. {float}
VAT_RATEThe tax/GST/VAT type to use. {integer}
STATUSThe status index of the item (0=Active, 1=Hidden in picklist, 2=Deleted)(optional). {float}
NO_SHORTFALLIf 0 then HireHop calculates availability. {integer}
ACC_NOMINALThe sales nominal group ID for the item. {integer}
ACC_NOMINAL_POThe purchase nominal group ID for the item. {integer}
FLAGThe deafult flag to set when adding a new item into a supplying list (0=none, 1=Not important, 2=Important & 3=Technical). {integer}
DELIVERYIf set to 1 a delivery will be automatically added to a job when the item is added. {string}
COLLECTIONIf set to 1 a collection will be automatically added to a job when the item is added. {string}
OTHERIf set to 1 an 'other' transport will be automatically added to a job when the item is added. {string}
DEPOT_LIMITSAn array or string of depot ID's the item is limited to. {array or array-string
CUSTOM_FIELDSCustom fields of the item {array}.
crumbsThe breadcrumb details of the category the item is in {JSON array}
}
}
]
}
]
errorSet if an error has occurred, either an error message or error number.

Save labour

Save changes or create a new labour item.

post/modules/services/save.php
Send parameters:
NameDescription
IDID of the labour item or zero creates a new item (default 0) {integer}.
TITLEName of the item (required for new). {string[85]}
ALT_TITLEThe alternative name of the item (optional). {string[85]}
PRICE1Price A of the item (optional). {float}
PRICE2Price B of the item (optional). {float}
PRICE3Price C of the item (optional). {float}
MAX_DISCOUNTThe maximum discount percentage allowed for the item (optional, 0 to 100). {float}
COST_PRICEThe cost to rent this item in (optional). {float}
PRICE_TYPESets PRICE_TYPE1, PRICE_TYPE2 and PRICE_TYPE3, to the same value. {integer}
PRICE_TYPE1The item price type (0=One off, 1=hourly, 2=daily, 3=weekly, 4=monthly, 5=every day, 6=every week, 7=Proportional week, others are custom) (optional). {integer}
PRICE_TYPE2The item price type (0=One off, 1=hourly, 2=daily, 3=weekly, 4=monthly, 5=every day, 6=every week, 7=Proportional week, others are custom) (optional). {integer}
PRICE_TYPE3The item price type (0=One off, 1=hourly, 2=daily, 3=weekly, 4=monthly, 5=every day, 6=every week, 7=Proportional week, others are custom) (optional). {integer}
VAT_RATEThe tax/GST/VAT type to use (optional). {integer}
MEMOThe memo of the item (optional). {string}
NO_SHORTFALLSet to 1 to prevent HireHop calculating availability. {integer}
DELIVERYSet to 1 to automatically add a delivery to a job when the item is added to a job (optional). {string}
COLLECTIONSet to 1 to automatically add a collection to a job when the item is added to a job (optional). {string}
OTHERSet to 1 to automatically add an 'other' transport to a job when the item is added to a job (optional). {string}
CATAGORYThe ID of the category the item is part of (optional). {integer}
STATUSThe status index of the item (0=Active, 1=Hidden in picklist, 2=Deleted)(optional). {float}
ACC_NOMINALThe sales nominal group ID for the item (optional). {integer}
ACC_NOMINAL_POThe purchase nominal group ID for the item (optional). {integer}
DEPOT_LIMITSAn array or string of depot ID's the item is limited to (optional). {array or array-string}
FLAGThe deafult flag to set when adding a new item into a supplying list (0=none, 1=Not important, 2=Important & 3=Technical) (optional). {integer}
CUSTOM_FIELDSCustom fields of the item (array).
Return parameters:
NameDescription
rows: [
0: {
idThe ID of the item (integer).
cell: [
0: {
idThe ID of the asset (integer).
TITLEName of the item. {string}
ALT_TITLEThe alternative name of the item. {string}
PRICE1Price A of the item. {float}
PRICE2Price B of the item. {float}
PRICE3Price C of the item. {float}
PRICE_TYPEThe item price type (0=One off, 1=hourly, 2=daily, 3=weekly, 4=monthly, 5=every day, 6=every week, 7=Proportional week, others are custom). {integer}
FLAGThe deafult flag to set when adding a new item into a supplying list (0=none, 1=Not important, 2=Important & 3=Technical). {integer}
data: {
IDThe ID of the asset (integer).
TITLEName of the item. {string}
ALT_TITLEThe alternative name of the item. {string}
MEMOThe memo of the item. {string}
CATAGORYThe ID of the category the item is part of. {integer}
PRICE1Price A of the item. {float}
PRICE2Price B of the item. {float}
PRICE3Price C of the item. {float}
PRICE_TYPE1The item price type (0=One off, 1=hourly, 2=daily, 3=weekly, 4=monthly, 5=every day, 6=every week, 7=Proportional week, others are custom). {integer}
PRICE_TYPE2The item price type (0=One off, 1=hourly, 2=daily, 3=weekly, 4=monthly, 5=every day, 6=every week, 7=Proportional week, others are custom). {integer}
PRICE_TYPE3The item price type (0=One off, 1=hourly, 2=daily, 3=weekly, 4=monthly, 5=every day, 6=every week, 7=Proportional week, others are custom). {integer}
MAX_DISCOUNTThe maximum discount percentage allowed for the item (optional, 0 to 100). {float}
COST_PRICEThe cost to hire in this person. {float}
VAT_RATEThe tax/GST/VAT type to use. {integer}
STATUSThe status index of the item (0=Active, 1=Hidden in picklist, 2=Deleted)(optional). {float}
NO_SHORTFALLIf 0 then HireHop calculates availability. {integer}
ACC_NOMINALThe sales nominal group ID for the item. {integer}
ACC_NOMINAL_POThe purchase nominal group ID for the item. {integer}
FLAGThe deafult flag to set when adding a new item into a supplying list (0=none, 1=Not important, 2=Important & 3=Technical). {integer}
DELIVERYIf set to 1 a delivery will be automatically added to a job when the item is added. {string}
COLLECTIONIf set to 1 a collection will be automatically added to a job when the item is added. {string}
OTHERIf set to 1 an 'other' transport will be automatically added to a job when the item is added. {string}
DEPOT_LIMITSAn array or string of depot ID's the item is limited to. {array or array-string
CUSTOM_FIELDSCustom fields of the item {array}.
crumbsThe breadcrumb details of the category the item is in {JSON array}
}
}
]
}
]
errorSet if an error has occurred, either an error message or error number.


Hire stock

Delete hire stock

Soft delete a hire stock item.

post/modules/stock/delete.php
Send parameters:
NameDescription
idID of the hire stock item (compulsory). {integer}.
no_webhookSet to '1' to prevent a webhook from triggering
Return parameters:
NameDescription
idID of the hire stock item if successful. {integer}.
errorSet if an error has occurred, either an error message or error number.

Save an asset

Soft delete a hire stock item. PLEASE NOTE THAT THIS WILL BE CHANGED AND OPTIMISED SOON!!

post/modules/stock/equipment_save.php
Send parameters:
NameDescription
IDID of the asset, if '0' or not set means new. {integer}.
STOCK_IDThe ID of the parent hire stock item (required). {integer}
STATUSThe index of the status (default is 0). {float}
QTYThe quantity for bulk assets or 1 for a single asset (default is 1). {integer}
BARCODEThe barcode for the asset (only if QTY is 1). {string}
SERIALThe serial number of the asset (only if QTY is 1). {string}
LEGACY_INCOMEThe income generated on the asset before HireHop was used (default is 0). {float}
MEMOThe memo for the asset. {string}
PURCHASE_PRICEThe purchase price of the asset in the base currency (default is 0). {float}
PURCHASED_FROMThe name of the person/company the asset was bought from. {string}
SOLD_PRICEThe price the asset was sold for in the base currency (default is 0). {float}
FINANCE_COMPANYThe company who financed the asset. {string}
FINANCE_REFThe fiance company reference. {string}
FINANCE_UPTOThe date the finance finishes (YYYY-MM-DD HH:mm:ss). {date string}
PURCHASE_DATEThe date the asset was bought (YYYY-MM-DD HH:mm:ss). {date string}
RETIRE_DATEThe date the asset was sold/deleted/lost, etc. (YYYY-MM-DD HH:mm:ss). {date string}
TELEMATICS_URLA url to link to the telematics page of the asset. {url string}
CUSTOM_FIELDSArray of custom fields and their values. {array or JSON}
new_barcodeSet to 1 to generate a new barcode (only if QTY is 1). {integer}
localThe date and time of the user in their timezone (required). {date string}
tzThe timezone of the user. {string}
fieldsDEPRECATED!!! Use 'CUSTOM_FIELDS' instead.
Return parameters:
NameDescription
rows: [
0: {
idID of the asset. {integer}
cell: {
idID of the asset. {integer}
QTYThe quantity for bulk assets or 1 for a single asset (default is 1). {integer}
BARCODEThe barcode for the asset (only if QTY is 1). {string}
STATUSThe index of the status (default is 0). {float}
SERIALThe serial number of the asset (only if QTY is 1). {string}
DEPOTThe name of the depot the asset belongs to. {string}
JOBThe ID of the job the asset is currently being used on ('0' means no job). {integer}
PURCHASE_DATEThe date the asset was bought (YYYY-MM-DD HH:mm:ss). {date string}
RETIRE_DATEThe date the asset was sold/deleted/lost, etc. (YYYY-MM-DD HH:mm:ss). {date string}
PURCHASE_PRICEThe purchase price of the asset in the base currency (default is 0). {float}
PURCHASED_FROMThe name of the person/company the asset was bought from. {string}
SOLD_PRICEThe price the asset was sold for in the base currency (default is 0). {float}
FINANCE_UPTOThe date the finance finishes (YYYY-MM-DD HH:mm:ss). {date string}
FINANCE_COMPANYThe company who financed the asset. {string}
FINANCE_REFThe fiance company reference. {string}
PRE_PREPThe name of the item is inside a preprep of. {string}
serviceThe date the item is serviced upto, a '!' if not done and needed or blank if not needed. {string}
patThe date the item is serviced upto, a '!' if not done and needed or blank if not needed. {string}
testThe date the item is serviced upto, a '!' if not done and needed or blank if not needed. {string}
data: {
IDID of the asset. {integer}
STOCK_IDID of the parent stock item. {integer}
QTYThe quantity for bulk assets or 1 for a single asset (default is 1). {integer}
BARCODEThe barcode for the asset (only if QTY is 1). {string}
SERIALThe serial number of the asset (only if QTY is 1). {string}
STATUSThe index of the status (default is 0). {float}
LEGACY_INCOMEThe income generated on the asset before HireHop was used (default is 0). {float}
MEMOThe memo for the asset. {string}
PURCHASE_DATE2008-10-17
RETIRE_DATEThe date the asset was bought (YYYY-MM-DD HH:mm:ss). {date string}
PURCHASE_PRICEThe purchase price of the asset in the base currency (default is 0). {float}
PURCHASED_FROMThe name of the person/company the asset was bought from. {string}
SOLD_PRICEThe price the asset was sold for in the base currency (default is 0). {float}
SERVICED_DATEThe date the asset was last serviced (YYYY-MM-DD HH:mm:ss). {date string}
PAT_DATEThe date the asset was last PAT tested (YYYY-MM-DD HH:mm:ss). {date string}
TEST_DATEThe date the asset was last tested (YYYY-MM-DD HH:mm:ss). {date string}
DEPOTID of the root depot the asset is in. {integer}
VIRTUAL_DEPOT_IDID of the virtual depot the asset is in. {integer}
FINANCE_UPTOThe date the finance finishes (YYYY-MM-DD HH:mm:ss). {date string}
FINANCE_COMPANYThe company who financed the asset. {string}
FINANCE_REFThe fiance company reference. {string}
PRE_PREPThe name of the item is inside a preprep of. {string}
JOBThe ID of the job the asset is currently being used on ('0' means no job). {integer}
TELEMATICS_URLA url to link to the telematics page of the asset. {url string}
CUSTOM_FIELDSArray of custom fields. {array}
}
}
}
]
errorSet if an error has occurred, either an error message or error number.

Asset test list

Returns a list of assets in repair, lost, certain category, etc. Field names for 'in' can be upper or lowercase.

get/modules/stock/equipment_tests_list.php
Send parameters:
NameDescription
IDID if set, overrides all other filters and gets the asset with the ID (optional) {integer}.
STATUSAn array of status values to serach. If not set, it will search all values less than 3, being On the shelf, Flagged and Damaged (optional) {array}
BARCODEThe barcode of a single asset to get the data for (optional) {string}
DEPOTThe root depot ID the asset(s) belong to (optional) {integer}
STOCK_IDThe stock ID to limit the assets to. (optional) {integer}
SERIALThe serial number of an asset to get the data for (optional) {string}
CATEGORYThe category ID to limit the assets to (it will include sub categories). (optional) {integer}
PAGEThe page number of data to return. (optional) {integer}
ROWSThe number of records to return for the requested page. (optional) {integer}
SORDIf the data should be ascending (asc) or descending (desc). (optional) {string}
SIDXThe field name to sort by ('BARCODE', 'STATUS', 'QTY', 'DEPOT', 'PAT_DATE', 'SERVICED_DATE' or 'TEST_DATE') (optional) {string}
Return parameters:
NameDescription
rows: [
0: {
idThe ID of the asset (integer).
cell: [
0: {
IDThe ID of the asset (integer).
NAMEThe stock name of the asset. (string).
STOCK_IDThe stock ID the asset is one of. (integer).
QTYThe quantity of the asset. If a bulk asset, it will be more than 1. (integer).
BARCODEThe barcode of the asset. (string).
SERIALThe serial number of the asset. (string).
STATUSThe status of the asset (float).
MEMOThe memo of the asset (string).
PURCHASE_DATEThe purchase date of the asset in 'YYYY-MM-DD hh:mm:ss' format (string).
RETIRE_DATEThe date the asset was taken out of commission in 'YYYY-MM-DD hh:mm:ss' format (string).
PURCHASE_PRICEThe price paid for the asset (float).
PURCHASED_FROMThe name of the entity that sold the asset to you (string).
SOLD_PRICEThe price the asset was sold for (float).
SERVICED_DATEThe date the asset was last serviced in 'YYYY-MM-DD hh:mm:ss' format (string).
PAT_DATEThe date the asset was last PAT tested in 'YYYY-MM-DD hh:mm:ss' format (string).
TEST_DATEThe date the asset was last tested in 'YYYY-MM-DD hh:mm:ss' format (string).
DEPOTThe depot ID the asset belongs to (integer).
FINANCE_UPTOThe date the asset is financed upto in 'YYYY-MM-DD hh:mm:ss' format (string).
FINANCE_COMPANYThe name of the finance company (string).
FINANCE_REFThe reference for the finance (string).
NEXT_SERVICEThe date the asset must next be serviced in 'YYYY-MM-DD hh:mm:ss' format (string).
NEXT_PATThe date the asset must next be PAT tested in 'YYYY-MM-DD hh:mm:ss' format (string).
NEXT_TESTThe date the asset must next be tested in 'YYYY-MM-DD hh:mm:ss' format (string).
CATEGORY_IDThe category ID the asset belongs to (integer).
CATEGORYThe category name the asset belongs to (string).
REPLACE_COSTThe replacement/insurance cost of the asset (float).
STATUS_CHANGEThe last time the STATUS was changed for the asset in 'YYYY-MM-DD hh:mm:ss' format (string).
breadcrumbThe name of the categories with all parents (string).
fieldsCustom fields of the asset (array).
errorSet if an error has occurred, either an error message or error number.
}
]
}
]

Asset test list (alt)

Returns a list of assets in repair, lost, certain category, etc. Field names for 'in' can be upper or lowercase.

get/modules/stock/equipment_tests_list_full.php
Send parameters:
NameDescription
IDID if set, overrides all other filters and gets the asset with the ID (optional) {integer}.
STATUSAn array of status values to serach. If not set, it will search all values less than 3, being On the shelf, Flagged and Damaged (optional) {array}
BARCODEThe barcode of a single asset to get the data for (optional) {string}
DEPOTThe root depot ID the asset(s) belong to (optional) {integer}
STOCK_IDThe stock ID to limit the assets to. (optional) {integer}
SERIALThe serial number of an asset to get the data for (optional) {string}
CATEGORYThe category ID to limit the assets to (it will include sub categories). (optional) {integer}
TEST_REQUIREDSet to '1' to only include assets that need a test. (optional) {integer}
PAT_REQUIREDSet to '1' to only include assets that need a PAT test. (optional) {integer}
SERVICE_REQUIREDSet to '1' to only include assets that need a service. (optional) {integer}
PAGEThe page number of data to return. (optional) {integer}
ROWSThe number of records to return for the requested page. (optional) {integer}
SORDIf the data should be ascending (asc) or descending (desc). (optional) {string}
SIDXThe field name to sort by ('BARCODE', 'STATUS', 'QTY', 'DEPOT', 'PAT_DATE', 'SERVICED_DATE' or 'TEST_DATE') (optional) {string}
Return parameters:
NameDescription
rows: [
0: {
idThe ID of the asset (integer).
cell: [
0: {
IDThe ID of the asset (integer).
NAMEThe stock name of the asset. (string).
STOCK_IDThe stock ID the asset is one of. (integer).
QTYThe quantity of the asset. If a bulk asset, it will be more than 1. (integer).
BARCODEThe barcode of the asset. (string).
SERIALThe serial number of the asset. (string).
STATUSThe status of the asset (float).
MEMOThe memo of the asset (string).
PURCHASE_DATEThe purchase date of the asset in 'YYYY-MM-DD hh:mm:ss' format (string).
RETIRE_DATEThe date the asset was taken out of commission in 'YYYY-MM-DD hh:mm:ss' format (string).
PURCHASE_PRICEThe price paid for the asset (float).
PURCHASED_FROMThe name of the entity that sold the asset to you (string).
SOLD_PRICEThe price the asset was sold for (float).
SERVICED_DATEThe date the asset was last serviced in 'YYYY-MM-DD hh:mm:ss' format (string).
PAT_DATEThe date the asset was last PAT tested in 'YYYY-MM-DD hh:mm:ss' format (string).
TEST_DATEThe date the asset was last tested in 'YYYY-MM-DD hh:mm:ss' format (string).
DEPOTThe depot ID the asset belongs to (integer).
FINANCE_UPTOThe date the asset is financed upto in 'YYYY-MM-DD hh:mm:ss' format (string).
FINANCE_COMPANYThe name of the finance company (string).
FINANCE_REFThe reference for the finance (string).
NEXT_SERVICEThe date the asset must next be serviced in 'YYYY-MM-DD hh:mm:ss' format (string).
NEXT_PATThe date the asset must next be PAT tested in 'YYYY-MM-DD hh:mm:ss' format (string).
NEXT_TESTThe date the asset must next be tested in 'YYYY-MM-DD hh:mm:ss' format (string).
CATEGORY_IDThe category ID the asset belongs to (integer).
CATEGORYThe category name the asset belongs to (string).
REPLACE_COSTThe replacement/insurance cost of the asset (float).
STATUS_CHANGEThe last time the STATUS was changed for the asset in 'YYYY-MM-DD hh:mm:ss' format (string).
CHECKED_OUTSet to true if the asset is checked out on a job (boolean).
CHECKED_OUT_JOB_NUMBERThe job number the asset is checked out on (integer).
CHECKED_OUT_JOB_NAMEThe job name the asset is checked out on (string).
breadcrumbThe name of the categories with all parents (string).
fieldsCustom fields of the asset (array).
errorSet if an error has occurred, either an error message or error number.
}
]
}
]

Get hire stock

DEPRICATED Get a list of hire stock and all the details (this will soon be changing).

get/modules/stock/list.php
Send parameters:
NameDescription
localThe local date and time of the user in 'YYYY-MM-DD hh:mm:ss' format (optional). {string}.
headThe ID of the category to filter by (optional). {integer}
BARCODEThe group barcode of the item to filter by (optional). {string}
delIf '1', include deleted items in the search (optional). {integer}
show_hiddenIf '1', include hidden in depot items in the search (optional). {integer}
_searchIf set to anything, allow filtering on TITLE, ALT_TITLE, PART_NUMBER, ACC_NOMINAL and custom fields
unqID of the hire stock item (returns only one item if set) (optional) {integer}.
pageThe page number of data to return. (optional) {integer}
rowsThe number of records to return for the requested page (min 20, max 200). (optional) {integer}
sordIf the data should be ascending (asc) or descending (desc). (optional) {string}
sidxThe field name to sort by (TITLE, ALT_TITLE, PRICE1, PRICE2, PRICE3, PRICE_TYPE1, PRICE_TYPE2, PRICE_TYPE3, STOCK, WEIGHT, GLOBAL, PART_NUMBER, LOCATION, HEIGHT, LENGTH, WIDTH, BARCODE, REPLACE_COST or ACC_NOMINAL) (optional) {string}
GLOBALThe ID of a any depot which determines the stock availability of the returned GLOBAL field. If 0 or not set, it assumes all depots (optional). {integer}
Return parameters:
NameDescription
rows: [
0: {
idThe ID of the item (integer).
cell: [
0: {
idThe ID of the asset (integer).
TITLEName of the item. {string}
ALT_TITLEThe alternative name of the item. {string}
DESCRIPTIONThe description of the item. {string}
PRICE1Price A of the item. {float}
PRICE2Price B of the item. {float}
PRICE3Price C of the item. {float}
PRICE_TYPE1The item price type for PRICE1 (0=One off, 1=hourly, 2=daily, 3=weekly, 4=monthly, 5=every day, 6=every week, 7=Proportional week, others are custom). {integer}
PRICE_TYPE2The item price type for PRICE2 (0=One off, 1=hourly, 2=daily, 3=weekly, 4=monthly, 5=every day, 6=every week, 7=Proportional week, others are custom). {integer}
PRICE_TYPE3The item price type for PRICE3 (0=One off, 1=hourly, 2=daily, 3=weekly, 4=monthly, 5=every day, 6=every week, 7=Proportional week, others are custom). {integer}
STOCKThis is a placeholder for how many are held in stock at the user depot, and will always be '?'. {string}
GLOBALThis is a placeholder for how many are held in stock in all depots, and will always be '?'. {string}
AVAILABLEThis is a placeholder for how many are available at local, and will always be '?'. {string}
WEIGHTThe weight of the item in KG. {float}
PART_NUMBERThe part number of the item. {string}
LOCATIONThe location description of the item in the warehouse, like shelf number (optional). {string}
WIDTHThe width of the item in meters. {float}
LENGTHThe length of the item in meters. {float}
HEIGHTThe height of the item in meters. {float}
VOLUMEThe volume in m3. {float}
IN_REPAIRHow many are in repair at the user depot at this moment {integer}
BARCODEThe group barcode of the item. {string}
REPLACE_COSTThe cost to replace/insurance value of the item. {float}
COST_PRICEThe estimated cost to rent this item in. {float}
COUNTRY_ORIGINThe country of origin of the item. Used on carnet documents. {string}
ACC_NOMINALThe sales nominal group ID for the item. {integer}
data: {
IDThe ID of the asset (integer).
TITLEName of the item. {string}
ALT_TITLEThe alternative name of the item. {string}
DESCRIPTIONThe description of the item. {string}
PRICE1Price A of the item. {float}
PRICE2Price B of the item. {float}
PRICE3Price C of the item. {float}
MAX_DISCOUNTThe maximum discount percentage allowed for the item (optional, 0 to 100). {float}
PRICE_TYPE1The item price type for PRICE1 (0=One off, 1=hourly, 2=daily, 3=weekly, 4=monthly, 5=every day, 6=every week, 7=Proportional week, others are custom). {integer}
PRICE_TYPE2The item price type for PRICE2 (0=One off, 1=hourly, 2=daily, 3=weekly, 4=monthly, 5=every day, 6=every week, 7=Proportional week, others are custom). {integer}
PRICE_TYPE3The item price type for PRICE3 (0=One off, 1=hourly, 2=daily, 3=weekly, 4=monthly, 5=every day, 6=every week, 7=Proportional week, others are custom). {integer}
VAT_RATEThe tax/GST/VAT type to use. {integer}
STATUSThe status index of the item (0=Active, 1=Hidden in picklist, 2=Deleted)(optional). {float}
CATAGORYThe ID of the category the item is part of. {integer}
IMAGE_IDThe ID of the image for the item. {integer}
MEMOThe memo of the item. {string}
NO_SHORTFALLIf 0 then HireHop calculates availability. {integer}
REPLACE_COSTThe cost to replace/insurance value of the item. {float}
COST_PRICEThe estimated cost to rent this item in. {float}
WEIGHTThe weight of the item in KG. {float}
WIDTHThe width of the item in meters. {float}
LENGTHThe length of the item in meters. {float}
HEIGHTThe height of the item in meters. {float}
IS_BOXSet to '1' if the item is a box {integer}
IS_BOX_OUTSet as 0 for do nothing on check out, 2 to open box on check out or 4 to open box on check out if it is empty. {integer}
IS_BOX_INSet as 0 for do nothing on check in, 8 to open box on check in. {integer}
VOLUMEThe override value of the volume. If zero, then volume should be calculated as WIDTH * LENGTH * HEIGHT. {float}
SERVICE_INTERVALThe service interval in ISO8601 temporal duration format (https://tc39.es/proposal-temporal/docs/duration.html). {string}
PAT_INTERVALThe service interval in ISO8601 temporal duration format (https://tc39.es/proposal-temporal/docs/duration.html). {string}
TEST_INTERVALThe service interval in ISO8601 temporal duration format (https://tc39.es/proposal-temporal/docs/duration.html). {string}
STOCKThis is a placeholder for how many are held in stock at the user depot, and will always be '?'. {string}
GLOBALThis is a placeholder for how many are held in stock in all depots, and will always be '?'. {string}
AVAILABLEThis is a placeholder for how many are available at local, and will always be '?'. {string}
IN_REPAIRHow many are in repair at the user depot at this moment {integer}
LOCATIONThe location description of the item in the warehouse, like shelf number. {string}
MARKETING_IDThe ID of the category for marketing. {integer}
MARKETING_PRICEThe price to use for marketing the item (0=none, 1=Price A, 2=Price B, & 3=Price C). {integer}
DEPRECIATIONHow many years for depreciation (from 0 to 10). {integer}
ACC_NOMINALThe sales nominal group ID for the item. {integer}
ACC_NOMINAL_POThe purchase nominal group ID for the item. {integer}
VIRTUALIf '1', the item is a virtual item. {integer}
BARCODEThe group barcode of the item (optional). {string}
PART_NUMBERThe part number of the item. {string}
COUNTRY_ORIGINThe country of origin of the item. Used on carnet documents.. {string[45]}
LOGGINGThe usage logging settings. {JSON array}
DEPOT_LIMITSAn array or string of depot ID's the item is limited to. {array or array-string
MANDATORY_SCANIf set to 1, a barcode is required to check the item out. {integer}
FLAGThe deafult flag to set when adding a new item into a supplying list (0=none, 1=Not important, 2=Important & 3=Technical). {integer}
fieldsCustom fields of the item {array}.
crumbsThe breadcrumb details of the category the item is in {JSON array}
}
}
]
}
]
errorSet if an error has occurred, either an error message or error number.

Save hire stock

Save changes or create a new hire stock item.

post/modules/stock/save.php
Send parameters:
NameDescription
IDID of the hire stock item or zero creates a new item (default 0) {integer}.
TITLEName of the item (required for new). {string[85]}
ALT_TITLEThe alternative name of the item (optional). {string[85]}
BARCODEThe group barcode of the item (optional). {string[45]}
DESCRIPTIONThe description of the item (optional). {string}
PRICE1Price A of the item (optional). {float}
PRICE2Price B of the item (optional). {float}
PRICE3Price C of the item (optional). {float}
MAX_DISCOUNTThe maximum discount percentage allowed for the item (optional, 0 to 100). {float}
PRICE_TYPESets PRICE_TYPE1, PRICE_TYPE2 and PRICE_TYPE3, to the same value. {integer}
PRICE_TYPE1The item price type (0=One off, 1=hourly, 2=daily, 3=weekly, 4=monthly, 5=every day, 6=every week, 7=Proportional week, others are custom) (optional). {integer}
PRICE_TYPE2The item price type (0=One off, 1=hourly, 2=daily, 3=weekly, 4=monthly, 5=every day, 6=every week, 7=Proportional week, others are custom) (optional). {integer}
PRICE_TYPE3The item price type (0=One off, 1=hourly, 2=daily, 3=weekly, 4=monthly, 5=every day, 6=every week, 7=Proportional week, others are custom) (optional). {integer}
VAT_RATEThe tax/GST/VAT type to use (optional). {integer}
STATUSThe status index of the item (0=Active, 1=Hidden in picklist, 2=Deleted)(optional). {float}
CATAGORYThe ID of the category the item is part of (optional). {integer}
MEMOThe memo of the item (optional). {string}
NO_SHORTFALLSet to 1 to prevent HireHop calculating availability. {integer}
REPLACE_COSTThe cost to replace/insurance value of the item (optional). {float}
COST_PRICEThe cost to rent this item in (optional). {float}
WEIGHTThe weight of the item in KG (optional). {float}
WIDTHThe width of the item in meters (optional). {float}
LENGTHThe length of the item in meters (optional). {float}
HEIGHTThe height of the item in meters (optional). {float}
SERVICE_INTERVALThe service interval in ISO8601 temporal duration format (https://tc39.es/proposal-temporal/docs/duration.html) (optional). {string}
PAT_INTERVALThe service interval in ISO8601 temporal duration format (https://tc39.es/proposal-temporal/docs/duration.html) (optional). {string}
TEST_INTERVALThe service interval in ISO8601 temporal duration format (https://tc39.es/proposal-temporal/docs/duration.html) (optional). {string}
LOCATIONThe location description of the item in the warehouse, like shelf number (optional). {string[45]}
MARKETING_IDThe ID of the category for marketing (optional). {integer}
MARKETING_PRICEThe price to use for marketing the item (0=none, 1=Price A, 2=Price B, & 3=Price C) (optional). {integer}
MANDATORY_SCANSet to 1 so that a barcode is required to check the item out. {integer}
DEPRECIATIONHow many years for depreciation (from 0 to 10) (optional). {integer}
ACC_NOMINALThe sales nominal group ID for the item (optional). {integer}
ACC_NOMINAL_POThe purchase nominal group ID for the item (optional). {integer}
PART_NUMBERThe part number of the item (optional). {string[25]}
COUNTRY_ORIGINThe country of origin of the item. Used on carnet documents. (optional). {string[45]}
FLAGThe deafult flag to set when adding a new item into a supplying list (0=none, 1=Not important, 2=Important & 3=Technical) (optional). {integer}
DEPOT_LIMITSAn array or string of depot ID's the item is limited to (optional). {array or array-string}
IMAGE_IDThe ID of the image for the item (optional). {integer}
VIRTUALOnly for new items. Setting to '1' makes the item vbirtual (optional). {integer}
IMAGEThe image data of the new image (optional). {BASE 64}
fieldsCustom fields of the item (array).
Return parameters:
NameDescription
rows: [
0: {
idThe ID of the item (integer).
cell: [
0: {
idThe ID of the asset (integer).
TITLEName of the item. {string}
ALT_TITLEThe alternative name of the item. {string}
DESCRIPTIONThe description of the item. {string}
PRICE1Price A of the item. {float}
PRICE2Price B of the item. {float}
PRICE3Price C of the item. {float}
PRICE_TYPE1The item price type for PRICE1 (0=One off, 1=hourly, 2=daily, 3=weekly, 4=monthly, 5=every day, 6=every week, 7=Proportional week, others are custom). {integer}
PRICE_TYPE2The item price type for PRICE2 (0=One off, 1=hourly, 2=daily, 3=weekly, 4=monthly, 5=every day, 6=every week, 7=Proportional week, others are custom). {integer}
PRICE_TYPE3The item price type for PRICE3 (0=One off, 1=hourly, 2=daily, 3=weekly, 4=monthly, 5=every day, 6=every week, 7=Proportional week, others are custom). {integer}
STOCKHow many are held in stock at the user depot. {integer}
GLOBALHow many are held in stock in all depots. {integer}
WEIGHTThe weight of the item in KG. {float}
PART_NUMBERThe part number of the item. {string}
LOCATIONThe location description of the item in the warehouse, like shelf number (optional). {string}
WIDTHThe width of the item in meters. {float}
LENGTHThe length of the item in meters. {float}
HEIGHTThe height of the item in meters. {float}
IN_REPAIRHow many are in repair at the user depot at this moment {integer}
BARCODEThe group barcode of the item. {string}
REPLACE_COSTThe cost to replace/insurance value of the item. {float}
COUNTRY_ORIGINThe country of origin of the item. Used on carnet documents. {string}
AVAILABLEHow many are available at the user depot at this moment. {integer}
ACC_NOMINALThe sales nominal group ID for the item. {integer}
data: {
IDThe ID of the asset (integer).
TITLEName of the item. {string}
ALT_TITLEThe alternative name of the item. {string}
DESCRIPTIONThe description of the item. {string}
PRICE1Price A of the item. {float}
PRICE2Price B of the item. {float}
PRICE3Price C of the item. {float}
MAX_DISCOUNTThe maximum discount percentage allowed for the item (optional, 0 to 100). {float}
PRICE_TYPE1The item price type for PRICE1 (0=One off, 1=hourly, 2=daily, 3=weekly, 4=monthly, 5=every day, 6=every week, 7=Proportional week, others are custom). {integer}
PRICE_TYPE2The item price type for PRICE2 (0=One off, 1=hourly, 2=daily, 3=weekly, 4=monthly, 5=every day, 6=every week, 7=Proportional week, others are custom). {integer}
PRICE_TYPE3The item price type for PRICE3 (0=One off, 1=hourly, 2=daily, 3=weekly, 4=monthly, 5=every day, 6=every week, 7=Proportional week, others are custom). {integer}
VAT_RATEThe tax/GST/VAT type to use. {integer}
STATUSThe status index of the item (0=Active, 1=Hidden in picklist, 2=Deleted)(optional). {float}
CATAGORYThe ID of the category the item is part of. {integer}
IMAGE_IDThe ID of the image for the item. {integer}
MEMOThe memo of the item. {string}
NO_SHORTFALLIf 0 then HireHop calculates availability. {integer}
REPLACE_COSTThe cost to replace/insurance value of the item. {float}
COST_PRICEThe cost to rent this item in. {float}
WEIGHTThe weight of the item in KG. {float}
WIDTHThe width of the item in meters. {float}
LENGTHThe length of the item in meters. {float}
HEIGHTThe height of the item in meters. {float}
SERVICE_INTERVALThe service interval in ISO8601 temporal duration format (https://tc39.es/proposal-temporal/docs/duration.html). {string}
PAT_INTERVALThe service interval in ISO8601 temporal duration format (https://tc39.es/proposal-temporal/docs/duration.html). {string}
TEST_INTERVALThe service interval in ISO8601 temporal duration format (https://tc39.es/proposal-temporal/docs/duration.html). {string}
STOCKHow many are held in stock at the user depot. {integer}
GLOBALHow many are held in stock in all depots. {integer}
AVAILABLEHow many are available at the user depot at this moment. {integer}
IN_REPAIRHow many are in repair at the user depot at this moment {integer}
LOCATIONThe location description of the item in the warehouse, like shelf number. {string}
MARKETING_IDThe ID of the category for marketing. {integer}
MARKETING_PRICEThe price to use for marketing the item (0=none, 1=Price A, 2=Price B, & 3=Price C). {integer}
DEPRECIATIONHow many years for depreciation (from 0 to 10). {integer}
ACC_NOMINALThe sales nominal group ID for the item. {integer}
ACC_NOMINAL_POThe purchase nominal group ID for the item. {integer}
VIRTUALIf '1', the item is a virtual item. {integer}
BARCODEThe group barcode of the item (optional). {string}
PART_NUMBERThe part number of the item. {string}
COUNTRY_ORIGINThe country of origin of the item. Used on carnet documents.. {string[45]}
LOGGINGThe usage logging settings. {JSON array}
DEPOT_LIMITSAn array or string of depot ID's the item is limited to. {array or array-string
FLAGThe deafult flag to set when adding a new item into a supplying list (0=none, 1=Not important, 2=Important & 3=Technical). {integer}
MANDATORY_SCANIf set to 1, a barcode is required to check the item out. {integer}
fieldsCustom fields of the item {array}.
crumbsThe breadcrumb details of the category the item is in {JSON array}
}
}
]
}
]
errorSet if an error has occurred, either an error message or error number.


Stock

Transfer asset to depot

Transfer an asset to another depot.

post/modules/stock/equipment_depot_save.php
Send parameters:
NameDescription
idID of the asset to move (compulsory if no barcode). {integer}.
barcodeBarcode of the asset to move (compulsory if no id). {string}.
depotID of the depot to transfer to. {integer}
qtyOptional quantity to move (will move all if not set). {integer}
Return parameters:
NameDescription
IDID of the asset. {integer}
DEPOTID of the new depot if changed. {integer}
VIRTUAL_DEPOT_IDID of the new virtual depot if changed. {integer}
errorSet if an error has occurred, either an error message or error number.


Reports

Consumable reorder

Get a list of sales stock reorders due based on stock level at depot

get/reports/consumable_reorder_list.php
Send parameters:
NameDescription
depotThe ID of the depot to filter by (default is 0=all) (optional). {integer}
Return parameters:
NameDescription
data: [
0: {
IDUnique ID of the item. {integer}
TITLEName of consumable stock item. {string}
BARCODEThe barcode of the item. {string}
PART_NUMBER The part number of the item. {float}
CATEGORYName of the category the item belongs to. {string}
COST_PRICEThe current cost price to buy this item. {float}
QTYQuantity currently held in stock. {float}
REORDER_LEVEL The qty level that will trigger a reorder alert. {integer}
REORDER_QTY The minimum amount that needs to be ordered when buying more. {integer}
BOUGHT_FROMWhere it was bought from. {string}
}
]
errorSet if an error has occurred, either an error message or error number.

Consumable usage report

Get a list of consumable items usage based on depot over a time period.

get/reports/consumable_usage_list.php
Send parameters:
NameDescription
idcosumable item Id. {integer}.
fromThe date we are searching from in 'YYYY-MM-DD' format (compulsory). {date string}.
uptoThe date we are searching upto in 'YYYY-MM-DD' format (compulsory). {date string}.
localUser local time (not required). {date string}
tzUser time zone (not required). {string}
Return parameters:
NameDescription
data: [
0: {
IDUnique ID of the purchase order. {integer}
JOBID of the owner job, project, etc. {integer}
JOB_NAMEWhat is the job name. {string}
OUT_DATEOut date of the consumable item is dispatch for job. {datetime}
RETURN_DATEReturn date of the consumable item is return from job. {datetime}
QTYcosumable item quantity. {integer}
STATUSThe status of the purchase order (0=Draft, 1=Awaiting Approval, 2=Approved, 3=Confirmed, 4=Part Received, 5=Received, 6=Part Returned, 7=Returned, 8=Cancelled). {integer}
}
]
errorSet if an error has occurred, either an error message or error number.

Get the custom item list

Get a list of custom items used in job based on dates.

get/reports/custom_items_list.php
Send parameters:
NameDescription
fromThe date we are searching from in 'YYYY-MM-DD' format (compulsory). {date string}.
uptoThe date we are searching upto in 'YYYY-MM-DD' format (compulsory). {date string}.
statusThe status values to filter. {json or json string of numbers}
depotThe ID of the depot to filter by (default is 0=all) (optional). {integer}.
localUser local time (not required). {date string}
tzUser time zone (not required). {string}
Return parameters:
NameDescription
data: [
0: {
IDUnique ID of the custom item. {integer}
JOBID of the job which the custom item used. {integer}.
NAMEName of the job custom item used. {string}
CUSTOMName of the custom item used on job. {string}
ADDITIONALThe additional name/ alias of custom items. {string}
QUNATITYThe qunatity of the custom item used in the job. {string}
UNIT_PRICEThe price of custom item per unit. {string}
PRICE_TYPEThe Type of price of custom item (0=One off price, 1= per Hour, 2=per Day, 3=per Week, 4=per Month, 5=Every day, 6=Every week, 7=Proportioned week). {integer}
VAT_RATEThe vat rate of custom item. {float}
DESCRIPTIONwhat the name of the custom item nominal account name. {integer}
WEIGHTweight of item. {float}
REPLACE_CODEThe replace cost of item. {float}
START_DATEStart date of the custom item used for job. {datetime}
END_DATEEnd date of the custom item used for job. {datetime}
STATUSThe status of the job (0=Enquiry, 1=Provisional, 2=Booked, 3=Prepped, 4=Part Dispatched, 5=Dispatched, 6=Returned Incomplete, 7=Returned, 8=Requires Attention, 9=Cancelled, 10=Not Interested,11=Completed). {integer}
DEPOTThe name of the depot the job is assigned to. {string}
}
]
errorSet if an error has occurred, either an error message or error number.

Damaged list

Get a list of repair or damaged items in a depot

get/reports/damaged_list.php
Send parameters:
NameDescription
depotThe ID of the depot to filter by (default is 0=all) (optional) {integer}.
Return parameters:
NameDescription
data: [
0: {
QTYNo of quantity of item {integer}
TITLEName of damaged/repaired stock item. {string}
BARCODEBarcode of the item. {string}
SERIAL Serial nummber of the item. {string}
MEMOMemo of the item. {string}
STATUSStatus of the item. {integer}
DEPOTWhich depot the item belongs to. {integer}
STATUS_CHANGEThe date the last status change happened. {date string}
REPLACE_COST Cost of replacing the item in the base currency. {float}
NET_BOOK_VALUEOriginal cost less the accumilated depreciation (net book value). {float}.
}
]
errorSet if an error has occurred, either an error message or error number.

Finance Asset item list

Get a list of financed assest list based on depot over a time period.

get/reports/financed_list.php
Send parameters:
NameDescription
fromThe date we are searching from in 'YYYY-MM-DD' format (compulsory). {date string}.
uptoThe date we are searching upto in 'YYYY-MM-DD' format (compulsory). {date string}.
depotThe ID of the depot to filter by (default is 0=all) (optional) {integer}.
localUser local time (not required). {date string}
tzUser time zone (not required). {string}
Return parameters:
NameDescription
data: [
0: {
IDUnique ID of the purchase order. {integer}
QTYAsset Quantity. {integer}.
TITLEAsset Item Name. {string}
BRACODEAssest Item Barcode. {string}
SERIALAsset item serial number. {string}
DEPOTAsset item blongs to which depot. {float}
PURCHASE_DATEAsset item purchase on date{datetime string}
FINANCE_DATEAsset item finance on date. {datetime string}
RETIRE_DATEAseet item retired on date. {date string}
PURCHASE_PRICEAsset item purchase price. {float}.
SOLD_PRICEAsset item sold price. {float}.
FINANCE_COMPANYAsset Item finance by company. {string}
FINANCE_REFasset item referece by . {string}
}
]
errorSet if an error has occurred, either an error message or error number.

Hire stock valuation

Get a list of tasks. The return data might include custom fields, all of which start with a '~' character.

get/reports/hire_stock_valuation_list.php
Send parameters:
NameDescription
depotThe ID of the depot to filter by (optional). {integer}.
virtdepoWhat the Virtual Depot to filter by (optional) {integer}.
headings_selWhat the Category to filter by (optional) {integer}.
localThe local date and time of the client (not required).
tzThe timezone of the client (not required).
Return parameters:
NameDescription
rows: [
0: {
IDThe unique ID of the asset. {integer}
STOCK_IDID of the of the hire stock. {integer}
TITLEThe name of the hire stock the asset belongs to. {string}
ALT_TITLEThe alternative name of the hire stock the asset belongs to. {string}
BARCODEThe barcode of the asset. {string}
CATEGORYThe category the hire stock is assigned to. {string}
DEPOTThe depot the asset is assigned to. {integer}
DEPRECIATIONThe depreciation for the hire stock.
LOCATIONThe location of stock in the depoty. {string}
MEMOThe asset memo. {string}.
NET_BOOK_VALUEThe net booke value of the asset (in the base currency). {float}
PART_NUMBERThe PART_NUMBER of the hire stock. {string}
PURCHASED_FROMWho the asset was purchased from. {string}
PURCHASED_PRICEHow much was the asset bought for (in the base currency). {float}
PURCHASED_DATEThe date the asset was purchased. {datetime string}
QUANTITYIf a bulk asset, how many are assigned, otherwise it will equal 1. {integer}
REPLACE_COSTHow much to replace the hire stock (in the base currency). {float}
STATUSThe status of the asset. {integer}
}
]
errorSet if an error has occurred, either an error message or error number.

Get the Job Income list

Get a list of Income from job based on dates.

get/reports/job_income_list.php
Send parameters:
NameDescription
fromThe date we are searching from in 'YYYY-MM-DD' format (compulsory). {date string}.
uptoThe date we are searching upto in 'YYYY-MM-DD' format (compulsory). {date string}.
statusThe status values to filter. {json or json string of numbers}
depotThe ID of the depot to filter by (default is 0=all) (optional). {integer}.
localUser local time (not required). {date string}
tzUser time zone (not required). {string}
Return parameters:
NameDescription
data: [
0: {
JOB_IDUnique ID of the JOB. {integer}
JOB_NAMEName of the job, the invoice/credit note is assigned to. {string}
DEPOTThe name of the depot the job is assigned to. {string}
COMPANYName of the company as customer the job is for. {string}
CREATE_DATEThe job created date of job. {date string}
OUT_DATEThe outgoing date of job. {date string}
RETURN_DATEThe returning date of the job. {date string}
TOTALThe net total revenue to date for the job. {float}
INVOICEDThe net total invoiced within the job. {float}
CREDITSThe total of credit notes within the job. {float}
UNINVOICEDThe total yet to be invoiced within the job. {float}
COSTSThe total cost for the job. {float}
PROFITThe 'total' less credit and costs for the job. {float}
MARGINThe profit margin of the job. {float}
PAIDThe paid amount for the job. {float}
JOB_TYPEThe type of job. {string}
MANAGERThe name of the manager the job is assigned to. {string}
MANAGER2The name of the manger-2 the job is assigned to. {string}
ACCOUNT_REFERENCEThe name of the client as reference. {string}
CLIENT_REFThe name of the depot the job is assigned to. {string}
STATUSThe status of the job (0=Enquiry, 1=Provisional, 2=Booked, 3=Prepped, 4=Part Dispatched, 5=Dispatched, 6=Returned Incomplete, 7=Returned, 8=Requires Attention, 9=Cancelled, 10=Not Interested,11=Completed). {integer}
}
]
errorSet if an error has occurred, either an error message or error number.

Labour Usage list

Get a list of labour used on job based on depot over a dates period.

get/reports/labour_usage_list.php
Send parameters:
NameDescription
idThe ID of Labour. {integer}.
fromThe date we are searching from in 'YYYY-MM-DD' format (compulsory). {date string}.
uptoThe date we are searching upto in 'YYYY-MM-DD' format (compulsory). {date string}.
localUser local time (not required). {date string}
tzUser time zone (not required). {string}
Return parameters:
NameDescription
data: [
0: {
IDID as Job ID. {integer}
JOB_NAMEName of the job labour used. {string}.
OUT_DATEOn dated labour is start work on the job {date}
RETURN_DATEOn dated labour is return from the job. {date}
qtyWhat the Labout quantitiy used for the job {integer}
INVOICED_qtyThe number of labour quantity invoiced . {integer}
INVOICED_PRICEThe amount of invoiced used qty.{float}
COSTThe amount is cost of labour while work on job. {float}
}
]
errorSet if an error has occurred, either an error message or error number.

Stock utilisation

Get the stock utilisation data

get/reports/labour_utilisation_list.php
Send parameters:
NameDescription
fromThe date to start the search from. {ISO string}
uptoThe date to start the search until. {ISO string}
depotThe ID of the depot to filter by (optional). {integer}.
catThe category ID to filter by. If empty or '0' then all shown (optional). {integer}.
methodThe method the utilisation is based on, either 'days' or 'jobs' (default is 'jobs'). {string}
localThe local date and time of the client (not required). {ISO string}
tzThe timezone of the client (not required). {string}
Return parameters:
NameDescription
rows: [
0: {
IDID of the of the task (integer).
NameWhat the name id the asset name
PART_NUMBERThe PART_NUMBER of the Asset.
CATEGORYThe category of what the asset is assigned to.
replacement costWhat the cost of replacement.
utilisationWhat the shows utilisation of asset.
utilisation percetageWhat the shows utilisation in percentage.
Qty In Stockshows total number of quantity in stock.
usedThe used is shows usages of asset.
used in percentageThe used is shows usages of asset in percentage.
hire in cost Its show cost of hire.
STATUSThe status of the task.
}
]
jobs_encompassedThe number of jobs used in the search. {integer}

Purchase order nominal codes report

Get a report on purchase order nominal codes used based on dates.

get/reports/nominal_purchase_list.php
Send parameters:
NameDescription
fromThe date we are searching from in 'YYYY-MM-DD' format (compulsory). {date string}.
uptoThe date we are searching upto in 'YYYY-MM-DD' format (compulsory). {date string}.
depotThe ID of the depot to filter by (default is 0=all) (optional) {integer}.
statusThe status values to filter. {json or json string of numbers}
localUser local time (not required). {date string}
tzUser time zone (not required). {string}
Return parameters:
NameDescription
data: [
0: {
IDUnique ID of the purchase order. {integer}
MAIN_IDID of the owner job, project, etc. {integer}.
TYPEWhat is the owner (1=job, 6=project, etc.). {integer}
STARTStart date of the purchase order. {datetime}
KINDWhat the purchase order is (0=Sub Hire, 1=Crew, 2=Service, 3=Purchase, 4=Transport, 5=Internal, 6=Travel). {integer}
NUMBERThe number of the purchase order. {string}
STATUSThe status of the purchase order (0=Draft, 1=Awaiting Approval, 2=Approved, 3=Confirmed, 4=Part Received, 5=Received, 6=Part Returned, 7=Returned, 8=Cancelled). {integer}
FINISHEnd date of the purchase order. {datetime}
DESCRIPTIONDescription of the purchase order. {string}
DEPOTThe name of the depot the purchase order is assigned to. {string}.
DEPOT_IDThe ID of the depot the purchase order is assigned to. {integer}.
NETThe net total. {float}
NOMINAL_CODEThe code or the name of the nominal code used. {string}
NAMEThe name of the supplier. {string}
COMPANYThe company name of the supplier. {string}
}
]
errorSet if an error has occurred, either an error message or error number.

Get the custom item list

Get a list of custom items used in job based on dates.

get/reports/sales_items_list.php
Send parameters:
NameDescription
fromThe date we are searching from in 'YYYY-MM-DD' format (compulsory). {date string}.
uptoThe date we are searching upto in 'YYYY-MM-DD' format (compulsory). {date string}.
statusThe status values to filter. {json or json string of numbers}
depotThe ID of the depot to filter by (default is 0=all) (optional). {integer}.
localUser local time (not required). {date string}
tzUser time zone (not required). {string}
Return parameters:
NameDescription
data: [
0: {
IDUnique ID of the custom item. {integer}
JOBID of the job which the custom item used. {integer}.
NAMEName of the job custom item used. {string}
CUSTOMName of the custom item used on job. {string}
ADDITIONALThe additional name/ alias of custom items. {string}
QUNATITYThe qunatity of the custom item used in the job. {string}
UNIT_PRICEThe price of custom item per unit. {string}
PRICE_TYPEThe Type of price of custom item (0=One off price, 1= per Hour, 2=per Day, 3=per Week, 4=per Month, 5=Every day, 6=Every week, 7=Proportioned week). {integer}
VAT_RATEThe vat rate of custom item. {float}
DESCRIPTIONwhat the name of the custom item nominal account name. {integer}
WEIGHTweight of item. {float}
REPLACE_CODEThe replace cost of item. {float}
START_DATEStart date of the custom item used for job. {datetime}
END_DATEEnd date of the custom item used for job. {datetime}
STATUSThe status of the job (0=Enquiry, 1=Provisional, 2=Booked, 3=Prepped, 4=Part Dispatched, 5=Dispatched, 6=Returned Incomplete, 7=Returned, 8=Requires Attention, 9=Cancelled, 10=Not Interested,11=Completed). {integer}
DEPOTThe name of the depot the job is assigned to. {string}
}
]
errorSet if an error has occurred, either an error message or error number.

Stock utilisation

Get the stock utilisation data

get/reports/sales_stock_utilisation_list.php
Send parameters:
NameDescription
fromThe date to start the search from. {ISO string}
uptoThe date to start the search until. {ISO string}
depotThe ID of the depot to filter by (optional). {integer}.
catThe category ID to filter by. If empty or '0' then all shown (optional). {integer}.
methodThe method the utilisation is based on, either 'days' or 'jobs' (default is 'jobs'). {string}
localThe local date and time of the client (not required). {ISO string}
tzThe timezone of the client (not required). {string}
Return parameters:
NameDescription
rows: [
0: {
IDID of the of the task (integer).
NameWhat the name id the asset name
PART_NUMBERThe PART_NUMBER of the Asset.
CATEGORYThe category of what the asset is assigned to.
replacement costWhat the cost of replacement.
utilisationWhat the shows utilisation of asset.
utilisation percetageWhat the shows utilisation in percentage.
Qty In Stockshows total number of quantity in stock.
usedThe used is shows usages of asset.
used in percentageThe used is shows usages of asset in percentage.
hire in cost Its show cost of hire.
STATUSThe status of the task.
}
]
jobs_encompassedThe number of jobs used in the search. {integer}

Sales stock valuation

Get a list of sales stock valuation based on categoty as well depot

get/reports/sales_stock_valuation_list.php
Send parameters:
NameDescription
depotDepot id to limit the search to (if 0, then all depots). {integer}.
catCategory id to search against (if 0, then all categories). {integer}.
Return parameters:
NameDescription
data: [
0: {
IDUnique ID of the consumables. {integer}
TITLEName of consumable stock item. {string}
CATEGORYName of the category. {string}
QUANTITYNo of quantity of stock item. {int}
COST_PRICECost price of stock item. {float}
VALUE Total amount ( cost price * quantity). {float}
PART_NUMBER Part number of item. {float}
LOCATION Location of stock item. {string}
DEPOTStock item is belongs to which depot.{string}
}
]
errorSet if an error has occurred, either an error message or error number.

Stock utilisation

Get the stock utilisation data

get/reports/stock_utilisation_list.php
Send parameters:
NameDescription
fromThe date to start the search from. {ISO string}
uptoThe date to start the search until. {ISO string}
depotThe ID of the depot to filter by (optional). {integer}.
catThe category ID to filter by. If empty or '0' then all shown (optional). {integer}.
methodThe method the utilisation is based on, either 'days' or 'jobs' (default is 'jobs'). {string}
localThe local date and time of the client (not required). {ISO string}
tzThe timezone of the client (not required). {string}
Return parameters:
NameDescription
rows: [
0: {
IDID of the of the task (integer).
NameWhat the name id the asset name
PART_NUMBERThe PART_NUMBER of the Asset.
CATEGORYThe category of what the asset is assigned to.
replacement costWhat the cost of replacement.
utilisationWhat the shows utilisation of asset.
utilisation percetageWhat the shows utilisation in percentage.
Qty In Stockshows total number of quantity in stock.
usedThe used is shows usages of asset.
used in percentageThe used is shows usages of asset in percentage.
hire in cost Its show cost of hire.
STATUSThe status of the task.
}
]
jobs_encompassedThe number of jobs used in the search. {integer}

Sub Hires list

Get a list of Sub Hires used on job based on job type, sub type, payment status, depot, sub hire status over a time period.

get/reports/sub_hires_list.php
Send parameters:
NameDescription
fromThe date we are searching from in 'YYYY-MM-DD' format (compulsory). {date string}.
uptoThe date we are searching upto in 'YYYY-MM-DD' format (compulsory). {date string}.
depotThe ID of the depot to filter by (default is 0=all). (optional) {integer}.
statusThe status of the sub hires to filter. (optional) {float}.
jobTypeThe Type of Job of the sub hires to filter. (optional) {string}.
subTypesThe sub Type of job to filter. (optional) {integer}.
PaymentStatusThe payment status of the job to filter. {integer}.
localUser local time (not required). {date string}
tzUser time zone (not required). {string}
Return parameters:
NameDescription
data: [
0: {
JOBThe job unique ID of the job which the sub hires used for. {integer}
JOB_NAMEName of the job which the sub hires used for. {string}
JOB_TYPEType of job which the sub hires used for. {string}
NUMBERNumber of the sub hires. {integer}
AUTH_DATEHire authorise date of sub hires. {date string}
STARTThe hires received on date. {date string}
FINISHThe hires retunrs on date. {date string}
TYPEType of sub hires type. {float}
SUPPLIERThe supplier of the sub hires. {string}
SUPPLYINGThe details of supplier of the sub hires. {string}
STATUSThe status of the Job. {float}
DEPOTThe job belongs to which depot. {float}
NET_TOTALNet total of the hires items. {float}
VATVat of the hired item. {float}
TOTALTotal amount of the hired items. {float}
PAYMENTSPayment of hired item. {float}
OWINGMoney owing from the job. {float}
}
]
errorSet if an error has occurred, either an error message or error number.

Test / service report

Get a list of item test or services due based on due date, categoty and depot

get/reports/tests_list.php
Send parameters:
NameDescription
Due dateThe date we are searching for due date in 'YYYY-MM-DD' format (compulsory). {date}
depotThe ID of the depot to filter by (default is 0=all). (optional) {integer}
catThe ID of the category to filter by (default is 0=all). (optional) {integer}
testThe type of test to filter by (default us 0 = SERVICE_INTERVAL, 2= PAT_INTERVAL, 3=TEST_INTERVAL). {integer}
Return parameters:
NameDescription
data: [
0: {
IDUnique ID of the asset. {integer}
QTYThe QTY of the asset used for test and service. {integer}
TITLEName of asset item. {string}
SERIALSerial number of the asset item. {string}
DEPOTThe asset belongs to which depot.{string}
LAST TESTlast test date of item. {date string}
NEXT TESTNext test date of stock item. {date string}
JOBJob ID stands for asset used in the job for due test (only checked out items). {integer}
}
]
errorSet if an error has occurred, either an error message or error number.


Integration API

Get assets

Get a list of assets for testing machines.

get/api/integration/get_assets.php
Send parameters:
NameDescription
keyThe Integration key found in 'Company settings' on the 'Settings' page. Do not use an API token! (required). {string}
barcodeAn optional barcode that will filter the results to one asset with the matching barcode (if found) (optional). {string}
Return parameters:
NameDescription
data: [
0: {
IDUnique ID of the asset. {integer}
STOCK_IDThe parent ID of the stock line. {integer}
BARCODEThe unique barcode of the asset. {string}
SERIALThe unique serial number of the asset. {string}
STATUSThe status of the asset (0=active, 1=flagged, 2=In repair, 3=Write off, 4=Sold, 5=Stolen, 6=Lost, 7=Erased; decimals are additional custom status values of the whole number). {float}
}
]
errorSet if an error has occurred, either an error message or error number (an http code of 403 or 429 will also be set).

Get categories

Get a list of categories for testing machines.

get/api/integration/get_categories.php
Send parameters:
NameDescription
keyThe Integration key found in 'Company settings' on the 'Settings' page. Do not use an API token! (required). {string}
Return parameters:
NameDescription
data: [
0: {
IDUnique ID of the category. {integer}
HEADINGThe name of the category. {string}
PARENT_IDThe ID of the parent if any. {string}
LFTThe left value of the category in the nested tree. {integer}
RGTThe right value of the category in the nested tree. {integer}
}
]
errorSet if an error has occurred, either an error message or error number (an http code of 403 or 429 will also be set).

Get job assets

Get a list of asset IDs checked out in a job.

get/api/integration/get_job_assets.php
Send parameters:
NameDescription
keyThe Integration key found in 'Company settings' on the 'Settings' page. Do not use an API token! (required). {string}
job_idThe ID/job number to get a list of assets checked out (required). {integer}
Return parameters:
NameDescription
data: [
0: {
ASSET_IDUnique ID of the asset. {integer}
}
]
errorSet if an error has occurred, either an error message or error number (an http code of 403 or 429 will also be set).

Get jobs

Get a list of jobs that are from and including part dispatched but not yet fully returned.

get/api/integration/get_jobs.php
Send parameters:
NameDescription
keyThe Integration key found in 'Company settings' on the 'Settings' page. Do not use an API token! (required). {string}
Return parameters:
NameDescription
data: [
0: {
IDThe number of the job. {integer}
JOB_NAMEThe name of the job. {string}
VENUEThe name of the delivery address. {string}
OUT_DATEThe job outgoing date and time. {ISO date string}
JOB_DATEThe job start date and time. {ISO date string}
DEPOT_NAMEThe name of the depot the job is alloocated to. {string}
STATUSThe status of the job (4=Part dispatched, 5=Dispatched, 6=Returned incomplete; decimals are additional custom status values of the whole number). {float}
}
]
errorSet if an error has occurred, either an error message or error number (an http code of 403 or 429 will also be set).

Get stock

Get a list of all active stock that needs a test, PAT test or service.

get/api/integration/get_stock.php
Send parameters:
NameDescription
keyThe Integration key found in 'Company settings' on the 'Settings' page. Do not use an API token! (required). {string}
Return parameters:
NameDescription
data: [
0: {
IDUnique ID of the stock line. {integer}
TITLEThe name of the stock line. {string}
CATEGORY_IDID of the category of the stock line. {integer}
IMAGE_IDID of the image (if new image assigned, ID will be different). {integer}
SERVICE_INTERVALThe period in ISO 8601 of a service. {string}
PAT_INTERVALThe period in ISO 8601 of a PAT test. {string}
TEST_INTERVALThe period in ISO 8601 of a test. {string}
IMAGE_URLThe URL of the stock line image. {string}
THUMBNAIL_URLThe URL of the smaller stock line thumbnail image. {string}
}
]
errorSet if an error has occurred, either an error message or error number (an http code of 403 or 429 will also be set).

Get users

Get a list of all users and their status.

get/api/integration/get_users.php
Send parameters:
NameDescription
keyThe Integration key found in 'Company settings' on the 'Settings' page. Do not use an API token! (required). {string}
Return parameters:
NameDescription
data: [
0: {
IDUnique ID of the user. {integer}
NAMEThe name of the user. {string}
EMAILThe email address of the user. {string}
ACTIVEIf true then the user is active. {integer}
}
]
errorSet if an error has occurred, either an error message or error number (an http code of 403 or 429 will also be set).

Save a test/service (plugin only)

Save a new test, service or PAT test for a single asset using the Integration key found in 'Company settings' on the 'Settings' page. This will only work with subscribed users.

post/api/integration/post_test.php
Send parameters:
NameDescription
keyThe Integration key found in 'Company settings' on the 'Settings' page. Do not use an API token! (required). {string}
typeWhat is the test/service (0=Service, 1=PAT Test [default], 2=Test, 3=Repair, 4=Maintenance, 5=Other) {integer}.
user_idThe ID of the Hirehop user. If not set, the HireHop user will be used instead. {integer}
asset_idThe ID of the asset the test/service is for. If empty, the 'barcode' will be used instead. {integer}.
barcodeThe barcode of the asset the test/service is for. Only used if the 'asset_id' is empty. {string}.
descriptionA brief description of the test/service (default is 'Test') {string}
dateThe date and time the test/service was done in UTC (default is now). {ISO datetime string}
memoA memo for the test/service. {string}
passSet to '1' (default) if it passed the test/service, or '0' if it failed. {integer}
Return parameters:
NameDescription
IDUnique identifier for the test/service/PAT test. {integer}
ASSET_IDThe ID of the asset the test is for. {integer}.
errorSet if an error has occurred, either an error message or error number (an http code of 403 or 429 will also be set).