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.
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.
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
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.
If you are using a RFC2046 (MIME format) to send the token (like a GET or non-JSON POST), you must encode the token (use something like https://www.urlencoder.org/).
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.
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.
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.
All currency values are sent and received in the base currency. They are converted and displayed accordingly using the job, invoice, etc. currency settings.
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.
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.
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.
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
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:Name | Description |
---|
job | ID of the job. {integer}. |
Return parameters:Name | Description |
---|
ACCOUNT_REFERENCE | Reference of the customer from the address book |
ACCOUNT_SUSPENDED | Is the account suspended (yes=1 or no=0). |
ACC_PACKAGE_ID | The ID of the accounting package to use |
ADDRESS | Address of the job |
ALLOW_EARLY_RETURNS | Discount for early returns (yes=1 or no=0). |
ARCHIVES | How many quotes saved |
CALC_LATE_FEES | Add late fees option, (yes=1 or no=0). |
CLIENT_ASSIGN | Client company or name in the address book the job is assigned to |
CLIENT_ID | Client company ID in the address book the job is assigned to |
CLIENT_MEMO | Memo from the address book |
CLIENT_REF | Reference for the job from the client |
COLLECT | Option on collection (customer collect=0, we deliver=1, courier delivery=2, other=3). |
COLOUR | The colour of the job in HEX |
COMPANY | Company name of the customer |
CREATED_BY | Name of the user who created the job |
CREATED_BY_EMAIL | Email of the user who created the job |
CREATED_BY_IMAGE_ID | Image ID of the user who created the job |
CREATED_BY_JOB | Job role of the user who created the job |
CREATED_BY_TELEPHONE | Telephone number of the user who created the job |
CREATE_DATE | Date the job was created (YYYY-MM-DD hh:mm:ss) |
CREATE_USER | ID of the user who created the job |
CREDIT_LIMIT | Credit limit of the customer |
CREDIT_PERIOD | Credit time in days for the customer |
CURRENCY: { |
CODE | The international currency code for the default currency used for the job |
DECIMALS | How many decimal places does the currency have |
DECIMAL_SEPARATOR | The character used to separate the decimals |
MULTIPLIER | The multiplier used to get the exchange rate |
NAME | Name of the currency |
NEGATIVE_FORMAT | How a negative should be displayed |
SYMBOL | The currency symbol |
SYMBOL_POSITION | The position of the currency symbol (0=before, 1=after) |
THOUSAND_SEPARATOR | The character used to separate thousands |
} |
CUSTOM_INDEX | The indexable custom field value |
DEFAULT_DISCOUNT | The default discount percentage to give to the customer. |
DEFAULT_SALES_TAX | The default sales tax percentage |
DELIVER | Option on delivery (customer return=0, we collect=1, courier collection=2, other=3). |
DEPOT | Name of the depot the job is in |
DEPOT_ID | ID of the depot the job is in |
DETAILS | Job memo about the job |
DO_PRIORITY | Use priority availability calculation for the job (yes=1 or no=0). |
DURATION_DAYS | How many chargeable days from JOB_DATE. |
DURATION_HRS | How many chargeable hours from JOB_DATE. |
DURATION_LOCKED | Set to '1' if changing the dates when editing a job does not change the duration. |
DURATION_SCHEME | The price structure to be used on the job code |
EMAIL | Email address of the client |
FILES | How many files attached to the job |
ID | The job number |
INTERNAL | Is this an internal hire (yes=1 or no=0). |
INTERNAL_DEPOT | The ID of the other depot if it is an internal rental. |
INTERNAL_DEPOT_NAME | The name of the other depot if it is an internal rental. |
INV_ADDRESS | Address for invoicing |
INV_EMAIL | Email for invoicing |
JOB_DATE | Date the job starts charging from (YYYY-MM-DD hh:mm). |
JOB_END | Date the job ends (YYYY-MM-DD hh:mm). |
JOB_NAME | Name of the job |
JOB_TYPE | What type of job it is |
LATITUDE | The latitude of the job depot. |
LOCKED | Is the job locked (yes=1 or no=0). |
LONGITUDE | The longitude of the job depot. |
MOBILE | Mobile/celluar telephone number of the customer |
NAME | Name number of the customer |
NOTES | How many notes on the job |
OUT_DATE | The date and time the equipment used in the job is reserved from (YYYY-MM-DD hh:mm). |
POP_UP | A note that pops up when the job is opened |
PRICE_GROUP | Which price group to use (A=0, B=1, & C=2). |
PRICE_STRUCTURE | The price structure name to be used on the job |
PROJECT_ID | The ID of the project the job belongs to. |
PROJECT_NAME | The name of the project the job belongs to. |
RETURN_DATE | The date and time that all equipment on the job will become available again (YYYY-MM-DD hh:mm). |
STATUS | The status code of the job |
SUB_ID | The ID of the internal cross depot rental |
SUB_MAIN_ID | The ID of the Job, Project or stand alone purchase order the internal rental is for. |
SUB_TYPE | What the internal rental is for (1=job, 6=project, 11=stand alone purchase order). |
SUSPENDED_NOTE | If account warning or suspended, a note saying why. |
TASKS | How many tasks in the job |
TELEPHONE | Telephone number of the client. |
USER | ID of manager 1 |
USER2 | ID of manager 2 |
USER2_EMAIL | Email of manager 2 |
USER2_IMAGE_ID | Image ID of manager 2 |
USER2_JOB | Job role of manager 2 |
USER2_NAME | Name of manager 2 |
USER2_TELEPHONE | Telephone number of manager 2 |
USER_EMAIL | Email address of manager 1 |
USER_IMAGE_ID | Image ID of manager 1 |
USER_JOB | Job role of manager 1 |
USER_NAME | Name of manager 1 |
USER_TELEPHONE | Telephone number of manager 1 |
USE_SALES_TAX | Use sales tax or not (yes=1 or no=0). |
VENUE | Name of the job delivery building |
VENUE_ADDRESS | ID of the venue in the address book |
VENUE_TELEPHONE | Delivery address phone number |
VIRTUAL_DEPOT_ID | If the depot is a virtual depot, it's ID |
CUSTOM_FIELDS | Object array of custom field objects. {object} |
fields | Same as 'CUSTOM_FIELDS' (kept for legacy purposes). WARNING: Will be deprecated. |
multipliers | Array of multipliers to be applied to items (one off, per hour, per day, per week, per month, every day & every week) |
root_depot_id | The ID if the depot is a standard depot |
standard_tax_rates | Array of tax rates data. |
Save job & items
Save a job and items in a single call.
post/api/save_job.php
Send parameters:Name | Description |
---|
job | ID of the job or zero creates a new job (default 0) {integer}. |
name | Name of the customer (required for new). {string} |
company | Company name of the customer. {string} |
address | Address of the customer. {text} |
telephone | Telephone number of the customer. {string} |
email | Email address of the customer. {string} |
mobile | Mobile/cellular telephone number of the customer. {string} |
type | What the job is. {string} |
venue | Delivery location name. {string} |
venue_address | Delivery address. {text} |
venue_id | ID of the venue in the address book. {integer} |
venue_telephone | Delivery address phone number. {string} |
job_name | Name of the job (default=company + venue). {string} |
client_ref | Reference for the job from the client. {string} |
details | Job memo about the job. {text} |
duration_scheme | Price structure code (default=7dw). {string} |
custom_index | Custom indexable field. {string} |
inv_address | Address for sending invoices. {text} |
client_id | ID of the client company in the address book. {integer} |
proj | The ID of the project the job belongs to. {integer} |
duration_days | Haw many chargeable days from JOB_DATE. {integer} |
duration_hrs | Haw many chargeable hours from JOB_DATE. {integer} |
price_group | Which price group to use (A=0, B=1, & C=2). {integer} |
calc_late_fees | Add late fees option, (yes=1 or no=0). {integer} |
deliver | Option on delivery (customer return=0, we collect=1, courier collection=2, other=3). {integer} |
collect | Option on collection (customer collect=0, we deliver=1, courier delivery=2, other=3). {integer} |
default_disc | The default discount percentage to give to the customer. {float} |
do_priority | Use priority availability calculation for the job (yes=1 or no=0). {integer} |
allow_early_returns | Discount for early returns (yes=1 or no=0). {integer} |
int | Is this an internal hire (yes=1 or no=0). {integer} |
out | The date and time the equipment used in the job is reserved from (YYYY-MM-DD hh:mm). {string} |
start | Date the job starts charging from (YYYY-MM-DD hh:mm). {string} |
end | Date the job ends (YYYY-MM-DD hh:mm). {string} |
to | The date and time that all equipment on the job will become available again (YYYY-MM-DD hh:mm). {string} |
custom_fields | Object array of custom field objects. {object} |
fields | Same as 'custom_fields' (kept for legacy purposes). WARNING: Will be deprecated. |
user | ID of manager 1. If not set on new job, then it is the user who created the job (zero leaves it unassigned). {integer} |
user2 | ID of manager 2 (zero is unassigned). {integer} |
items | Object 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:Name | Description |
---|
ACCOUNT_REFERENCE | Reference of the customer from the address book |
ACCOUNT_SUSPENDED | Is the account suspended (yes=1 or no=0). |
ACC_PACKAGE_ID | The ID of the accounting package to use |
ADDRESS | Address of the job |
ALLOW_EARLY_RETURNS | Discount for early returns (yes=1 or no=0). |
ARCHIVES | How many quotes saved |
CALC_LATE_FEES | Add late fees option, (yes=1 or no=0). |
CLIENT_ASSIGN | Client company or name in the address book the job is assigned to |
CLIENT_ID | Client company ID in the address book the job is assigned to |
CLIENT_MEMO | Memo from the address book |
CLIENT_REF | Reference for the job from the client |
COLLECT | Option on collection (customer collect=0, we deliver=1, courier delivery=2, other=3). |
COLOUR | The colour of the job in HEX |
COMPANY | Company name of the customer |
CREATED_BY | Name of the user who created the job |
CREATED_BY_EMAIL | Email of the user who created the job |
CREATED_BY_IMAGE_ID | Image ID of the user who created the job |
CREATED_BY_JOB | Job role of the user who created the job |
CREATED_BY_TELEPHONE | Telephone number of the user who created the job |
CREATE_DATE | Date the job was created (YYYY-MM-DD hh:mm:ss) |
CREATE_USER | ID of the user who created the job |
CREDIT_LIMIT | Credit limit of the customer |
CREDIT_PERIOD | Credit time in days for the customer |
CURRENCY: { |
CODE | The international currency code for the default currency used for the job |
DECIMALS | How many decimal places does the currency have |
DECIMAL_SEPARATOR | The character used to separate the decimals |
MULTIPLIER | The multiplier used to get the exchange rate |
NAME | Name of the currency |
NEGATIVE_FORMAT | How a negative should be displayed |
SYMBOL | The currency symbol |
SYMBOL_POSITION | The position of the currency symbol (0=before, 1=after) |
THOUSAND_SEPARATOR | The character used to separate thousands |
} |
CUSTOM_INDEX | The indexable custom field value |
DEFAULT_DISCOUNT | The default discount percentage to give to the customer. |
DEFAULT_SALES_TAX | The default sales tax percentage |
DELIVER | Option on delivery (customer return=0, we collect=1, courier collection=2, other=3). |
DEPOT | Name of the depot the job is in |
DEPOT_ID | ID of the depot the job is in |
DETAILS | Job memo about the job |
DO_PRIORITY | Use priority availability calculation for the job (yes=1 or no=0). |
DURATION_DAYS | How many chargeable days from JOB_DATE. |
DURATION_HRS | Haw many chargeable hours from JOB_DATE. |
DURATION_SCHEME | The price structure to be used on the job code |
EMAIL | Email address of the client |
FILES | How many files attached to the job |
ID | The job number |
INTERNAL | Is this an internal hire (yes=1 or no=0). |
INTERNAL_DEPOT | The ID of the other depot if it is an internal rental. |
INTERNAL_DEPOT_NAME | The name of the other depot if it is an internal rental. |
INV_ADDRESS | Address for invoicing |
INV_EMAIL | Email for invoicing |
JOB_DATE | Date the job starts charging from (YYYY-MM-DD hh:mm). |
JOB_END | Date the job ends (YYYY-MM-DD hh:mm). |
JOB_NAME | Name of the job |
JOB_TYPE | What type of job it is |
LATITUDE | The latitude of the job depot. |
LOCKED | Is the job locked (yes=1 or no=0). |
LONGITUDE | The longitude of the job depot. |
MOBILE | Mobile/celluar telephone number of the customer |
NAME | Name number of the customer |
NOTES | How many notes on the job |
OUT_DATE | The date and time the equipment used in the job is reserved from (YYYY-MM-DD hh:mm). |
POP_UP | A note that pops up when the job is opened |
PRICE_GROUP | Which price group to use (A=0, B=1, & C=2). |
PRICE_STRUCTURE | The price structure name to be used on the job |
PROJECT_ID | The ID of the project the job belongs to. |
PROJECT_NAME | The name of the project the job belongs to. |
RETURN_DATE | The date and time that all equipment on the job will become available again (YYYY-MM-DD hh:mm). |
STATUS | The status code of the job |
SUB_ID | The ID of the internal cross depot rental |
SUB_MAIN_ID | The ID of the Job, Project or stand alone purchase order the internal rental is for. |
SUB_TYPE | What the internal rental is for (1=job, 6=project, 11=stand alone purchase order). |
SUSPENDED_NOTE | If account warning or suspended, a note saying why. |
TASKS | How many tasks in the job |
TELEPHONE | Telephone number of the client. |
USER | ID of manager 1 |
USER2 | ID of manager 2 |
USER2_EMAIL | Email of manager 2 |
USER2_IMAGE_ID | Image ID of manager 2 |
USER2_JOB | Job role of manager 2 |
USER2_NAME | Name of manager 2 |
USER2_TELEPHONE | Telephone number of manager 2 |
USER_EMAIL | Email address of manager 1 |
USER_IMAGE_ID | Image ID of manager 1 |
USER_JOB | Job role of manager 1 |
USER_NAME | Name of manager 1 |
USER_TELEPHONE | Telephone number of manager 1 |
USE_SALES_TAX | Use sales tax or not (yes=1 or no=0). |
VENUE | Name of the job delivery building |
VENUE_ADDRESS | ID of the venue in the address book |
VENUE_TELEPHONE | Delivery address phone number |
VIRTUAL_DEPOT_ID | If the depot is a virtual depot, it's ID |
CUSTOM_FIELDS | Object array of custom field objects. {object} |
fields | Same as 'CUSTOM_FIELDS' (kept for legacy purposes). WARNING: Will be deprecated. |
multipliers | Array of multipliers to be applied to items (one off, per hour, per day, per week, per month, every day & every week) |
root_depot_id | The ID if the depot is a standard depot |
standard_tax_rates | Array of tax rates data. |
items | Array of items |
error | Set 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:Name | Description |
---|
job | ID of the job (required) {integer}. |
status | The new status value (required) {float}. |
no_webhook | Set to anything but zero to prevent a webhook (default 0). {integer} |
Return parameters:Name | Description |
---|
status | The new status value {float} |
colour | The hex colour that the job has been set to or left as {string} |
error | Error 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:Name | Description |
---|
job | ID of the job (compulsory) {integer or array of integers}. |
desc | Decsription of the archive {string}. |
Return parameters:Name | Description |
---|
page | How many pages in total for all of the rows |
records | How many rows in total found. |
total | How many pages there are of data. |
rows: [ |
0: { |
id | Unique ID of the note |
cells: { |
id | Unique ID of the archive {integer} |
user | Name of the user {string} |
created | The date and time it was created. {datetime ISO string} |
description | A short HTML formatted description of the archive. {string}. |
data: { |
USER_ID | The ID of the user who created the archive. {integer} |
DESCRIPTION | A short description of the archive. {string}. |
DEPOT_LIMITS | An array of depot IDs that the archive can be used in. {array} |
} |
} |
} |
] |
error | Set if an error has occurred, either an error message or error number. |
Get availability
Get the availability of items in batches of upto 200 for a job. This can't be used in external API calls, only from within HireHop. DEPRICATED - Soon to be updated, not removed
get/php_functions/items_available.php
Send parameters:Name | Description |
---|
job | The ID of the job (required if no arch). {integer} |
arch | The ID of the archive (required if no job). {integer} |
ids | Unique IDs of the supplying list stock items. Anything more than 200 in an array will be truncated (compulsory). {integer|array|JSON string} |
no_availability | Set to '1' to disable availability loading (will return an empty array). (default 0). {integer} |
local | The local date and time of the user (required). {ISO datetime} |
Return parameters:Name | Description |
---|
rows: { |
XX_ID_XX: { |
avail | How many are available. {integer} |
remainder | The remainder available after priority. {string} |
late | How many are late returning. {integer} |
} |
} |
error | Set 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:Name | Description |
---|
job | ID of the job (required) {integer}. |
barcode | Barcode of the item to add (required). {string} |
action | Whether to reserve (0), checkout (1) or nothing (2) (default 0). {integer} |
parent | The ID of the to be parent heading (# or empty is no heading) {integer} |
sid | The ID of the to be previous sibling {integer} |
skind | The type of the to be previous sibling (1=sales, 2=hire stock, etc.) {integer} |
no_availability | Set to 1 to prevent availability for all items being calculated. {integer} |
no_stock_availability | Do not show hire stock availability only if set to 1 {integer} |
barcodes | Set to 1 to list barcodes used for the item. {integer} |
local | The local date and time of the client (not required). |
tz | The timezone of the client (not required). |
Return parameters:Name | Description |
---|
itms: [ |
0: { |
ID | ID of the item. {integer} |
kind | What the item is (0=heading, 1=sales, 2=hire, 3=custom, 4=labour, 5=inline, 6=calculated). {integer} |
qty | How many. {integer or float} |
title | The name of the item. {string} |
alt_title | The alternative name of the item. {string} |
ADDITIONAL | The additional information of the item. {string} |
TECHNICAL | The technical information of the item. {string} |
UNIT_PRICE | The unit base price of the item. {float} |
PRICE | The base price of the item. {float} |
VAT_RATE | The percentage tax rate of the item. {float} |
ACC_NOMINAL | The nominal group ID of the item. {integer} |
NO_SCAN | Set to 1 if the item does not need checking out. {integer} |
NO_SHORTFALL | Set to 1 if the item is never short. {integer} |
LIST_ID | The ID from the stock, sales or labour list of the item. {integer} |
PRICE_TYPE | What 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_DATE | The outgoing date of the item if set. {date} |
START_DATE | The start date of the item if set. {date} |
END_DATE | The end date of the item if set. {date} |
RETURNING_DATE | The returning date of the item if set. {date} |
DURATION | The duration of the item. {float} |
LFT | The left value in the nested tree structure of the item. {integer} |
RGT | The right value in the nested tree structure of the item. {integer} |
AUTOPULL | The autopull ID of the item. {integer} |
FLAG | The flag value of the item. {integer} |
CUSTOM_FIELDS | The custom fields of the item. {JSON} |
COUNTRY_ORIGIN | The country of origin of the item. {string} |
PART_NUMBER | The part number of the item. {string} |
parent | The parent ID of the item. {integer} |
avail | How many available. {float or integer} |
remainder | How many available depending on priority. {integer} |
late | How many are late. {integer} |
flagged | How many are flagged (only if there is an availability conflict). {integer} |
reserved | How many have been reserved. {integer} |
weight | The weight of a single item. {float} |
VIRTUAL | 1 if the item is virtual or 2 if it is a grouped item. {integer} |
sub_details: { |
sub_qty | The quantity subbed in. {float} |
sub_price | The total price of the subs. {float} |
cost_price | The cost price to buy one sales item. {float} |
job_total_qty | The total quantity of the item subbed in throughout the job {float} |
} |
value | The value of a single item. {float} |
DEPOT_LIMITS | An 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: [ |
0 | One off price ratio {float} |
1 | Hourly ratio {float} |
2 | Daily ratio {float} |
3 | Weekly ratio {float} |
4 | Monthly ratio {float} |
5 | Every day ratio {float} |
6 | Every week ratio {float} |
] |
} |
] |
error | Set 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:Name | Description |
---|
job | ID of the job. {integer}. |
global | The ID of the other depot or 0 for all depots. {integer} |
items | Array of items IDs preceeded with a letter (a=sales, b=rental) to get availability for (max 50) (compulsory). {array|JSON array}. |
local | The local date and time of the client (used to establish late items). {ISO datetime string} |
only_avail | If set to 1, then only 'available' will be calculated and 'global' and 'late' will always be zero. {integer} |
Return parameters:Name | Description |
---|
_item id_: { |
available | How many available. {integer} |
global | How many available globally or at a selected depot. {integer} |
late | How many are late. {integer} |
} |
error | Set 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:Name | Description |
---|
id | The ID/job number of the job to copy from. {integer} |
notes | Set to '1' if you want to copy the notes (dates will NOT be updated). {integer} |
tasks | Set to '1' if you want to copy the tasks (dates will be updated). {integer} |
subcontractors | Set to '1' if you want to copy the subcontractors (dates will be updated). {integer} |
transport | Set to '1' if you want to copy the transport (dates will be updated). {integer} |
supplying | Set to '1' if you want to copy the supplying list (dates will be updated). {integer} |
reserved | Set to '1' if you want to copy the reserved list (conflicts will be ommitted). {integer} |
update | Set to '1' if you want to update prices to the current price. {integer} |
job_name | The job name for the new job. {string} |
local | The local date and time of the client (required). |
tz | The timezone of the client (not required). |
Return parameters:Name | Description |
---|
job | The ID/job number of the new job. {integer} |
error | Set 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:Name | Description |
---|
job_id | ID of the job (compulsory if project_id empty) {integer}. |
project_id | ID of the project (compulsory if job_id empty) {integer}. |
Return parameters:Name | Description |
---|
types: [ |
0: { |
idx | The type (1=sales, 2=hire, 3=custom, 4=labour, 6=calculated or 50=additional). Additional is the revenue of all late fees less any early returns. |
revenue | The revenue for the row in the base currency. |
approved_cost | Total cost of all approved purchase order items for the row in the base currency. |
unapproved_cost | Total cost of all unapproved purchase order items for the row in the base currency. |
estimated_cost | Total cost of all unapproved line items for the row with shortfall not fullfield with a purchase order in the base currency. |
} |
] |
nominals: [ |
0: { |
idx | The nominal group ID + 100 |
revenue | The revenue for the row in the base currency. |
approved_cost | Total cost of all approved purchase order items for the row in the base currency. |
unapproved_cost | Total cost of all unapproved purchase order items for the row in the base currency. |
estimated_cost | Total cost of all unapproved line items for the row with shortfall not fullfield with a purchase order in the base currency. |
} |
] |
sales_revenue | Total revenue of all sales stock in base currency. |
hire_revenue | Total revenue of all hire stock in base currency. |
labour_revenue | Total revenue of all labour items in base currency. |
custom_revenue | Total revenue of all custom items in base currency. |
calculated_revenue | Total revenue of all calculated items in base currency. |
additional_revenue | Total revenue of all late fees less any early returns if applicable in base currency. |
total_revenue | Total revenue of all items in base currency. |
sales_approved_cost | Total cost of all approved purchase order sales line items in base currency. |
hire_approved_cost | Total cost of all approved purchase order hire line items in base currency. |
custom_approved_cost | Total cost of all approved purchase order custom line items in base currency. |
labour_approved_cost | Total cost of all approved purchase order labour line items in base currency. |
sales_unapproved_cost | Total cost of all unapproved purchase order sales line items in base currency. |
hire_unapproved_cost | Total cost of all unapproved purchase order hire line items in base currency. |
custom_unapproved_cost | Total cost of all unapproved purchase order custom line items in base currency. |
labour_unapproved_cost | Total cost of all unapproved purchase order labour line items in base currency. |
sales_estimated_cost | Total cost of all unapproved sales line items with shortfall not fullfield with a purchase order in base currency. |
custom_estimated_cost | Total cost of all unapproved custom line items with shortfall not fullfield with a purchase order in base currency. |
labour_estimated_cost | Total cost of all unapproved labour line items with shortfall not fullfield with a purchase order in base currency. |
error | Set if an error has occurred, either an error message or error number. |
Get job data
Get the data for a job.
get/php_functions/job_refresh.php
Send parameters:Name | Description |
---|
job | ID of the job. {integer}. |
Return parameters:Name | Description |
---|
ACCOUNT_REFERENCE | Reference of the customer from the address book. {string} |
ACCOUNT_SUSPENDED | Is the account suspended (yes=1 or no=0). {integer} |
ACC_PACKAGE_ID | The ID of the accounting package to use. {integer} |
ADDRESS | Address of the customer. {string} |
ALLOW_EARLY_RETURNS | Discount for early returns (yes=1 or no=0. {integer} |
ARCHIVES | How many quotes saved. {integer} |
CALC_LATE_FEES | Add late fees option, (yes=1 or no=0). {integer} |
CLIENT_ASSIGN | Client company or name in the address book the job is assigned to. {string} |
CLIENT_ID | Client company ID in the address book the job is assigned to. {integer} |
CLIENT_MEMO | Memo from the address book. {string} |
CLIENT_REF | Reference for the job from the client. {string} |
COLLECT | Option on collection (customer collect=0, we deliver=1, courier delivery=2, other=3). {integer} |
COLLECTION_FROM | Name of where it is to be collected from. |
COLLECTION_ADDRESS | Collection address. |
COLLECTION_TELEPHONE | Telephone number of where it is to be collected. |
COLOUR | The colour of the job in HEX. {string} |
COMPANY | Company name of the customer. {string} |
CREATED_BY | Name of the user who created the job. {string} |
CREATED_BY_EMAIL | Email of the user who created the job. {string} |
CREATED_BY_IMAGE_ID | Image ID of the user who created the job. {integer} |
CREATED_BY_JOB | Job role of the user who created the job. {string} |
CREATED_BY_TELEPHONE | Telephone number of the user who created the job. {string} |
CREATE_DATE | Date the job was created (YYYY-MM-DD hh:mm:ss). {date string} |
CREATE_USER | ID of the user who created the job. {integer} |
CREDIT_LIMIT | Credit limit of the customer. {float} |
CREDIT_PERIOD | Credit time in days for the customer. {integer} |
CURRENCY: { |
CODE | The international currency code for the default currency used for the job. {string} |
DECIMALS | How many decimal places does the currency have. {integer} |
DECIMAL_SEPARATOR | The character used to separate the decimals. {string} |
MULTIPLIER | The multiplier used to get the exchange rate. {float} |
NAME | Name of the currency. {string} |
NEGATIVE_FORMAT | How a negative should be displayed. {integer} |
SYMBOL | The currency symbol. {string} |
SYMBOL_POSITION | The position of the currency symbol (0=before, 1=after). {integer} |
THOUSAND_SEPARATOR | The character used to separate thousands. {string} |
} |
CUSTOM_INDEX | The indexable custom field value. {string} |
DEFAULT_DISCOUNT | The default discount percentage to give to the customer. {float} |
DEFAULT_SALES_TAX | The default sales tax percentage. {float} |
DELIVER | Option on delivery (customer return=0, we collect=1, courier collection=2, other=3). {integer} |
DEPOT | Name of the depot the job is in. {string} |
DEPOT_ID | ID of the depot the job is in (virtual if not root). {integer} |
DETAILS | Job memo about the job. {string} |
DO_PRIORITY | Use priority availability calculation for the job (yes=1 or no=0). {integer} |
DURATION_DAYS | How many chargeable days from JOB_DATE. {integer} |
DURATION_HRS | How many chargeable hours from JOB_DATE. {integer} |
DURATION_LOCKED | Set to '1' if changing the dates when editing a job does not change the duration. {integer} |
DURATION_SCHEME | The price structure to be used on the job code. {string} |
EMAIL | Email address of the client. {string} |
FILES | How many files attached to the job. {integer} |
ID | The job number. {integer} |
INTERNAL | Is this an internal hire (yes=1 or no=0). {integer} |
INTERNAL_DEPOT | The ID of the other depot if it is an internal rental. {integer} |
INTERNAL_DEPOT_NAME | The name of the other depot if it is an internal rental. {string} |
INV_ADDRESS | Address for invoicing. {string} |
INV_EMAIL | Email for invoicing. {string} |
JOB_DATE | Date the job starts charging from (YYYY-MM-DD hh:mm). {date string} |
JOB_END | Date the job ends (YYYY-MM-DD hh:mm). {date string} |
JOB_NAME | Name of the job. {string} |
JOB_TYPE | What type of job it is. {string} |
LATITUDE | The latitude of the job depot. {float} |
LOCKED | Is the job locked (yes=1 or no=0). {integer} |
LONGITUDE | The longitude of the job depot. |
MOBILE | Mobile/celluar telephone number of the customer. {string} |
NAME | Name number of the customer. {string} |
NOTES | How many notes on the job. {integer} |
OUT_DATE | The date and time the equipment used in the job is reserved from (YYYY-MM-DD hh:mm). |
POP_UP | A note that pops up when the job is opened. {string} |
PRICE_GROUP | Which price group to use (A=0, B=1, & C=2). {integer} |
PRICE_STRUCTURE | The price structure name to be used on the job. {string} |
PROJECT_ID | The ID of the project the job belongs to. {integer} |
PROJECT_NAME | The name of the project the job belongs to. {string} |
RETURN_DATE | The date and time that all equipment on the job will become available again (YYYY-MM-DD hh:mm). {date string} |
STATUS | The status code of the job. {float} |
SUB_ID | The ID of the internal cross depot rental. {integer} |
SUB_MAIN_ID | The ID of the Job, Project or stand alone purchase order the internal rental is for. {integer} |
SUB_TYPE | What the internal rental is for (1=job, 6=project, 11=stand alone purchase order). {integer} |
SUSPENDED_NOTE | If account warning or suspended, a note saying why. {string} |
TASKS | How many tasks in the job. {integer} |
TELEPHONE | Telephone number of the client. {string} |
USE_AT | Name of where it is being used. |
USE_AT_ADDRESS | Collection address. |
USE_AT_TELEPHONE | Telephone number of where it is being used. |
USER | ID of manager 1. {integer} |
USER2 | ID of manager 2. {integer} |
USER2_EMAIL | Email of manager 2. {string} |
USER2_IMAGE_ID | Image ID of manager 2. {integer} |
USER2_JOB | Job role of manager 2. {string} |
USER2_NAME | Name of manager 2. {string} |
USER2_TELEPHONE | Telephone number of manager 2. {string} |
USER_EMAIL | Email address of manager 1. {string} |
USER_IMAGE_ID | Image ID of manager 1. {integer} |
USER_JOB | Job role of manager 1. {string} |
USER_NAME | Name of manager 1. {string} |
USER_TELEPHONE | Telephone number of manager 1. {string} |
USE_SALES_TAX | Use sales tax or not (yes=1 or no=0). {integer} |
VENUE | Name of the job delivery building. {string} |
VENUE_ADDRESS | Delivery location address. {string} |
VENUE_TELEPHONE | Delivery address phone number. {string} |
VIRTUAL_DEPOT_ID | If the depot is a virtual depot, it's ID. {integer} |
CUSTOM_FIELDS | Object array of custom field objects. {object} |
fields | Same as 'CUSTOM_FIELDS' (kept for legacy purposes). WARNING: Will be deprecated. {object} |
multipliers | Array of multipliers to be applied to items (one off, per hour, per day, per week, per month, every day & every week). {object} |
root_depot_id | The ID if the depot is a standard depot. {integer} |
standard_tax_rates | Array of tax rates data. {object} |
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:Name | Description |
---|
address | Address of the customer. {text} |
allow_early_returns | Discount for early returns (yes=1 or no=0). {integer} |
calc_late_fees | Add late fees option, (yes=1 or no=0). {integer} |
client_id | ID of the client company in the address book. {integer} |
client_ref | Reference for the job from the client. {string} |
collect | Option on collection (customer collect=0, we deliver=1, courier delivery=2, other=3). {integer} |
collection_from | Name of where it is to be collected from. {text} |
collection_address | Collection address. {text} |
collection_telephone | Telephone number of where it is to be collected. {text} |
company | Company name of the customer. {string} |
currency: { |
CODE | The international currency code for the default currency used for the job |
DECIMALS | How many decimal places does the currency have |
DECIMAL_SEPARATOR | The character used to separate the decimals |
MULTIPLIER | The multiplier used to get the exchange rate |
NAME | Name of the currency |
NEGATIVE_FORMAT | How a negative should be displayed |
SYMBOL | The currency symbol |
SYMBOL_POSITION | The position of the currency symbol (0=before, 1=after) |
THOUSAND_SEPARATOR | The character used to separate thousands |
} |
custom_fields | Object array of custom field objects. {object} |
custom_index | Custom indexable field. {string} |
default_disc | The default discount percentage to give to the customer. {float} |
deliver | Option on delivery (customer return=0, we collect=1, courier collection=2, other=3). {integer} |
details | Job memo about the job. {text} |
do_priority | Use priority availability calculation for the job (yes=1 or no=0). {integer} |
duration_days | Haw many chargeable days from JOB_DATE. {integer} |
duration_hrs | Haw many chargeable hours from JOB_DATE. {integer} |
duration_locked | If set to 1, the job duration will not change when dates are changed (not for open ended) {integer} |
duration_scheme | Price structure code (default=7dw). {string} |
email | Email address of the customer. {string} |
end | Date the job ends (YYYY-MM-DD hh:mm). {string} |
extra_dates: [ |
0: { |
NAME | Unique field name of the extra date (required if not DEFAULT). {string} |
LABEL | Label to display when whowing the date (required if not DEFAULT). {string} |
DEFAULT | Must be set to 'OUT', 'START', 'FINISH' or 'RETURN' only if it is a standard default date. {string} |
REQUIRED | Set to 1 if compulsory, if VALUE is empty and compulsory, an error 3 (missing paramaters) will be returned. {integer} |
VALUE | The value in 'YYYY-MM-DD hh:mm:ss' format or null if empty (required but not for DEFAULT dates). {string} |
END_TIME | The value in 'hh:mm' of the optional end time or empty for nothing (optional). {string} |
} |
] |
fields | DEPRECATED: Same as 'custom_fields', so use 'custom_fields' instead. |
int | Is this an internal hire (yes=1 or no=0). {integer} |
inv_address | Address for sending invoices. {text} |
no_vat | Set to 1 to set no VAT/Tax. {integer} |
job | ID of the job or zero creates a new job (default 0) {integer}. |
job_name | Name of the job (default=company + venue). {string} |
mobile | Mobile/cellular telephone number of the customer. {string} |
name | Name of the customer (required for new). {string} |
no_empty_date_check | Set to 1 to stop checks for required empty extra dates (only used for editing the extra dates structure in a job). {integer} |
no_webhook | Set to 1 prevent a webhook from triggering. {integer} |
out | The date and time the equipment used in the job is reserved from (YYYY-MM-DD hh:mm) (compulsory when new). {string} |
overwrite | USE WITH CAUTION. If set to '1', this will overwrite ALL custom fields with the current 'custom_fields' parameter. {integer} |
price_group | Which price group to use (A=0, B=1, & C=2). {integer} |
proj | The ID of the project the job belongs to. {integer} |
start | Date the job starts charging from (YYYY-MM-DD hh:mm) (compulsory when new). {string} |
telephone | Telephone number of the customer. {string} |
type | What the job is. {string} |
to | The date and time that all equipment on the job will become available again (YYYY-MM-DD hh:mm). {string} |
use_at | Name of where it is being used. {text} |
use_at_address | Collection address. {text} |
use_at_telephone | Telephone number of where it is being used. {text} |
user | ID of manager 1. If not set on new job, then it is the user who created the job (zero leaves it unassigned). {integer} |
user2 | ID of manager 2 (zero is unassigned). {integer} |
venue | Delivery location name. {string} |
venue_address | Delivery address. {text} |
venue_id | ID of the company in the address book that the venue was last selected from. {integer} |
venue_telephone | Delivery address phone number. {string} |
local | The local date and time of the client (not required). |
tz | The timezone of the client (not required). |
Return parameters:Name | Description |
---|
ACCOUNT_REFERENCE | Reference of the customer from the address book |
ACCOUNT_SUSPENDED | Is the account suspended (yes=1 or no=0). |
ACC_PACKAGE_ID | The ID of the accounting package to use |
ADDRESS | Address of the job |
ALLOW_EARLY_RETURNS | Discount for early returns (yes=1 or no=0). |
ARCHIVES | How many quotes saved |
CALC_LATE_FEES | Add late fees option, (yes=1 or no=0). |
CLIENT_ASSIGN | Client company or name in the address book the job is assigned to |
CLIENT_ID | Client company ID in the address book the job is assigned to |
CLIENT_MEMO | Memo from the address book |
CLIENT_REF | Reference for the job from the client |
COLLECT | Option on collection (customer collect=0, we deliver=1, courier delivery=2, other=3). |
COLLECTION_FROM | Name of where it is to be collected from. |
COLLECTION_ADDRESS | Collection address. |
COLLECTION_TELEPHONE | Telephone number of where it is to be collected. |
COLOUR | The colour of the job in HEX |
COMPANY | Company name of the customer |
CREATED_BY | Name of the user who created the job |
CREATED_BY_EMAIL | Email of the user who created the job |
CREATED_BY_IMAGE_ID | Image ID of the user who created the job |
CREATED_BY_JOB | Job role of the user who created the job |
CREATED_BY_TELEPHONE | Telephone number of the user who created the job |
CREATE_DATE | Date the job was created (YYYY-MM-DD hh:mm:ss) |
CREATE_USER | ID of the user who created the job |
CREDIT_LIMIT | Credit limit of the customer |
CREDIT_PERIOD | Credit time in days for the customer |
CURRENCY: { |
CODE | The international currency code for the default currency used for the job |
DECIMALS | How many decimal places does the currency have |
DECIMAL_SEPARATOR | The character used to separate the decimals |
MULTIPLIER | The multiplier used to get the exchange rate |
NAME | Name of the currency |
NEGATIVE_FORMAT | How a negative should be displayed |
SYMBOL | The currency symbol |
SYMBOL_POSITION | The position of the currency symbol (0=before, 1=after) |
THOUSAND_SEPARATOR | The character used to separate thousands |
} |
CUSTOM_FIELDS | Object array of custom field objects. {object} |
CUSTOM_INDEX | The indexable custom field value |
DEFAULT_DISCOUNT | The default discount percentage to give to the customer. |
DEFAULT_SALES_TAX | The default sales tax percentage |
DELIVER | Option on delivery (customer return=0, we collect=1, courier collection=2, other=3). |
DEPOT | Name of the depot the job is in |
DEPOT_ID | ID of the depot the job is in |
DETAILS | Job memo about the job |
DO_PRIORITY | Use priority availability calculation for the job (yes=1 or no=0). |
DURATION_DAYS | How many chargeable days from JOB_DATE. |
DURATION_HRS | Haw many chargeable hours from JOB_DATE. |
DURATION_SCHEME | The price structure to be used on the job code |
EMAIL | Email address of the client |
EXTRA_DATES: [ |
0: { |
NAME | Unique field name of the extra date (required if not DEFAULT). {string} |
LABEL | Label to display when whowing the date (required if not DEFAULT). {string} |
DEFAULT | Must be set to 'OUT', 'START', 'FINISH' or 'RETURN' only if it is a standard default date. {string} |
REQUIRED | Set to 1 if compulsory, if VALUE is empty and compulsory, an error 3 (missing paramaters) will be returned. {integer} |
VALUE | The value in 'YYYY-MM-DD hh:mm:ss' format or null if empty (required but not for DEFAULT dates). {string} |
END_TIME | The value in 'hh:mm' of the optional end time or empty for nothing. {string} |
} |
] |
FILES | How many files attached to the job |
ID | The job number |
INTERNAL | Is this an internal hire (yes=1 or no=0). |
INTERNAL_DEPOT | The ID of the other depot if it is an internal rental. |
INTERNAL_DEPOT_NAME | The name of the other depot if it is an internal rental. |
INV_ADDRESS | Address for invoicing |
NO_VAT | Set to one, otherwise zero, if there is no VAT/Tax applied to the job |
INV_EMAIL | Email for invoicing |
JOB_DATE | Date the job starts charging from (YYYY-MM-DD hh:mm). |
JOB_END | Date the job ends (YYYY-MM-DD hh:mm). |
JOB_NAME | Name of the job |
JOB_TYPE | What type of job it is |
LATITUDE | The latitude of the job depot. |
LOCKED | Is the job locked (yes=1 or no=0). |
LONGITUDE | The longitude of the job depot. |
MOBILE | Mobile/celluar telephone number of the customer |
NAME | Name number of the customer |
NOTES | How many notes on the job |
OUT_DATE | The date and time the equipment used in the job is reserved from (YYYY-MM-DD hh:mm). |
POP_UP | A note that pops up when the job is opened |
PRICE_GROUP | Which price group to use (A=0, B=1, & C=2). |
PRICE_STRUCTURE | The price structure name to be used on the job |
PROJECT_ID | The ID of the project the job belongs to. |
PROJECT_NAME | The name of the project the job belongs to. |
RETURN_DATE | The date and time that all equipment on the job will become available again (YYYY-MM-DD hh:mm). |
STATUS | The status code of the job |
SUB_ID | The ID of the internal cross depot rental |
SUB_MAIN_ID | The ID of the Job, Project or stand alone purchase order the internal rental is for. |
SUB_TYPE | What the internal rental is for (1=job, 6=project, 11=stand alone purchase order). |
SUSPENDED_NOTE | If account warning or suspended, a note saying why. |
TASKS | How many tasks in the job |
TELEPHONE | Telephone number of the client. |
USE_AT | Name of where it is being used. |
USE_AT_ADDRESS | Collection address. |
USE_AT_TELEPHONE | Telephone number of where it is being used. |
USER | ID of manager 1 |
USER2 | ID of manager 2 |
USER2_EMAIL | Email of manager 2 |
USER2_IMAGE_ID | Image ID of manager 2 |
USER2_JOB | Job role of manager 2 |
USER2_NAME | Name of manager 2 |
USER2_TELEPHONE | Telephone number of manager 2 |
USER_EMAIL | Email address of manager 1 |
USER_IMAGE_ID | Image ID of manager 1 |
USER_JOB | Job role of manager 1 |
USER_NAME | Name of manager 1 |
USER_TELEPHONE | Telephone number of manager 1 |
USE_SALES_TAX | Use sales tax or not (yes=1 or no=0). |
VENUE | Name of the job delivery building |
VENUE_ADDRESS | Delivery location address |
VENUE_ID | ID of the delivery location address in the address book |
VENUE_TELEPHONE | Delivery address phone number |
VIRTUAL_DEPOT_ID | If the depot is a virtual depot, it's ID |
multipliers | Array of multipliers to be applied to items (one off, per hour, per day, per week, per month, every day & every week) |
root_depot_id | The ID if the depot is a standard depot |
standard_tax_rates | Array of tax rates data. |
transport_clashes | The quantity of date warnings in the transport management for the job. |
error | Set 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:Name | Description |
---|
jobs | Array of job IDs (numbers) (required) {array of integer}. |
Return parameters:Name | Description |
---|
jobs: { |
quoted | The quoted total from the supplying list, or upto today if open ended {float} |
late | The total of any late fees {float} |
early_returns | Credit amount that should be decusted from 'quoted' for any early returns, if early returns allowed on the job {float} |
total | quoted + late - early_returns |
} |
job_data | JSON of job data |
error | Set 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:Name | Description |
---|
format | What format the data should be in ('csv', 'xml' or the default 'json') {string}. |
sql | A select only SQL statement, anything else will fail (required). {string} |
Return parameters:Name | Description |
---|
rows | An array of data fields matching the SQL statement if successful. {array} |
sql | The SQL statement if successful. {string} |
error | Set 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:Name | Description |
---|
type | The owner type (1=job, 6=project, etc.) (compulsory) {integer}. |
main_id | ID of the of the owner, like job or project ID (compulsory) {integer}. |
deatils | Array of objects, being 'name' and 'description' of each image in sequence (compulsory) {array of obejcts} |
custom_fields | JSON data of custom fields data (optional) {array, object or JSON string) |
latitude | The current latitude sent from the device, otherwise obtained from IP address. (optional). {float} |
longitude | The current longitude sent from the device, otherwise obtained from IP address. (optional). {float} |
files | Array of files files data to upload (compulsory) {objects} |
Return parameters:Name | Description |
---|
success | Array of details with ids or errors. |
error | Set if an error has occurred, either an error message or error number. |
Delete one or many categories
Delete empty categories (you can't delete a category that contains items or if a sub category does, including hidden items).
post/php_functions/categories_delete.php
Send parameters:Name | Description |
---|
ids | Unique ID(s) of the categories to be deleted (compulsory). {integer|array|JSON string} |
no_webhook | Set to 1 to prevent the webhook from firing. {integer} |
Return parameters:Name | Description |
---|
success | Always true if move was successful. {boolean} |
error | Set if an error has occurred, either an error message or error number. |
Get a list of categories
Get a list of categories used in sales stocke, rental stock and labour.
get/php_functions/categories_list.php
Send parameters:Name | Description |
---|
doc_type | What the sender is (0=All (default), 2=Hire, 5=Sales, 8=Labour) (optional). {integer} |
fix | Set to '1' to run an indexing fix on the category tree structure before loading the data (default is 0). {integer} |
Return parameters:Name | Description |
---|
rows: [ |
0: { |
ID | Unique ID of the category. {integer} |
NAME | Name of the category. {string} |
NOTE | The note for the category. {string} |
ICON | The decimal number of the UTF8 Symbol for the category. (integer) |
IS_CONSUMABLE | Set to '1' if the category can be used for sales stock. {integer} |
IS_STOCK | Set to '1' if the category can be used for rental stock. {integer} |
IS_LABOUR | Set to '1' if the category can be used for labour items. {integer} |
LFT | The left value of the category. {integer} |
RGT | The right value of the category. {integer} |
parentId | The ID of the parent node (not set if no parent). {integer} |
children | Array of children in this 'tree' format (not set if no children). {array} |
} |
] |
error | Set if an error has occurred, either an error message or error number. |
Move categories
Move categories to a new position.
post/php_functions/categories_move.php
Send parameters:Name | Description |
---|
ids | Unique ID(s) of the categories to be moved (compulsory). {integer|array|JSON string} |
prev_sibling_id | ID of the previous sibling, or 0 to be first in parent (default 0). {integer} |
parent_id | ID of the new parent, or 0 for the root (default 0). {integer} |
Return parameters:Name | Description |
---|
_id_: { |
LFT | The new left value of the category. {integer} |
RGT | The new right value of the category. {integer} |
} |
error | Set if an error occurred, either an error message or error number. |
Save a category
Save a new or edited category and returns the 'changed' category and 'positions' of all nodes if there was a tree structure change.
post/php_functions/categories_save.php
Send parameters:Name | Description |
---|
ID | Unique ID of the category (0 or not set for new & compulsory for edit). {integer} |
NAME | Name of the category (compulsory for new). {string} |
NOTE | The note for the category (default is empty). {string} |
ICON | The decimal number of the UTF8 Symbol for the category or '0' for none (default 0). (integer) |
IS_CONSUMABLE | Set to '1' if the category can be used for sales stock (default 0). {integer} |
IS_STOCK | Set to '1' if the category can be used for rental stock (default 0). {integer} |
IS_LABOUR | Set to '1' if the category can be used for labour items (default 0). {integer} |
parentId | The ID of the parent node if there is a new parent (optional). {integer} |
fix_tree | Set to '1' to do a fix on the tree structure (optional). {integer} |
Return parameters:Name | Description |
---|
changed: [ |
0: { |
ID | Unique ID of the category. {integer} |
NAME | Name of the category. {string} |
NOTE | The note for the category. {string} |
ICON | Decimal number of the UTF8 Symbol for the category. (integer). |
LFT | The left value of the category. {integer} |
RGT | The right value of the category. {integer} |
children | Array of children in this 'tree' format (not set if there are no children). {array} |
} |
] |
positions: { |
_id_: { |
LFT | The new left value of the category. {integer} |
RGT | The new right value of the category. {integer} |
} |
} |
error | Set 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:Name | Description |
---|
0: { |
ID | The ID of the depot. {integer} |
DEPOT | The name of the depot. {string} |
VIRTUAL | If the depot is virtual or not. {boolean} |
} |
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:Name | Description |
---|
NAME | Name of the user. {string} |
EMAIL | Login email of the user. {string} |
ID | The user ID. {integer} |
DATE_FORMAT | The date format the user uses(0='d m y', 1='y m d', 2='m d y'). {integer} |
TIME_FORMAT | The time format the user uses(0=24 hour, 1=12 hour). {integer} |
DEFAULT_DEPOT | The ID of the depot the user is assigned to (can be a virtual depot). {integer} |
VIRTUAL_DEPOT_ID | The ID of the virtual depot the user is assigned to (null if none). {integer} |
root_depot_id | The ID of the root depot the user is assigned. {integer} |
COMPANY_ID | The unique ID of the company within HireHop (same for all users). {integer} |
LENGTH_FORMAT | The format the user uses for length (0=metric, 1=imperial). {integer} |
WEIGHT_FORMAT | The format the user uses for weight (0=metric, 1=imperial). {integer} |
SUPERUSER | If 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_TABS | Does the user open pages in new tabs. (0=no, 1=yes). {integer} |
SHOW_ENQUIRIES | Option is enquiries grid is shown on availability popup. {integer} |
DEFAULT_START | The default start time for new jobs in 24 hour clock. {string} |
DEFAULT_DURATION | The default hours fo a new job. {integer} |
DEFAULT_EXTRAS_CHECK | The default setting for 'Allow extras' in checking out. (0=no, 1=yes). {integer} |
DEFAULT_CHARGE_ADDITIONAL | The default setting for 'Charge for additional' in checking out (0=no, 1=yes). {integer} |
DEFAULT_EARLY_RETURNS | The default setting for selecting 'Allow early returns' for new jobs (0=no, 1=yes). {integer} |
DEFAULT_LATE_FEES | The default setting for selecting 'Charge late fees' for new jobs (0=no, 1=yes). {integer} |
DEFAULT_DATES_UNLINKED | The default setting for having the dates linked or unliked for new jobs (0=linked, 1=unlinked). {integer} |
DEFAULT_OPEN_ENDED | The setting in new jobs for setting dates as open ended by default (0=no, 1=yes). {integer} |
DEFAULT_ALL_OWING_ITEMS | The setting in new invoices for selecting 'Include all owing items' by default (0=no, 1=yes). {integer} |
DEFAULT_AGGREGATED | The setting in new invoices for selecting 'Aggregated items' by default (0=no, 1=yes). {integer} |
DEFAULT_CALCULATED_PRE_DISC | The default setting for new invoices calculated items being pre or post discount (0=pre, 1=post). {integer} |
PERMISSIONS | An array of numbers, each one signifies a user permission. {array} |
PERMISSION_GROUP | The ID of the permission group the user belongs to. {string} |
GRID_COLUMNS | The settings for certain grids and which columns to show and where to position them. {array} |
CURRENCY: { |
CODE | The international currency code for the default currency used for the job. {string} |
DECIMALS | How many decimal places does the currency have. {integer} |
DECIMAL_SEPARATOR | The character used to separate the decimals. {string} |
MULTIPLIER | The multiplier used to get the exchange rate. {float} |
NAME | Name of the currency. {string} |
NEGATIVE_FORMAT | How a negative should be displayed. {integer} |
SYMBOL | The currency symbol. {string} |
SYMBOL_POSITION | The position of the currency symbol (0=before, 1=after). {integer} |
THOUSAND_SEPARATOR | The character used to separate thousands. {string} |
} |
BASE_CURRENCY: { |
CODE | The international currency code for the default currency used for the job. {string} |
DECIMALS | How many decimal places does the currency have. {integer} |
DECIMAL_SEPARATOR | The character used to separate the decimals. {string} |
MULTIPLIER | The multiplier used to get the exchange rate. {float} |
NAME | Name of the currency. {string} |
NEGATIVE_FORMAT | How a negative should be displayed. {integer} |
SYMBOL | The currency symbol. {string} |
SYMBOL_POSITION | The position of the currency symbol (0=before, 1=after). {integer} |
THOUSAND_SEPARATOR | The character used to separate thousands. {string} |
} |
DATE_CHECK | When 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} |
PLUGINS | A list of plugin links. {array} |
DEFAULT_PRIORITY | The setting in new jobs for setting priority by default (0=no, 1=yes). {integer} |
TAX_TYPES | A list of the VAT/GST, etc. types. {array} |
THEME | The name of the HireHop theme for the user. {string} |
DEFAULT_TAX_GROUP | The index of the default tax type to use (0 is the first. {integer} |
AGENT | Used internally by HireHop. |
AVAILABILITY_RANGE | Within how many days until after a job starts should availability be automatically enabled in the supplying list. TO BE DEPRECATED {integer} |
AVAILABILITY_RANGE_ENABLE | Enable AVAILABILITY_RANGE (0=no, 1=yes). TO BE DEPRECATED {integer} |
DELIVER | The setting in new jobs for setting the delivery field. {integer} |
COLLECT | The setting in new jobs for setting the collection field. {integer} |
SHOW_END_TIMES | Set to 1 if jobs & projects have an end time shown. {integer} |
USE_CATEGORY_TREE | Set to 1 if the user uses a tree to filter by category and not tabs. {integer} |
CALENDAR | The user's calendar settings. {array} |
fields | Array of custom fields and their names and values. {array} |
FIELD_DEFINITIONS | List 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:Name | Description |
---|
id | Temporary ID of the item that will be returned. (required) {string}. |
job_id | ID of the job (required if package_id not set) {integer}. |
package_id | ID of the package (required if job_id not set) {integer}. |
qty | The quantity needed (can be 0 just to return data). {float} |
part_number | The part number of the item to add (required). {string} |
no_availability | Set to 1 to prevent availability for all items being calculated. {integer} |
price_group | Which price group (0=price a, 1= price b & 2= price c) {integer} |
local | The local date and time of the client (not required). |
tz | The timezone of the client (not required). |
Return parameters:Name | Description |
---|
old_id | The temporary ID of the item. {string} |
ID | ID of the item. {integer} |
TYPE | What the item is (1=sales or 2=hire). {integer} |
PART_NUMBER | The part number of the item. {string} |
QTY | The quantity needed. {float} |
TITLE | The name of the item. {string} |
PRICE | The base unit base price of the item. {float} |
AVAIL | How many available. {float or integer} |
error | Set 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:Name | Description |
---|
main_id | ID of the thing it is for, like a job or project ID (compulsory) {integer}. |
type | What is the thing, being the doc_type variable on each page (0=nothing, 1=job, 2=stock, 3=assets, etc.) (compulsory) {integer}. |
page | Starting from 1, the page number of notes to return (option, but 1 if not set)) {string} |
rows | How many rows of notes to return for each page (optional, minimum and default is 25, max is 500) {integer} |
sord | Sort order, either 'asc' (default) or 'desc' {string} |
sidx | Column to sort by ('CREATE_DATE', 'NAME' or 'JOB') {string} |
Return parameters:Name | Description |
---|
page | How many pages in total for all of the rows |
records | How many rows in total found. |
total | How many pages there are of data. |
rows: [ |
0: { |
id | Unique ID of the note |
cells: { |
id | Unique ID of the note {integer} |
user_id | ID of the user who created or last edited the note. {integer} |
username | Name of the user {string} |
note | The note in HTML {string} |
job | The project ID if for a project (6), the job ID if the note belongs to a job, or empty if not {integer}. |
} |
} |
] |
error | Set 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:Name | Description |
---|
main_id | The ID(s) of the item (job, asset, consumable, etc) to apply the note to (required only for new). {integer|array|JSON string}. |
type | The 'doc_type' of the page to save it to (see 'types' in the language files) (required only for new). {integer} |
id | The ID of the note to edit. If empty or zero, a new note will be created. (optional). {integer} |
note | Thetext of the note to save (can't be empty). (compulsory). {string} |
local | The local time of the user (not needed or used) {datetime string} |
tz | The timezone of the user (not needed or used) {string} |
Return parameters:Name | Description |
---|
page | How many pages in total for all of the rows (will be 1) |
records | How many rows in total found (will be 1. |
total | How many pages there are of data (will be 1). |
rows: { |
id | Unique ID of the edited note |
cells: { |
id | Unique ID of the note {integer} |
user_id | ID of the user who created or last edited the note. {integer} |
username | Name of the user {string} |
note | The note in HTML {string} |
job | The project ID if for a project (6), the job ID if the note belongs to a job, or empty if not {integer}. |
} |
} |
error | Set 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:Name | Description |
---|
main_id | The ID of the parent (required) {integer}. |
type | What the parent is (the doc_type) (required) {integer}. |
page | Which page of data your want (default is 1) {integer} |
rows | How many rows of data per page (minimum and default is 20, maximum is 500) (optional). {integer} |
sidx | The column index field to sort by ('ID', 'DTSTART' is default, 'DUE', 'USER_ID', 'STATUS' or 'PRIORITY') (optional). {string} |
sord | The order the index field is to be sorted, either 'asc' (default) or 'desc'. {string} |
Return parameters:Name | Description |
---|
page | What page this is (the first page is 1) |
records | How many rows in total found. |
total | How many pages there are of data. |
rows: [ |
0: { |
id | Unique ID of the task |
cells: { |
ID | ID of the of the task. |
MAIN_ID | The ID of the parent. |
TYPE | What the parent is (the doc_type). |
USER_ID | The ID of the user who the task is assigned to. |
USER_NAME | The name of the user who the task is assigned to. |
DTSTART | The start date of the task. |
DUE | The due date of the task. |
SUMMARY | The description of the task. |
STATUS | The status of the task. |
PRIORITY | The priority of the task. |
data: { |
ID | ID of the of the task. If empty a new task is created. |
MAIN_ID | The ID of the parent. |
TYPE | What the parent is (the doc_type). |
USER_ID | The ID of the user who the task is assigned to. |
DTSTART | The start date of the task. |
DUE | The due date of the task. |
SUMMARY | The description of the task. |
STATUS | The status of the task. |
PRIORITY | The priority of the task. |
CUSTOM_FIELDS | The array of custom fields. {JSON array} |
} |
} |
} |
] |
error | Set 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:Name | Description |
---|
id | ID of the of the task. If empty a new task is created (optional) {integer}. |
main_id | The ID of the parent (required) {integer}. |
type | What the parent is (the doc_type) (required) {integer}. |
user_id | The ID of the user who the task is assigned to (required) {integer} |
dtstart | The start date of the task (required) {date string} |
due | The due date of the task (optional) {date string} |
summary | The description of the task (optional) {string} |
status | The status of the task (optional) {integer}. |
priority | The priority of the task (optional) {integer}. |
custom_fields | The array of custom fields (optional) {array or JSON string} |
Return parameters:Name | Description |
---|
page | Will always be 1 |
records | Will always be 1 |
total | Will always be 1 |
rows: { |
id | Unique ID of the task |
cells: { |
ID | ID of the of the task. If empty a new task is created. |
MAIN_ID | The ID of the parent (required). |
TYPE | What the parent is (the doc_type). |
USER_ID | The ID of the user who the task is assigned to. |
USER_NAME | The name of the user who the task is assigned to. |
DTSTART | The start date of the task. |
DUE | The due date of the task. |
SUMMARY | The description of the task. |
STATUS | The status of the task. |
PRIORITY | The priority of the task. |
data: { |
ID | ID of the of the task. If empty a new task is created. |
MAIN_ID | The ID of the parent (required). |
TYPE | What the parent is (the doc_type). |
USER_ID | The ID of the user who the task is assigned to. |
DTSTART | The start date of the task. |
DUE | The due date of the task. |
SUMMARY | The description of the task. |
STATUS | The status of the task. |
PRIORITY | The priority of the task. |
CUSTOM_FIELDS | The array of custom fields (optional) {array or JSON string} |
} |
} |
} |
error | Set 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:Name | Description |
---|
type | The owner type (1=job, 6=project, etc.) (compulsory) {integer}. |
main_id | ID of the of the owner, like job or project ID (compulsory) {integer}. |
deatils | Array of objects, being 'name' and 'description' of each image in sequence (compulsory) {array of obejcts} |
custom_fields | JSON data of custom fields data (optional) {array, object or JSON string) |
waypoint | ID of the waypoint the upload is against (optional) {integer} |
files | Array of files files data to upload (compulsory) {objects} |
latitude | The current latitude sent from the device, otherwise obtained from IP address. (optional). {float} |
longitude | The current longitude sent from the device, otherwise obtained from IP address. (optional). {float} |
Return parameters:Name | Description |
---|
success | Array of details with ids or errors. |
STATUS | Set if upload successful and 'waypoint' parameter sent, being the new status value of 2. |
WAYPOINT_ID | Set if upload successful and 'waypoint' parameter sent, being the ID of the waypoint. |
error | Set 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:Name | Description |
---|
type | The owner type (1=job, 6=project, etc.) (compulsory) {integer}. |
main_id | ID of the of the owner, like job or project ID (compulsory) {integer}. |
note | The note to save. (compulsory) {string} |
waypoint | ID of the waypoint the upload is against (optional) {integer} |
route_ids | ID or IDs of the routes the update is for (required if no waypoint or registration) {integer|JSON|array} |
latitude | The current latitude sent from the device, otherwise obtained from IP address. (optional). {float} |
longitude | The current longitude sent from the device, otherwise obtained from IP address. (optional). {float} |
time | The time the last geolocation was taken. {ISO date string} |
Return parameters:Name | Description |
---|
success | Array of details with ids or errors. |
STATUS | Set if upload successful and 'waypoint' parameter sent, being the new status value of 2. |
WAYPOINT_ID | Set if upload successful and 'waypoint' parameter sent, being the ID of the waypoint. |
error | Set 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:Name | Description |
---|
job | ID of the job to limit the archives to, otherwise if not set or 0, it will return a list of packages (default=0). {integer}. |
_search | Set to true to enable filters. |
description | Decsription filter. {string}. |
page | Starting from 1, the page number of notes to return (option, but 1 if not set)) {string} |
rows | How many rows of notes to return for each page (optional, minimum and default is 25, max is 500) {integer} |
sord | Sort order, either 'asc' (default) or 'desc' {string} |
sidx | Column to sort by (''NAME', 'CREATED' or 'DESCRIPTION') {string} |
Return parameters:Name | Description |
---|
page | How many pages in total for all of the rows |
records | How many rows in total found. |
total | How many pages there are of data. |
rows: [ |
0: { |
id | Unique ID of the note |
cells: { |
id | Unique ID of the archive {integer} |
user | Name of the user {string} |
created | The date and time it was created. {datetime ISO string} |
description | A short HTML formatted description of the archive. {string}. |
job_type | The job type name the package will be applied to for new jobs. {string} |
data: { |
USER_ID | The ID of the user who created the archive. {integer} |
DESCRIPTION | A short description of the archive. {string}. |
DEPOT_LIMITS | An array of depot IDs that the archive can be used in. {array} |
JOB_TYPE | The job type name the package will be applied to for new jobs. {string} |
} |
} |
} |
] |
error | Set 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:Name | Description |
---|
bill | The ID of the the invoice/credit notes the line items belong to (required). {integer}. |
nodes: [ |
0: { |
id | ID of the line item to move (required). |
sid | ID of the new previous sibling line item (required). |
prnt | The ID of the immediate parent line item (required). |
} |
] |
Return parameters:Name | Description |
---|
items: [ |
0: { |
ID | ID of the line item {integer}. |
MAIN_ID | The sales, hire, labour, custom item, etc. ID. {integer}. |
KIND | What the line item is (0=heading, 1= sales, 2=hire, 3=custom, 4=labour, 5=comment & 6=calculated). {integer}. |
QTY | The quantity of the line item. {float}. |
FROM | The date the line item is billed from. {string}. |
UPTO | The date the line item is billed upto.. {string}. |
DESCRIPTION | Name given to the line item. {string}. |
MEMO | A memo for the item. {string}. |
CUSTOM_FIELDS | The custom fields assigned to the line item. {array}. |
ITEM | Name of item in supplying list (if linked). {string}. |
PART_NUMBER | Part number of the line item (if linked). {string}. |
UNIT_PRICE | The unit price for each line item for the duration of the invoice. {float}. |
VAT_RATE | The VAT/Tax/GST rate percentage applied to the line item. {float}. |
PRICE | The total price charged for the line item. {float}. |
BASE_UNIT_PRICE | The unit price for the line item for each day, week, etc.. {float}. |
MULTIPLIER | The multiplier used to get the UNIT_PRICE and PRICE for the duration. {float}. |
ACC_NOMINAL_ID | The ID of the nominal code for the line item. {integer}. |
ACC_TAX_RATE_ID | The ID of the tax rate for the line item. {integer}. |
LFT | The nested tree left value of the item. {integer}. |
RGT | The nested tree right value of the item.. {integer}. |
} |
] |
error | Set 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:Name | Description |
---|
main_id | ID of the thing it is for, like a job or project ID (compulsory) {integer}. |
type | What is the thing, being the doc_type variable on each page (1=job or 6=project) (compulsory) {integer}. |
fix | Set to '1' to do a reapir on the invoice and credit notes item tree {integer} |
Return parameters:Name | Description |
---|
banks: [ |
0: { |
ID | The unique ID of the bank account. {integer} |
DEFAULT | This will be '1' if this is the default bank account. {integer} |
NAME | The name of the bank account. {string} |
} |
] |
currency: { |
CODE | The international currency code for the default currency used for the job. {string} |
DECIMALS | How many decimal places does the currency have. {integer} |
DECIMAL_SEPARATOR | The character used to separate the decimals. {string} |
MULTIPLIER | The multiplier used to get the exchange rate. {float} |
NAME | Name of the currency. {string} |
NEGATIVE_FORMAT | How a negative should be displayed. {integer} |
SYMBOL | The currency symbol. {string} |
SYMBOL_POSITION | The position of the currency symbol (0=before, 1=after). {integer} |
THOUSAND_SEPARATOR | The character used to separate thousands. {string} |
} |
default_sales_tax | The zero based index in 'tax_codes' of the default sales tax rate. {integer} |
nominal_codes: [ |
0: { |
ID | The unique ID of the nominal code. {integer} |
DEFAULT | This will be '1' if this is the default nominal code. {integer} |
NAME | The name of the nominal code. {string} |
CODE | The code of the nominal code. {string} |
HIDDEN | If '1' then this is a deleted nominal code that is not used anymore. {integer} |
assigned | If '0' then it is not assigned to a nominal group item. {integer} |
} |
] |
package_name | The name of the accounting package assigned to the job/project. {string} |
subs | The cost of all the purchase orders in the base currency. {float} |
use_sales_tax | If '1', then the USA sales tax should be used. |
total | Ignore |
page | Ignore |
records | How many rows returned |
rows: [ |
0: { |
kind | '0' means it is a job total. {integer} |
currency | The currency code of the job. {string} |
id | The job number preceeded by the letter 'a'. {string} |
job | The job number/ID. {integer} |
accrued | The gross total of the job or the total amount accrued on the job is to date if it is open eneded. {float} |
data: { |
DEPOT_ID | The job depot ID. {integer} |
JOB_NAME | The job name. {string} |
TOTAL | The gross total of the job or the total amount accrued on the job is to date if it is open eneded. {float} |
TYPE | Will always be 0 like the 'kind' field. {integer} |
} |
} |
1: { |
kind | '1' means it is an invoice. {integer} |
currency | The currency code of the job. {string} |
data | Detailed data of the invoice. {associative array}. |
date | The tax point or issue date of the invoice. {date time string} |
debit | The amount of the invoice. {float} |
expanded | Will always be true. {boolean} |
id | The invoice ID preceeded by the letter 'b'. {string} |
isLeaf | Will be false to signify that it is not a child. {boolean} |
job | The job number/ID the invoice is for. {integer} |
level | Will be 0 to signify that it is a root item at tree level 0. {integer} |
loaded | Will always be true. {boolean} |
number | The invoice number. {string} |
owing | How much is owing on the invoice in the base currency. {float} |
status | The status of the invoice. {float} |
} |
2: { |
kind | '2' means it is a credit note. {integer} |
currency | The currency code of the job. {string} |
data | Detailed data of the credit note. {associative array}. |
date | The tax point or issue date of the credit note. {date time string} |
credit | The amount of the credit note. {float} |
id | The credit note ID preceeded by the letter 'c'. {string} |
isLeaf | Will be true to signify that it is a child. {boolean} |
level | Will be 1 to signify that it is a child of a root item. {integer} |
number | The credit note number. {string} |
owner | The ID of the owner invoice. {string} |
status | The status of the credit note. {float} |
} |
3: { |
kind | '3' means it is a payment. {integer} |
credit | How much the payment is for in the base currency. {float} |
currency | The currency code of the job. {string} |
data | Detailed data of the payment. {associative array}. |
date | The date of the payment. {date string} |
id | The payment ID preceeded by the letter 'd' and suffixed by a '_' and the invoice number. {string} |
isLeaf | Will be true to signify that it is a child. {boolean} |
level | Will be 1 to signify that it is a child item at tree level 1. {integer} |
owner | The ID of the invoice that the payment belongs to. {string} |
} |
] |
error | Set 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:Name | Description |
---|
id | ID of the invoice or credit note (compulsory). {integer}. |
type | What are we changing, an invoice or credit note (1=invoice, 2=credit note) (compulsory) {integer}. |
status | The new status of the invoice/credit note (0=Draft, 1=Awaiting Approval, 2=Approved, 3=Paid) (compulsory). {integer} |
period | The amount of days credit (optional and for invoices only). {integer} |
date | The 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_date | The date the invoice must be paid by. This will override 'period' (optional and for invoices only). {ISO date string} |
local | The local date and time of the client (optional). {ISO datetime string} |
tz | The timezone of the client (not required). |
no_webhook | Set to '1' to prevent a webhook from triggering |
Return parameters:Name | Description |
---|
page | How many pages in total for all of the rows (will always be one). |
records | How many rows in total found (will always be 1). |
total | How many pages there are of data (will always be 1). |
rows: [ |
0: { |
id | Unique ID of the billing item {integer} |
job | The number of the job it belongs to. {integer} |
kind | What it is (1=invoice, 2=credit note) {integer} |
date | The date of the invoice/credit note. {ISO datetime string} |
currency | The currency of the invoice/credit note. {JSON}. |
debit | Total of the invoice. {float} |
owing | How much of the invoice is owing. {float} |
isLeaf | Will be set if it is a credit note or payment. {boolean} |
level | 0 for an invoice or deposit, 1 for a credit note or payment. {integer} |
loaded | Will always be true |
number | The number of the credit note or invoice. {string} |
status | The status of the invoice/credit note (0=Draft, 1=Awaiting Approval, 2=Approved, 3=Paid). {integer} |
data | The full data of the invoice, credit note, payment and/or deposit (fields vary). {array} |
} |
] |
error | Set 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:Name | Description |
---|
job | ID of the job (optional) {integer}. |
arch | ID of the package (optional) {integer}. |
no_availability | Do not calculate availability if set to 1 (optional) {integer} |
grp | Which price group to use when adding new (0=A, 1=B & 2=C) {integer} |
data | Parent data {array or JSON string} |
Return parameters:Name | Description |
---|
pull: [ |
0: { |
AVAILABLE | Will always be '?' for rental and sale items and 0 for anything else. {string} |
CHECKED | If the item is selected then it will be 1, otherwise 0. {integer} |
DESCRIPTION | If it is a custom item, it will be the custom item name. {string} |
FLAG | The value of the flag for the item. {integer} |
ID | This is the hms_autopulls.ID {integer} |
ITEM_ID | The ID in hms_items_xxxx.ID or hms_archive_xxxx.ID (0 if not set) {integer} |
MAIN_ID | The ID of the stock, sale or labour management item. {integer} |
NO_SCAN | Set to '1' if no scan is needed. {integer} |
OWNER_ID | The ID of the rental item in the list. {integer} |
PRICE | Price in the base currency {float} |
PRICE_TYPE | Price duration to use (0=one off, 1=hourly, 2=daily, 3=weekly, 4=monthly, 5=every day, 6=every week, + custom) {integer} |
PROMPT | The prompt setting for the autopull (0=no prompt, 1=prompt selected, etc.). {integer} |
QTY | How many of the autopull are to be added. {float} |
REPLACE_COST | The cost of replacing the autopull in the base currency. {float} |
STOCK_ID | The stock management ID (owner) that this autopull is for {integer} |
TYPE | What it is (0=heading, 1=sales, 2=hire, 3=custom, 4=labour, etc.) {integer} |
UNIT_PRICE | Unit price in the base currency {float} |
VAT_RATE | The VAT/TAX group of the item. {integer} |
WEIGHT | The weight of the item. {float} |
children | An array of autopulls for this item, using this structure (excludes 'children'). {array} |
hide | Set to 1 if the autopull is hidden by default. {integer} |
m_title | The name of the owner. {string} |
title | The name of the item {string} |
} |
] |
error | Set 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:Name | Description |
---|
job | ID of the job the supplying list belongs to. (compulsory if arch not set) {integer}. |
arch | ID of the package the supplying list belongs to. (compulsory if job not set) {integer}. |
ids | Comma 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:Name | Description |
---|
success | Array 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} |
error | Set 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:Name | Description |
---|
job_id | ID of the job the supplying list belongs to. (compulsory if arch not set) {integer}. |
archive_id | ID of the package the supplying list belongs to. (compulsory if job not set) {integer}. |
sibling_id | ID of the sibling that the items will be inserted after. {integer} |
sibling_kind | What 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_id | ID of the parent heading the items will be inserted into. {integer} |
rows: [ |
0: { |
STOCK_ID | ID of the rental stock item. {integer} |
SALES_ID | ID of the sales stock item. {integer} |
LABOUR_ID | ID of the labour item. {integer} |
QTY | The 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_NUMBER | The part number to match. Priority is the last item added and will search rental stock first then sales if there are no matches. {string} |
BARCODE | The group rental or sales stock unique barcode. {string} |
TITLE | The 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_PRICE | The unit price for the item (will default to UNIT_PRICE/QTY or 0 if either are zero). {float} |
PRICE | The price for the item (will default to UNIT_PRICE * QTY or 0 if either are zero). {float} |
NO_SHORTFALL | For custom or labour items to mark them as never having a shortfall with a value of 1. {integer} |
NOTE | The additional inline comment for the item. {string} |
MEMO | The memo for the item. {string} |
} |
] |
Return parameters:Name | Description |
---|
items | Array of items added. {array} |
autopulls | Autopull data. {array} |
avail | A 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} |
error | Set if an error has occurred, either an error message or error number. |
Contacts
Save a job or project customer or delivery address to the address book.
post/php_functions/job_save_contact.php
Send parameters:Name | Description |
---|
CLIENT_ID | ID 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_ID | ID of the job {integer}. |
PROJECT_ID | ID of the project {integer}. |
NAME | Name of the customer (required). {string} |
COMPANY | Company name of the customer. {string} |
ADDRESS | Address of the customer. {text} |
TELEPHONE | Telephone number of the customer. {string} |
EMAIL | Email address of the customer. {string} |
MOBILE | Mobile/cellular telephone number of the customer. {string} |
CLIENT | Set to 1 if a customer (default 1). {integer} |
VENUE | Set to 1 if a delivery address (default 0). {integer} |
SUBCONTRACTOR | Set to 1 if a subcontractor (default 0). {integer} |
no_webhook | Set to anything but zero to prevent a webhook (default 0). {integer} |
Return parameters:Name | Description |
---|
id | ID of the customer's company in the address book (CLIENT_ID field) |
error | Error code or message if something went wrong |
Get a list of contacts or a single contact
get/modules/contacts/list.php
Send parameters:Name | Description |
---|
unq | If set, the ID of the company to filter contacts in. {integer}. |
cat | If set, the ID of the category to filter by. {integer} |
del | If set to 1, include all hidden/deleted contacts. {integer} |
_search | If set to 'true', more search filters can be set. {string}. |
COMPANY | If set, filter by the company name. {string} |
NAME | If set, filter by the person's name. {string} |
EMAIL | If set, filter by the email address. {string} |
TELEPHONE | If set, filter by all the telephone numbers. {string} |
RATING | If set, filter by the rating. {string}. {integer} |
LISTS | If set, fileter by a list (1=client, 2=delivery address or 3=supplier). {integer} |
page | Starting from 1, the page number of notes to return (option, but 1 if not set)) {string} |
rows | How many rows of notes to return for each page (optional, minimum and default is 25, max is 500) {integer} |
sord | Sort order, either 'asc' (default) or 'desc' {string} |
sidx | Column to sort by (COMPANY', 'NAME', 'TELEPHONE', 'RATING' or 'EMAIL') {string} |
Return parameters:Name | Description |
---|
page | How many pages in total for all of the rows |
records | How many rows in total found. |
total | How many pages there are of data. |
rows: [ |
0: { |
id | Unique ID of the person |
cell: { |
id | Unique ID of the person {integer} |
COMPANY | The name of the company. {string}. |
NAME | The name of the person. {string}. |
TELEPHONE | The direct phone number of the person, if empty then the mobile/cell number, if that is empty then the company telephone number. {string}. |
RATING | The rating out of 5 of the person. {float}. |
EMAIL | The email address of the person. {string}. |
LISTS | A 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: { |
ID | ID of the accounts package contact is included in. {string} |
PACKAGE | The name of the accounts package contact is included in. {string} |
ACC_ID | The reference from the accounts package for the contact. {string} |
ACC_ID_2 | The 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: { |
ID | Unique ID of the person {integer} |
cID | Unique ID of the company {integer} |
COMPANY | The name of the company. {string}. |
NAME | The name of the person. {string}. |
JOB | The job description of the person. {string}. |
ADDRESS | The address of the company. {string}. |
TELEPHONE | The phone number of the company. {string}. |
FAX | The fax number of the company. {string}. |
VAT_NUMBER | The VAT/GST/Tax number of the company. {string}. |
SOURCE | A short description of how the company came to be in the address book. {string}. |
WEB | Website of the company. {string}. |
MEMO | Memo for the company. {string}. |
CLIENT | Set to 1 to include the company in the client list. {integer}. |
VENUE | Set to 1 to include the company in the list of delivery addresses. {integer}. |
SUB | Set to 1 to include the company in the supplier list. {integer}. |
DD | The direct phone number of the person. {string}. |
CELL | The mobile/cell phone number of the person. {string}. |
EMAIL | The email address of the person. {string}. |
pMEMO | A memo for the person. {string}. |
MAIL | Set to 1 to include the person in mailing lists/bulk emails. {integer}. |
STATUS | The status of the person. {string}. |
IMAGE_ID | The ID of the image for the person. {integer}. |
names: [ |
0: { |
ID | Unique ID of the person in the company {integer} |
NAME | Simon Mitchell |
} |
] |
heads: [ |
0: { |
ID | Unique ID of the category. {integer} |
HEAD | The name of the person in the company. {string}. |
} |
] |
PRICE_GROUP | Which price group to use (0=price A, 1=price B & 2=price C). {integer} |
CREDIT_PERIOD | How many days credit the company has. {integer} |
CREDIT_LIMIT | What is the maximum amount of credit given to the company. {float} |
ACCOUNT_SUSPENDED | Set to 1 if the company is on a warning, or 2 if it is suspended. {integer} |
SUSPENDED_NOTE | The text to show as warning for the reason for the warning or suspension. {string} |
DEFAULT_DISCOUNT | The percentage default discount given to the company. {float} |
INV_EMAIL | Email address used as default to send invoices to. {string} |
PAY_EMAIL | Email address used as default to send purchase orders to. {string} |
INV_ADDRESS | Address to be used in invoices. {string} |
PAY_ADDRESS | Address to be used in purchase orders. {string} |
RATING | The rating out of 5 of the person. {float}. |
ACCOUNT_REFERENCE | A reference the user uses for this company. {string} |
ACC_IDS: [ |
0: { |
ID | ID of the accounts package contact is included in. {string} |
PACKAGE | The name of the accounts package contact is included in. {string} |
ACC_ID | The reference from the accounts package for the contact. {string} |
ACC_ID_2 | The 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_LIMITS | Array of depot IDs where the contact can be seen (including virtual depots), or empty for all. {array}. |
CUSTOM_FIELDS | The custom fields for the company. {array}. |
PERSON_CUSTOM_FIELDS | The custom fields for the person. {array}. |
TASKS | How many tasks assigned to the company. {integer} |
NOTES | How many notes linked to the company. {integer} |
FILES | How many files attached to the company. {integer} |
} |
} |
} |
] |
error | Set if an error has occurred, either an error message or error number. |
Save a new or edit of a contact, being the company, person or both.
post/modules/contacts/save.php
Send parameters:Name | Description |
---|
ID | The ID of the person or 0 (default) for new. {integer}. |
cID | The ID of the company or 0 (default) for new. {integer}. |
NAME | The name of the person (required). {string}. |
JOB | The job description of the person. {string}. |
DD | The direct phone number of the person. {string}. |
CELL | The mobile/cell phone number of the person. {string}. |
EMAIL | The email address of the person. {string}. |
pMEMO | A memo for the person. {string}. |
MAIL | Set to 1 to include the person in mailing lists/bulk emails. {integer}. |
STATUS | The status of the person. {string}. |
RATING | The rating out of 5 of the person. {float}. |
PERSON_CUSTOM_FIELDS | The custom fields for the company. {array}. |
COMPANY | The name of the company. {string}. |
ADDRESS | The address of the company. {string}. |
TELEPHONE | The phone number of the company. {string}. |
FAX | The fax number of the company. {string}. |
VAT_NUMBER | The VAT/GST/Tax number of the company. {string}. |
SOURCE | A short description of how the company came to be in the address book. {string}. |
WEB | Website of the company. {string}. |
MEMO | Memo for the company. {string}. |
CLIENT | Set to 1 to include the company in the client list. {integer}. |
VENUE | Set to 1 to include the company in the list of delivery addresses. {integer}. |
SUB | Set to 1 to include the company in the supplier list. {integer}. |
DEPOT_LIMITS | Array of depot IDs where the contact can be seen (including virtual depots), or empty for all. {array}. |
CUSTOM_FIELDS | The custom fields for the company. {array}. |
Return parameters:Name | Description |
---|
page | How many pages in total for all of the rows |
records | How many rows in total found. |
total | How many pages there are of data. |
rows: [ |
0: { |
id | Unique ID of the person |
cell: { |
id | Unique ID of the person {integer} |
COMPANY | The name of the company. {string}. |
NAME | The name of the person. {string}. |
TELEPHONE | The direct phone number of the person, if empty then the mobile/cell number, if that is empty then the company telephone number. {string}. |
RATING | The rating out of 5 of the person. {float}. |
EMAIL | The email address of the person. {string}. |
LISTS | A 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: { |
ID | ID of the accounts package contact is included in. {string} |
PACKAGE | The name of the accounts package contact is included in. {string} |
ACC_ID | The reference from the accounts package for the contact. {string} |
ACC_ID_2 | The 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: { |
ID | Unique ID of the person {integer} |
cID | Unique ID of the company {integer} |
COMPANY | The name of the company. {string}. |
NAME | The name of the person. {string}. |
JOB | The job description of the person. {string}. |
ADDRESS | The address of the company. {string}. |
TELEPHONE | The phone number of the company. {string}. |
FAX | The fax number of the company. {string}. |
VAT_NUMBER | The VAT/GST/Tax number of the company. {string}. |
SOURCE | A short description of how the company came to be in the address book. {string}. |
WEB | Website of the company. {string}. |
MEMO | Memo for the company. {string}. |
CLIENT | Set to 1 to include the company in the client list. {integer}. |
VENUE | Set to 1 to include the company in the list of delivery addresses. {integer}. |
SUB | Set to 1 to include the company in the supplier list. {integer}. |
DD | The direct phone number of the person. {string}. |
CELL | The mobile/cell phone number of the person. {string}. |
EMAIL | The email address of the person. {string}. |
pMEMO | A memo for the person. {string}. |
MAIL | Set to 1 to include the person in mailing lists/bulk emails. {integer}. |
STATUS | The status of the person. {string}. |
IMAGE_ID | The ID of the image for the person. {integer}. |
names: [ |
0: { |
ID | Unique ID of the person in the company {integer} |
NAME | Simon Mitchell |
} |
] |
heads: [ |
0: { |
ID | Unique ID of the category. {integer} |
HEAD | The name of the person in the company. {string}. |
} |
] |
PRICE_GROUP | Which price group to use (0=price A, 1=price B & 2=price C). {integer} |
CREDIT_PERIOD | How many days credit the company has. {integer} |
CREDIT_LIMIT | What is the maximum amount of credit given to the company. {float} |
ACCOUNT_SUSPENDED | Set to 1 if the company is on a warning, or 2 if it is suspended. {integer} |
SUSPENDED_NOTE | The text to show as warning for the reason for the warning or suspension. {string} |
DEFAULT_DISCOUNT | The percentage default discount given to the company. {float} |
INV_EMAIL | Email address used as default to send invoices to. {string} |
PAY_EMAIL | Email address used as default to send purchase orders to. {string} |
INV_ADDRESS | Address to be used in invoices. {string} |
PAY_ADDRESS | Address to be used in purchase orders. {string} |
RATING | The rating out of 5 of the person. {float}. |
ACCOUNT_REFERENCE | A reference the user uses for this company. {string} |
ACC_IDS: [ |
0: { |
ID | ID of the accounts package contact is included in. {string} |
PACKAGE | The name of the accounts package contact is included in. {string} |
ACC_ID | The reference from the accounts package for the contact. {string} |
ACC_ID_2 | The 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_LIMITS | Array of depot IDs where the contact can be seen (including virtual depots), or empty for all. {array}. |
CUSTOM_FIELDS | The custom fields for the company. {array}. |
PERSON_CUSTOM_FIELDS | The custom fields for the person. {array}. |
TASKS | How many tasks assigned to the company. {integer} |
NOTES | How many notes linked to the company. {integer} |
FILES | How many files attached to the company. {integer} |
} |
} |
} |
] |
error | Set 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:Name | Description |
---|
id | ID of the payment holiday item (compulsory). {integer}. |
job_id | ID of the job the payment holiday belongs to. (optional). {integer} |
no_webhook | Set to '1' to prevent a webhook from triggering |
Return parameters:Name | Description |
---|
id | Old ID of the payment holiday item if successful. {integer}. |
error | Set 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:Name | Description |
---|
job_id | ID of the job the payment holiday belongs to (compulsory). {integer}. |
page | Starting from 1, the page number of notes to return (optional, default is 1)) {string} |
rows | How many rows of notes to return for each page (optional, minimum and default is 25, max is 500) {integer} |
sord | Sort order, either 'asc' (default) or 'desc' {string} |
sidx | Column to sort by ('FROM', 'UNTIL', 'UNIT_DEDUCTION', 'QTY' or 'TITLE') {string} |
Return parameters:Name | Description |
---|
page | How many pages in total for all of the rows |
records | How many rows in total found. |
total | How many pages there are of data. |
rows: [ |
0: { |
ID | Unique ID of the payment holiday line item {integer} |
TITLE | Name of the item {string} |
QUANTITY | How many are in the supplying list. {numeric} |
FROM | The date and time the payment holiday starts in ISO format. {string} |
PRICE | The base price (base unit price * qty) of the supplying list item. {float} |
PRICE_TYPE | The price type of the supplying list item. {integer} |
UNTIL | The date and time the payment holiday ends in ISO format. {string} |
UNIT_DEDUCTION | The amount per item to be reduced by {float} |
DESCRIPTION | Description of the payment holiday in HTML {string} |
data: { |
ID | Unique ID of the payment holiday line item {integer} |
CREATE_DATE | The date and time the payment holiday was created. {string} |
JOB_ID | The job number the payment holiday belongs to. {integer} |
ITEM_STOCK_ID | The stock supplying item the payment holiday is assigned to. {integer} |
ITEM_CUSTOM_ID | The custom supplying item the payment holiday is assigned to. {integer} |
ITEM_LABOUR_ID | The labour supplying item the payment holiday is assigned to. {integer} |
TYPE | What type of item the payment holiday is for (2=Hire stock, 3=Custom and 4=Labour). {integer} |
TITLE | Name of the item {string} |
FROM | The date and time the payment holiday starts in ISO format. {string} |
UNTIL | The date and time the payment holiday ends in ISO format. {string} |
QUANTITY | How many are in the supplying list. {numeric} |
UNIT_DEDUCTION | The amount per item to be reduced by {float} |
PRICE | The base price (base unit price * qty) of the supplying list item. {float} |
PRICE_TYPE | The price type of the supplying list item. {integer} |
DESCRIPTION | The description for the payment holiday. {string} |
MEMO | The memo for the payment holiday. {string} |
USER_ID | The ID of the user who created the payment holiday. {integer} |
CUSTOM_FIELDS | Custom fields assigned to the payment holiday. {JSON} |
} |
} |
] |
error | Set 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:Name | Description |
---|
ID | ID of the payment holiday (required) {integer}. |
UNIT_DEDUCTION | The amount per item to be reduced by {float} |
DESCRIPTION | Description of the payment holiday (required). {string} |
MEMO | The memo for the payment holiday. {string} |
FROM | The date and time the payment holiday starts in ISO format. {string} |
UNTIL | The date and time the payment holiday ends in ISO format. {string} |
no_webhook | Set to '1' to prevent a webhook from triggering |
Return parameters:Name | Description |
---|
ID | Unique ID of the payment holiday line item {integer} |
TITLE | Name of the item {string} |
QUANTITY | How many are in the supplying list. {numeric} |
FROM | The date and time the payment holiday starts in ISO format. {string} |
PRICE_TYPE | The price type used (0=One off (default), 1=Hours, 2=Days, 3=Weeks, 4=Months, etc.). {integer} |
UNTIL | The date and time the payment holiday ends in ISO format. {string} |
UNIT_DEDUCTION | The amount per item to be reduced by {float} |
DESCRIPTION | Description of the payment holiday in HTML {string} |
INVOICE_ID | The invoice the payment holiday is used in. {integer} |
data: { |
ID | Unique ID of the payment holiday line item {integer} |
CREATE_DATE | The date and time the payment holiday was created. {string} |
JOB_ID | The job number the payment holiday belongs to. {integer} |
ITEM_STOCK_ID | The stock supplying item the payment holiday is assigned to. {integer} |
ITEM_CUSTOM_ID | The custom supplying item the payment holiday is assigned to. {integer} |
ITEM_LABOUR_ID | The labour supplying item the payment holiday is assigned to. {integer} |
TYPE | What type of item the payment holiday is for (2=Hire stock, 3=Custom and 4=Labour). {integer} |
TITLE | Name of the item {string} |
INVOICE_ID | The invoice the payment holiday is used in. {integer} |
FROM | The date and time the payment holiday starts in ISO format. {string} |
UNTIL | The date and time the payment holiday ends in ISO format. {string} |
QUANTITY | How many are in the supplying list. {numeric} |
UNIT_DEDUCTION | The amount per item to be reduced by {float} |
PRICE_TYPE | The price type used in the supplying list (0=One off, 1=Hours, 2=Days, 3=Weeks, 4=Months, etc.). {integer} |
DESCRIPTION | Description of the payment holiday. {string} |
MEMO | The memo for the payment holiday. {string} |
USER_ID | The ID of the user who created the payment holiday. {integer} |
CUSTOM_FIELDS | Custom fields assigned to the payment holiday. {JSON} |
} |
error | Set 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:Name | Description |
---|
FROM | The date and time the payment holiday starts in ISO format (required). {string} |
UNTIL | The date and time the payment holiday ends in ISO format (required). {string} |
DESCRIPTION | The note for the payment holiday (required). {string} |
MEMO | The memo for the payment holiday (optional). {string} |
price_type | The 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_scheme | The name of the job DURATION_SCHEME filter (optional). {string}. |
status | The job status filter (optional). {float}. |
depot | The ID of the job depot or virtual depot ID filter (optional). {integer}. |
selected_stock_ids | The IDs of the stock items to include (optional). {array|json|integer}. |
selected_custom_ids | The IDs of the custom items to include (optional). {array|json|integer}. |
selected_labour_ids | The IDs of the labour items to include (optional). {array|json|integer}. |
selected_jobs | The IDs of the jobs to include (optional). {array|json|integer}. |
days_per_week | The chargeable days per week (optional, default 7). {integer}. |
multiplier | The amount to multiply the base price for each item by (required). {float}. |
no_webhook | Set to '1' to prevent a webhook from triggering |
Return parameters:Name | Description |
---|
0: { |
ID | Unique ID of the payment holiday line item {integer} |
TITLE | Name of the item {string} |
QUANTITY | How many are in the supplying list. {numeric} |
FROM | The date and time the payment holiday starts in ISO format. {string} |
PRICE_TYPE | The price type used (0=One off (default), 1=Hours, 2=Days, 3=Weeks, 4=Months, etc.). {integer} |
UNTIL | The date and time the payment holiday ends in ISO format. {string} |
UNIT_DEDUCTION | The amount per item to be reduced by {float} |
DESCRIPTION | Description of the payment holiday in HTML. {string} |
INVOICE_ID | The invoice the payment holiday is used in. {integer} |
data: { |
ID | Unique ID of the payment holiday line item {integer} |
CREATE_DATE | The date and time the payment holiday was created. {string} |
JOB_ID | The job number the payment holiday belongs to. {integer} |
ITEM_STOCK_ID | The stock supplying item the payment holiday is assigned to. {integer} |
ITEM_CUSTOM_ID | The custom supplying item the payment holiday is assigned to. {integer} |
ITEM_LABOUR_ID | The labour supplying item the payment holiday is assigned to. {integer} |
TYPE | What type of item the payment holiday is for (2=Hire stock, 3=Custom and 4=Labour). {integer} |
TITLE | Name of the item {string} |
INVOICE_ID | The invoice the payment holiday is used in. {integer} |
FROM | The date and time the payment holiday starts in ISO format. {string} |
UNTIL | The date and time the payment holiday ends in ISO format. {string} |
QUANTITY | How many are in the supplying list. {numeric} |
UNIT_DEDUCTION | The amount per item to be reduced by {float} |
PRICE_TYPE | The price type used in the supplying list (0=One off, 1=Hours, 2=Days, 3=Weeks, 4=Months, etc.). {integer} |
DESCRIPTION | Description of the payment holiday. {string} |
MEMO | The memo for the payment holiday. {string} |
USER_ID | The ID of the user who created the payment holiday. {integer} |
CUSTOM_FIELDS | Custom 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:Name | Description |
---|
id | The project ID (number) to get the data for (compulsory) {integer}. |
Return parameters:Name | Description |
---|
ID | The project number. {integer} |
USER | The user ID of manager 1. {integer} |
USER_NAME | The name of manger 1. {string} |
USER_EMAIL | The email of manger 1. {string} |
USER2 | The user ID of manager 2. {integer} |
USER2_NAME | The name of manger 2. {string} |
USER2_EMAIL | The email of manger 2. {string} |
CREATE_USER | The user ID who created the project. {integer} |
CREATED_BY | The user name who created the project. {string} |
CREATE_DATE | The date and time the the project was created (YYYY-MM-DD hh:mm). {string} |
NAME | Name number of the customer. {string} |
COMPANY | Company name of the customer. {string} |
ADDRESS | Address of the customer. {string} |
TELEPHONE | Telephone number of the client. {string} |
MOBILE | Mobile/celluar telephone number of the customer. {string} |
EMAIL | Email address of the client. {string} |
STATUS | The status code of the project. {float} |
JOB_TYPE | What type of job it is. {string} |
DELIVER_TO | Name of the job delivery building. {string} |
DELIVERY_ADDRESS | Delivery location address. {string} |
DELIVERY_TELEPHONE | Delivery address phone number. {string} |
OUT_DATE | The date and time the equipment used in the job is reserved from (YYYY-MM-DD hh:mm). |
START_DATE | Date the job starts charging from (YYYY-MM-DD hh:mm). {date string} |
END_DATE | Date the job ends (YYYY-MM-DD hh:mm). {date string} |
RETURN_DATE | The date and time that all equipment on the job will become available again (YYYY-MM-DD hh:mm). {date string} |
COLOUR | The colour of the job in HEX. {string} |
PROJECT_NAME | Name of the project. {string} |
DETAILS | Memo about the project. {string} |
DEPOT_ID | ID of the depot the project is in (virtual if not root). {integer} |
root_depot_id | The ID if the depot is a standard depot. {integer} |
VIRTUAL_DEPOT_ID | If the depot is a virtual depot, it's ID. {integer} |
DEFAULT_DISCOUNT | The default discount percentage to give to the customer. {float} |
PRICE_GROUP | Which price group to use (A=0, B=1, & C=2). {integer} |
DEPOT | Name of the depot the project is in. {string} |
CLIENT_ID | Client company ID in the address book the job is assigned to. {integer} |
ACCOUNT_SUSPENDED | Is the account suspended (yes=1 or no=0). {integer} |
SUSPENDED_NOTE | If account warning or suspended, a note saying why. {string} |
NOTES | How many notes on the job. {integer} |
TASKS | How many tasks in the job. {integer} |
FILES | How many files attached to the job. {integer} |
CREDIT_PERIOD | Credit time in days for the customer. {integer} |
INV_ADDRESS | Address for invoicing. {string} |
INV_EMAIL | Email for invoicing. {string} |
CURRENCY: { |
CODE | The international currency code for the default currency used for the job. {string} |
DECIMALS | How many decimal places does the currency have. {integer} |
DECIMAL_SEPARATOR | The character used to separate the decimals. {string} |
MULTIPLIER | The multiplier used to get the exchange rate. {float} |
NAME | Name of the currency. {string} |
NEGATIVE_FORMAT | How a negative should be displayed. {integer} |
SYMBOL | The currency symbol. {string} |
SYMBOL_POSITION | The position of the currency symbol (0=before, 1=after). {integer} |
THOUSAND_SEPARATOR | The character used to separate thousands. {string} |
} |
CUSTOM_FIELDS | Object array of custom field objects. {object} |
CUSTOM_INDEX | The indexable custom field value. {string} |
CLIENT_MEMO | Memo from the address book. {string} |
ACC_PACKAGE_ID | The ID of the accounting package to use. {integer} |
error | Set 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:Name | Description |
---|
job_ids | A list of job numbers to update {integer | array of integers | JSON string}. |
project_id | The project ID the jobs belong to (optional) {integer}. |
OUT_DATE | The new outgoing date & time to apply to the jobs (YYYY-MM-DD hh:mm). {string}. |
JOB_DATE | The new job date & time to apply to the jobs (YYYY-MM-DD hh:mm). {string}. |
JOB_END | The new outgoing date & time to apply to the jobs or empty for open ended (YYYY-MM-DD hh:mm). {string}. |
RETURN_DATE | The new outgoing date & time to apply to the jobs or empty for open ended (YYYY-MM-DD hh:mm). {string}. |
STATUS | The new status value to apply to the jobs. {float} |
VENUE | The new deliver to name to apply to the jobs. {string}. |
VENUE_ADDRESS | The new delivery address to apply to the jobs. {string}. |
VENUE_TELEPHONE | The new delivery phone number to apply to the jobs. {string}. |
no_webhook | Set to 1 prevent a webhook from triggering. {integer} |
Return parameters:Name | Description |
---|
rows: { |
job_id: { |
OUT_DATE | The date and time the equipment used in the job is reserved from (YYYY-MM-DD hh:mm). |
JOB_DATE | Date the job starts charging from (YYYY-MM-DD hh:mm). |
JOB_END | Date the job ends (YYYY-MM-DD hh:mm). |
RETURN_DATE | The date and time that all equipment on the job will become available again (YYYY-MM-DD hh:mm). |
STATUS | The status code of the job |
COLOUR | The colour of the job in HEX |
VENUE | Name of the job delivery building |
VENUE_ADDRESS | Delivery location address |
VENUE_TELEPHONE | Delivery address phone number |
} |
} |
error | Set 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:Name | Description |
---|
address | The address of the customer {multiline string} |
client_id | The ID of the customer's company in the address book (optional) {integer} |
client_ref | The client's reference for the project {string} |
collection_from | Name of where it is to be collected from. {text} |
collection_address | Collection address. {text} |
collection_telephone | Telephone number of where it is to be collected. {text} |
company | The company name of the customer {string} |
currency | Default currency object of the project (optional and only if multi-currency plugin enabled) {json array or json string} |
custom_fields | Object array of custom field objects (optional). {JSON or JSON string} |
custom_index | A custom field that is indexed in the database for faster searching {string} |
delivery_address | The address of the delivery location {multiline string} |
delivery_telephone | The telephone number of the delivery location {string} |
deliver_to | The name of the delivery location {string} |
depot | The ID of the depot (compulsory for new) {integer} |
details | Details memo of the project {multiline string} |
email | The email of the customer {string} |
end | The finish date and time (YYYY-MM-DD hh:mm:ss) of the project (optional) {string} |
extra_dates: [ |
0: { |
NAME | Unique field name of the extra date (required if not DEFAULT). {string} |
LABEL | Label to display when whowing the date (required if not DEFAULT). {string} |
DEFAULT | Must be set to 'OUT', 'START', 'FINISH' or 'RETURN' only if it is a standard default date. {string} |
REQUIRED | Set to 1 if compulsory, if VALUE is empty and compulsory, an error 3 (missing paramaters) will be returned. {integer} |
VALUE | The value in 'YYYY-MM-DD hh:mm:ss' format or null if empty (required but not for DEFAULT dates). {string} |
} |
] |
fields | Depricated custom fields parameter. Ignored if 'custom_fields' is set (use 'custom_fields'). |
id | Number of the project or empty for a new project (optional) {integer}. |
inv_address | The invoice address for the customer {multiline string} |
mobile | The mobile/cell of the customer {string} |
name | The contact name of the customer {string} |
no_empty_date_check | Set to 1 to stop checks for required empty extra dates (only used for editing the extra dates structure in a job). {integer} |
out | The outgoing date and time (YYYY-MM-DD hh:mm:ss) of the project (compulsory for new) {string} |
project_name | The name of the project {string} |
start | The start date and time (YYYY-MM-DD hh:mm:ss) of the project (compulsory for new) {string} |
status | The status of the project, being 0 for active and 1 for closed (optional) {integer}. |
telephone | The telephone number of the customer {string} |
to | The return date and time (YYYY-MM-DD hh:mm:ss) of the project (optional) {string} |
type | The type of project {string} |
use_at | Name of where it is being used. {text} |
use_at_address | Collection address. {text} |
use_at_telephone | Telephone number of where it is being used. {text} |
venue_id | ID of the company in the address book that the venue was last selected from. {integer} |
Return parameters:Name | Description |
---|
ID | Number of the project or empty for a new project {integer}. |
USER | The ID of the project manager {integer} |
USER_NAME | The name of the project manager {string} |
USER_EMAIL | The email of the project manager {string} |
USER2 | The ID of the second project manager {integer} |
USER2_NAME | The name of the second project manager {string} |
USER2_EMAIL | The email of the second project manager {string} |
CREATE_USER | The ID of the user who created the project {integer} |
CREATED_BY | The name of the user who created the project {string} |
CREATE_DATE | The date and time (YYYY-MM-DD hh:mm:ss) the project was created {string} |
COLLECTION_FROM | Name of where it is to be collected from (only if set). |
COLLECTION_ADDRESS | Collection address (only if set). |
COLLECTION_TELEPHONE | Telephone number of where it is to be collected (only if set). |
NAME | The contact name of the customer {string} |
COMPANY | The company name of the customer {string} |
ADDRESS | The address of the customer {multiline string} |
TELEPHONE | The telephone number of the customer {string} |
MOBILE | The mobile/cell of the customer {string} |
EMAIL | The email of the customer {string} |
STATUS | The status of the project, being 0 for active and 1 for closed {integer}. |
JOB_TYPE | The type of project {string} |
DELIVER_TO | The name of the delivery location {string} |
DELIVERY_ADDRESS | The address of the delivery location {multiline string} |
DELIVERY_TELEPHONE | The telephone number of the delivery location {string} |
OUT_DATE | The outgoing date and time (YYYY-MM-DD hh:mm:ss) of the project {string} |
START_DATE | The start date and time (YYYY-MM-DD hh:mm:ss) of the project {string} |
END_DATE | The end date and time (YYYY-MM-DD hh:mm:ss) of the project {string} |
RETURN_DATE | The return date and time (YYYY-MM-DD hh:mm:ss) of the project {string} |
COLOUR | The colour in hexidecimal assigned to the project {string} |
PROJECT_NAME | The name of the project {string} |
DETAILS | Details memo of the project {multiline string} |
DEPOT_ID | The ID of the depot the project is assigned to {integer} |
root_depot_id | The root ID of the depot the project is assigned to {integer} |
VIRTUAL_DEPOT_ID | The virtual ID of the depot the project is assigned to {integer} |
DEFAULT_DISCOUNT | The default discount automatically given to new jobs {float} |
PRICE_GROUP | Which price group new jobs will default to (0=price A, 1=price B and 2=price C) {integer} |
DEPOT | The name of the depot the project is assigned to {string} |
CLIENT_ID | The ID of the customer's company in the address book {integer} |
INV_ADDRESS | The invoice address of the customer {multiline string} |
ACCOUNT_SUSPENDED | Is the account suspended (2) or just has a warning (1) {integer} |
SUSPENDED_NOTE | The note that will appear if the account is suspended or has a warning {string} |
NOTES | How many notes in the project {integer} |
TASKS | How many tasks in the project {integer} |
FILES | How many files in the project {integer} |
CREDIT_PERIOD | The default credit period in days for new jobs {integer} |
INV_EMAIL | The email of the accounts payable {string} |
EXTRA_DATES: [ |
0: { |
NAME | Unique field name of the extra date (required if not DEFAULT). {string} |
LABEL | Label to display when whowing the date (required if not DEFAULT). {string} |
DEFAULT | Must be set to 'OUT', 'START', 'FINISH' or 'RETURN' only if it is a standard default date. {string} |
REQUIRED | Set to 1 if compulsory, if VALUE is empty and compulsory, an error 3 (missing paramaters) will be returned. {integer} |
VALUE | The value in 'YYYY-MM-DD hh:mm:ss' format or null if empty (required but not for DEFAULT dates). {string} |
} |
] |
USE_AT | Name of where it is being used (only if set). |
USE_AT_ADDRESS | Collection address (only if set). |
USE_AT_TELEPHONE | Telephone number of where it is being used (only if set). |
VENUE_ID | ID of the delivery location address in the address book |
CURRENCY | Currency object of the project {json} |
fields | Custom fields to {json} |
CUSTOM_INDEX | A custom field that is indexed in the database for faster searching {string} |
CLIENT_MEMO | The memo assigned to the customer in the address book {multiline string} |
ACC_PACKAGE_ID | The ID of the default accounting package assigned to the project {integer} |
error | Set 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:Name | Description |
---|
id | The project ID the jobs belong to (compulsory) {integer}. |
page | Starting from 1, the page number of notes to return (optional, default is 1) {string} |
rows | How many rows of notes to return for each page (optional, default is 25) {integer} |
sord | Sort order, either 'asc' (default) or 'desc' {string} |
sidx | Column to sort by ('CUSTOM_INDEX', 'JOB_DATE', 'JOB_END', 'ID', 'JOB_NAME', 'VENUE','STATUS' or 'JOB_TYPE') (default is JOB_DATE) {string} |
Return parameters:Name | Description |
---|
page | The page number of the data (starting from 1). {integer} |
total | The total number of pages. {integer} |
records | How many jobs in total in the project. {integer} |
rows: [ |
0: { |
id | A unique id for the row made by appending the job number after the string 'jobs_'. {string} |
cell: { |
ID | The job number. {integer} |
OUT_DATE | The date and time the equipment used in the job is reserved from (YYYY-MM-DD hh:mm). {string} |
JOB_DATE | Date the job starts charging from (YYYY-MM-DD hh:mm). {string} |
JOB_END | Date the job ends (YYYY-MM-DD hh:mm). {string} |
RETURN_DATE | The date and time that all equipment on the job will become available again (YYYY-MM-DD hh:mm). {string} |
JOB_NAME | The name given to the job {string} |
VENUE | Name of the job delivery building {string} |
JOB_TYPE | The name given to the type of the job {string} |
STATUS | The status code of the job {float} |
COLOUR | The colour of the job in HEX {string} |
DEPOT | The depot ID the job belongs to {integer} |
CUSTOM_INDEX | The optional custom index field. {string} |
} |
} |
] |
error | Set 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. (This might be subject to change)
get/php_functions/subcontractors_get_short_list.php
Send parameters:Name | Description |
---|
job | The job number the list is for. {integer}. |
last_idx | The last_idx sent back from the last search (compulsory). {integer} |
head | The name of the category to filter by. {string}. DEPRICATED, will be replaced with 'category_id' |
TITLE | Filter for the name of the item. {string} |
kind | A string of characters telling what to include in the list ('1'=sales, '2'=hire, '3'=custom, '4'=labour & 's'=only list shortfalls). {string}. |
supplier | The ID of the supplying company in the address book (used to establish the previous cost). {integer} |
page | Starting from 1, the page number of the data (default is 1) {integer} |
rows | How many rows of notes to return for each page (optional, minimum and default is 25, max is 500) {integer} |
sord | Sort order, either 'asc' (default) or 'desc' {string} |
sidx | Column to sort by ('TITLE', 'SHORT' or 'KIND') {string} |
pq_sort | Array of sorting objects as an alternative to sord and sidx. {array|JSON string} |
pq_filter | Array of filter objects as an alternative to TITLE. {array|JSON string} |
Return parameters:Name | Description |
---|
heads | An array of category data for the selected rows. Only returned on the first search. |
last_idx | The index of the last item returned. |
totalRecords | How many records to fetch in total. This will progressively decrease as rows are filtered, but assumes all until all pages checked. |
curPage | The page number of the data. |
rows: [ |
0: { |
ID | Unique ID of the line item. {string} |
MAIN_ID | ID of the linked item. {integer} |
TYPE | What the item is (1=sales, 2=hire, 3=custom & 4=labour). {integer} |
TITLE | The name of the item. {string} |
ESTIMATED_COST | The estimated cost of the item. {float}. |
PREVIOUS_COST | The latest agreed cost of the item from the supplier for the item. {float}. |
UNIT_PRICE | If no previous cost, then estimated cost is used. {float}. |
TOTAL | The UNIT_PRICE * SHORT. {float}. |
SHORT | How many are short. {float}. |
} |
] |
error | Set if an error has occurred, either an error message or error number. |
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. (DEPRICATED)
get/php_functions/subcontractors_short_list.php
Send parameters:Name | Description |
---|
job | The job number the list is for. {integer}. |
head | The name of the category to filter by. {string}. |
kind | A string of characters telling what to include in the list ('1'=sales, '2'=hire, '3'=custom, '4'=labour & 's'=only list shortfalls). {string}. |
supplier | The ID of the supplying company in the address book. {integer} |
page | Starting from 1, the page number of notes to return (option, but 1 if not set)) {string} |
rows | How many rows of notes to return for each page (optional, minimum and default is 25, max is 500) {integer} |
sord | Sort order, either 'asc' (default) or 'desc' {string} |
sidx | Column to sort by ('TITLE', 'SHORT' or 'KIND') {string} |
Return parameters:Name | Description |
---|
page | The current page that was loaded |
records | How many rows in total found. |
total | How many pages there are of data. |
rows: [ |
0: { |
id | Unique ID of the note |
cells: { |
ID | Unique ID of the line item {string} |
MAIN_ID | ID of the linked item. {integer} |
TYPE | What the item is (1=sales, 2=hire, 3=custom & 4=labour). {integer} |
TITLE | The name of the item. {string} |
ESTIMATED_COST | The estimated cost of the item. {float}. |
PREVIOUS_COST | The latest agreed cost of the item from the supplier for the item. {float}. |
UNIT_PRICE | If no previous cost, then estimated cost is used. {float}. |
TOTAL | The UNIT_PRICE * SHORT. {float}. |
SHORT | How many are short. {float}. |
} |
} |
] |
error | Set 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:Name | Description |
---|
id | The ID of the purchase order to save. If empty or zero, a new purchase order will be created. {integer} |
main_id | The ID of the owner (job, project or empty) of the purchase order (required only for new and if 'type' is 1 or 6). {integer}. |
type | The 'doc_type' of the page to save it to (1=job, 6=project, 0=no owner) (required only for new). {integer} |
pers | The ID of the person in the address book the PO is made to. {integer}. |
internal | The ID of the job the internal PO is for (-1 = new internal job, 0 = normal subcontractor, >0 means internal job id). {integer}. |
depot | The ID of the root depot the PO is for. {integer}. |
desc | The description of the PO. {string} |
kind | What type of PO is this (0=Rental, 1=Labour, 2=Service, 3=Purchase, 4=Transport, 5=Internal, 6=Travel). {integer} |
ref | The supplier reference of the PO. {string} |
tax_total | The total of the tax to charge if using USA tax. {float} |
memo | The memo of the PO. {string} |
addr | The delivery address of the PO. {string} |
checkin | Set to 1 if the PO needs to be checked in. {integer}. |
checkout | Set to 1 if the PO needs to be checked out. {integer}. |
sceduled | Set to 1 to include the PO in the job schedule. {integer}. |
fulfil | Set to 1 to exclude the PO from checking if it encapsulates the job dates. {integer}. |
collect | Set to 1 if the PO needs to be collected. {integer}. |
return | Set to 1 if the PO needs to be returned. {integer}. |
update_items | Set to 1 to to calculate new prices if the dates have been changed. {integer}. |
no_vat | Set to 1 to exclude the PO from VAT, Tax, GST, etc.. {integer}. |
zero_code | The ID of the xero rated tax code. {integer} |
vat_rate | The rate of tax if using USA tax. {float} |
res | The ID of the resource the PO is assigned to. {integer}. |
acc_id | The ID of the accounts package ID. If not set, the owner accounts package will be used. {integer}. |
start | The start date of the PO. {date string}. |
finish | The end date of the PO. {date string}. |
currency | The currency settings of the PO. {currency object}. |
local | The local time of the user (not needed or used) {datetime string} |
tz | The timezone of the user (not needed or used) {string} |
Return parameters:Name | Description |
---|
deafult_package_name | The name of the default accounting package |
nominal_codes: [ |
0: { |
ID | The ID of the nominal |
CODE | The code of the nominal |
NAME | The name to describe the nominal |
DEFAULT | If 1 then it is the default |
HIDDEN | If set to 1 then it is deleted |
assigned | The nominal group ID the nominal is assigned to |
} |
] |
packages: [ |
0: { |
ID | The ID of the accounts package |
NAME | The name of the accounts package |
} |
] |
rows | Array of PO data |
tax_codes: [ |
0: { |
ID | The ID of the tax code |
DESCRIPTION | The name to describe the nominal |
DEFAULT | If 1 then it is the default |
HIDDEN | If set to 1 then it is deleted |
RATE | The total rate of the tax/VAT/GST. |
assigned | The nominal group ID the nominal is assigned to |
} |
] |
use_sales_tax | If 1, then by default all new purchase orders should use sales tax |
error | Set 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:Name | Description |
---|
id | ID of the line item (optional, default 0) {integer}. |
kind | What it is (heading, sales, hire,custom, etc.) (optional) {integer} |
sub | Purchase order ID the line item is linked to (compulsory) {integer} |
qty | The quantity (optional, default 1) {float} |
unit | The unit price in the base currency (optional, default 0) (float) |
price | The total price in the base currency (optional, default 0) (float) |
desc | Description of the item (compulsory) {string} |
price_type | What is the pricing (one off, daily, weekly, etc. See 'price types') (optional, default 0) {integer} |
base_unit_price | The unit price before duration multiplying, eg. the price of one item for a day (optional, default 0) (float) |
memo | Memo for the waypoint (optional) {multiline string} |
vat_rate | The percentage of the VAT/Tax/GST (optional, default 0) (float) |
vat_id | ID of the VAT/Tax/GST rate (optional, default 0) {integer}. |
nominal | ID of the nominal code (optional, default 0) {integer}. |
selected | ID of the selected line item so HireHop can position new line items (optional, default 0) {integer}. |
tz | The timezone the user is in (optional but recommended) {string} |
local | The local date and time (optional but recommended) {string} |
custom_fields | The custom fields JSON (optional) {json} |
Return parameters:Name | Description |
---|
ID | Unique ID of the line item |
error | Set 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).
get/modules/consumables/list.php
Send parameters:Name | Description |
---|
head | ID of the heading to filter by (a parent will include all child heading items) (default 0) {integer}. |
cats | An array of category IDs to show (empty shows all). {JSON|JSON string|array} |
unq | ID of the item to filter by. {integer} |
del | Set to false to hide deleted items. {boolean} |
_search | Set to 'true' to enable further filtering (optional). {boolean} |
TITLE | Name to filter by (optional). {string} |
ALT_TITLE | Name to filter by (optional). {string} |
PART_NUMBER | Part number to filetr by (optional). {string} |
page | The page number of data to return. (optional) {integer} |
rows | How many rows to return (min 20, max 200). (optional) {integer} |
sord | If the data should be ascending (asc) or descending (desc). (optional) {string} |
sidx | The field name to sort by (TITLE, ALT_TITLE, PRICE1, PRICE2, PRICE3, WEIGHT, PART_NUMBER, LOCATION, HEIGHT, LENGTH, WIDTH, BARCODE, QUANTITY) (optional) {string} |
Return parameters:Name | Description |
---|
heads: [ |
0: { |
LFT | The left value of the category. {integer} |
CATEGORY_ID | The ID of the category. {integer} |
NAME | The name of the category. {string} |
} |
] |
page | The page number returned. {integer} |
records | How many rows in all the pages. {integer} |
total | Total amount of pages for the result. {integer} |
data: [ |
0: { |
ID | The ID of the item (integer). |
QUANTITY | How many are currently on the shelf. {float} |
TITLE | Name of the item. {string} |
ALT_TITLE | The alternative name of the item. {string} |
CATEGORY_ID | The category ID of the item. {integer} |
PRICE1 | Price A of the item. {float} |
PRICE2 | Price B of the item. {float} |
PRICE3 | Price C of the item. {float} |
MAX_DISCOUNT | The maximum discount percentage allowed for the item (optional, 0 to 100). {float} |
VAT_RATE | The tax/GST/VAT type to use. {integer} |
STATUS | The status index of the item (0=Active, 1=Hidden in picklist, 2=Deleted)(optional). {float} |
IMAGE_ID | The ID of the image for the item. {integer} |
MEMO | The memo of the item. {string} |
COST_PRICE | The cost to rent this item in. {float} |
BOUGHT_FROM | The name of the supplier the item was bought from. {string} |
WEIGHT | The weight of the item in KG. {float} |
WIDTH | The width of the item in meters. {float} |
LENGTH | The length of the item in meters. {float} |
HEIGHT | The height of the item in meters. {float} |
VOLUME | The volume of the item in m3. {float} |
LOCATION | The location description of the item in the warehouse, like shelf number. {string} |
ACC_NOMINAL | The sales nominal group ID for the item. {integer} |
ACC_NOMINAL_PO | The purchase nominal group ID for the item. {integer} |
BARCODE | The group barcode of the item (optional). {string} |
PART_NUMBER | The part number of the item. {string} |
COUNTRY_ORIGIN | The country of origin of the item. Used on carnet documents. {string} |
HS_CODE | The customs code of the item. {string} |
EXCLUDE_FROM_WEBSHOP | For exclude the item from webshop. {integer} |
REORDER_LEVEL | The reorder level the item has to be to appear in the reorder report. {float} |
REORDER_QTY | The quantity to reorder on each purchase. {float} |
DEPOT_LIMITS | An array or string of depot ID's the item is limited to. {array or array-string |
FLAG | The deafult flag to set when adding a new item into a supplying list (0=none, 1=Not important, 2=Important & 3=Technical). {integer} |
CUSTOM_FIELDS | Custom fields of the item {array}. |
crumbs | The breadcrumb details of the category the item is in {JSON array} |
} |
] |
error | Set if an error has occurred, either an error message or error number. |
Get sales stock
DEPRICATED Get a list of sales stock items (this will soon be changing).
get/modules/consumables/list.v1.php
Send parameters:Name | Description |
---|
head | ID of the heading to filter by (a parent will include all child heading items) (default 0) {integer}. |
cats | An array of category IDs to show (empty shows all). {JSON|JSON string|array} |
unq | ID of the item to filter by. {integer} |
del | Set to false to hide deleted items. {boolean} |
_search | Set to 'true' to enable further filtering (optional). {boolean} |
TITLE | Name to filter by (optional). {string} |
ALT_TITLE | Name to filter by (optional). {string} |
PART_NUMBER | Part number to filetr by (optional). {string} |
page | The page number of data to return. (optional) {integer} |
rows | How many rows to return (min 20, max 200). (optional) {integer} |
sord | If the data should be ascending (asc) or descending (desc). (optional) {string} |
sidx | The field name to sort by (TITLE, ALT_TITLE, PRICE1, PRICE2, PRICE3, WEIGHT, PART_NUMBER, LOCATION, HEIGHT, LENGTH, WIDTH, BARCODE, QUANTITY) (optional) {string} |
Return parameters:Name | Description |
---|
heads: [ |
0: { |
LFT | The left value of the category. {integer} |
CATEGORY_ID | The ID of the category. {integer} |
NAME | The name of the category. {string} |
} |
] |
page | The page number returned. {integer} |
records | How many rows in all the pages. {integer} |
total | Total amount of pages for the result. {integer} |
rows: [ |
0: { |
id | The ID of the item (integer). |
cell: [ |
0: { |
id | The ID of the item (integer). |
TITLE | Name of the item. {string} |
ALT_TITLE | The alternative name of the item. {string} |
PRICE1 | Price A of the item. {float} |
PRICE2 | Price B of the item. {float} |
PRICE3 | Price C of the item. {float} |
WEIGHT | The weight of the item in KG. {float} |
PART_NUMBER | The part number of the item. {string} |
LOCATION | The location description of the item in the warehouse, like shelf number (optional). {string} |
WIDTH | The width of the item in meters. {float} |
LENGTH | The length of the item in meters. {float} |
HEIGHT | The height of the item in meters. {float} |
BARCODE | The group barcode of the item. {string} |
data: { |
ID | The ID of the item (integer). |
QUANTITY | How many are currently on the shelf. {float} |
TITLE | Name of the item. {string} |
ALT_TITLE | The alternative name of the item. {string} |
CATEGORY_ID | The category ID of the item. {integer} |
PRICE1 | Price A of the item. {float} |
PRICE2 | Price B of the item. {float} |
PRICE3 | Price C of the item. {float} |
MAX_DISCOUNT | The maximum discount percentage allowed for the item (optional, 0 to 100). {float} |
VAT_RATE | The tax/GST/VAT type to use. {integer} |
STATUS | The status index of the item (0=Active, 1=Hidden in picklist, 2=Deleted)(optional). {float} |
IMAGE_ID | The ID of the image for the item. {integer} |
MEMO | The memo of the item. {string} |
COST_PRICE | The cost to rent this item in. {float} |
BOUGHT_FROM | The name of the supplier the item was bought from. {string} |
WEIGHT | The weight of the item in KG. {float} |
WIDTH | The width of the item in meters. {float} |
LENGTH | The length of the item in meters. {float} |
HEIGHT | The height of the item in meters. {float} |
VOLUME | The volume of the item in m3. {float} |
LOCATION | The location description of the item in the warehouse, like shelf number. {string} |
ACC_NOMINAL | The sales nominal group ID for the item. {integer} |
ACC_NOMINAL_PO | The purchase nominal group ID for the item. {integer} |
BARCODE | The group barcode of the item (optional). {string} |
PART_NUMBER | The part number of the item. {string} |
COUNTRY_ORIGIN | The country of origin of the item. Used on carnet documents. {string} |
HS_CODE | The customs code of the item. {string} |
EXCLUDE_FROM_WEBSHOP | For exclude the item from webshop. {integer} |
REORDER_LEVEL | The reorder level the item has to be to appear in the reorder report. {float} |
REORDER_QTY | The quantity to reorder on each purchase. {float} |
DEPOT_LIMITS | An array or string of depot ID's the item is limited to. {array or array-string |
FLAG | The deafult flag to set when adding a new item into a supplying list (0=none, 1=Not important, 2=Important & 3=Technical). {integer} |
CUSTOM_FIELDS | Custom fields of the item {array}. |
crumbs | The breadcrumb details of the category the item is in {JSON array} |
} |
} |
] |
} |
] |
error | Set 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:Name | Description |
---|
ID | ID of the sales stock item or zero creates a new item (default 0) {integer}. |
TITLE | Name of the item (required for new). {string[85]} |
ALT_TITLE | The alternative name of the item (optional). {string[85]} |
BARCODE | The group barcode of the item (optional). {string[45]} |
CATEGORY_ID | This is the ID of the category. {integer} |
DESCRIPTION | The description of the item (optional). {string} |
PRICE1 | Price A of the item (optional). {float} |
PRICE2 | Price B of the item (optional). {float} |
PRICE3 | Price C of the item (optional). {float} |
MAX_DISCOUNT | The maximum discount percentage allowed for the item (optional, 0 to 100). {float} |
VAT_RATE | The tax/GST/VAT type to use (optional). {integer} |
STATUS | The status index of the item (0=Active, 1=Hidden in picklist, 2=Deleted)(optional). {float} |
MEMO | The memo of the item (optional). {string} |
COST_PRICE | The cost to rent this item in (optional). {float} |
WEIGHT | The weight of the item in KG (optional). {float} |
WIDTH | The width of the item in meters (optional). {float} |
LENGTH | The length of the item in meters (optional). {float} |
HEIGHT | The height of the item in meters (optional). {float} |
LOCATION | The location description of the item in the warehouse, like shelf number (optional). {string[45]} |
BOUGHT_FROM | The name of merchant where the item is bought from (optional). {string} |
REORDER_LEVEL | When this quantity or lower is all that remains in stock it will appear in the shortfall report (optional). {float/empty string} |
REORDER_QTY | How many need should be re-ordered when re-ordering. {float} |
ACC_NOMINAL | The sales nominal group ID for the item (optional). {integer} |
ACC_NOMINAL_PO | The purchase nominal group ID for the item (optional). {integer} |
PART_NUMBER | The part number of the item (optional). {string[25]} |
COUNTRY_ORIGIN | The country of origin of the item. Used on carnet documents. (optional). {string[45]} |
HS_CODE | The customs code of the item. {string} |
EXCLUDE_FROM_WEBSHOP | For exclude the item from webshop. {integer} |
FLAG | The 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_LIMITS | An array or string of depot ID's the item is limited to (optional). {array or array-string} |
IMAGE_ID | The ID of the image for the item (optional). {integer} |
IMAGE | The image data of the new image (optional). {BASE 64} |
CUSTOM_FIELDS | Custom fields of the item (array). |
Return parameters:Name | Description |
---|
heads: [ |
0: { |
LFT | The left value of the category. {integer} |
CATEGORY_ID | The ID of the category. {integer} |
NAME | The name of the category. {string} |
} |
] |
page | The page number returned. {integer} |
records | How many rows in all the pages. {integer} |
total | Total amount of pages for the result. {integer} |
rows: [ |
0: { |
id | The ID of the item (integer). |
cell: [ |
0: { |
id | The ID of the item (integer). |
TITLE | Name of the item. {string} |
ALT_TITLE | The alternative name of the item. {string} |
PRICE1 | Price A of the item. {float} |
PRICE2 | Price B of the item. {float} |
PRICE3 | Price C of the item. {float} |
WEIGHT | The weight of the item in KG. {float} |
PART_NUMBER | The part number of the item. {string} |
LOCATION | The location description of the item in the warehouse, like shelf number (optional). {string} |
WIDTH | The width of the item in meters. {float} |
LENGTH | The length of the item in meters. {float} |
HEIGHT | The height of the item in meters. {float} |
BARCODE | The group barcode of the item. {string} |
data: { |
ID | The ID of the item (integer). |
QUANTITY | How many are currently on the shelf. {float} |
TITLE | Name of the item. {string} |
ALT_TITLE | The alternative name of the item. {string} |
CATEGORY_ID | The category ID of the item. {integer} |
PRICE1 | Price A of the item. {float} |
PRICE2 | Price B of the item. {float} |
PRICE3 | Price C of the item. {float} |
MAX_DISCOUNT | The maximum discount percentage allowed for the item (optional, 0 to 100). {float} |
VAT_RATE | The tax/GST/VAT type to use. {integer} |
STATUS | The status index of the item (0=Active, 1=Hidden in picklist, 2=Deleted)(optional). {float} |
IMAGE_ID | The ID of the image for the item. {integer} |
MEMO | The memo of the item. {string} |
COST_PRICE | The cost to rent this item in. {float} |
BOUGHT_FROM | The name of the supplier the item was bought from. {string} |
WEIGHT | The weight of the item in KG. {float} |
WIDTH | The width of the item in meters. {float} |
LENGTH | The length of the item in meters. {float} |
HEIGHT | The height of the item in meters. {float} |
VOLUME | The volume of the item in m3. {float} |
LOCATION | The location description of the item in the warehouse, like shelf number. {string} |
ACC_NOMINAL | The sales nominal group ID for the item. {integer} |
ACC_NOMINAL_PO | The purchase nominal group ID for the item. {integer} |
BARCODE | The group barcode of the item (optional). {string} |
PART_NUMBER | The part number of the item. {string} |
COUNTRY_ORIGIN | The country of origin of the item. Used on carnet documents. {string} |
HS_CODE | The customs code of the item. {string} |
EXCLUDE_FROM_WEBSHOP | For exclude the item from webshop. {integer} |
REORDER_LEVEL | The reorder level the item has to be to appear in the reorder report. {float} |
REORDER_QTY | The quantity to reorder on each purchase. {float} |
DEPOT_LIMITS | An array or string of depot ID's the item is limited to. {array or array-string |
FLAG | The deafult flag to set when adding a new item into a supplying list (0=none, 1=Not important, 2=Important & 3=Technical). {integer} |
CUSTOM_FIELDS | Custom fields of the item {array}. |
crumbs | The breadcrumb details of the category the item is in {JSON array} |
} |
} |
] |
} |
] |
error | Set 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:Name | Description |
---|
id | The ID of the existing adjustment or zero (default) for new (optional). {integer} |
qty | The quantity to adjust the stock level by (compulsory). {float} |
cons | The ID of the Sales Item (compulsory). {integer} |
details | A short description of the reason for the stock adjustment (compulsory). {string} |
local | The local time of the user (not needed or used) {datetime string} |
tz | The timezone of the user (not needed or used) {string} |
Return parameters:Name | Description |
---|
page | How many pages in total for all of the rows |
records | How many rows in total found. |
total | How many pages there are of data. |
rows: [ |
0: { |
id | The ID of the item (integer). |
cell: [ |
0: { |
id | The ID of the adjustment (integer). |
kind | What is the adjustment. {integer} |
date | The date and time of the adjustment (ISO). {string} |
qty | The amount of the adjustment. {float} |
details | A short description of the adjustment. {string} |
user | Name of the user who did the adjustment. {string} |
data: { |
ID | The ID of the adjustment (integer). |
KIND | What is the adjustment. {integer} |
JOB | The job ID the adjustment is assigned to. {integer} |
PROJECT | The job ID the adjustment is assigned to. {integer} |
USER | ID of the user who did the adjustment. {integer} |
QTY | The amount of the adjustment. {float} |
DETAILS | A short description of the adjustment. {string} |
DATE | The date and time of the adjustment (ISO). {string} |
REPAIR | The ID of the repair/maintenance it was used in. {integer} |
} |
} |
] |
} |
] |
error | Set if an error has occurred, either an error message or error number. |
Address Book
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:Name | Description |
---|
id | ID 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}. |
cid | ID of the company to delete or the company the person is attached to (compulsory) {integer} |
con | If 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_webhook | This will prevent a webhook from being triggered for the event. |
token | The API token is required if being called from outside of HireHop (optional) {string} |
Return parameters:Name | Description |
---|
success | Will be present and true if all went well {boolean} |
error | Will have the error number or message {integer or string} |
confirm | Will be present and true if the 'con' field needs to be set to 1 to delete a company. {boolean} |
name_count | How many people will be deleted in the company. Only present if confirm set. {integer} |
names | A 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:Name | Description |
---|
waypoint_id | ID of the waypoint to get (optional) {integer}. |
route_id | ID of the route (vehicle) to get (optional) {integer}. |
start | The date (YYYY-MM-DD hh:mm:ss) to limit the search to (compulsory if no route_id or waypoint_id) {string} |
depot | The depot ID to limit the search to (optional) {integer} |
Return parameters:Name | Description |
---|
waypoints: { |
type | Will be 'waypoint' {string} |
ID | Unique ID of the waypoint |
JOB_ID | The job number |
SUB_ID | The unique ID of the purchase order |
DEPOT_ID | The unique ID of the root depot (not a virtual depot) |
ROUTE_ID | The unique ID of the vehicle route it is attached to. |
DIRECTION | Which direction it is going (0=delivery, 1=collection, 2=service) |
DATE | The date and time the waypoint needs to take place |
POSITION | The numeric order in a vehicle that it will be placed. |
ADDRESS | The waypoint address. |
OWNER_ADDRESS | The delivery address of the job or subcontractor that the waypoint belongs to. |
LATITUDE | The latitude of the waypoint. |
LONGITUDE | The longitude of the waypoint. |
DESCRIPTION | A brief description of the waypoint. |
WEIGHT | Weight set by user assigned to the vehicle in kg |
OWNER_WEIGHT | Sum of weight of all items in the job or purchase order in kg |
MEMO | A memo of the waypoint |
CUSTOM_FIELDS | The custom fields attached to the waypoint. |
JOB_NAME | The name of the job attached to the waypoint |
VENUE | The delivery address name of the destination. |
DEPOT_NAME | The name of the depot the waypoint is part of. |
OUT_DATE | The outgoing date of the job the waypoint is part of. |
JOB_DATE | The job start date of the job the waypoint is part of. |
JOB_END | The job end date of the job the waypoint is part of. |
RETURN_DATE | The date the equipment will be returned in the job the waypoint is part of. |
JOB_CUSTOM_FIELDS | The custom fields attached to the waypoint's job. |
items: [ |
0: { |
item_index | A unique index for the tree node. {string} |
ID | ID of the item with a prefix {string} |
TYPE | What type it is (0=heading, 1=sales, 2=stock, 3=custom, 4=labour, 5=comment). {integer} |
QUANTITY | How many of the line item {float} |
NAME | Name of the item {string} |
ADDITIONAL | Additional note for the item {string} |
MEMO | Memo of the item {string} |
WEIGHT | Total weight of all the items {float} |
AUTOPULL | The autopull ID if the item is an autopull {integer} |
LFT | Left nested tree value {integer} |
RGT | Right nested tree value {integer} |
} |
] |
} |
routes: { |
type | Will be 'route' {string} |
ID | ID of the route/vehicle {integer} |
VEHICLE_ID | The ID of the vehicle if not a custom one. {integer} |
DRIVER | Driver's user ID assigned to the route/vehicle {integer} |
DRIVER_NAME | Driver's name assigned to the route/vehicle {string} |
DRIVER_EMAIL | Driver's email assigned to the route/vehicle {string} |
DRIVER_TELEPHONE | Driver's telephone number assigned to the route/vehicle {string} |
ASSISTANT_1 | First assistant's user ID assigned to the route/vehicle {integer} |
ASSISTANT_1_NAME | First assistant's name assigned to the route/vehicle {string} |
ASSISTANT_1_EMAIL | First assistant's email assigned to the route/vehicle {string} |
ASSISTANT_1_TELEPHONE | First assistant's telephone number assigned to the route/vehicle {string} |
ASSISTANT_2 | Second assistant's user ID assigned to the route/vehicle {integer} |
ASSISTANT_2_NAME | Second assistant's name assigned to the route/vehicle {string} |
ASSISTANT_2_EMAIL | Second assistant's email assigned to the route/vehicle {string} |
ASSISTANT_2_TELEPHONE | Second assistant's telephone number assigned to the route/vehicle {string} |
DESCRIPTION | Description of the route/vehicle {string} |
MEMO | Memo of the route/vehicle {multiline string} |
VEHICLE_REG | Registration of the vehicle {string} |
DEPOT_ID | Depot ID the vehicle/route is assigned to {integer} |
DEPOT_NAME | Name of the depot the vehicle/route is assigned to {string} |
DATE | Date the vehicle/route is set to {string} |
DATA | Additional vehicle/route data {array} |
CUSTOM_FIELDS | Custom fields for the vehicle/route {array} |
} |
error | Set 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:Name | Description |
---|
waypoint | ID of a waypoint that is part of a route (required if no route or registration) {integer} |
route_ids | ID or IDs of the routes the update is for (required if no waypoint or registration) {integer|JSON|array} |
registration | If no waypoint or route, the coordinates will be saved to the vehicles with a matching registration. {string} |
latitude | The current latitude sent from the device, otherwise obtained from IP address. (optional). {float} |
longitude | The current longitude sent from the device, otherwise obtained from IP address. (optional). {float} |
time | The time the geolocation was taken in UTC. {ISO datetime string} |
geolocation_time | Same as 'time'. {ISO datetime string} |
local | The local time of the client device (if time not set, this will be used). {ISO datetime string} |
tz | The timezone of the client device (required if time or local set). {string} |
Return parameters:Name | Description |
---|
success: { |
TRACKING_LATITUDE | The current latitude sent from the device, otherwise obtained from IP address. (optional). {float} |
TRACKING_LONGITUDE | The current longitude sent from the device, otherwise obtained from IP address. (optional). {float} |
TRACKING_TIME | The time the geolocation was taken. {ISO datetime string} |
TRACKING_USER_ID | The ID of the user. {integer} |
} |
error | Set 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:Name | Description |
---|
ID | ID of the waypoint to save (required) {integer}. |
STATUS | Status value of the new status (required) {float}. |
Return parameters:Name | Description |
---|
ID | The ID of the waypoint) {integer}. |
STATUS | The status of the waypoint {integer} |
error | Set 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:Name | Description |
---|
ID | ID of the empty vehicle route to delete (compulsory) {integer}. |
Return parameters:Name | Description |
---|
ID | Old ID of the deleted route |
error | Set 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:Name | Description |
---|
ID | ID of the vehicle to delete (compulsory) {integer}. |
Return parameters:Name | Description |
---|
ID | Old ID of the deleted vehicle |
error | Set 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:Name | Description |
---|
ID | ID of the empty vehicle route to delete (compulsory) {integer}. |
Return parameters:Name | Description |
---|
ID | Old ID of the deleted vehicle |
error | Set 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:Name | Description |
---|
id | ID of the vehicle route (required). {integer} |
optimize | Arrange the waypoints in a more efficient order (0=no [default], 1=yes) {integer} |
start_at | What time to start calculating the directions from {datetime string} |
Return parameters:Name | Description |
---|
DIRECTIONS | A Google Maps directions JSON object. |
waypoints_data: [ |
0: { |
ID | ID of the waypoint |
LATITUDE | Latitude of the coordinates of the waypoint |
LONGITUDE | Longitude of the coordinates of the waypoint |
ADDRESS | Address of the coordinates of the waypoint |
POSITION | Position in the order of deliveries |
} |
] |
error | Set 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:Name | Description |
---|
ids | An array of a maximum of 15 waypoint IDs (compulsory) {JSON or array}. |
region | The region ccTLD code to prioritise (optional default 'us' for USA) {string} |
Return parameters:Name | Description |
---|
waypoints | Array of waypoint objects that got a successful geolocation with ID, LONGITUDE, LATITUDE and ADDRESS {array} |
error | Set 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:Name | Description |
---|
route_id | ID of the route to get. This will limit the results to just this route (optional). {integer}. |
start | The start date and time (YYYY-MM-DD hh:mm:ss) of the search criteria (compulsory if no route_id) {string} |
finish | The finish date and time (YYYY-MM-DD hh:mm:ss) of the search criteria (compulsory if no route_id) {string} |
depot | The depot ID to limit the search to (0 is all depots) (optional, default 0) {integer} |
local | The local time of the client device (not used). {ISO datetime string} |
tz | The timezone of the client device (not used). {string} |
Return parameters:Name | Description |
---|
routes: { |
ID | ID of the route/vehicle {integer} |
TRACKING_LATITUDE | The last known latitude of the vehicle. {float} |
TRACKING_LONGITUDE | The last known longitude of the vehicle. {float} |
DATA | Additional vehicle/route data {array} |
CUSTOM_FIELDS | Custom fields for the vehicle/route {array} |
} |
error | Set 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:Name | Description |
---|
JOB_ID | ID of the job (optional) {integer}. |
SUB_ID | ID of the purchase order (optional) {integer}. |
Return parameters:Name | Description |
---|
waypoints: { |
ID | Unique ID of the waypoint |
JOB_ID | The job number |
SUB_ID | The unique ID of the purchase order |
DEPOT_ID | The unique ID of the root depot (not a virtual depot) |
ROUTE_ID | The unique ID of the vehicle route it is attached to or NULL for unasigned. |
DIRECTION | Which direction it is going (0=delivery, 1=collection, 2=service) |
DATE | The date and time the waypoint needs to take place |
POSITION | The numeric order in a vehicle that it will be done. |
ADDRESS | The waypoint address. |
OWNER_ADDRESS | The delivery address of the job or subcontractor that the waypoint belongs to. |
LATITUDE | The latitude of the waypoint. |
LONGITUDE | The longitude of the waypoint. |
DESCRIPTION | A brief description of the waypoint. |
WEIGHT | Weight set by user assigned to the vehicle in kg |
OWNER_WEIGHT | Sum of weight of all items in the job or purchase order in kg. {float} |
MEMO | A memo of the waypoint |
CUSTOM_FIELDS | The custom fields attached to the waypoint. |
JOB_NAME | The name of the job attached to the waypoint |
VENUE | The delivery address name of the destination. |
DEPOT_NAME | The name of the depot the waypoint is part of. |
OUT_DATE | The outgoing date of the job the waypoint is part of. |
JOB_DATE | The job start date of the job the waypoint is part of. |
JOB_END | The job end date of the job the waypoint is part of. |
RETURN_DATE | The date the equipment will be returned in the job the waypoint is part of. |
JOB_CUSTOM_FIELDS | The custom fields attached to the waypoint's job. |
DRIVER | The name of the driver if one has been assigned |
ASSISTANT_1 | The name of the first assistant if one has been assigned |
ASSISTANT_2 | The name of the second assistant if one has been assigned |
} |
owner_weight | Sum of weight of all items in the job or purchase order in kg. {float} |
error | Set 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:Name | Description |
---|
waypoint_id | ID of the waypoint to get (optional) {integer}. |
route_id | ID of the route (vehicle) to get (optional) {integer}. |
start | The start date and time (YYYY-MM-DD hh:mm:ss) of the search criteria (compulsory if no route_id or waypoint_id) {string} |
finish | The finish date and time (YYYY-MM-DD hh:mm:ss) of the search criteria (compulsory if no route_id or waypoint_id) {string} |
depot | The depot ID to limit the search to (0 is all depots) (optional, default 0) {integer} |
Return parameters:Name | Description |
---|
waypoints: { |
type | Will be 'waypoint' {string} |
ID | Unique ID of the waypoint |
JOB_ID | The job number the waypoint is linked to. |
SUB_ID | The unique ID of the purchase order |
DEPOT_ID | The unique ID of the root depot (not a virtual depot) |
ROUTE_ID | The unique ID of the vehicle route it is attached to or NULL for unasigned. |
DIRECTION | Which direction it is going (0=delivery, 1=collection, 2=service) |
DATE | The date and time the waypoint needs to take place |
POSITION | The numeric order in a vehicle that it will be done. |
ADDRESS | The waypoint address. |
OWNER_ADDRESS | The delivery address of the job or subcontractor that the waypoint belongs to. |
LATITUDE | The latitude of the waypoint. |
LONGITUDE | The longitude of the waypoint. |
DESCRIPTION | A brief description of the waypoint. |
WEIGHT | Weight set by user assigned to the vehicle in kg |
OWNER_WEIGHT | Sum of weight of all items in the job or purchase order in kg |
MEMO | A memo of the waypoint |
CUSTOM_FIELDS | The custom fields attached to the waypoint. |
JOB_NAME | The name of the job attached to the waypoint |
VENUE | The delivery address name of the destination. |
DEPOT_NAME | The name of the depot the waypoint is part of. |
OUT_DATE | The outgoing date of the job the waypoint is part of. |
JOB_DATE | The job start date of the job the waypoint is part of. |
JOB_END | The job end date of the job the waypoint is part of. |
RETURN_DATE | The date the equipment will be returned in the job the waypoint is part of. |
JOB_CUSTOM_FIELDS | The custom fields attached to the waypoint's job. |
} |
routes: { |
type | Will be 'route' {string} |
ID | ID of the route/vehicle {integer} |
DRIVER | Driver's user ID assigned to the route/vehicle {integer} |
DRIVER_NAME | Driver's name assigned to the route/vehicle {string} |
DRIVER_EMAIL | Driver's email assigned to the route/vehicle {string} |
DRIVER_TELEPHONE | Driver's telephone number assigned to the route/vehicle {string} |
ASSISTANT_1 | First assistant's user ID assigned to the route/vehicle {integer} |
ASSISTANT_1_NAME | First assistant's name assigned to the route/vehicle {string} |
ASSISTANT_1_EMAIL | First assistant's email assigned to the route/vehicle {string} |
ASSISTANT_1_TELEPHONE | First assistant's telephone number assigned to the route/vehicle {string} |
ASSISTANT_2 | Second assistant's user ID assigned to the route/vehicle {integer} |
ASSISTANT_2_NAME | Second assistant's name assigned to the route/vehicle {string} |
ASSISTANT_2_EMAIL | Second assistant's email assigned to the route/vehicle {string} |
ASSISTANT_2_TELEPHONE | Second assistant's telephone number assigned to the route/vehicle {string} |
DESCRIPTION | Description of the route/vehicle {string} |
MEMO | Memo of the route/vehicle {multiline string} |
VEHICLE_REG | Registration of the vehicle {string} |
DEPOT_ID | Depot ID the vehicle/route is assigned to {integer} |
DEPOT_NAME | Name of the depot the vehicle/route is assigned to {string} |
DATE | Date the vehicle/route is set to {string} |
TRACKING_LATITUDE | The last known latitude of the vehicle. {float} |
TRACKING_LONGITUDE | The last known longitude of the vehicle. {float} |
TRACKING_TIME | The time the last known coordinates of the vehicle were obtained in UTC. {datetime string} |
DATA | Additional vehicle/route data {array} |
CUSTOM_FIELDS | Custom fields for the vehicle/route {array} |
} |
vehicles: [ |
0: { |
ID | ID of the vehicle in the list {integer} |
DESCRIPTION | Description of the route/vehicle {string} |
MEMO | Memo of the route/vehicle {multiline string} |
VEHICLE_REG | Registration of the vehicle {string} |
STATUS | Status of the vehicle (0=Available, 1=Unavaileable, 2=Sold {decimal} |
DEPOT_ID | Depot ID the vehicle/route is assigned to {integer} |
CUSTOM_FIELDS | Custom fields for the vehicle/route {array} |
} |
] |
error | Set 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:Name | Description |
---|
ID | ID of the waypoint (compulsory) {integer}. |
LATITUDE | Latitude of the waypoint (compulsory) {float} |
LONGITUDE | Longitude of the waypoint (compulsory) {float} |
Return parameters:Name | Description |
---|
waypoint | ID of the successfully saved waypoint {integer} |
error | Set 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:Name | Description |
---|
ids | ID of the waypoints to re-assign (compulsory) {integer or array of integers}. |
sibling | ID of the sibling it is to be inserted after {integer}. |
route_id | ID of the vehicle route the waypoint is to be assigned to (0 means no route) {integer} |
Return parameters:Name | Description |
---|
ROUTE_ID | The ID of the new vehicle route |
error | Set 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:Name | Description |
---|
ID | ID of the vehicle route to edit or 0 to add a new one (optional, default 0) {integer}. |
STATUS | Status of the waypoint 0=Active, 1=Delivered (optional, default 0) {integer} |
DESCRIPTION | Description of the vehicle route (optional but recommended) {string} |
MEMO | Memo for the waypoint (optional) {multiline string} |
VEHICLE_REG | Registration of the vehicle (optional but recommended) {string} |
WEIGHT | The weight of the vehicle in KG. {float} |
DATE | The date the route is due to take place (compulsory) {date} |
DEPOT_ID | Depot ID the delivery is linked to (compulsory for new) {integer} |
USER_ID | User ID assigned to the route/vehicle {integer} |
ASSISTANT_1 | First assistant's user ID assigned to the route/vehicle {integer} |
ASSISTANT_2 | Second assistant's user ID assigned to the route/vehicle {integer} |
CUSTOM_FIELDS | The custom fields JSON (optional) {json} |
Return parameters:Name | Description |
---|
ID | ID of the route/vehicle {integer} |
DRIVER | Driver's user ID assigned to the route/vehicle {integer} |
DRIVER_NAME | Driver's name assigned to the route/vehicle {string} |
DRIVER_EMAIL | Driver's email assigned to the route/vehicle {string} |
DRIVER_TELEPHONE | Driver's telephone number assigned to the route/vehicle {string} |
ASSISTANT_1 | First assistant's user ID assigned to the route/vehicle {integer} |
ASSISTANT_1_NAME | First assistant's name assigned to the route/vehicle {string} |
ASSISTANT_1_EMAIL | First assistant's email assigned to the route/vehicle {string} |
ASSISTANT_1_TELEPHONE | First assistant's telephone number assigned to the route/vehicle {string} |
ASSISTANT_2 | Second assistant's user ID assigned to the route/vehicle {integer} |
ASSISTANT_2_NAME | Second assistant's name assigned to the route/vehicle {string} |
ASSISTANT_2_EMAIL | Second assistant's email assigned to the route/vehicle {string} |
ASSISTANT_2_TELEPHONE | Second assistant's telephone number assigned to the route/vehicle {string} |
DESCRIPTION | Description of the route/vehicle {string} |
MEMO | Memo of the route/vehicle {multiline string} |
VEHICLE_REG | Registration of the vehicle {string} |
WEIGHT | The weight of the vehicle in KG. {float} |
DEPOT_ID | Depot ID the vehicle/route is assigned to {integer} |
DEPOT_NAME | Name of the depot the vehicle/route is assigned to {string} |
DATE | Date the vehicle/route is set to {string} |
DATA | Additional vehicle/route data {array} |
CUSTOM_FIELDS | Custom fields for the vehicle/route {array} |
error | Set 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:Name | Description |
---|
ID | ID of the vehicle to edit or 0 to add a new one (optional, default 0) {integer}. |
DESCRIPTION | Description of the vehicle (compulsory) {string} |
MEMO | Memo for the vehicle (optional) {multiline string} |
VEHICLE_REG | Registration of the vehicle (optional but recommended) {string} |
WEIGHT | The weight of the vehicle in KG. {float} |
DEPOT_ID | Depot ID the vehicle is linked to (compulsory for new) {integer} |
STATUS | Status of the vehicle 0=Available, 1=Unavailable (optional, default 0) {integer} |
CUSTOM_FIELDS | The custom fields JSON (optional) {json} |
Return parameters:Name | Description |
---|
ID | ID of the vehicle {integer} |
DESCRIPTION | Description of the vehicle {string} |
MEMO | Memo of the vehicle {multiline string} |
VEHICLE_REG | Registration of the vehicle {string} |
WEIGHT | The weight of the vehicle in KG. {float} |
DEPOT_ID | Depot ID the vehicle is assigned to {integer} |
STATUS | Status of the vehicle (0=available, 1=unavailable) {integer} |
CUSTOM_FIELDS | Custom fields for the vehicle {array} |
error | Set 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:Name | Description |
---|
ID | ID of the waypoint to edit or 0 to add a new one (optional, default 0) {integer}. |
JOB_ID | Job number the waypoint is linked to (optional) {integer} |
SUB_ID | Purchase order ID the waypoint is linked to (optional) {integer} |
DEPOT_ID | Depot ID the delivery is linked to (compulsory for new) {integer} |
ROUTE_ID | Vehicle route the waypoint is assigned to. 0 removes it from a vehicle route (optional, defgault 0) (integer) |
DESCRIPTION | Description of the waypoint (optional but recommended) {string} |
DIRECTION | The waypoint direction (0=Delivery, 1=Collection, 2=Service, 100=Comment or others for custom values) (optional, default 0) {integer} |
STATUS | Status of the waypoint 0=Active, 1=Delivered (optional, default 0) {integer} |
POSITION | The position in the order of deliveries of the waypoint in the route (optional, default 0) {integer} |
DATE | The date and time the delivery or collection is due to take place (compulsory) {datetime} |
ADDRESS | Address of the waypoint (optional but recommended) {multiline string} |
WEIGHT | Weight set by user assigned to the vehicle in kg. An empty string means use the job or PO total weight. {float or empty string} |
LATITUDE | The latitude of the delivery location (optional but recommended) {float} |
LONGITUDE | The longitude of the delivery location (optional but recommended) {float} |
MEMO | Memo for the waypoint (optional) {multiline string} |
CUSTOM_FIELDS | The custom fields JSON (optional) {json} |
Return parameters:Name | Description |
---|
ID | Unique ID of the waypoint |
JOB_ID | The job number |
SUB_ID | The unique ID of the purchase order |
DEPOT_ID | The unique ID of the root depot (not a virtual depot) |
ROUTE_ID | The unique ID of the vehicle route it is attached to or NULL for unasigned. |
DIRECTION | Which direction it is going (0=delivery, 1=collection, 2=service, 100=comment) |
DATE | The date and time the waypoint needs to take place |
POSITION | The numeric order in a vehicle that it will be done. |
ADDRESS | The waypoint address. |
OWNER_ADDRESS | The delivery address of the job or subcontractor that the waypoint belongs to. |
LATITUDE | The latitude of the waypoint. |
LONGITUDE | The longitude of the waypoint. |
DESCRIPTION | A brief description of the waypoint. |
WEIGHT | Weight set by user assigned to the vehicle in kg |
OWNER_WEIGHT | Sum of weight of all items in the job or purchase order in kg |
MEMO | A memo of the waypoint |
CUSTOM_FIELDS | The custom fields attached to the waypoint. |
JOB_NAME | The name of the job attached to the waypoint |
VENUE | The delivery address name of the destination. |
DEPOT_NAME | The name of the depot the waypoint is part of. |
OUT_DATE | The outgoing date of the job the waypoint is part of. |
JOB_DATE | The job start date of the job the waypoint is part of. |
JOB_END | The job end date of the job the waypoint is part of. |
RETURN_DATE | The date the equipment will be returned in the job the waypoint is part of. |
JOB_CUSTOM_FIELDS | The custom fields attached to the waypoint's job. |
error | Set 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:Name | Description |
---|
id | ID of the waypoint to duplicate {integer}. |
multiply | How many times the waypoint will be duplicated (1 to 99) {integer} |
period | The period to multiply by {string} |
local | The client browser local date and time (optional). {string} |
tz | The client browser local timezone (optional). {string} |
Return parameters:Name | Description |
---|
waypoints: { |
ID | Unique ID of the waypoint |
JOB_ID | The job number |
SUB_ID | The unique ID of the purchase order |
DEPOT_ID | The unique ID of the root depot (not a virtual depot) |
ROUTE_ID | The unique ID of the vehicle route it is attached to or NULL for unasigned. |
DIRECTION | Which direction it is going (0=delivery, 1=collection, 2=service) |
DATE | The date and time the waypoint needs to take place |
POSITION | The numeric order in a vehicle that it will be done. |
ADDRESS | The waypoint address. |
OWNER_ADDRESS | The delivery address of the job or subcontractor that the waypoint belongs to. |
LATITUDE | The latitude of the waypoint. |
LONGITUDE | The longitude of the waypoint. |
DESCRIPTION | A brief description of the waypoint. |
WEIGHT | Weight set by user assigned to the vehicle in kg |
OWNER_WEIGHT | Sum of weight of all items in the job or purchase order in kg |
MEMO | A memo of the waypoint |
CUSTOM_FIELDS | The custom fields attached to the waypoint. |
JOB_NAME | The name of the job attached to the waypoint |
VENUE | The delivery address name of the destination. |
DEPOT_NAME | The name of the depot the waypoint is part of. |
OUT_DATE | The outgoing date of the job the waypoint is part of. |
JOB_DATE | The job start date of the job the waypoint is part of. |
JOB_END | The job end date of the job the waypoint is part of. |
RETURN_DATE | The date the equipment will be returned in the job the waypoint is part of. |
JOB_CUSTOM_FIELDS | The custom fields attached to the waypoint's job. |
} |
error | Set 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:Name | Description |
---|
from | The date the report is from (compulsory) {string}. |
upto | The date the report is upto (compulsory) {string}. |
depot | The depot ID to report on (default is the user depot if not set. 0 is all depots) {integer} |
direction | Which direction it is going (empty=all, 0=delivery, 1=collection, 2=service). {integer} |
Return parameters:Name | Description |
---|
waypoints: [ |
0: { |
ID | Unique ID of the waypoint |
JOB_ID | The job number the waypoint is linked to. |
SUB_ID | The unique ID of the purchase order the waypoint is linked to. |
DEPOT_ID | The unique ID of the root depot (not a virtual depot) |
ROUTE_ID | The unique ID of the vehicle route it is attached to or NULL for unasigned. |
DIRECTION | Which direction it is going (0=delivery, 1=collection, 2=service) |
DATE | The date and time the waypoint needs to take place |
POSITION | The numeric order in the vehicle starting from 0. |
ADDRESS | The waypoint address. |
OWNER_ADDRESS | The delivery address of the job or subcontractor that the waypoint belongs to. |
LATITUDE | The latitude of the waypoint. |
LONGITUDE | The longitude of the waypoint. |
DESCRIPTION | A brief description of the waypoint. |
WEIGHT | Weight set by user assigned to the vehicle in kg |
OWNER_WEIGHT | Sum of weight of all items in the job or purchase order in kg |
MEMO | A memo of the waypoint |
CUSTOM_FIELDS | The custom fields attached to the waypoint. |
JOB_NAME | The name of the job attached to the waypoint |
VENUE | The delivery address name of the destination. |
DEPOT_NAME | The name of the depot the waypoint is part of. |
OUT_DATE | The outgoing date of the job the waypoint is part of. |
JOB_DATE | The job start date of the job the waypoint is part of. |
JOB_END | The job end date of the job the waypoint is part of. |
RETURN_DATE | The date the equipment will be returned in the job the waypoint is part of. |
JOB_CUSTOM_FIELDS | The custom fields attached to the waypoint's job. |
DRIVER | The user ID of the driver. |
DRIVER_NAME | The name of the driver. |
ASSISTANT_1 | The user ID of the first assistant. |
ASSISTANT_1_NAME | The name of the first assistant. |
ASSISTANT_2 | The user ID of the second assistant. |
ASSISTANT_2_NAME | The name of the second assistant. |
VEHICLE_REG | The registration of the vehicle used to do the waypoint |
} |
] |
error | Set 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:Name | Description |
---|
ID | ID of the depot to delete (compulsory). {integer}. |
no_webhook | Set to '1' to prevent a webhook from triggering |
Return parameters:Name | Description |
---|
ID | ID of the of the deleted depot. {integer} |
error | Set 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:Name | Description |
---|
del | Show deleted depots ('true' or 'false') (optional). {string}. |
_search | Set to 'true' if there is to be filtering. {string} |
sidx | The row index field name (optional) {string} |
sord | The order the index field is to be sorted, either 'asc' or 'desc' (optional) {string} |
filters | The filters to apply to the results (optional). {JSON or JSON string} |
Return parameters:Name | Description |
---|
page | Always 1 |
records | How many depots and virtual depots in total |
total | Always 1 |
rows: [ |
0: { |
ID | ID of the of the depot. {integer} |
ADDRESS | The address of the depot. {string} |
DEPOT | The name of the depot. {string} |
EMAIL | The email of the depot. {string} |
TELEPHONE | The telephone number of the depot. {string} |
data: { |
ID | ID of the of the depot. {integer} |
ADDRESS | The address of the depot. {string} |
CURRENCY: { |
CODE | The international currency code for the default currency used for the job |
DECIMALS | How many decimal places does the currency have |
DECIMAL_SEPARATOR | The character used to separate the decimals |
MULTIPLIER | The multiplier used to get the exchange rate |
NAME | Name of the currency |
NEGATIVE_FORMAT | How a negative should be displayed |
SYMBOL | The currency symbol |
SYMBOL_POSITION | The position of the currency symbol (0=before, 1=after) |
THOUSAND_SEPARATOR | The character used to separate thousands |
} |
CUSTOM_FIELDS | The array of custom fields {array or JSON string} |
DEPOT | The name of the depot. {string} |
EMAIL | The email of the depot. {string} |
IMAGE_ID | The image ID of the company logo. {integer} |
LATITUDE | The latitude of the depot. {float} |
LONGITUDE | The longitude of the depot. {float} |
MEMO | The memo for the depot. {string} |
OWNER | If a virtual depot, the ID of the parent depot. {integer} |
PREFIX | The default prefix to add to barcodes to assets assigned to the depot. {string} |
STATUS | The status of the depot (0=active, 1=deleted). {integer} |
SUFIX | The default suffix to add to barcodes to assets assigned to the depot. {string} |
TELEPHONE | The telephone number of the depot. {string} |
VAT_NUM | The VAT/GST/Tax number of the depot. {string} |
TASKS | How many tasks assigned to this depot. {integer} |
NOTES | How many notes assigned to this depot. {integer} |
FILES | How many files assigned to this depot. {integer} |
} |
expanded | True if depot is a virtual depots |
isLeaf | True for virtual depots only |
loaded | Always true |
parent | ID of the parent depot if it is a virtual depot |
} |
] |
error | Set 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:Name | Description |
---|
ID | ID of the depot or set to '0' for new (compulsory) {integer}. |
LATITUDE | The latitude of the depot (not set for virtual depots). {float} |
LONGITUDE | The longitude of the depot (not set for virtual depots). {float} |
IMAGE_ID | The image ID of the company logo (optional). {integer} |
OWNER | If a virtual depot, the ID of the parent depot (compulsory for virtual depots). {integer} |
DEPOT | The name of the depot (compulsory). {string} |
ADDRESS | The address of the depot (optional). {string} |
TELEPHONE | The telephone number of the depot (optional). {string} |
EMAIL | The email of the depot (optional). {string} |
MEMO | The memo for the depot (optional). {string} |
VAT_NUM | The VAT/GST/Tax number of the depot (optional). {string} |
PREFIX | The default prefix to add to barcodes to assets assigned to the depot (optional). {string} |
SUFIX | The default suffix to add to barcodes to assets assigned to the depot (optional). {string} |
STATUS | The status of the depot (0=active, 1=deleted) (optional). {integer} |
CURRENCY: { |
CODE | The international currency code for the default currency used for the job |
DECIMALS | How many decimal places does the currency have |
DECIMAL_SEPARATOR | The character used to separate the decimals |
MULTIPLIER | The multiplier used to get the exchange rate |
NAME | Name of the currency |
NEGATIVE_FORMAT | How a negative should be displayed |
SYMBOL | The currency symbol |
SYMBOL_POSITION | The position of the currency symbol (0=before, 1=after) |
THOUSAND_SEPARATOR | The character used to separate thousands |
} |
local | The local time of the user (optional) {ISO datetime string} |
tz | The timezone of the user (optional) {string} |
no_webhook | Set to '1' to prevent a webhook from triggering |
Return parameters:Name | Description |
---|
page | The page of the data |
records | How many depots and virtual depots in total |
total | How many pages in total |
rows: [ |
0: { |
ID | ID of the of the depot. {integer} |
ADDRESS | The address of the depot. {string} |
DEPOT | The name of the depot. {string} |
EMAIL | The email of the depot. {string} |
TELEPHONE | The telephone number of the depot. {string} |
data: { |
ID | ID of the of the depot. {integer} |
ADDRESS | The address of the depot. {string} |
CURRENCY: { |
CODE | The international currency code for the default currency used for the job |
DECIMALS | How many decimal places does the currency have |
DECIMAL_SEPARATOR | The character used to separate the decimals |
MULTIPLIER | The multiplier used to get the exchange rate |
NAME | Name of the currency |
NEGATIVE_FORMAT | How a negative should be displayed |
SYMBOL | The currency symbol |
SYMBOL_POSITION | The position of the currency symbol (0=before, 1=after) |
THOUSAND_SEPARATOR | The character used to separate thousands |
} |
CUSTOM_FIELDS | The array of custom fields {array or JSON string} |
DEPOT | The name of the depot. {string} |
EMAIL | The email of the depot. {string} |
IMAGE_ID | The image ID of the company logo. {integer} |
LATITUDE | The latitude of the depot. {float} |
LONGITUDE | The longitude of the depot. {float} |
MEMO | The memo for the depot. {string} |
OWNER | If a virtual depot, the ID of the parent depot. {integer} |
PREFIX | The default prefix to add to barcodes to assets assigned to the depot. {string} |
STATUS | The status of the depot (0=active, 1=deleted). {integer} |
SUFIX | The default suffix to add to barcodes to assets assigned to the depot. {string} |
TELEPHONE | The telephone number of the depot. {string} |
VAT_NUM | The VAT/GST/Tax number of the depot. {string} |
} |
expanded | Always true |
isLeaf | True for virtual depots only |
loaded | Always true |
parent | ID of the parent depot if it is a virtual depot. {integer} |
} |
] |
error | Set 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:Name | Description |
---|
depot | The ID of the depot (required). {integer}. |
_search | Set to 'true' to enable filtering (optional). {string}. |
NAME | A name of the user filter (optional). {string}. |
JOB | A job of the user filter (optional). {string}. |
EMAIL | An email of the user filter (optional). {string}. |
page | Which page of data your want (default is 1) {integer} |
rows | How many rows of data per page (minimum of 20 & maximum of 500) (required) {integer} |
sidx | The column index field to sort by ('NAME' is default, 'JOB' or 'EMAIL') (optional). {string} |
sord | The order the index field is to be sorted, either 'asc' (default) or 'desc'. (optional) {string} |
Return parameters:Name | Description |
---|
page | What page this is (the first page is 1) |
records | How many rows in total found. |
total | How many pages there are of data. |
rows: [ |
0: { |
ID | ID of the of the user. |
NAME | The name of the user. |
JOB | The job of the user. |
EMAIL | The email of the user. |
} |
] |
error | Set 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:Name | Description |
---|
ASSET_IDS | The IDs of the asset the maintenance is for (required). {integer|array|JSON string}. |
STATUS | The new status of the assets (optional). {float} |
DEPOT_ID | The new depot/virtual depot ID of the assets (optional). {integer} |
STOCK_ID | The new owner stock ID of the assets (optional). {integer} |
local | The local time of the user (not needed or used) {datetime string} |
tz | The timezone of the user (not needed or used) {string} |
Return parameters:Name | Description |
---|
ASSET_IDS | The ID of the asset the maintenance is for (compulsory) {array}. |
STATUS | The new status of the assets (if changed). {float} |
DEPOT_ID | The new depot/virtual depot ID of the assets (if changed). {integer} |
STOCK_ID | The new owner stock ID of the assets (if changed). {integer} |
error | Set 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:Name | Description |
---|
BARCODES | The barcode of the asset to get details for {string | array of string | JSON string}. |
ASSET_IDS | The asset IDs to get the details for {integer | array of integer | JSON string} |
Return parameters:Name | Description |
---|
ASSET_IDS | Unique number of the assets {array of integer} |
STOCK_ID | ID of the stock line it belongs to if all assets and barcodes belong to the same stock line {integer} |
TITLE | Name of the stock line it belongs to if all assets and barcodes are of the same stock line {string} |
DEPOT_ID | Depot ID if all assets belong to the same depot {integer} |
STATUS | Status if all assets have the same status {integer} |
BARCODE | Barcode of the asset if just one asset found {string} |
DO_LOGGING | Signifies if usage logging can be done on the asset (0=no, 1=yes). {integer} |
MAINTENANCE: [ |
0: { |
ID | Unique ID of the maintenance, asset or task {integer} |
TYPE | What type of maintenance it is (0 = Service, 1 = PAT Test, 2=Test, etc.) {integer} |
DESCRIPTION | Description of the maintenance, test or task {string}. |
} |
] |
ASSETS_FOUND: [ |
0: { |
ASSET_ID | ID of the asset. {integer} |
BARCODE | Barcode of the asset {string} |
} |
] |
error | Set 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:Name | Description |
---|
ASSET_ID | ID of the asset to get the logging data for. {integer} |
BARCODE | The barcode of the asset to get the logging data for. {string}. |
Return parameters:Name | Description |
---|
ASSET_ID | ID of the asset to get the logging data for. {integer} |
STOCK_ID | ID of the stock item the asset belongs to. {integer} |
TITLE | The name of the stock item. {string} |
BARCODE | The barcode of the asset to get the logging data for. {string} |
LOGGING: { |
PROMPT | A descriptive prompt to ask the user. {string} |
RESETABLE | Can the value be reset (0=No, 1=Yes). {integer} |
COMPULSORY | When checking in, entering a value is compulsory (0=No, 1=Yes). {integer} |
VALIDATION | Check needed with new value (0=None, 1=Less or equal and 2=More or equal). {integer} |
PREFIX_UNITS | The prefix before the value, like 'r' as in 'r10'. {string} |
SUFFIX_UNITS | The suffix after the value, like 'kg' as in '10kg'. {string} |
} |
LAST_LOG: { |
USER_ID | ID of the user who entered the log. {integer} |
JOB_ID | The job number (if any) the log was done against. {integer} |
CREATE_DATE | The date and time in ISO format in the UTC timezone the log was created. {datetime string} |
VALUE | The value entered. {float} |
DETAILS | Note made when entering the value. {string} |
} |
error | Set 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:Name | Description |
---|
NUMBER | The number/ID of the maintenance order {integer} |
BARCODE | The barcode of the asset to get the last open maintenance order for {string}. |
ASSET_ID | The asset ID to get the last open maintennace order for {integer} |
MAINTENANCE_TYPE | What 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:Name | Description |
---|
ID | Unique number of the maintenance order {integer} |
MAINTENANCE_TYPE | What is the maintenance (0=Service, 1=PAT Test, 2=Test, 3=Repair, 4=Maintenance, 5=Other) {integer}. |
ASSET_ID | The ID of the asset the maintenance is for (compulsory) {integer}. |
USER_ID | The ID of the user who created the maintenance order {integer} |
DESCRIPTION | A brief description of the maintenance order {string} |
TECHNICIAN_1 | The ID of the user who is the first technician assigned to the maintennace order {integer} |
TECHNICIAN_2 | The ID of the user who is the second technician assigned to the maintennace order {integer} |
DATE | The date the maintenance order was started {datetime string} |
PAUSE_UNTIL_DATE | The date the maintennace order is postponed to {date string}. |
END_DATE | The date the maintenance order was completed (NOT USED YET) {datetime string} |
STATUS | The status of the maintenance order. {integer} |
ITEMS: { |
ID: { |
ID | ID of the line item |
CONSUMABLE_ID | Sales stock ID the line item appertains to |
LABOUR_ID | Labour item ID the line item appertains to. |
TITLE | Sales stock or labour name the line item appertains to |
QTY | Quatity used |
DESCRIPTION | Description of the line item |
COST | The cost of the line item |
PRICE | Net charge of the line item |
MEMO | Memo for the line item |
CUSTOM_FIELDS | Custom fields for the line item |
} |
} |
QUOTED_PRICE | The quoted estimated price of the maintenance order {float} |
COST | The cost of the maintenance order {float} |
JOB_ID | The ID of the job the maintenance is linked to {integer}. |
CUSTOM_ITEM_ID | The ID of the custom item the maintenance is linked to for applying a charge to a job {integer}. |
MEMO | A memo for the maintenance order {string} |
METER_READING | A current logging meter reading of the asset that is recorded in the maintenance order {float} |
PASS | If the maintennace order is a pass(1) or fail (0) if it is for a test or service {integer} |
BARCODE | The barcode of the asset {string}. |
TITLE | The name of the stock item {string}. |
CUSTOM_FIELDS | The custom fields for the maintenance order {json}. |
error | Set 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:Name | Description |
---|
type | What is the list of ('maintenance', 'damaged', 'tests', 'tasks') (compulsory) {string}. |
test_type | If type is 'tests', which type (0=service, 1=pat test, 2=test). {integer} |
due_date | If type is 'tests', what is the due date (YYYY-MM-DD HH:mm:ss). {ISO datetime string} |
tz | The timezone of the user (optional). {string} |
local | The current date and time in the user's timezone (optional). {ISO datetime string} |
Return parameters:Name | Description |
---|
rows: [ |
0: { |
ID | Unique ID of the maintenance, asset or task {integer} |
NUMBER | Number of the maintenance order {integer} |
TYPE | What type of maintenance it is (0 = Service, 1 = PAT Test, 2=Test, etc.) {integer} |
USER_NAMES | Technician names {string} |
TITLE | What the stock name is of the asset {string}. |
BARCODE | The barcode of the asset {string}. |
DATE | The date of the maintennace order was created, the date the test is due or the date of the task {date string}. |
PAUSE_UNTIL_DATE | The date the maintennace order is postponed to {date string}. |
DESCRIPTION | Description of the maintenance, test or task {string}. |
data: { |
ID | Unique ID of the row {string} |
NUMBER | ID of the maintenance order, if applicable. {integer} |
TYPE | Type of test (0=Service, 1=PAT Test, 2=Test, 3=Repair, 4=Maintenance, 5=Other) {integer} |
USER_NAMES | Technician names {string} |
STOCK_ID | ID of the stock line asset belongs to {integer} |
TITLE | Name of the stock item {string} |
BARCODE | Barcode of the asset {string} |
DATE | Date of the maintenence in UTC {string} |
PAUSE_UNTIL_DATE | Date that the maintenance is on hold until {string} |
DESCRIPTION | Maintenance order description {string} |
ASSET_ID | ID of the asset the maintenance order is for {integer} |
STATUS | Status of the maintenence or asset or task, etc. {integer} |
JOB_ID | ID of the job the maintenence order is linked to {integer} |
MEMO | Memo of the asset {string} |
} |
} |
] |
error | Set 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:Name | Description |
---|
ID | Number of the maintenance order, or 0 if new one needs to be created {integer} |
MAINTENANCE_TYPE | What is the maintenance (0=Service, 1=PAT Test, 2=Test, 3=Repair, 4=Maintenance, 5=Other) {integer}. |
ASSET_IDS | The IDs of the asset the maintenance is for (only for new) {integer|array|JSON string}. |
DESCRIPTION | A brief description of the maintenance order {string} |
TECHNICIAN_1 | The ID of the user who is the first technician assigned to the maintennace order {integer} |
TECHNICIAN_2 | The ID of the user who is the second technician assigned to the maintennace order {integer} |
DATE | The date the maintenance order was started in UTC. {datetime string} |
PAUSE_UNTIL_DATE | The date the maintenance order is postponed until {datetime string} |
END_DATE | The date the maintenance order was completed NOT USED YET (defaults to DATE) {datetime string} |
STATUS | The status of the maintenance order. {integer} |
QUOTED_PRICE | The quoted estimated price of the maintenance order {float} |
COST | The cost of the maintenance order {float} |
METER_READING | A current logging meter reading of the asset that is recorded in the maintenance order {float} |
JOB_ID | The ID of the job the maintenance is linked to {integer}. |
CUSTOM_ITEM_ID | The ID of the custom item the maintenance is linked to for applying a charge to a job {integer}. |
MEMO | A memo for the maintenance order {string} |
PASS | If the maintennace order is a pass(1) or fail (0) if it is for a test or service {integer} |
ITEMS | JSON 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_FIELDS | The custom fields for the maintenance order {json or json string}. |
status_in_stock | Setting to 1 will make sure the asset status' for the assets linked to the maintenance are 'in stock'. {integer} |
local | The local time of the user (not needed or used) {datetime string} |
tz | The timezone of the user (not needed or used) {string} |
Return parameters:Name | Description |
---|
rows: [ |
0: { |
ID | Unique identifier for the maintenance order {html string} |
kind | Always set to 'maintenance'. {html string}. |
NUMBER | The unique number of the maintenance order. {integer}. |
TYPE | What is the maintenace order. (0=Service, 1=PAT Test, 2=Test, 3=Repair, 4=Maintenance, 5=Other) {integer}. |
USER_NAMES | Names of the technicians assigned to the maintenance order. {html string} |
BARCODE | Barcode of the asset maintenance belongs to, or the job number in brackets. {html string} |
DATE | The date the maintenance order was started {datetime string} |
PAUSE_UNTIL_DATE | The date the maintenance order is postponed until {datetime string} |
DESCRIPTION | A brief description of the maintenance order {html string} |
data: { |
kind | Always set to 'maintenance'. {string}. |
ID | The unique number of the maintenance order. {integer}. |
ASSET_ID | The ID of the asset the maintenance is for. {integer}. |
JOB_ID | The ID of the job the maintenance is for. {integer}. |
DATE | The date the maintenance order was started {datetime string} |
PAUSE_UNTIL_DATE | The date the maintenance order is postponed until {datetime string} |
USER_NAMES | Names of the technicians assigned to the maintenance order. {string} |
DESCRIPTION | A brief description of the maintenance order. {string} |
TYPE | What is the maintenace order. (0=Service, 1=PAT Test, 2=Test, 3=Repair, 4=Maintenance, 5=Other) {integer}. |
STATUS | The status of the maintenance order. {integer} |
BARCODE | The barcode of the asset {string}. |
CUSTOM_FIELDS | The custom fields for the maintenance order {json}. |
} |
} |
] |
error | Set 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:Name | Description |
---|
depot_id | The root depot ID filter to apply to the list {integer}. |
name | The name filter to apply to the list {string} |
status | The status value to filter (0=All, 1=Active, 2=Deleted) (optional, default 0) {integer} |
page | Which page of data your want (required) {integer} |
rows | How many rows of data per page (required) {integer} |
sidx | The row index field name (optional) {string} |
sord | The order the index field is to be sorted, either 'asc' or 'desc' (optional) {string} |
Return parameters:Name | Description |
---|
page | How many pages in total for all of the rows |
records | How many rows in total found. |
total | How many pages there are of data. |
rows: { |
id | Unique ID of the resource |
cells: { |
id | Unique ID of the resource {integer} |
name | Name of the resource {string} |
user | The user name if the resource is a HireHop user. {string} |
contact | Name from the address book if resource assigned to an address book contact person. {string} |
email | Email of the resource {string}. |
depot_id | ID of the root depot the resource belongs to. {integer}. |
status | The status of the resource (0=Active, 1=Deleted) {integer}. |
data: [ |
0: { |
ID | Unique ID of the resource {integer} |
STATUS | The status of the resource (0=Active, 1=Deleted) {integer}. |
NAME | Name of the resource {string} |
DEPOT_ID | ID of the root depot the resource belongs to. {integer}. |
USER_ID | The user ID if the resource is a HireHop user. {integer} |
CONATCT_PERS_ID | ID of a person in the address book if resource assigned to an address book entry. {integer} |
MEMO | A memo for the resource. {string} |
EMAIL | Email of the resource. {string} |
COST | The default cost of using the resource. {float} |
TAGS | A list of string tags associated with the resource {array} |
skills: [ |
0: { |
SERVICE_ID | ID of a labour item the resource can do {integer} |
TITLE | Name of a labour item the resource can do {string} |
} |
] |
certs: [ |
0: { |
cert | Name of certification. {string} |
expire | Date the certification will expire (YYYY-MM-DD hh:mm:ss) {string} |
} |
] |
} |
] |
} |
} |
error | Set if an error has occurred, either an error message or error number. |
Scanning
Do a scan
Process a scan or a command from the scanning
post/modules/scanning/check.php
Send parameters:Name | Description |
---|
cmd | A word like 'check', 'no_code_check', 'change_status', 'delete_scans', 'open_box', etc. (REQUIRED). {string} |
allow_extras | If set to '1', allow all extra items with prompting. Will refuse if not enough available. {integer} |
asset_id | The ID of the asset in hms_stock_assets. {integer} |
barcode | Barcode of the item to check. {string} |
box_id | The box ID the scanned item will be placed inside. {integer} |
charge | Set to '1' to charge for additional items. {integer} |
check_ids | Array of check IDs to delete when cmd='delete_scans'. {array} |
check_type | Set to 'in' or 'out' depending which checks to delete when cmd = 'delete_scans'. {string} |
consumable_id | The ID of the item in hms_consumables. {integer} |
external_id | NOT USED YET. The ID of the subbed in item when it was given a temporary barcode. {integer} |
index | For no code check, index of the item it is for, so a stock with ID 123 would be 'c123' (matches data['quantities']['c123'] below). IF ends with _xxx then xxx is the job ID. {string} |
job_id | ID of the job the scan is for. {integer} |
kind | What the sending scanning page kind is (1=Preprep job, 2=Checkout job, 3=Checkin job, 4=Check all in, 5=Job check scan, 10=Subs in, 15=Subs out, 20=Prep project, 21=Checkout project, 22=Checkin project & 23=Project check scan) (REQUIRED). {integer} |
logging | An asset usage logging data if it needs a new usage log added. {object} |
main_id | What the sending scanning main ID is, so if it is for job 52, it would be 52, etc. (REQUIRED). {integer} |
message | An error code or message (ONLY WHEN cmd = 'error'). {string} |
nolate | If set to '1', nothing scanned in will be deemed as late. {integer} |
note | A note to add to the scan. {string} |
open_box | Set to one to say that this scan was an open box command. {integer} |
other | An array of other groups that should get the command. |
qty | Quantity to be checked. {float} |
rems | An array of stock ID's to apply a status change to if cmd['status']>=2. {array} |
sales_id | NOT USED YET. The ID of the sales item. {integer} |
status | The status to set for an asset (if damaged, flagged or lost and cmd='check') or a job status change when cmd='change_status'. {float} |
step | The step the confirm got upto to prevent asking same confirmation question. This sends back what was received. {integer} |
to_user_depot | If not empty, the asset will be moved to the user's depot. {integer} |
Return parameters:Name | Description |
---|
cmds: { |
} |
data_changes: { |
} |
Items in a box
Retreives a list of items inside a scanned box.
get/modules/scanning/get_box_info.php
Send parameters:Name | Description |
---|
id | The ID of the scan of the box (compulsory). {integer} |
kind | What type of scanning are we looking at, being the same kind set in the scanning app (1=Prep, 2=Check out, etc.). (compulsory). {date string}. |
main_id | The main_id set in the scanning app, being the job, project or purchse order. (compulsory). {integer}. |
local | User local time (not used). {date string} |
tz | User time zone (not used). {string} |
Return parameters:Name | Description |
---|
id | Unique ID of the scan. {integer} |
qty | How many checked out/in for the scan. {float}. |
barcode | The barcode of the item scanned. {string} |
user_name | The name of the user who did the scan. {string} |
time | The date and time of the scan. {datetime} |
title | The name of the item scanned. {string} |
error | Set if an error has occurred, either an error message or error number. |
Get check in data
Get the data for checking in
get/modules/scanning/get_check_in_list.php
Send parameters:Name | Description |
---|
main_id | The ID of the job. (REQUIRED). {integer} |
kind | the scanning kind (should be 3). {integer} |
local | The local time of the client device (if time not set, this will be used). {ISO datetime string} |
tz | The timezone of the client device (required if time or local set). {string} |
Return parameters:Name | Description |
---|
rows: [ |
0: { |
index | Index of item based on the 'TYPE' and the 'LIST_ID'. {string} |
ordered | Total of how many required in the supplying list. {float} |
TYPE | What it is (0=heading, 1=sales, 2=rental, 3=custom, 4=labour, 5=comment, 6=calculated). {integer} |
JOB_ID | The ID of the job. {integer} |
LIST_ID | The ID of the item type, so for a hire stock item, it would be the ID in the hire stock management. {integer} |
TITLE | The name of the item. {string} |
MEMO | The memo of the item. {string} |
LOCATION | The location in the warehouse of the item. {string} |
PART_NUMBER | The part number of the item. {string} |
scanned | How many have already been scanned. {float} |
remain | How many remaining that need to be scanned. {float} |
CATEGORY | The category name the item belongs to. {string} |
category_id | The ID of the category the item belongs to. {string} |
subs | The quantity subcontracted in for this item. {float} |
dates: [ |
0: { |
DATE | The outgoing date of the supplying list item. {string} |
QTY | The total quantity of all supplying list items going out on the 'DATE'. {float} |
} |
] |
diff_dates | True if any item has a different outgoing date. {boolean} |
} |
] |
quantities: { |
index: { |
ordered | Total of how many ordered of the item 'index' in the supplying list. {float} |
scanned | Total of how many scanned of the item 'index' in the supplying list. {float} |
remain | Total of how many remaining to be scanned of the item 'index' in the supplying list. {float} |
subs | The quantity subcontracted in for this item. {float} |
reserved | Array of barcodes of this item that have been reserved. {array} |
} |
} |
dates | Array of unique dates encapsulated in the job and item outgoing dates ('YYYY-MM-DD'). {array} |
boxes: [ |
0: { |
id | ID of an already prepared box. {integer} |
barcode | Barcode of the box. {string} |
title | Name of the box. {string} |
asset_id | ID of the asset the box is for. {integer} |
} |
] |
scans: [ |
0: { |
id | Unique ID of the scan. {integer} |
qty | The quantity included in the scan. {float} |
barcode | The barcode used for the scan. {string} |
box | The ID of the box the scanned was put in. {integer} |
time | The ISO date time of the scan in UTC. {datetime string} |
username | The name of the user who did the scan. {string} |
user_id | The ID of the user who did the scan. {integer} |
title | The name of the item scanned. {string} |
} |
] |
tree: [ |
0: { |
item_index | A unique index based on the 'TYPE' and the 'ID' of the supplying list item. {string} |
index | Index of item based on the 'TYPE' and the 'LIST_ID'. {string} |
ID | The 'ID' of the supplying list item. {integer} |
JOB_ID | The ID of the job. {integer} |
TYPE | What it is (0=heading, 1=sales, 2=rental, 3=custom, 4=labour, 5=comment, 6=calculated). {integer} |
QUANTITY | How many required in the supplying list. {float} |
LIST_ID | The ID of the item type, so for a hire stock item, it would be the ID in the hire stock management. {integer} |
LFT | The LFT value of the item in the nested tree. {integer} |
RGT | The RGT value of the item in the nested tree. {integer} |
AUTOPULL | The ID of the autopull it belongs to. {integer} |
VIRTUAL | More than 0 if it is a virtual item. {integer} |
OUTGOING_DATE | The ISO outgoing date of the item if set. {datetime string} |
RETURNING_DATE | The ISO returning date of the item if set. {datetime string} |
TITLE | The name of the item. {string} |
ADDITIONAL | Additional note of the line item. {string} |
MEMO | The memo of the line item. {string} |
dates: [ |
0: { |
DATE | The outgoing date of the line item. {string} |
QTY | The total quantity of of the line item. {float} |
} |
] |
diff_dates | True if any item has a different outgoing date. {boolean} |
assigned | How many scans assigned to the tree item denoted by 'item_index'. {float} |
scanned | How many have already been scanned. {float} |
remain | How many remaining that need to be scanned. {float} |
children | Array of children in this 'tree' format (not set if no children). {array} |
} |
] |
assigned: { |
item_index: { |
qty | How many scans assigned to the tree item denoted by 'item_index'. {float} |
} |
} |
categories: [ |
0: { |
id | The ID of the category. {integer} |
category | The name of the category. {string} |
} |
] |
name | The name of the job. {string} |
status | The status of the job. {float} |
part_numbers | If '1', then show the part numbers column as there are part numbers in the list. {integer} |
timestamp | The Unix timestamp with microseconds at the time the data was sent. {float} |
error | Set if an error has occurred, either an error message or error number. |
Get check out data
Get the data for checking out
get/modules/scanning/get_check_out_list.php
Send parameters:Name | Description |
---|
main_id | The ID of the job. (REQUIRED). {integer} |
kind | the scanning kind (should be 2). {integer} |
time | The local time of the client device. {ISO datetime string} |
local | The local time of the client device (if 'time' not set, this will be used). {ISO datetime string} |
tz | The timezone of the client device (required if 'time' or 'local' set). {string} |
Return parameters:Name | Description |
---|
rows: [ |
0: { |
index | Index of item based on the 'TYPE' and the 'LIST_ID'. {string} |
ordered | Total of how many required in the supplying list. {float} |
TYPE | What it is (0=heading, 1=sales, 2=rental, 3=custom, 4=labour, 5=comment, 6=calculated). {integer} |
JOB_ID | The ID of the job. {integer} |
LIST_ID | The ID of the item type, so for a hire stock item, it would be the ID in the hire stock management. {integer} |
TITLE | The name of the item. {string} |
MEMO | The memo of the item. {string} |
LOCATION | The location in the warehouse of the item. {string} |
PART_NUMBER | The part number of the item. {string} |
scanned | How many have already been scanned. {float} |
remain | How many remaining that need to be scanned. {float} |
CATEGORY | The category name the item belongs to. {string} |
category_id | The ID of the category the item belongs to. {string} |
subs | The quantity subcontracted in for this item. {float} |
dates: [ |
0: { |
DATE | The outgoing date of the supplying list item. {string} |
QTY | The total quantity of all supplying list items going out on the 'DATE'. {float} |
} |
] |
diff_dates | True if any item has a different outgoing date. {boolean} |
} |
] |
quantities: { |
index: { |
ordered | Total of how many ordered of the item 'index' in the supplying list. {float} |
scanned | Total of how many scanned of the item 'index' in the supplying list. {float} |
remain | Total of how many remaining to be scanned of the item 'index' in the supplying list. {float} |
subs | The quantity subcontracted in for this item. {float} |
reserved | Array of barcodes of this item that have been reserved. {array} |
} |
} |
dates | Array of unique dates encapsulated in the job and item outgoing dates ('YYYY-MM-DD'). {array} |
boxes: [ |
0: { |
id | ID of an already prepared box. {integer} |
barcode | Barcode of the box. {string} |
title | Name of the box. {string} |
asset_id | ID of the asset the box is for. {integer} |
} |
] |
scans: [ |
0: { |
id | Unique ID of the scan. {integer} |
qty | The quantity included in the scan. {float} |
barcode | The barcode used for the scan. {string} |
box | The ID of the box the scanned was put in. {integer} |
time | The ISO date time of the scan in UTC. {datetime string} |
username | The name of the user who did the scan. {string} |
user_id | The ID of the user who did the scan. {integer} |
title | The name of the item scanned. {string} |
} |
] |
tree: [ |
0: { |
item_index | A unique index based on the 'TYPE' and the 'ID' of the supplying list item. {string} |
index | Index of item based on the 'TYPE' and the 'LIST_ID'. {string} |
ID | The 'ID' of the supplying list item. {integer} |
JOB_ID | The ID of the job. {integer} |
TYPE | What it is (0=heading, 1=sales, 2=rental, 3=custom, 4=labour, 5=comment, 6=calculated). {integer} |
QUANTITY | How many required in the supplying list. {float} |
LIST_ID | The ID of the item type, so for a hire stock item, it would be the ID in the hire stock management. {integer} |
LFT | The LFT value of the item in the nested tree. {integer} |
RGT | The RGT value of the item in the nested tree. {integer} |
AUTOPULL | The ID of the autopull it belongs to. {integer} |
VIRTUAL | More than 0 if it is a virtual item. {integer} |
OUTGOING_DATE | The ISO outgoing date of the item if set. {datetime string} |
RETURNING_DATE | The ISO returning date of the item if set. {datetime string} |
CATEGORY_ID | The ID of the category the item belongs to ('-1' for headings and inline comments and '0' for not assigned). {integer} |
TITLE | The name of the item. {string} |
ADDITIONAL | Additional note of the line item. {string} |
MEMO | The memo of the line item. {string} |
dates: [ |
0: { |
DATE | The outgoing date of the line item. {string} |
QTY | The total quantity of of the line item. {float} |
} |
] |
diff_dates | True if any item has a different outgoing date. {boolean} |
assigned | How many scans assigned to the tree item denoted by 'item_index'. {float} |
scanned | How many have already been scanned. {float} |
remain | How many remaining that need to be scanned. {float} |
children | Array of children in this 'tree' format (not set if no children). {array} |
} |
] |
assigned: { |
item_index: { |
qty | How many scans assigned to the tree item denoted by 'item_index'. {float} |
} |
} |
categories: [ |
0: { |
id | The ID of the category (0 if it is for not assigned). {integer} |
name | The name of the category (blank for not assigned). {string} |
note | The note for the category. {string} |
icon | The icon character value for the category. {integer} |
LFT | The LFT nested tree position value for the category. {integer} |
RGT | The RGT nested tree position value for the category. {integer} |
} |
] |
name | The name of the job. {string} |
status | The status of the job. {float} |
part_numbers | If '1', then show the part numbers column as there are part numbers in the list. {integer} |
timestamp | The Unix timestamp with microseconds at the time the data was sent. {float} |
error | Set if an error has occurred, either an error message or error number. |
Get check scan data
Get the check scan data for a job or a project
get/modules/scanning/get_check_scan_list.php
Send parameters:Name | Description |
---|
main_id | The ID of the job. (REQUIRED). {integer} |
kind | The scanning kind (should be 5 for a job or 23 for a project). {integer} |
time | The local time of the client device. {ISO datetime string} |
local | The local time of the client device (if 'time' not set, this will be used). {ISO datetime string} |
tz | The timezone of the client device (required if 'time' or 'local' set). {string} |
Return parameters:Name | Description |
---|
rows: [ |
0: { |
index | Index of item based on the 'TYPE' and the 'LIST_ID'. {string} |
ordered | Total of how many required in the supplying list. {float} |
TYPE | What it is (0=heading, 1=sales, 2=rental, 3=custom, 4=labour, 5=comment, 6=calculated). {integer} |
JOB_ID | The ID of the job. {integer} |
LIST_ID | The ID of the item type, so for a hire stock item, it would be the ID in the hire stock management. {integer} |
TITLE | The name of the item. {string} |
MEMO | The memo of the item. {string} |
LOCATION | The location in the warehouse of the item. {string} |
PART_NUMBER | The part number of the item. {string} |
scanned | How many have already been scanned. {float} |
remain | How many remaining that need to be scanned. {float} |
CATEGORY | The category name the item belongs to. {string} |
category_id | The ID of the category the item belongs to. {string} |
subs | The quantity subcontracted in for this item. {float} |
dates: [ |
0: { |
DATE | The outgoing date of the supplying list item. {string} |
QTY | The total quantity of all supplying list items going out on the 'DATE'. {float} |
} |
] |
diff_dates | True if any item has a different outgoing date. {boolean} |
} |
] |
quantities: { |
index: { |
ordered | Total of how many ordered of the item 'index' in the supplying list. {float} |
scanned | Total of how many scanned of the item 'index' in the supplying list. {float} |
remain | Total of how many remaining to be scanned of the item 'index' in the supplying list. {float} |
subs | The quantity subcontracted in for this item. {float} |
reserved | Array of barcodes of this item that have been reserved. {array} |
} |
} |
dates | Array of unique dates encapsulated in the job and item outgoing dates ('YYYY-MM-DD'). {array} |
boxes: [ |
0: { |
id | ID of an already prepared box. {integer} |
barcode | Barcode of the box. {string} |
title | Name of the box. {string} |
asset_id | ID of the asset the box is for. {integer} |
} |
] |
scans: [ |
0: { |
id | Unique ID of the scan. {integer} |
qty | The quantity included in the scan. {float} |
barcode | The barcode used for the scan. {string} |
box | The ID of the box the scanned was put in. {integer} |
time | The ISO date time of the scan in UTC. {datetime string} |
username | The name of the user who did the scan. {string} |
user_id | The ID of the user who did the scan. {integer} |
title | The name of the item scanned. {string} |
} |
] |
tree: [ |
0: { |
item_index | A unique index based on the 'TYPE' and the 'ID' of the supplying list item. {string} |
index | Index of item based on the 'TYPE' and the 'LIST_ID'. {string} |
ID | The 'ID' of the supplying list item. {integer} |
JOB_ID | The ID of the job. {integer} |
TYPE | What it is (0=heading, 1=sales, 2=rental, 3=custom, 4=labour, 5=comment, 6=calculated). {integer} |
QUANTITY | How many required in the supplying list. {float} |
LIST_ID | The ID of the item type, so for a hire stock item, it would be the ID in the hire stock management. {integer} |
LFT | The LFT value of the item in the nested tree. {integer} |
RGT | The RGT value of the item in the nested tree. {integer} |
AUTOPULL | The ID of the autopull it belongs to. {integer} |
VIRTUAL | More than 0 if it is a virtual item. {integer} |
OUTGOING_DATE | The ISO outgoing date of the item if set. {datetime string} |
RETURNING_DATE | The ISO returning date of the item if set. {datetime string} |
CATEGORY_ID | The ID of the category the item belongs to ('-1' for headings and inline comments and '0' for not assigned). {integer} |
TITLE | The name of the item. {string} |
ADDITIONAL | Additional note of the line item. {string} |
MEMO | The memo of the line item. {string} |
dates: [ |
0: { |
DATE | The outgoing date of the line item. {string} |
QTY | The total quantity of of the line item. {float} |
} |
] |
diff_dates | True if any item has a different outgoing date. {boolean} |
assigned | How many scans assigned to the tree item denoted by 'item_index'. {float} |
scanned | How many have already been scanned. {float} |
remain | How many remaining that need to be scanned. {float} |
children | Array of children in this 'tree' format (not set if no children). {array} |
} |
] |
assigned: { |
item_index: { |
qty | How many scans assigned to the tree item denoted by 'item_index'. {float} |
} |
} |
categories: [ |
0: { |
id | The ID of the category (0 if it is for not assigned). {integer} |
name | The name of the category (blank for not assigned). {string} |
note | The note for the category. {string} |
icon | The icon character value for the category. {integer} |
LFT | The LFT nested tree position value for the category. {integer} |
RGT | The RGT nested tree position value for the category. {integer} |
} |
] |
name | The name of the job/project. {string} |
status | Not used, always 0. {float} |
part_numbers | If '1', then show the part numbers column as there are part numbers in the list. {integer} |
timestamp | The Unix timestamp with microseconds at the time the data was sent. {float} |
error | Set if an error has occurred, either an error message or error number. |
Get's the check scans
Retreives a list check scans already created for a job, project or stock item.
get/modules/scanning/get_check_scans.php
Send parameters:Name | Description |
---|
job_id | The ID of the job. {integer} |
project_id | The ID of the project. {integer}. |
stock_id | The ID of the stock. {integer}. |
local | User local time (not used). {date string} |
tz | User time zone (not used). {string} |
Return parameters:Name | Description |
---|
rows: [ |
0: { |
ID | Unique ID of the scan. {integer} |
USER_ID | ID of the user. {integer} |
DATE | The date and time the check was created. {datetime}. |
NAME | The name given to the check scan. {string} |
user_name | The name of the user who did the scan. {string} |
CUSTOM_FIELDS | Custom fields. {array} |
} |
] |
error | Set if an error has occurred, either an error message or error number. |
Get job prep data
Get the data for preping a job
get/modules/scanning/get_prep_list.php
Send parameters:Name | Description |
---|
main_id | The ID of the job. (REQUIRED). {integer} |
kind | the scanning kind (should be 2). {integer} |
time | The local time of the client device. {ISO datetime string} |
local | The local time of the client device (if 'time' not set, this will be used). {ISO datetime string} |
tz | The timezone of the client device (required if 'time' or 'local' set). {string} |
Return parameters:Name | Description |
---|
rows: [ |
0: { |
index | Index of item based on the 'TYPE' and the 'LIST_ID'. {string} |
ordered | Total of how many required in the supplying list. {float} |
TYPE | What it is (0=heading, 1=sales, 2=rental, 3=custom, 4=labour, 5=comment, 6=calculated). {integer} |
JOB_ID | The ID of the job. {integer} |
LIST_ID | The ID of the item type, so for a hire stock item, it would be the ID in the hire stock management. {integer} |
TITLE | The name of the item. {string} |
MEMO | The memo of the item. {string} |
LOCATION | The location in the warehouse of the item. {string} |
PART_NUMBER | The part number of the item. {string} |
scanned | How many have already been scanned. {float} |
remain | How many remaining that need to be scanned. {float} |
CATEGORY | The category name the item belongs to. {string} |
category_id | The ID of the category the item belongs to. {string} |
subs | The quantity subcontracted in for this item. {float} |
dates: [ |
0: { |
DATE | The outgoing date of the supplying list item. {string} |
QTY | The total quantity of all supplying list items going out on the 'DATE'. {float} |
} |
] |
diff_dates | True if any item has a different outgoing date. {boolean} |
} |
] |
quantities: { |
index: { |
ordered | Total of how many ordered of the item 'index' in the supplying list. {float} |
scanned | Total of how many scanned of the item 'index' in the supplying list. {float} |
remain | Total of how many remaining to be scanned of the item 'index' in the supplying list. {float} |
subs | The quantity subcontracted in for this item. {float} |
reserved | Array of barcodes of this item that have been reserved. {array} |
} |
} |
dates | Array of unique dates encapsulated in the job and item outgoing dates ('YYYY-MM-DD'). {array} |
boxes: [ |
0: { |
id | ID of an already prepared box. {integer} |
barcode | Barcode of the box. {string} |
title | Name of the box. {string} |
asset_id | ID of the asset the box is for. {integer} |
} |
] |
scans: [ |
0: { |
id | Unique ID of the scan. {integer} |
qty | The quantity included in the scan. {float} |
barcode | The barcode used for the scan. {string} |
box | The ID of the box the scanned was put in. {integer} |
time | The ISO date time of the scan in UTC. {datetime string} |
username | The name of the user who did the scan. {string} |
user_id | The ID of the user who did the scan. {integer} |
title | The name of the item scanned. {string} |
} |
] |
tree: [ |
0: { |
item_index | A unique index based on the 'TYPE' and the 'ID' of the supplying list item. {string} |
index | Index of item based on the 'TYPE' and the 'LIST_ID'. {string} |
ID | The 'ID' of the supplying list item. {integer} |
JOB_ID | The ID of the job. {integer} |
TYPE | What it is (0=heading, 1=sales, 2=rental, 3=custom, 4=labour, 5=comment, 6=calculated). {integer} |
QUANTITY | How many required in the supplying list. {float} |
LIST_ID | The ID of the item type, so for a hire stock item, it would be the ID in the hire stock management. {integer} |
LFT | The LFT value of the item in the nested tree. {integer} |
RGT | The RGT value of the item in the nested tree. {integer} |
AUTOPULL | The ID of the autopull it belongs to. {integer} |
VIRTUAL | More than 0 if it is a virtual item. {integer} |
OUTGOING_DATE | The ISO outgoing date of the item if set. {datetime string} |
RETURNING_DATE | The ISO returning date of the item if set. {datetime string} |
CATEGORY_ID | The ID of the category the item belongs to ('-1' for headings and inline comments and '0' for not assigned). {integer} |
TITLE | The name of the item. {string} |
ADDITIONAL | Additional note of the line item. {string} |
MEMO | The memo of the line item. {string} |
dates: [ |
0: { |
DATE | The outgoing date of the line item. {string} |
QTY | The total quantity of of the line item. {float} |
} |
] |
diff_dates | True if any item has a different outgoing date. {boolean} |
assigned | How many scans assigned to the tree item denoted by 'item_index'. {float} |
scanned | How many have already been scanned. {float} |
remain | How many remaining that need to be scanned. {float} |
children | Array of children in this 'tree' format (not set if no children). {array} |
} |
] |
assigned: { |
item_index: { |
qty | How many scans assigned to the tree item denoted by 'item_index'. {float} |
} |
} |
categories: [ |
0: { |
id | The ID of the category (0 if it is for not assigned). {integer} |
name | The name of the category (blank for not assigned). {string} |
note | The note for the category. {string} |
icon | The icon character value for the category. {integer} |
LFT | The LFT nested tree position value for the category. {integer} |
RGT | The RGT nested tree position value for the category. {integer} |
} |
] |
name | The name of the job. {string} |
status | The status of the job. {float} |
part_numbers | If '1', then show the part numbers column as there are part numbers in the list. {integer} |
timestamp | The Unix timestamp with microseconds at the time the data was sent. {float} |
error | Set if an error has occurred, either an error message or error number. |
Get check project in data
Get the data for checking in a project
get/modules/scanning/get_project_check_in_list.php
Send parameters:Name | Description |
---|
main_id | The ID of the job. (REQUIRED). {integer} |
kind | the scanning kind (should be 22). {integer} |
time | The local time of the client device. {ISO datetime string} |
local | The local time of the client device (if 'time' not set, this will be used). {ISO datetime string} |
tz | The timezone of the client device (required if 'time' or 'local' set). {string} |
Return parameters:Name | Description |
---|
rows: [ |
0: { |
index | Index of item based on the 'TYPE' and the 'LIST_ID'. {string} |
ordered | Total of how many required in the supplying list. {float} |
TYPE | What it is (0=heading, 1=sales, 2=rental, 3=custom, 4=labour, 5=comment, 6=calculated). {integer} |
JOB_ID | The ID of the job. {integer} |
JOB_NAME | The name of the job the item belongs to. {string} |
LIST_ID | The ID of the item type, so for a hire stock item, it would be the ID in the hire stock management. {integer} |
TITLE | The name of the item. {string} |
MEMO | The memo of the item. {string} |
LOCATION | The location in the warehouse of the item. {string} |
PART_NUMBER | The part number of the item. {string} |
scanned | How many have already been scanned. {float} |
remain | How many remaining that need to be scanned. {float} |
CATEGORY | The category name the item belongs to. {string} |
category_id | The ID of the category the item belongs to. {string} |
subs | The quantity subcontracted in for this item. {float} |
dates: [ |
0: { |
DATE | The outgoing date of the supplying list item. {string} |
QTY | The total quantity of all supplying list items going out on the 'DATE'. {float} |
} |
] |
diff_dates | True if any item has a different outgoing date. {boolean} |
} |
] |
quantities: { |
index: { |
ordered | Total of how many ordered of the item 'index' in the supplying list. {float} |
scanned | Total of how many scanned of the item 'index' in the supplying list. {float} |
remain | Total of how many remaining to be scanned of the item 'index' in the supplying list. {float} |
subs | The quantity subcontracted in for this item. {float} |
reserved | Array of barcodes of this item that have been reserved. {array} |
} |
} |
dates | Array of unique dates encapsulated in the job and item outgoing dates ('YYYY-MM-DD'). {array} |
boxes: [ |
0: { |
id | ID of an already prepared box. {integer} |
barcode | Barcode of the box. {string} |
title | Name of the box. {string} |
asset_id | ID of the asset the box is for. {integer} |
} |
] |
scans: [ |
0: { |
id | Unique ID of the scan. {integer} |
qty | The quantity included in the scan. {float} |
barcode | The barcode used for the scan. {string} |
box | The ID of the box the scanned was put in. {integer} |
time | The ISO date time of the scan in UTC. {datetime string} |
username | The name of the user who did the scan. {string} |
user_id | The ID of the user who did the scan. {integer} |
title | The name of the item scanned. {string} |
} |
] |
tree: [ |
0: { |
item_index | A unique index based on the 'TYPE' and the 'ID' of the supplying list item. {string} |
index | Index of item based on the 'TYPE' and the 'LIST_ID'. {string} |
ID | The 'ID' of the supplying list item. {integer} |
JOB_ID | The ID of the job. {integer} |
TYPE | What it is (0=heading, 1=sales, 2=rental, 3=custom, 4=labour, 5=comment, 6=calculated). {integer} |
QUANTITY | How many required in the supplying list. {float} |
LIST_ID | The ID of the item type, so for a hire stock item, it would be the ID in the hire stock management. {integer} |
LFT | The LFT value of the item in the nested tree. {integer} |
RGT | The RGT value of the item in the nested tree. {integer} |
AUTOPULL | The ID of the autopull it belongs to. {integer} |
VIRTUAL | More than 0 if it is a virtual item. {integer} |
OUTGOING_DATE | The ISO outgoing date of the item if set. {datetime string} |
RETURNING_DATE | The ISO returning date of the item if set. {datetime string} |
CATEGORY_ID | The ID of the category the item belongs to ('-1' for headings and inline comments and '0' for not assigned). {integer} |
TITLE | The name of the item. {string} |
ADDITIONAL | Additional note of the line item. {string} |
MEMO | The memo of the line item. {string} |
dates: [ |
0: { |
DATE | The outgoing date of the line item. {string} |
QTY | The total quantity of of the line item. {float} |
} |
] |
diff_dates | True if any item has a different outgoing date. {boolean} |
assigned | How many scans assigned to the tree item denoted by 'item_index'. {float} |
scanned | How many have already been scanned. {float} |
remain | How many remaining that need to be scanned. {float} |
children | Array of children in this 'tree' format (not set if no children). {array} |
} |
] |
assigned: { |
item_index: { |
qty | How many scans assigned to the tree item denoted by 'item_index'. {float} |
} |
} |
categories: [ |
0: { |
id | The ID of the category (0 if it is for not assigned). {integer} |
name | The name of the category (blank for not assigned). {string} |
note | The note for the category. {string} |
icon | The icon character value for the category. {integer} |
LFT | The LFT nested tree position value for the category. {integer} |
RGT | The RGT nested tree position value for the category. {integer} |
} |
] |
name | The name of the project. {string} |
status_vals | Array of status values of the jobs in the project with the job ID as the index. {array} |
part_numbers | If '1', then show the part numbers column as there are part numbers in the list. {integer} |
timestamp | The Unix timestamp with microseconds at the time the data was sent. {float} |
error | Set if an error has occurred, either an error message or error number. |
Get check project out data
Get the data for checking out a project
get/modules/scanning/get_project_check_out_list.php
Send parameters:Name | Description |
---|
main_id | The ID of the job. (REQUIRED). {integer} |
kind | the scanning kind (should be 21). {integer} |
time | The local time of the client device. {ISO datetime string} |
local | The local time of the client device (if 'time' not set, this will be used). {ISO datetime string} |
tz | The timezone of the client device (required if 'time' or 'local' set). {string} |
Return parameters:Name | Description |
---|
rows: [ |
0: { |
index | Index of item based on the 'TYPE' and the 'LIST_ID'. {string} |
ordered | Total of how many required in the supplying list. {float} |
TYPE | What it is (0=heading, 1=sales, 2=rental, 3=custom, 4=labour, 5=comment, 6=calculated). {integer} |
JOB_ID | The ID of the job. {integer} |
JOB_NAME | The name of the job the item belongs to. {string} |
LIST_ID | The ID of the item type, so for a hire stock item, it would be the ID in the hire stock management. {integer} |
TITLE | The name of the item. {string} |
MEMO | The memo of the item. {string} |
LOCATION | The location in the warehouse of the item. {string} |
PART_NUMBER | The part number of the item. {string} |
scanned | How many have already been scanned. {float} |
remain | How many remaining that need to be scanned. {float} |
CATEGORY | The category name the item belongs to. {string} |
category_id | The ID of the category the item belongs to. {string} |
subs | The quantity subcontracted in for this item. {float} |
dates: [ |
0: { |
DATE | The outgoing date of the supplying list item. {string} |
QTY | The total quantity of all supplying list items going out on the 'DATE'. {float} |
} |
] |
diff_dates | True if any item has a different outgoing date. {boolean} |
} |
] |
quantities: { |
index: { |
ordered | Total of how many ordered of the item 'index' in the supplying list. {float} |
scanned | Total of how many scanned of the item 'index' in the supplying list. {float} |
remain | Total of how many remaining to be scanned of the item 'index' in the supplying list. {float} |
subs | The quantity subcontracted in for this item. {float} |
reserved | Array of barcodes of this item that have been reserved. {array} |
} |
} |
dates | Array of unique dates encapsulated in the job and item outgoing dates ('YYYY-MM-DD'). {array} |
boxes: [ |
0: { |
id | ID of an already prepared box. {integer} |
barcode | Barcode of the box. {string} |
title | Name of the box. {string} |
asset_id | ID of the asset the box is for. {integer} |
} |
] |
scans: [ |
0: { |
id | Unique ID of the scan. {integer} |
qty | The quantity included in the scan. {float} |
barcode | The barcode used for the scan. {string} |
box | The ID of the box the scanned was put in. {integer} |
time | The ISO date time of the scan in UTC. {datetime string} |
username | The name of the user who did the scan. {string} |
user_id | The ID of the user who did the scan. {integer} |
title | The name of the item scanned. {string} |
} |
] |
tree: [ |
0: { |
item_index | A unique index based on the 'TYPE' and the 'ID' of the supplying list item. {string} |
index | Index of item based on the 'TYPE' and the 'LIST_ID'. {string} |
ID | The 'ID' of the supplying list item. {integer} |
JOB_ID | The ID of the job. {integer} |
TYPE | What it is (0=heading, 1=sales, 2=rental, 3=custom, 4=labour, 5=comment, 6=calculated). {integer} |
QUANTITY | How many required in the supplying list. {float} |
LIST_ID | The ID of the item type, so for a hire stock item, it would be the ID in the hire stock management. {integer} |
LFT | The LFT value of the item in the nested tree. {integer} |
RGT | The RGT value of the item in the nested tree. {integer} |
AUTOPULL | The ID of the autopull it belongs to. {integer} |
VIRTUAL | More than 0 if it is a virtual item. {integer} |
OUTGOING_DATE | The ISO outgoing date of the item if set. {datetime string} |
RETURNING_DATE | The ISO returning date of the item if set. {datetime string} |
CATEGORY_ID | The ID of the category the item belongs to ('-1' for headings and inline comments and '0' for not assigned). {integer} |
TITLE | The name of the item. {string} |
ADDITIONAL | Additional note of the line item. {string} |
MEMO | The memo of the line item. {string} |
dates: [ |
0: { |
DATE | The outgoing date of the line item. {string} |
QTY | The total quantity of of the line item. {float} |
} |
] |
diff_dates | True if any item has a different outgoing date. {boolean} |
assigned | How many scans assigned to the tree item denoted by 'item_index'. {float} |
scanned | How many have already been scanned. {float} |
remain | How many remaining that need to be scanned. {float} |
children | Array of children in this 'tree' format (not set if no children). {array} |
} |
] |
assigned: { |
item_index: { |
qty | How many scans assigned to the tree item denoted by 'item_index'. {float} |
} |
} |
categories: [ |
0: { |
id | The ID of the category (0 if it is for not assigned). {integer} |
name | The name of the category (blank for not assigned). {string} |
note | The note for the category. {string} |
icon | The icon character value for the category. {integer} |
LFT | The LFT nested tree position value for the category. {integer} |
RGT | The RGT nested tree position value for the category. {integer} |
} |
] |
name | The name of the project. {string} |
status_vals | Array of status values of the jobs in the project with the job ID as the index. {array} |
part_numbers | If '1', then show the part numbers column as there are part numbers in the list. {integer} |
timestamp | The Unix timestamp with microseconds at the time the data was sent. {float} |
error | Set if an error has occurred, either an error message or error number. |
Get check project prep data
Get the data for preping a project
get/modules/scanning/get_project_prep_list.php
Send parameters:Name | Description |
---|
main_id | The ID of the job. (REQUIRED). {integer} |
kind | the scanning kind (should be 22). {integer} |
time | The local time of the client device. {ISO datetime string} |
local | The local time of the client device (if 'time' not set, this will be used). {ISO datetime string} |
tz | The timezone of the client device (required if 'time' or 'local' set). {string} |
Return parameters:Name | Description |
---|
rows: [ |
0: { |
index | Index of item based on the 'TYPE' and the 'LIST_ID'. {string} |
ordered | Total of how many required in the supplying list. {float} |
TYPE | What it is (0=heading, 1=sales, 2=rental, 3=custom, 4=labour, 5=comment, 6=calculated). {integer} |
JOB_ID | The ID of the job. {integer} |
JOB_NAME | The name of the job the item belongs to. {string} |
LIST_ID | The ID of the item type, so for a hire stock item, it would be the ID in the hire stock management. {integer} |
TITLE | The name of the item. {string} |
MEMO | The memo of the item. {string} |
LOCATION | The location in the warehouse of the item. {string} |
PART_NUMBER | The part number of the item. {string} |
scanned | How many have already been scanned. {float} |
remain | How many remaining that need to be scanned. {float} |
CATEGORY | The category name the item belongs to. {string} |
category_id | The ID of the category the item belongs to. {string} |
subs | The quantity subcontracted in for this item. {float} |
dates: [ |
0: { |
DATE | The outgoing date of the supplying list item. {string} |
QTY | The total quantity of all supplying list items going out on the 'DATE'. {float} |
} |
] |
diff_dates | True if any item has a different outgoing date. {boolean} |
} |
] |
quantities: { |
index: { |
ordered | Total of how many ordered of the item 'index' in the supplying list. {float} |
scanned | Total of how many scanned of the item 'index' in the supplying list. {float} |
remain | Total of how many remaining to be scanned of the item 'index' in the supplying list. {float} |
subs | The quantity subcontracted in for this item. {float} |
reserved | Array of barcodes of this item that have been reserved. {array} |
} |
} |
dates | Array of unique dates encapsulated in the job and item outgoing dates ('YYYY-MM-DD'). {array} |
boxes: [ |
0: { |
id | ID of an already prepared box. {integer} |
barcode | Barcode of the box. {string} |
title | Name of the box. {string} |
asset_id | ID of the asset the box is for. {integer} |
} |
] |
scans: [ |
0: { |
id | Unique ID of the scan. {integer} |
qty | The quantity included in the scan. {float} |
barcode | The barcode used for the scan. {string} |
box | The ID of the box the scanned was put in. {integer} |
time | The ISO date time of the scan in UTC. {datetime string} |
username | The name of the user who did the scan. {string} |
user_id | The ID of the user who did the scan. {integer} |
title | The name of the item scanned. {string} |
} |
] |
tree: [ |
0: { |
item_index | A unique index based on the 'TYPE' and the 'ID' of the supplying list item. {string} |
index | Index of item based on the 'TYPE' and the 'LIST_ID'. {string} |
ID | The 'ID' of the supplying list item. {integer} |
JOB_ID | The ID of the job. {integer} |
TYPE | What it is (0=heading, 1=sales, 2=rental, 3=custom, 4=labour, 5=comment, 6=calculated). {integer} |
QUANTITY | How many required in the supplying list. {float} |
LIST_ID | The ID of the item type, so for a hire stock item, it would be the ID in the hire stock management. {integer} |
LFT | The LFT value of the item in the nested tree. {integer} |
RGT | The RGT value of the item in the nested tree. {integer} |
AUTOPULL | The ID of the autopull it belongs to. {integer} |
VIRTUAL | More than 0 if it is a virtual item. {integer} |
OUTGOING_DATE | The ISO outgoing date of the item if set. {datetime string} |
RETURNING_DATE | The ISO returning date of the item if set. {datetime string} |
CATEGORY_ID | The ID of the category the item belongs to ('-1' for headings and inline comments and '0' for not assigned). {integer} |
TITLE | The name of the item. {string} |
ADDITIONAL | Additional note of the line item. {string} |
MEMO | The memo of the line item. {string} |
dates: [ |
0: { |
DATE | The outgoing date of the line item. {string} |
QTY | The total quantity of of the line item. {float} |
} |
] |
diff_dates | True if any item has a different outgoing date. {boolean} |
assigned | How many scans assigned to the tree item denoted by 'item_index'. {float} |
scanned | How many have already been scanned. {float} |
remain | How many remaining that need to be scanned. {float} |
children | Array of children in this 'tree' format (not set if no children). {array} |
} |
] |
assigned: { |
item_index: { |
qty | How many scans assigned to the tree item denoted by 'item_index'. {float} |
} |
} |
categories: [ |
0: { |
id | The ID of the category (0 if it is for not assigned). {integer} |
name | The name of the category (blank for not assigned). {string} |
note | The note for the category. {string} |
icon | The icon character value for the category. {integer} |
LFT | The LFT nested tree position value for the category. {integer} |
RGT | The RGT nested tree position value for the category. {integer} |
} |
] |
name | The name of the project. {string} |
status_vals | Array of status values of the jobs in the project with the job ID as the index. {array} |
part_numbers | If '1', then show the part numbers column as there are part numbers in the list. {integer} |
timestamp | The Unix timestamp with microseconds at the time the data was sent. {float} |
error | Set if an error has occurred, either an error message or error number. |
Save a check scans
Create a new check scan or change a check scan name.
post/modules/scanning/save_check_scan.php
Send parameters:Name | Description |
---|
ID | The ID of the check scan (0 or not set creates a new one). {integer} |
NAME | Name of the check scan (45 character limit). {string} |
JOB_ID | The ID of the job the check scan is for (only for new). {integer} |
PROJECT_ID | The ID of the project the check scan is for (only for new). {integer}. |
local | User local time (not used). {date string} |
tz | User time zone (not used). {string} |
Return parameters:Name | Description |
---|
rows: [ |
0: { |
ID | Unique ID of the scan. {integer} |
USER_ID | ID of the user. {integer} |
DATE | The date and time the check was created. {datetime}. |
NAME | The name given to the check scan. {string} |
user_name | The name of the user who did the scan. {string} |
CUSTOM_FIELDS | Custom fields. {array} |
} |
] |
error | Set 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:Name | Description |
---|
local | The local date and time of the user in 'YYYY-MM-DD hh:mm:ss' format (optional). {string}. |
head | The ID of the category to filter by (optional). {integer} |
cats | An array of category IDs to show (empty shows all). {JSON|JSON string|array} |
del | If '1', include deleted/hidden items in the search (optional). {integer} |
_search | If set to anything, allow filtering on TITLE and ALT_TITLE |
unq | ID of the hire stock item (returns only one item if set) (optional) {integer}. |
page | The page number of data to return. (optional) {integer} |
rows | The number of records to return for the requested page. (optional) {integer} |
sord | If the data should be ascending (asc) or descending (desc). (optional) {string} |
sidx | The field name to sort by (TITLE, ALT_TITLE, PRICE1, PRICE2, PRICE3, PRICE_TYPE, FLAG) (optional) {string} |
Return parameters:Name | Description |
---|
rows: [ |
0: { |
id | The ID of the item (integer). |
cell: [ |
0: { |
id | The ID of the asset (integer). |
TITLE | Name of the item. {string} |
ALT_TITLE | The alternative name of the item. {string} |
PRICE1 | Price A of the item. {float} |
PRICE2 | Price B of the item. {float} |
PRICE3 | Price C of the item. {float} |
PRICE_TYPE1 | The 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_TYPE2 | The 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_TYPE3 | The 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_PRICE | The estimated cost to hire in this person. {float} |
FLAG | The deafult flag to set when adding a new item into a supplying list (0=none, 1=Not important, 2=Important & 3=Technical). {integer} |
data: { |
ID | The ID of the asset (integer). |
TITLE | Name of the item. {string} |
ALT_TITLE | The alternative name of the item. {string} |
MEMO | The memo of the item. {string} |
CATEGORY_ID | The ID of the category the item is part of. {integer} |
PRICE1 | Price A of the item. {float} |
PRICE2 | Price B of the item. {float} |
PRICE3 | Price C of the item. {float} |
PRICE_TYPE1 | The 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_TYPE2 | The 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_TYPE3 | The 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_DISCOUNT | The maximum discount percentage allowed for the item (optional, 0 to 100). {float} |
COST_PRICE | The estimated cost to hire in this person. {float} |
VAT_RATE | The tax/GST/VAT type to use. {integer} |
STATUS | The status index of the item (0=Active, 1=Hidden in picklist, 2=Deleted)(optional). {float} |
NO_SHORTFALL | If 0 then HireHop calculates availability. {integer} |
ACC_NOMINAL | The sales nominal group ID for the item. {integer} |
ACC_NOMINAL_PO | The purchase nominal group ID for the item. {integer} |
FLAG | The deafult flag to set when adding a new item into a supplying list (0=none, 1=Not important, 2=Important & 3=Technical). {integer} |
DELIVERY | If set to 1 a delivery will be automatically added to a job when the item is added. {string} |
COLLECTION | If set to 1 a collection will be automatically added to a job when the item is added. {string} |
OTHER | If set to 1 an 'other' transport will be automatically added to a job when the item is added. {string} |
DEPOT_LIMITS | An array or string of depot ID's the item is limited to. {array or array-string |
CUSTOM_FIELDS | Custom fields of the item {array}. |
EXCLUDE_FROM_WEBSHOP | For exclude the item from webshop. {integer} |
crumbs | The breadcrumb details of the category the item is in {JSON array} |
} |
} |
] |
} |
] |
error | Set 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:Name | Description |
---|
ID | ID of the labour item or zero creates a new item (default 0) {integer}. |
TITLE | Name of the item (required for new). {string[85]} |
ALT_TITLE | The alternative name of the item (optional). {string[85]} |
PRICE1 | Price A of the item (optional). {float} |
PRICE2 | Price B of the item (optional). {float} |
PRICE3 | Price C of the item (optional). {float} |
MAX_DISCOUNT | The maximum discount percentage allowed for the item (optional, 0 to 100). {float} |
COST_PRICE | The cost to rent this item in (optional). {float} |
PRICE_TYPE | Sets PRICE_TYPE1, PRICE_TYPE2 and PRICE_TYPE3, to the same value. {integer} |
PRICE_TYPE1 | The 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_TYPE2 | The 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_TYPE3 | The 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_RATE | The tax/GST/VAT type to use (optional). {integer} |
MEMO | The memo of the item (optional). {string} |
NO_SHORTFALL | Set to 1 to prevent HireHop calculating availability. {integer} |
DELIVERY | Set to 1 to automatically add a delivery to a job when the item is added to a job (optional). {string} |
COLLECTION | Set to 1 to automatically add a collection to a job when the item is added to a job (optional). {string} |
OTHER | Set to 1 to automatically add an 'other' transport to a job when the item is added to a job (optional). {string} |
CATEGORY_ID | The ID of the category the item is part of (required for new). {integer} |
STATUS | The status index of the item (0=Active, 1=Hidden in picklist, 2=Deleted)(optional). {float} |
ACC_NOMINAL | The sales nominal group ID for the item (optional). {integer} |
ACC_NOMINAL_PO | The purchase nominal group ID for the item (optional). {integer} |
DEPOT_LIMITS | An array or string of depot ID's the item is limited to (optional). {array or array-string} |
FLAG | The deafult flag to set when adding a new item into a supplying list (0=none, 1=Not important, 2=Important & 3=Technical) (optional). {integer} |
EXCLUDE_FROM_WEBSHOP | For exclude the item from webshop. {integer} |
CUSTOM_FIELDS | Custom fields of the item (array). |
Return parameters:Name | Description |
---|
rows: [ |
0: { |
id | The ID of the item (integer). |
cell: [ |
0: { |
id | The ID of the asset (integer). |
TITLE | Name of the item. {string} |
ALT_TITLE | The alternative name of the item. {string} |
PRICE1 | Price A of the item. {float} |
PRICE2 | Price B of the item. {float} |
PRICE3 | Price C of the item. {float} |
PRICE_TYPE | The 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} |
FLAG | The deafult flag to set when adding a new item into a supplying list (0=none, 1=Not important, 2=Important & 3=Technical). {integer} |
data: { |
ID | The ID of the asset (integer). |
TITLE | Name of the item. {string} |
ALT_TITLE | The alternative name of the item. {string} |
MEMO | The memo of the item. {string} |
CATEGORY_ID | The ID of the category the item is part of. {integer} |
PRICE1 | Price A of the item. {float} |
PRICE2 | Price B of the item. {float} |
PRICE3 | Price C of the item. {float} |
PRICE_TYPE1 | The 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_TYPE2 | The 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_TYPE3 | The 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_DISCOUNT | The maximum discount percentage allowed for the item (optional, 0 to 100). {float} |
COST_PRICE | The cost to hire in this person. {float} |
VAT_RATE | The tax/GST/VAT type to use. {integer} |
STATUS | The status index of the item (0=Active, 1=Hidden in picklist, 2=Deleted)(optional). {float} |
NO_SHORTFALL | If 0 then HireHop calculates availability. {integer} |
ACC_NOMINAL | The sales nominal group ID for the item. {integer} |
ACC_NOMINAL_PO | The purchase nominal group ID for the item. {integer} |
FLAG | The deafult flag to set when adding a new item into a supplying list (0=none, 1=Not important, 2=Important & 3=Technical). {integer} |
DELIVERY | If set to 1 a delivery will be automatically added to a job when the item is added. {string} |
COLLECTION | If set to 1 a collection will be automatically added to a job when the item is added. {string} |
OTHER | If set to 1 an 'other' transport will be automatically added to a job when the item is added. {string} |
DEPOT_LIMITS | An array or string of depot ID's the item is limited to. {array or array-string |
EXCLUDE_FROM_WEBSHOP | For exclude the item from webshop. {integer} |
CUSTOM_FIELDS | Custom fields of the item {array}. |
crumbs | The breadcrumb details of the category the item is in {JSON array} |
} |
} |
] |
} |
] |
error | Set 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:Name | Description |
---|
id | ID of the hire stock item (compulsory). {integer}. |
no_webhook | Set to '1' to prevent a webhook from triggering |
Return parameters:Name | Description |
---|
id | ID of the hire stock item if successful. {integer}. |
error | Set 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:Name | Description |
---|
ID | ID of the asset, if '0' or not set means new. {integer}. |
STOCK_ID | The ID of the parent hire stock item (required). {integer} |
STATUS | The index of the status (default is 0). {float} |
QTY | The quantity for bulk assets or 1 for a single asset (default is 1). {integer} |
BARCODE | The barcode for the asset (only if QTY is 1). {string} |
SERIAL | The serial number of the asset (only if QTY is 1). {string} |
LEGACY_INCOME | The income generated on the asset before HireHop was used (default is 0). {float} |
MEMO | The memo for the asset. {string} |
PURCHASE_PRICE | The purchase price of the asset in the base currency (default is 0). {float} |
PURCHASED_FROM | The name of the person/company the asset was bought from. {string} |
SOLD_PRICE | The price the asset was sold for in the base currency (default is 0). {float} |
FINANCE_COMPANY | The company who financed the asset. {string} |
FINANCE_REF | The fiance company reference. {string} |
FINANCE_UPTO | The date the finance finishes (YYYY-MM-DD HH:mm:ss). {date string} |
PURCHASE_DATE | The date the asset was bought (YYYY-MM-DD HH:mm:ss). {date string} |
RETIRE_DATE | The date the asset was sold/deleted/lost, etc. (YYYY-MM-DD HH:mm:ss). {date string} |
TELEMATICS_URL | A url to link to the telematics page of the asset. {url string} |
CUSTOM_FIELDS | Array of custom fields and their values. {array or JSON} |
new_barcode | Set to 1 to generate a new barcode (only if QTY is 1). {integer} |
local | The date and time of the user in their timezone (required). {date string} |
tz | The timezone of the user. {string} |
fields | DEPRECATED!!! Use 'CUSTOM_FIELDS' instead. |
Return parameters:Name | Description |
---|
rows: [ |
0: { |
id | ID of the asset. {integer} |
cell: { |
id | ID of the asset. {integer} |
QTY | The quantity for bulk assets or 1 for a single asset (default is 1). {integer} |
BARCODE | The barcode for the asset (only if QTY is 1). {string} |
STATUS | The index of the status (default is 0). {float} |
SERIAL | The serial number of the asset (only if QTY is 1). {string} |
DEPOT | The name of the depot the asset belongs to. {string} |
JOB | The ID of the job the asset is currently being used on ('0' means no job). {integer} |
PURCHASE_DATE | The date the asset was bought (YYYY-MM-DD HH:mm:ss). {date string} |
RETIRE_DATE | The date the asset was sold/deleted/lost, etc. (YYYY-MM-DD HH:mm:ss). {date string} |
PURCHASE_PRICE | The purchase price of the asset in the base currency (default is 0). {float} |
PURCHASED_FROM | The name of the person/company the asset was bought from. {string} |
SOLD_PRICE | The price the asset was sold for in the base currency (default is 0). {float} |
FINANCE_UPTO | The date the finance finishes (YYYY-MM-DD HH:mm:ss). {date string} |
FINANCE_COMPANY | The company who financed the asset. {string} |
FINANCE_REF | The fiance company reference. {string} |
PRE_PREP | The name of the item is inside a preprep of. {string} |
service | The date the item is serviced upto, a '!' if not done and needed or blank if not needed. {string} |
pat | The date the item is serviced upto, a '!' if not done and needed or blank if not needed. {string} |
test | The date the item is serviced upto, a '!' if not done and needed or blank if not needed. {string} |
data: { |
ID | ID of the asset. {integer} |
STOCK_ID | ID of the parent stock item. {integer} |
QTY | The quantity for bulk assets or 1 for a single asset (default is 1). {integer} |
BARCODE | The barcode for the asset (only if QTY is 1). {string} |
SERIAL | The serial number of the asset (only if QTY is 1). {string} |
STATUS | The index of the status (default is 0). {float} |
LEGACY_INCOME | The income generated on the asset before HireHop was used (default is 0). {float} |
MEMO | The memo for the asset. {string} |
PURCHASE_DATE | 2008-10-17 |
RETIRE_DATE | The date the asset was bought (YYYY-MM-DD HH:mm:ss). {date string} |
PURCHASE_PRICE | The purchase price of the asset in the base currency (default is 0). {float} |
PURCHASED_FROM | The name of the person/company the asset was bought from. {string} |
SOLD_PRICE | The price the asset was sold for in the base currency (default is 0). {float} |
SERVICED_DATE | The date the asset was last serviced (YYYY-MM-DD HH:mm:ss). {date string} |
PAT_DATE | The date the asset was last PAT tested (YYYY-MM-DD HH:mm:ss). {date string} |
TEST_DATE | The date the asset was last tested (YYYY-MM-DD HH:mm:ss). {date string} |
DEPOT | ID of the root depot the asset is in. {integer} |
VIRTUAL_DEPOT_ID | ID of the virtual depot the asset is in. {integer} |
FINANCE_UPTO | The date the finance finishes (YYYY-MM-DD HH:mm:ss). {date string} |
FINANCE_COMPANY | The company who financed the asset. {string} |
FINANCE_REF | The fiance company reference. {string} |
PRE_PREP | The name of the item is inside a preprep of. {string} |
JOB | The ID of the job the asset is currently being used on ('0' means no job). {integer} |
TELEMATICS_URL | A url to link to the telematics page of the asset. {url string} |
CUSTOM_FIELDS | Array of custom fields. {array} |
} |
} |
} |
] |
error | Set 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:Name | Description |
---|
ID | ID if set, overrides all other filters and gets the asset with the ID (optional) {integer}. |
STATUS | An 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} |
BARCODE | The barcode of a single asset to get the data for (optional) {string} |
DEPOT | The root depot ID the asset(s) belong to (optional) {integer} |
STOCK_ID | The stock ID to limit the assets to. (optional) {integer} |
SERIAL | The serial number of an asset to get the data for (optional) {string} |
CATEGORY | The category ID to limit the assets to (it will include sub categories). (optional) {integer} |
PAGE | The page number of data to return. (optional) {integer} |
ROWS | The number of records to return for the requested page. (optional) {integer} |
SORD | If the data should be ascending (asc) or descending (desc). (optional) {string} |
SIDX | The field name to sort by ('BARCODE', 'STATUS', 'QTY', 'DEPOT', 'PAT_DATE', 'SERVICED_DATE' or 'TEST_DATE') (optional) {string} |
Return parameters:Name | Description |
---|
rows: [ |
0: { |
id | The ID of the asset (integer). |
cell: [ |
0: { |
ID | The ID of the asset (integer). |
NAME | The stock name of the asset. (string). |
STOCK_ID | The stock ID the asset is one of. (integer). |
QTY | The quantity of the asset. If a bulk asset, it will be more than 1. (integer). |
BARCODE | The barcode of the asset. (string). |
SERIAL | The serial number of the asset. (string). |
STATUS | The status of the asset (float). |
MEMO | The memo of the asset (string). |
PURCHASE_DATE | The purchase date of the asset in 'YYYY-MM-DD hh:mm:ss' format (string). |
RETIRE_DATE | The date the asset was taken out of commission in 'YYYY-MM-DD hh:mm:ss' format (string). |
PURCHASE_PRICE | The price paid for the asset (float). |
PURCHASED_FROM | The name of the entity that sold the asset to you (string). |
SOLD_PRICE | The price the asset was sold for (float). |
SERVICED_DATE | The date the asset was last serviced in 'YYYY-MM-DD hh:mm:ss' format (string). |
PAT_DATE | The date the asset was last PAT tested in 'YYYY-MM-DD hh:mm:ss' format (string). |
TEST_DATE | The date the asset was last tested in 'YYYY-MM-DD hh:mm:ss' format (string). |
DEPOT | The depot ID the asset belongs to (integer). |
FINANCE_UPTO | The date the asset is financed upto in 'YYYY-MM-DD hh:mm:ss' format (string). |
FINANCE_COMPANY | The name of the finance company (string). |
FINANCE_REF | The reference for the finance (string). |
NEXT_SERVICE | The date the asset must next be serviced in 'YYYY-MM-DD hh:mm:ss' format (string). |
NEXT_PAT | The date the asset must next be PAT tested in 'YYYY-MM-DD hh:mm:ss' format (string). |
NEXT_TEST | The date the asset must next be tested in 'YYYY-MM-DD hh:mm:ss' format (string). |
CATEGORY_ID | The category ID the asset belongs to (integer). |
CATEGORY | The category name the asset belongs to (string). |
REPLACE_COST | The replacement/insurance cost of the asset (float). |
STATUS_CHANGE | The last time the STATUS was changed for the asset in 'YYYY-MM-DD hh:mm:ss' format (string). |
breadcrumb | The name of the categories with all parents (string). |
fields | Custom fields of the asset (array). |
error | Set 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:Name | Description |
---|
ID | ID if set, overrides all other filters and gets the asset with the ID (optional) {integer}. |
STATUS | An 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} |
BARCODE | The barcode of a single asset to get the data for (optional) {string} |
DEPOT | The root depot ID the asset(s) belong to (optional) {integer} |
STOCK_ID | The stock ID to limit the assets to. (optional) {integer} |
SERIAL | The serial number of an asset to get the data for (optional) {string} |
CATEGORY | The category ID to limit the assets to (it will include sub categories). (optional) {integer} |
TEST_REQUIRED | Set to '1' to only include assets that need a test. (optional) {integer} |
PAT_REQUIRED | Set to '1' to only include assets that need a PAT test. (optional) {integer} |
SERVICE_REQUIRED | Set to '1' to only include assets that need a service. (optional) {integer} |
PAGE | The page number of data to return. (optional) {integer} |
ROWS | The number of records to return for the requested page. (optional) {integer} |
SORD | If the data should be ascending (asc) or descending (desc). (optional) {string} |
SIDX | The field name to sort by ('BARCODE', 'STATUS', 'QTY', 'DEPOT', 'PAT_DATE', 'SERVICED_DATE' or 'TEST_DATE') (optional) {string} |
Return parameters:Name | Description |
---|
rows: [ |
0: { |
id | The ID of the asset (integer). |
cell: [ |
0: { |
ID | The ID of the asset (integer). |
NAME | The stock name of the asset. (string). |
STOCK_ID | The stock ID the asset is one of. (integer). |
QTY | The quantity of the asset. If a bulk asset, it will be more than 1. (integer). |
BARCODE | The barcode of the asset. (string). |
SERIAL | The serial number of the asset. (string). |
STATUS | The status of the asset (float). |
MEMO | The memo of the asset (string). |
PURCHASE_DATE | The purchase date of the asset in 'YYYY-MM-DD hh:mm:ss' format (string). |
RETIRE_DATE | The date the asset was taken out of commission in 'YYYY-MM-DD hh:mm:ss' format (string). |
PURCHASE_PRICE | The price paid for the asset (float). |
PURCHASED_FROM | The name of the entity that sold the asset to you (string). |
SOLD_PRICE | The price the asset was sold for (float). |
SERVICED_DATE | The date the asset was last serviced in 'YYYY-MM-DD hh:mm:ss' format (string). |
PAT_DATE | The date the asset was last PAT tested in 'YYYY-MM-DD hh:mm:ss' format (string). |
TEST_DATE | The date the asset was last tested in 'YYYY-MM-DD hh:mm:ss' format (string). |
DEPOT | The depot ID the asset belongs to (integer). |
FINANCE_UPTO | The date the asset is financed upto in 'YYYY-MM-DD hh:mm:ss' format (string). |
FINANCE_COMPANY | The name of the finance company (string). |
FINANCE_REF | The reference for the finance (string). |
NEXT_SERVICE | The date the asset must next be serviced in 'YYYY-MM-DD hh:mm:ss' format (string). |
NEXT_PAT | The date the asset must next be PAT tested in 'YYYY-MM-DD hh:mm:ss' format (string). |
NEXT_TEST | The date the asset must next be tested in 'YYYY-MM-DD hh:mm:ss' format (string). |
CATEGORY_ID | The category ID the asset belongs to (integer). |
CATEGORY | The category name the asset belongs to (string). |
REPLACE_COST | The replacement/insurance cost of the asset (float). |
STATUS_CHANGE | The last time the STATUS was changed for the asset in 'YYYY-MM-DD hh:mm:ss' format (string). |
CHECKED_OUT | Set to true if the asset is checked out on a job (boolean). |
CHECKED_OUT_JOB_NUMBER | The job number the asset is checked out on (integer). |
CHECKED_OUT_JOB_NAME | The job name the asset is checked out on (string). |
breadcrumb | The name of the categories with all parents (string). |
fields | Custom fields of the asset (array). |
error | Set 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.NEW.php
Send parameters:Name | Description |
---|
local | The local date and time of the user in 'YYYY-MM-DD hh:mm:ss' format (optional). {string}. |
head | The ID of the category to filter by (optional). {integer} |
BARCODE | The group barcode of the item to filter by (optional). {string} |
del | If '1', include deleted items in the search (optional). {integer} |
show_hidden | If '1', include hidden in depot items in the search (optional). {integer} |
_search | If set to anything, allow filtering on TITLE, ALT_TITLE, PART_NUMBER, ACC_NOMINAL and custom fields |
unq | ID of the hire stock item (returns only one item if set) (optional) {integer}. |
page | The page number of data to return. (optional) {integer} |
rows | The number of records to return for the requested page (min 20, max 200). (optional) {integer} |
sord | If the data should be ascending (asc) or descending (desc). (optional) {string} |
sidx | The 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} |
GLOBAL | The 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:Name | Description |
---|
page | The page number returned. {integer} |
total | How many pages in total to be returned. {integer} |
records | How many rows in total. {integer} |
rows: [ |
0: { |
id | The ID of the asset (integer). |
TITLE | Name of the item. {string} |
ALT_TITLE | The alternative name of the item. {string} |
DESCRIPTION | The description of the item. {string} |
PRICE1 | Price A of the item. {float} |
PRICE2 | Price B of the item. {float} |
PRICE3 | Price C of the item. {float} |
PRICE_TYPE1 | The 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_TYPE2 | The 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_TYPE3 | The 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} |
STOCK | This is a placeholder for how many are held in stock at the user depot, and will always be '?'. {string} |
GLOBAL | This is a placeholder for how many are held in stock in all depots, and will always be '?'. {string} |
AVAILABLE | This is a placeholder for how many are available at local, and will always be '?'. {string} |
WEIGHT | The weight of the item in KG. {float} |
PART_NUMBER | The part number of the item. {string} |
LOCATION | The location description of the item in the warehouse, like shelf number (optional). {string} |
WIDTH | The width of the item in meters. {float} |
LENGTH | The length of the item in meters. {float} |
HEIGHT | The height of the item in meters. {float} |
VOLUME | The volume in m3. {float} |
IN_REPAIR | How many are in repair at the user depot at this moment {integer} |
BARCODE | The group barcode of the item. {string} |
REPLACE_COST | The cost to replace/insurance value of the item. {float} |
COST_PRICE | The estimated cost to rent this item in. {float} |
COUNTRY_ORIGIN | The country of origin of the item. Used on carnet documents. {string} |
ACC_NOMINAL | The sales nominal group ID for the item. {integer} |
data: { |
ID | The ID of the asset (integer). |
TITLE | Name of the item. {string} |
ALT_TITLE | The alternative name of the item. {string} |
DESCRIPTION | The description of the item. {string} |
PRICE1 | Price A of the item. {float} |
PRICE2 | Price B of the item. {float} |
PRICE3 | Price C of the item. {float} |
MAX_DISCOUNT | The maximum discount percentage allowed for the item (optional, 0 to 100). {float} |
PRICE_TYPE1 | The 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_TYPE2 | The 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_TYPE3 | The 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_RATE | The tax/GST/VAT type to use. {integer} |
STATUS | The status index of the item (0=Active, 1=Hidden in picklist, 2=Deleted)(optional). {float} |
CATEGORY_ID | The ID of the category the item is part of. {integer} |
IMAGE_ID | The ID of the image for the item. {integer} |
MEMO | The memo of the item. {string} |
NO_SHORTFALL | If 0 then HireHop calculates availability. {integer} |
REPLACE_COST | The cost to replace/insurance value of the item. {float} |
COST_PRICE | The estimated cost to rent this item in. {float} |
WEIGHT | The weight of the item in KG. {float} |
WIDTH | The width of the item in meters. {float} |
LENGTH | The length of the item in meters. {float} |
HEIGHT | The height of the item in meters. {float} |
IS_BOX | Set to '1' if the item is a box {integer} |
IS_BOX_OUT | Set 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_IN | Set as 0 for do nothing on check in, 8 to open box on check in. {integer} |
VOLUME | The override value of the volume. If zero, then volume should be calculated as WIDTH * LENGTH * HEIGHT. {float} |
SERVICE_INTERVAL | The service interval in ISO8601 temporal duration format (https://tc39.es/proposal-temporal/docs/duration.html). {string} |
PAT_INTERVAL | The service interval in ISO8601 temporal duration format (https://tc39.es/proposal-temporal/docs/duration.html). {string} |
TEST_INTERVAL | The service interval in ISO8601 temporal duration format (https://tc39.es/proposal-temporal/docs/duration.html). {string} |
STOCK | This is a placeholder for how many are held in stock at the user depot, and will always be '?'. {string} |
GLOBAL | This is a placeholder for how many are held in stock in all depots, and will always be '?'. {string} |
AVAILABLE | This is a placeholder for how many are available at local, and will always be '?'. {string} |
IN_REPAIR | How many are in repair at the user depot at this moment {integer} |
LOCATION | The location description of the item in the warehouse, like shelf number. {string} |
MARKETING_ID | The ID of the category for marketing. {integer} |
MARKETING_PRICE | The price to use for marketing the item (0=none, 1=Price A, 2=Price B, & 3=Price C). {integer} |
DEPRECIATION | How many years for depreciation (from 0 to 10). {integer} |
ACC_NOMINAL | The sales nominal group ID for the item. {integer} |
ACC_NOMINAL_PO | The purchase nominal group ID for the item. {integer} |
VIRTUAL | If '1', the item is a virtual item. {integer} |
BARCODE | The group barcode of the item (optional). {string} |
PART_NUMBER | The part number of the item. {string} |
COUNTRY_ORIGIN | The country of origin of the item. Used on carnet documents.. {string[45]} |
LOGGING | The usage logging settings. {JSON array} |
DEPOT_LIMITS | An array or string of depot ID's the item is limited to. {array or array-string |
MANDATORY_SCAN | If set to 1, a barcode is required to check the item out. {integer} |
FLAG | The deafult flag to set when adding a new item into a supplying list (0=none, 1=Not important, 2=Important & 3=Technical). {integer} |
EXCLUDE_FROM_WEBSHOP | For exclude the item from webshop. {integer} |
fields | Custom fields of the item {array}. |
crumbs | The breadcrumb details of the category the item is in {JSON array} |
} |
} |
] |
error | Set 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.OLD.php
Send parameters:Name | Description |
---|
local | The local date and time of the user in 'YYYY-MM-DD hh:mm:ss' format (optional). {string}. |
head | The ID of the category to filter by (optional). {integer} |
BARCODE | The group barcode of the item to filter by (optional). {string} |
del | If '1', include deleted items in the search (optional). {integer} |
show_hidden | If '1', include hidden in depot items in the search (optional). {integer} |
_search | If set to anything, allow filtering on TITLE, ALT_TITLE, PART_NUMBER, ACC_NOMINAL and custom fields |
unq | ID of the hire stock item (returns only one item if set) (optional) {integer}. |
page | The page number of data to return. (optional) {integer} |
rows | The number of records to return for the requested page (min 20, max 200). (optional) {integer} |
sord | If the data should be ascending (asc) or descending (desc). (optional) {string} |
sidx | The 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} |
GLOBAL | The 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:Name | Description |
---|
page | The page number returned. {integer} |
total | How many pages in total to be returned. {integer} |
records | How many rows in total. {integer} |
rows: [ |
0: { |
id | The ID of the item (integer). |
cell: [ |
0: { |
id | The ID of the asset (integer). |
TITLE | Name of the item. {string} |
ALT_TITLE | The alternative name of the item. {string} |
DESCRIPTION | The description of the item. {string} |
PRICE1 | Price A of the item. {float} |
PRICE2 | Price B of the item. {float} |
PRICE3 | Price C of the item. {float} |
PRICE_TYPE1 | The 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_TYPE2 | The 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_TYPE3 | The 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} |
STOCK | This is a placeholder for how many are held in stock at the user depot, and will always be '?'. {string} |
GLOBAL | This is a placeholder for how many are held in stock in all depots, and will always be '?'. {string} |
AVAILABLE | This is a placeholder for how many are available at local, and will always be '?'. {string} |
WEIGHT | The weight of the item in KG. {float} |
PART_NUMBER | The part number of the item. {string} |
LOCATION | The location description of the item in the warehouse, like shelf number (optional). {string} |
WIDTH | The width of the item in meters. {float} |
LENGTH | The length of the item in meters. {float} |
HEIGHT | The height of the item in meters. {float} |
VOLUME | The volume in m3. {float} |
IN_REPAIR | How many are in repair at the user depot at this moment {integer} |
BARCODE | The group barcode of the item. {string} |
REPLACE_COST | The cost to replace/insurance value of the item. {float} |
COST_PRICE | The estimated cost to rent this item in. {float} |
COUNTRY_ORIGIN | The country of origin of the item. Used on carnet documents. {string} |
ACC_NOMINAL | The sales nominal group ID for the item. {integer} |
data: { |
ID | The ID of the asset (integer). |
TITLE | Name of the item. {string} |
ALT_TITLE | The alternative name of the item. {string} |
DESCRIPTION | The description of the item. {string} |
PRICE1 | Price A of the item. {float} |
PRICE2 | Price B of the item. {float} |
PRICE3 | Price C of the item. {float} |
MAX_DISCOUNT | The maximum discount percentage allowed for the item (optional, 0 to 100). {float} |
PRICE_TYPE1 | The 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_TYPE2 | The 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_TYPE3 | The 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_RATE | The tax/GST/VAT type to use. {integer} |
STATUS | The status index of the item (0=Active, 1=Hidden in picklist, 2=Deleted)(optional). {float} |
CATEGORY_ID | The ID of the category the item is part of. {integer} |
IMAGE_ID | The ID of the image for the item. {integer} |
MEMO | The memo of the item. {string} |
NO_SHORTFALL | If 0 then HireHop calculates availability. {integer} |
REPLACE_COST | The cost to replace/insurance value of the item. {float} |
COST_PRICE | The estimated cost to rent this item in. {float} |
WEIGHT | The weight of the item in KG. {float} |
WIDTH | The width of the item in meters. {float} |
LENGTH | The length of the item in meters. {float} |
HEIGHT | The height of the item in meters. {float} |
IS_BOX | Set to '1' if the item is a box {integer} |
IS_BOX_OUT | Set 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_IN | Set as 0 for do nothing on check in, 8 to open box on check in. {integer} |
VOLUME | The override value of the volume. If zero, then volume should be calculated as WIDTH * LENGTH * HEIGHT. {float} |
SERVICE_INTERVAL | The service interval in ISO8601 temporal duration format (https://tc39.es/proposal-temporal/docs/duration.html). {string} |
PAT_INTERVAL | The service interval in ISO8601 temporal duration format (https://tc39.es/proposal-temporal/docs/duration.html). {string} |
TEST_INTERVAL | The service interval in ISO8601 temporal duration format (https://tc39.es/proposal-temporal/docs/duration.html). {string} |
STOCK | This is a placeholder for how many are held in stock at the user depot, and will always be '?'. {string} |
GLOBAL | This is a placeholder for how many are held in stock in all depots, and will always be '?'. {string} |
AVAILABLE | This is a placeholder for how many are available at local, and will always be '?'. {string} |
IN_REPAIR | How many are in repair at the user depot at this moment {integer} |
LOCATION | The location description of the item in the warehouse, like shelf number. {string} |
MARKETING_ID | The ID of the category for marketing. {integer} |
MARKETING_PRICE | The price to use for marketing the item (0=none, 1=Price A, 2=Price B, & 3=Price C). {integer} |
DEPRECIATION | How many years for depreciation (from 0 to 10). {integer} |
ACC_NOMINAL | The sales nominal group ID for the item. {integer} |
ACC_NOMINAL_PO | The purchase nominal group ID for the item. {integer} |
VIRTUAL | If '1', the item is a virtual item. {integer} |
BARCODE | The group barcode of the item (optional). {string} |
PART_NUMBER | The part number of the item. {string} |
COUNTRY_ORIGIN | The country of origin of the item. Used on carnet documents.. {string[45]} |
LOGGING | The usage logging settings. {JSON array} |
DEPOT_LIMITS | An array or string of depot ID's the item is limited to. {array or array-string |
MANDATORY_SCAN | If set to 1, a barcode is required to check the item out. {integer} |
FLAG | The deafult flag to set when adding a new item into a supplying list (0=none, 1=Not important, 2=Important & 3=Technical). {integer} |
EXCLUDE_FROM_WEBSHOP | For exclude the item from webshop. {integer} |
fields | Custom fields of the item {array}. |
crumbs | The breadcrumb details of the category the item is in {JSON array} |
} |
} |
] |
} |
] |
error | Set 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:Name | Description |
---|
local | The local date and time of the user in 'YYYY-MM-DD hh:mm:ss' format (optional). {string}. |
head | The ID of the category to filter by (optional). {integer} |
cats | An array of category IDs to show (empty shows all). {JSON|JSON string|array} |
BARCODE | The group barcode of the item to filter by (optional). {string} |
del | If '1', include deleted items in the search (optional). {integer} |
show_hidden | If '1', include hidden in depot items in the search (optional). {integer} |
_search | If set to anything, allow filtering on TITLE, ALT_TITLE, PART_NUMBER, ACC_NOMINAL and custom fields |
unq | ID of the hire stock item (returns only one item if set) (optional) {integer}. |
page | The page number of data to return. (optional) {integer} |
rows | The number of records to return for the requested page (min 20, max 200). (optional) {integer} |
sord | If the data should be ascending (asc) or descending (desc). (optional) {string} |
sidx | The 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} |
GLOBAL | The 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:Name | Description |
---|
page | The page number returned. {integer} |
total | How many pages in total to be returned. {integer} |
records | How many rows in total. {integer} |
heads | If the first page and the user is not using category trees, then a list of root categories will be returned, otherwise this will be empty. {array} |
rows: [ |
0: { |
id | The ID of the item (integer). |
cell: [ |
0: { |
id | The ID of the asset (integer). |
TITLE | Name of the item. {string} |
ALT_TITLE | The alternative name of the item. {string} |
DESCRIPTION | The description of the item. {string} |
PRICE1 | Price A of the item. {float} |
PRICE2 | Price B of the item. {float} |
PRICE3 | Price C of the item. {float} |
PRICE_TYPE1 | The 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_TYPE2 | The 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_TYPE3 | The 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} |
STOCK | This is a placeholder for how many are held in stock at the user depot, and will always be '?'. {string} |
GLOBAL | This is a placeholder for how many are held in stock in all depots, and will always be '?'. {string} |
AVAILABLE | This is a placeholder for how many are available at local, and will always be '?'. {string} |
WEIGHT | The weight of the item in KG. {float} |
PART_NUMBER | The part number of the item. {string} |
LOCATION | The location description of the item in the warehouse, like shelf number (optional). {string} |
WIDTH | The width of the item in meters. {float} |
LENGTH | The length of the item in meters. {float} |
HEIGHT | The height of the item in meters. {float} |
VOLUME | The volume in m3. {float} |
IN_REPAIR | How many are in repair at the user depot at this moment {integer} |
BARCODE | The group barcode of the item. {string} |
REPLACE_COST | The cost to replace/insurance value of the item. {float} |
COST_PRICE | The estimated cost to rent this item in. {float} |
COUNTRY_ORIGIN | The country of origin of the item. Used on carnet documents. {string} |
ACC_NOMINAL | The sales nominal group ID for the item. {integer} |
data: { |
ID | The ID of the asset (integer). |
TITLE | Name of the item. {string} |
ALT_TITLE | The alternative name of the item. {string} |
DESCRIPTION | The description of the item. {string} |
PRICE1 | Price A of the item. {float} |
PRICE2 | Price B of the item. {float} |
PRICE3 | Price C of the item. {float} |
MAX_DISCOUNT | The maximum discount percentage allowed for the item (optional, 0 to 100). {float} |
PRICE_TYPE1 | The 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_TYPE2 | The 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_TYPE3 | The 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_RATE | The tax/GST/VAT type to use. {integer} |
STATUS | The status index of the item (0=Active, 1=Hidden in picklist, 2=Deleted)(optional). {float} |
CATEGORY_ID | The ID of the category the item is part of. {integer} |
IMAGE_ID | The ID of the image for the item. {integer} |
MEMO | The memo of the item. {string} |
NO_SHORTFALL | If 0 then HireHop calculates availability. {integer} |
REPLACE_COST | The cost to replace/insurance value of the item. {float} |
COST_PRICE | The estimated cost to rent this item in. {float} |
WEIGHT | The weight of the item in KG. {float} |
WIDTH | The width of the item in meters. {float} |
LENGTH | The length of the item in meters. {float} |
HEIGHT | The height of the item in meters. {float} |
IS_BOX | Set to '1' if the item is a box {integer} |
IS_BOX_OUT | Set 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_IN | Set as 0 for do nothing on check in, 8 to open box on check in. {integer} |
VOLUME | The override value of the volume. If zero, then volume should be calculated as WIDTH * LENGTH * HEIGHT. {float} |
SERVICE_INTERVAL | The service interval in ISO8601 temporal duration format (https://tc39.es/proposal-temporal/docs/duration.html). {string} |
PAT_INTERVAL | The service interval in ISO8601 temporal duration format (https://tc39.es/proposal-temporal/docs/duration.html). {string} |
TEST_INTERVAL | The service interval in ISO8601 temporal duration format (https://tc39.es/proposal-temporal/docs/duration.html). {string} |
STOCK | This is a placeholder for how many are held in stock at the user depot, and will always be '?'. {string} |
GLOBAL | This is a placeholder for how many are held in stock in all depots, and will always be '?'. {string} |
AVAILABLE | This is a placeholder for how many are available at local, and will always be '?'. {string} |
IN_REPAIR | How many are in repair at the user depot at this moment {integer} |
LOCATION | The location description of the item in the warehouse, like shelf number. {string} |
MARKETING_ID | The ID of the category for marketing. {integer} |
MARKETING_PRICE | The price to use for marketing the item (0=none, 1=Price A, 2=Price B, & 3=Price C). {integer} |
DEPRECIATION | How many years for depreciation (from 0 to 10). {integer} |
ACC_NOMINAL | The sales nominal group ID for the item. {integer} |
ACC_NOMINAL_PO | The purchase nominal group ID for the item. {integer} |
VIRTUAL | If '1', the item is a virtual item. {integer} |
BARCODE | The group barcode of the item (optional). {string} |
PART_NUMBER | The part number of the item. {string} |
COUNTRY_ORIGIN | The country of origin of the item. Used on carnet documents.. {string[45]} |
LOGGING | The usage logging settings. {JSON array} |
DEPOT_LIMITS | An array or string of depot ID's the item is limited to. {array or array-string |
MANDATORY_SCAN | If set to 1, a barcode is required to check the item out. {integer} |
FLAG | The deafult flag to set when adding a new item into a supplying list (0=none, 1=Not important, 2=Important & 3=Technical). {integer} |
EXCLUDE_FROM_WEBSHOP | For exclude the item from webshop. {integer} |
fields | Custom fields of the item {array}. |
crumbs | The breadcrumb details of the category the item is in {JSON array} |
} |
} |
] |
} |
] |
error | Set 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:Name | Description |
---|
ID | ID of the hire stock item or zero creates a new item (default 0) {integer}. |
TITLE | Name of the item (required for new). {string[85]} |
ALT_TITLE | The alternative name of the item (optional). {string[85]} |
BARCODE | The group barcode of the item (optional). {string[45]} |
DESCRIPTION | The description of the item (optional). {string} |
PRICE1 | Price A of the item (optional). {float} |
PRICE2 | Price B of the item (optional). {float} |
PRICE3 | Price C of the item (optional). {float} |
MAX_DISCOUNT | The maximum discount percentage allowed for the item (optional, 0 to 100). {float} |
PRICE_TYPE | Sets PRICE_TYPE1, PRICE_TYPE2 and PRICE_TYPE3, to the same value. {integer} |
PRICE_TYPE1 | The 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_TYPE2 | The 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_TYPE3 | The 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_RATE | The tax/GST/VAT type to use (optional). {integer} |
STATUS | The status index of the item (0=Active, 1=Hidden in picklist, 2=Deleted)(optional). {float} |
CATEGORY_ID | The ID of the category the item is part of (optional). {integer} |
MEMO | The memo of the item (optional). {string} |
NO_SHORTFALL | Set to 1 to prevent HireHop calculating availability. {integer} |
REPLACE_COST | The cost to replace/insurance value of the item (optional). {float} |
COST_PRICE | The cost to rent this item in (optional). {float} |
WEIGHT | The weight of the item in KG (optional). {float} |
WIDTH | The width of the item in meters (optional). {float} |
LENGTH | The length of the item in meters (optional). {float} |
HEIGHT | The height of the item in meters (optional). {float} |
SERVICE_INTERVAL | The service interval in ISO8601 temporal duration format (https://tc39.es/proposal-temporal/docs/duration.html) (optional). {string} |
PAT_INTERVAL | The service interval in ISO8601 temporal duration format (https://tc39.es/proposal-temporal/docs/duration.html) (optional). {string} |
TEST_INTERVAL | The service interval in ISO8601 temporal duration format (https://tc39.es/proposal-temporal/docs/duration.html) (optional). {string} |
LOCATION | The location description of the item in the warehouse, like shelf number (optional). {string[45]} |
MARKETING_ID | The ID of the category for marketing (optional). {integer} |
MARKETING_PRICE | The price to use for marketing the item (0=none, 1=Price A, 2=Price B, & 3=Price C) (optional). {integer} |
MANDATORY_SCAN | Set to 1 so that a barcode is required to check the item out. {integer} |
DEPRECIATION | How many years for depreciation (from 0 to 10) (optional). {integer} |
ACC_NOMINAL | The sales nominal group ID for the item (optional). {integer} |
ACC_NOMINAL_PO | The purchase nominal group ID for the item (optional). {integer} |
PART_NUMBER | The part number of the item (optional). {string[25]} |
COUNTRY_ORIGIN | The country of origin of the item. Used on carnet documents. (optional). {string[45]} |
FLAG | The 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_LIMITS | An array or string of depot ID's the item is limited to (optional). {array or array-string} |
IMAGE_ID | The ID of the image for the item (optional). {integer} |
VIRTUAL | Only for new items. Setting to '1' makes the item vbirtual (optional). {integer} |
IMAGE | The image data of the new image (optional). {BASE 64} |
EXCLUDE_FROM_WEBSHOP | For exclude the item from webshop. {integer} |
fields | Custom fields of the item (array). |
Return parameters:Name | Description |
---|
rows: [ |
0: { |
id | The ID of the item (integer). |
cell: [ |
0: { |
id | The ID of the asset (integer). |
TITLE | Name of the item. {string} |
ALT_TITLE | The alternative name of the item. {string} |
DESCRIPTION | The description of the item. {string} |
PRICE1 | Price A of the item. {float} |
PRICE2 | Price B of the item. {float} |
PRICE3 | Price C of the item. {float} |
PRICE_TYPE1 | The 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_TYPE2 | The 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_TYPE3 | The 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} |
STOCK | How many are held in stock at the user depot. {integer} |
GLOBAL | How many are held in stock in all depots. {integer} |
WEIGHT | The weight of the item in KG. {float} |
PART_NUMBER | The part number of the item. {string} |
LOCATION | The location description of the item in the warehouse, like shelf number (optional). {string} |
WIDTH | The width of the item in meters. {float} |
LENGTH | The length of the item in meters. {float} |
HEIGHT | The height of the item in meters. {float} |
IN_REPAIR | How many are in repair at the user depot at this moment {integer} |
BARCODE | The group barcode of the item. {string} |
REPLACE_COST | The cost to replace/insurance value of the item. {float} |
COUNTRY_ORIGIN | The country of origin of the item. Used on carnet documents. {string} |
AVAILABLE | How many are available at the user depot at this moment. {integer} |
ACC_NOMINAL | The sales nominal group ID for the item. {integer} |
data: { |
ID | The ID of the asset (integer). |
TITLE | Name of the item. {string} |
ALT_TITLE | The alternative name of the item. {string} |
DESCRIPTION | The description of the item. {string} |
PRICE1 | Price A of the item. {float} |
PRICE2 | Price B of the item. {float} |
PRICE3 | Price C of the item. {float} |
MAX_DISCOUNT | The maximum discount percentage allowed for the item (optional, 0 to 100). {float} |
PRICE_TYPE1 | The 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_TYPE2 | The 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_TYPE3 | The 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_RATE | The tax/GST/VAT type to use. {integer} |
STATUS | The status index of the item (0=Active, 1=Hidden in picklist, 2=Deleted)(optional). {float} |
CATEGORY_ID | The ID of the category the item is part of. {integer} |
IMAGE_ID | The ID of the image for the item. {integer} |
MEMO | The memo of the item. {string} |
NO_SHORTFALL | If 0 then HireHop calculates availability. {integer} |
REPLACE_COST | The cost to replace/insurance value of the item. {float} |
COST_PRICE | The cost to rent this item in. {float} |
WEIGHT | The weight of the item in KG. {float} |
WIDTH | The width of the item in meters. {float} |
LENGTH | The length of the item in meters. {float} |
HEIGHT | The height of the item in meters. {float} |
SERVICE_INTERVAL | The service interval in ISO8601 temporal duration format (https://tc39.es/proposal-temporal/docs/duration.html). {string} |
PAT_INTERVAL | The service interval in ISO8601 temporal duration format (https://tc39.es/proposal-temporal/docs/duration.html). {string} |
TEST_INTERVAL | The service interval in ISO8601 temporal duration format (https://tc39.es/proposal-temporal/docs/duration.html). {string} |
STOCK | How many are held in stock at the user depot. {integer} |
GLOBAL | How many are held in stock in all depots. {integer} |
AVAILABLE | How many are available at the user depot at this moment. {integer} |
IN_REPAIR | How many are in repair at the user depot at this moment {integer} |
LOCATION | The location description of the item in the warehouse, like shelf number. {string} |
MARKETING_ID | The ID of the category for marketing. {integer} |
MARKETING_PRICE | The price to use for marketing the item (0=none, 1=Price A, 2=Price B, & 3=Price C). {integer} |
DEPRECIATION | How many years for depreciation (from 0 to 10). {integer} |
ACC_NOMINAL | The sales nominal group ID for the item. {integer} |
ACC_NOMINAL_PO | The purchase nominal group ID for the item. {integer} |
VIRTUAL | If '1', the item is a virtual item. {integer} |
BARCODE | The group barcode of the item (optional). {string} |
PART_NUMBER | The part number of the item. {string} |
COUNTRY_ORIGIN | The country of origin of the item. Used on carnet documents.. {string[45]} |
LOGGING | The usage logging settings. {JSON array} |
DEPOT_LIMITS | An array or string of depot ID's the item is limited to. {array or array-string |
FLAG | The deafult flag to set when adding a new item into a supplying list (0=none, 1=Not important, 2=Important & 3=Technical). {integer} |
MANDATORY_SCAN | If set to 1, a barcode is required to check the item out. {integer} |
fields | Custom fields of the item {array}. |
crumbs | The breadcrumb details of the category the item is in {JSON array} |
} |
} |
] |
} |
] |
error | Set 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:Name | Description |
---|
id | ID of the asset to move (compulsory if no barcode). {integer}. |
barcode | Barcode of the asset to move (compulsory if no id). {string}. |
depot | ID of the depot to transfer to. {integer} |
qty | Optional quantity to move (will move all if not set). {integer} |
Return parameters:Name | Description |
---|
ID | ID of the asset. {integer} |
DEPOT | ID of the new depot if changed. {integer} |
VIRTUAL_DEPOT_ID | ID of the new virtual depot if changed. {integer} |
error | Set 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:Name | Description |
---|
depot | The ID of the depot to filter by (default is 0=all) (optional). {integer} |
Return parameters:Name | Description |
---|
data: [ |
0: { |
ID | Unique ID of the item. {integer} |
TITLE | Name of consumable stock item. {string} |
BARCODE | The barcode of the item. {string} |
PART_NUMBER | The part number of the item. {float} |
CATEGORY | Name of the category the item belongs to. {string} |
COST_PRICE | The current cost price to buy this item. {float} |
QTY | Quantity 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_FROM | Where it was bought from. {string} |
} |
] |
error | Set 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:Name | Description |
---|
id | cosumable item Id. {integer}. |
from | The date we are searching from in 'YYYY-MM-DD' format (compulsory). {date string}. |
upto | The date we are searching upto in 'YYYY-MM-DD' format (compulsory). {date string}. |
local | User local time (not required). {date string} |
tz | User time zone (not required). {string} |
Return parameters:Name | Description |
---|
data: [ |
0: { |
ID | Unique ID of the purchase order. {integer} |
JOB | ID of the owner job, project, etc. {integer} |
JOB_NAME | What is the job name. {string} |
OUT_DATE | Out date of the consumable item is dispatch for job. {datetime} |
RETURN_DATE | Return date of the consumable item is return from job. {datetime} |
QTY | cosumable item quantity. {integer} |
STATUS | The 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} |
} |
] |
error | Set 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:Name | Description |
---|
from | The date we are searching from in 'YYYY-MM-DD' format (compulsory). {date string}. |
upto | The date we are searching upto in 'YYYY-MM-DD' format (compulsory). {date string}. |
status | The status values to filter. {json or json string of numbers} |
depot | The ID of the depot to filter by (default is 0=all) (optional). {integer}. |
local | User local time (not required). {date string} |
tz | User time zone (not required). {string} |
Return parameters:Name | Description |
---|
data: [ |
0: { |
ID | Unique ID of the custom item. {integer} |
JOB | ID of the job which the custom item used. {integer}. |
NAME | Name of the job custom item used. {string} |
CUSTOM | Name of the custom item used on job. {string} |
ADDITIONAL | The additional name/ alias of custom items. {string} |
QUNATITY | The qunatity of the custom item used in the job. {string} |
UNIT_PRICE | The price of custom item per unit. {string} |
PRICE_TYPE | The 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_RATE | The vat rate of custom item. {float} |
DESCRIPTION | what the name of the custom item nominal account name. {integer} |
WEIGHT | weight of item. {float} |
REPLACE_CODE | The replace cost of item. {float} |
START_DATE | Start date of the custom item used for job. {datetime} |
END_DATE | End date of the custom item used for job. {datetime} |
STATUS | The 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} |
DEPOT | The name of the depot the job is assigned to. {string} |
} |
] |
error | Set 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:Name | Description |
---|
depot | The ID of the depot to filter by (default is 0=all) (optional) {integer}. |
Return parameters:Name | Description |
---|
data: [ |
0: { |
QTY | No of quantity of item {integer} |
TITLE | Name of damaged/repaired stock item. {string} |
BARCODE | Barcode of the item. {string} |
SERIAL | Serial nummber of the item. {string} |
MEMO | Memo of the item. {string} |
STATUS | Status of the item. {integer} |
DEPOT | Which depot the item belongs to. {integer} |
STATUS_CHANGE | The date the last status change happened. {date string} |
REPLACE_COST | Cost of replacing the item in the base currency. {float} |
NET_BOOK_VALUE | Original cost less the accumilated depreciation (net book value). {float}. |
} |
] |
error | Set 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:Name | Description |
---|
from | The date we are searching from in 'YYYY-MM-DD' format (compulsory). {date string}. |
upto | The date we are searching upto in 'YYYY-MM-DD' format (compulsory). {date string}. |
depot | The ID of the depot to filter by (default is 0=all) (optional) {integer}. |
local | User local time (not required). {date string} |
tz | User time zone (not required). {string} |
Return parameters:Name | Description |
---|
data: [ |
0: { |
ID | Unique ID of the purchase order. {integer} |
QTY | Asset Quantity. {integer}. |
TITLE | Asset Item Name. {string} |
BRACODE | Assest Item Barcode. {string} |
SERIAL | Asset item serial number. {string} |
DEPOT | Asset item blongs to which depot. {float} |
PURCHASE_DATE | Asset item purchase on date{datetime string} |
FINANCE_DATE | Asset item finance on date. {datetime string} |
RETIRE_DATE | Aseet item retired on date. {date string} |
PURCHASE_PRICE | Asset item purchase price. {float}. |
SOLD_PRICE | Asset item sold price. {float}. |
FINANCE_COMPANY | Asset Item finance by company. {string} |
FINANCE_REF | asset item referece by . {string} |
} |
] |
error | Set 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/fixed_asset_depreciation_list.php
Send parameters:Name | Description |
---|
depot | The ID of the depot to filter by (optional). {integer}. |
virtdepo | What the Virtual Depot to filter by (optional) {integer}. |
headings_sel | What the Category to filter by (optional) {integer}. |
local | The local date and time of the client (not required). |
tz | The timezone of the client (not required). |
Return parameters:Name | Description |
---|
rows: [ |
0: { |
ID | The unique ID of the asset. {integer} |
STOCK_ID | ID of the of the hire stock. {integer} |
TITLE | The name of the hire stock the asset belongs to. {string} |
ALT_TITLE | The alternative name of the hire stock the asset belongs to. {string} |
BARCODE | The barcode of the asset. {string} |
CATEGORY | The category the hire stock is assigned to. {string} |
DEPOT | The depot the asset is assigned to. {integer} |
DEPRECIATION | The depreciation for the hire stock. |
LOCATION | The location of stock in the depoty. {string} |
MEMO | The asset memo. {string}. |
NET_BOOK_VALUE | The net booke value of the asset (in the base currency). {float} |
PART_NUMBER | The PART_NUMBER of the hire stock. {string} |
PURCHASED_FROM | Who the asset was purchased from. {string} |
PURCHASED_PRICE | How much was the asset bought for (in the base currency). {float} |
PURCHASED_DATE | The date the asset was purchased. {datetime string} |
QUANTITY | If a bulk asset, how many are assigned, otherwise it will equal 1. {integer} |
REPLACE_COST | How much to replace the hire stock (in the base currency). {float} |
STATUS | The status of the asset. {integer} |
} |
] |
error | Set 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:Name | Description |
---|
depot | The ID of the depot to filter by (optional). {integer}. |
virtdepo | What the Virtual Depot to filter by (optional) {integer}. |
headings_sel | What the Category to filter by (optional) {integer}. |
local | The local date and time of the client (not required). |
tz | The timezone of the client (not required). |
Return parameters:Name | Description |
---|
rows: [ |
0: { |
ID | The unique ID of the asset. {integer} |
STOCK_ID | ID of the of the hire stock. {integer} |
TITLE | The name of the hire stock the asset belongs to. {string} |
ALT_TITLE | The alternative name of the hire stock the asset belongs to. {string} |
BARCODE | The barcode of the asset. {string} |
CATEGORY | The category the hire stock is assigned to. {string} |
DEPOT | The depot the asset is assigned to. {integer} |
DEPRECIATION | The depreciation for the hire stock. |
LOCATION | The location of stock in the depoty. {string} |
MEMO | The asset memo. {string}. |
NET_BOOK_VALUE | The net booke value of the asset (in the base currency). {float} |
PART_NUMBER | The PART_NUMBER of the hire stock. {string} |
PURCHASED_FROM | Who the asset was purchased from. {string} |
PURCHASED_PRICE | How much was the asset bought for (in the base currency). {float} |
PURCHASED_DATE | The date the asset was purchased. {datetime string} |
QUANTITY | If a bulk asset, how many are assigned, otherwise it will equal 1. {integer} |
REPLACE_COST | How much to replace the hire stock (in the base currency). {float} |
STATUS | The status of the asset. {integer} |
} |
] |
error | Set 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:Name | Description |
---|
from | The date we are searching from in 'YYYY-MM-DD' format (compulsory). {date string}. |
upto | The date we are searching upto in 'YYYY-MM-DD' format (compulsory). {date string}. |
status | The status values to filter. {json or json string of numbers} |
depot | The ID of the depot to filter by (default is 0=all) (optional). {integer}. |
local | User local time (not required). {date string} |
tz | User time zone (not required). {string} |
Return parameters:Name | Description |
---|
data: [ |
0: { |
JOB_ID | Unique ID of the JOB. {integer} |
JOB_NAME | Name of the job, the invoice/credit note is assigned to. {string} |
DEPOT | The name of the depot the job is assigned to. {string} |
COMPANY | Name of the company as customer the job is for. {string} |
CREATE_DATE | The job created date of job. {date string} |
OUT_DATE | The outgoing date of job. {date string} |
RETURN_DATE | The returning date of the job. {date string} |
TOTAL | The net total revenue to date for the job. {float} |
INVOICED | The net total invoiced within the job. {float} |
CREDITS | The total of credit notes within the job. {float} |
UNINVOICED | The total yet to be invoiced within the job. {float} |
COSTS | The total cost for the job. {float} |
PROFIT | The 'total' less credit and costs for the job. {float} |
MARGIN | The profit margin of the job. {float} |
PAID | The paid amount for the job. {float} |
JOB_TYPE | The type of job. {string} |
MANAGER | The name of the manager the job is assigned to. {string} |
MANAGER2 | The name of the manger-2 the job is assigned to. {string} |
ACCOUNT_REFERENCE | The name of the client as reference. {string} |
CLIENT_REF | The name of the depot the job is assigned to. {string} |
STATUS | The 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} |
} |
] |
error | Set 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:Name | Description |
---|
id | The ID of Labour. {integer}. |
from | The date we are searching from in 'YYYY-MM-DD' format (compulsory). {date string}. |
upto | The date we are searching upto in 'YYYY-MM-DD' format (compulsory). {date string}. |
local | User local time (not required). {date string} |
tz | User time zone (not required). {string} |
Return parameters:Name | Description |
---|
data: [ |
0: { |
ID | ID as Job ID. {integer} |
JOB_NAME | Name of the job labour used. {string}. |
OUT_DATE | On dated labour is start work on the job {date} |
RETURN_DATE | On dated labour is return from the job. {date} |
qty | What the Labout quantitiy used for the job {integer} |
INVOICED_qty | The number of labour quantity invoiced . {integer} |
INVOICED_PRICE | The amount of invoiced used qty.{float} |
COST | The amount is cost of labour while work on job. {float} |
} |
] |
error | Set 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:Name | Description |
---|
from | The date to start the search from. {ISO string} |
upto | The date to start the search until. {ISO string} |
depot | The ID of the depot to filter by (optional). {integer}. |
cat | The category ID to filter by. If empty or '0' then all shown (optional). {integer}. |
method | The method the utilisation is based on, either 'days' or 'jobs' (default is 'jobs'). {string} |
local | The local date and time of the client (not required). {ISO string} |
tz | The timezone of the client (not required). {string} |
Return parameters:Name | Description |
---|
rows: [ |
0: { |
ID | ID of the of the task (integer). |
Name | What the name id the asset name |
PART_NUMBER | The PART_NUMBER of the Asset. |
CATEGORY | The category of what the asset is assigned to. |
replacement cost | What the cost of replacement. |
utilisation | What the shows utilisation of asset. |
utilisation percetage | What the shows utilisation in percentage. |
Qty In Stock | shows total number of quantity in stock. |
used | The used is shows usages of asset. |
used in percentage | The used is shows usages of asset in percentage. |
hire in cost | Its show cost of hire. |
STATUS | The status of the task. |
} |
] |
jobs_encompassed | The 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:Name | Description |
---|
from | The date we are searching from in 'YYYY-MM-DD' format (compulsory). {date string}. |
upto | The date we are searching upto in 'YYYY-MM-DD' format (compulsory). {date string}. |
depot | The ID of the depot to filter by (default is 0=all) (optional) {integer}. |
status | The status values to filter. {json or json string of numbers} |
local | User local time (not required). {date string} |
tz | User time zone (not required). {string} |
Return parameters:Name | Description |
---|
data: [ |
0: { |
ID | Unique ID of the purchase order. {integer} |
MAIN_ID | ID of the owner job, project, etc. {integer}. |
TYPE | What is the owner (1=job, 6=project, etc.). {integer} |
START | Start date of the purchase order. {datetime} |
KIND | What the purchase order is (0=Sub Hire, 1=Crew, 2=Service, 3=Purchase, 4=Transport, 5=Internal, 6=Travel). {integer} |
NUMBER | The number of the purchase order. {string} |
STATUS | The 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} |
FINISH | End date of the purchase order. {datetime} |
DESCRIPTION | Description of the purchase order. {string} |
DEPOT | The name of the depot the purchase order is assigned to. {string}. |
DEPOT_ID | The ID of the depot the purchase order is assigned to. {integer}. |
NET | The net total. {float} |
NOMINAL_CODE | The code or the name of the nominal code used. {string} |
NAME | The name of the supplier. {string} |
COMPANY | The company name of the supplier. {string} |
} |
] |
error | Set 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/payment_suspension_list.php
Send parameters:Name | Description |
---|
from | The date we are searching from in 'YYYY-MM-DD' format (compulsory). {date string}. |
upto | The date we are searching upto in 'YYYY-MM-DD' format (compulsory). {date string}. |
status | The status values to filter. {json or json string of numbers} |
depot | The ID of the depot to filter by (default is 0=all) (optional). {integer}. |
local | User local time (not required). {date string} |
tz | User time zone (not required). {string} |
Return parameters:Name | Description |
---|
data: [ |
0: { |
JOB_ID | Unique ID of the JOB. {integer} |
JOB_NAME | Name of the job, the invoice/credit note is assigned to. {string} |
DEPOT | The name of the depot the job is assigned to. {string} |
COMPANY | Name of the company as customer the job is for. {string} |
CREATE_DATE | The job created date of job. {date string} |
OUT_DATE | The outgoing date of job. {date string} |
RETURN_DATE | The returning date of the job. {date string} |
JOB_TYPE | The type of job. {string} |
MANAGER | The name of the manager the job is assigned to. {string} |
MANAGER2 | The name of the manger-2 the job is assigned to. {string} |
ACCOUNT_REFERENCE | The name of the client as reference. {string} |
CLIENT_REF | The name of the depot the job is assigned to. {string} |
STATUS | The 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} |
} |
] |
error | Set 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:Name | Description |
---|
from | The date we are searching from in 'YYYY-MM-DD' format (compulsory). {date string}. |
upto | The date we are searching upto in 'YYYY-MM-DD' format (compulsory). {date string}. |
status | The status values to filter. {json or json string of numbers} |
depot | The ID of the depot to filter by (default is 0=all) (optional). {integer}. |
local | User local time (not required). {date string} |
tz | User time zone (not required). {string} |
Return parameters:Name | Description |
---|
data: [ |
0: { |
ID | Unique ID of the custom item. {integer} |
JOB | ID of the job which the custom item used. {integer}. |
NAME | Name of the job custom item used. {string} |
CUSTOM | Name of the custom item used on job. {string} |
ADDITIONAL | The additional name/ alias of custom items. {string} |
QUNATITY | The qunatity of the custom item used in the job. {string} |
UNIT_PRICE | The price of custom item per unit. {string} |
PRICE_TYPE | The 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_RATE | The vat rate of custom item. {float} |
DESCRIPTION | what the name of the custom item nominal account name. {integer} |
WEIGHT | weight of item. {float} |
REPLACE_CODE | The replace cost of item. {float} |
START_DATE | Start date of the custom item used for job. {datetime} |
END_DATE | End date of the custom item used for job. {datetime} |
STATUS | The 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} |
DEPOT | The name of the depot the job is assigned to. {string} |
} |
] |
error | Set if an error has occurred, either an error message or error number. |
Stock utilisation
Get the stock utilisation data
get/reports/sales_items_purchases_list.php
Send parameters:Name | Description |
---|
from | The date to start the search from. {ISO string} |
upto | The date to start the search until. {ISO string} |
depot | The ID of the depot to filter by (optional). {integer}. |
cat | The category ID to filter by. If empty or '0' then all shown (optional). {integer}. |
method | The method the utilisation is based on, either 'days' or 'jobs' (default is 'jobs'). {string} |
local | The local date and time of the client (not required). {ISO string} |
tz | The timezone of the client (not required). {string} |
Return parameters:Name | Description |
---|
rows: [ |
0: { |
ID | ID of the of the task (integer). |
Name | What the name id the asset name |
PART_NUMBER | The PART_NUMBER of the Asset. |
CATEGORY | The category of what the asset is assigned to. |
replacement cost | What the cost of replacement. |
utilisation | What the shows utilisation of asset. |
utilisation percetage | What the shows utilisation in percentage. |
Qty In Stock | shows total number of quantity in stock. |
used | The used is shows usages of asset. |
used in percentage | The used is shows usages of asset in percentage. |
hire in cost | Its show cost of hire. |
STATUS | The status of the task. |
} |
] |
jobs_encompassed | The number of jobs used in the search. {integer} |
Stock utilisation
Get the stock utilisation data
get/reports/sales_stock_utilisation_list.php
Send parameters:Name | Description |
---|
from | The date to start the search from. {ISO string} |
upto | The date to start the search until. {ISO string} |
depot | The ID of the depot to filter by (optional). {integer}. |
cat | The category ID to filter by. If empty or '0' then all shown (optional). {integer}. |
method | The method the utilisation is based on, either 'days' or 'jobs' (default is 'jobs'). {string} |
local | The local date and time of the client (not required). {ISO string} |
tz | The timezone of the client (not required). {string} |
Return parameters:Name | Description |
---|
rows: [ |
0: { |
ID | ID of the of the task (integer). |
Name | What the name id the asset name |
PART_NUMBER | The PART_NUMBER of the Asset. |
CATEGORY | The category of what the asset is assigned to. |
replacement cost | What the cost of replacement. |
utilisation | What the shows utilisation of asset. |
utilisation percetage | What the shows utilisation in percentage. |
Qty In Stock | shows total number of quantity in stock. |
used | The used is shows usages of asset. |
used in percentage | The used is shows usages of asset in percentage. |
hire in cost | Its show cost of hire. |
STATUS | The status of the task. |
} |
] |
jobs_encompassed | The 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:Name | Description |
---|
depot | Depot id to limit the search to (if 0, then all depots). {integer}. |
cat | Category id to search against (if 0, then all categories). {integer}. |
Return parameters:Name | Description |
---|
data: [ |
0: { |
ID | Unique ID of the consumables. {integer} |
TITLE | Name of consumable stock item. {string} |
CATEGORY | Name of the category. {string} |
QUANTITY | No of quantity of stock item. {int} |
COST_PRICE | Cost 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} |
DEPOT | Stock item is belongs to which depot.{string} |
} |
] |
error | Set 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:Name | Description |
---|
from | The date to start the search from. {ISO string} |
upto | The date to start the search until. {ISO string} |
depot | The ID of the depot to filter by (optional). {integer}. |
cat | The category ID to filter by. If empty or '0' then all shown (optional). {integer}. |
method | The method the utilisation is based on, either 'days' or 'jobs' (default is 'jobs'). {string} |
local | The local date and time of the client (not required). {ISO string} |
tz | The timezone of the client (not required). {string} |
Return parameters:Name | Description |
---|
rows: [ |
0: { |
ID | ID of the of the task (integer). |
Name | What the name id the asset name |
PART_NUMBER | The PART_NUMBER of the Asset. |
CATEGORY | The category of what the asset is assigned to. |
replacement cost | What the cost of replacement. |
utilisation | What the shows utilisation of asset. |
utilisation percetage | What the shows utilisation in percentage. |
Qty In Stock | shows total number of quantity in stock. |
used | The used is shows usages of asset. |
used in percentage | The used is shows usages of asset in percentage. |
hire in cost | Its show cost of hire. |
STATUS | The status of the task. |
} |
] |
jobs_encompassed | The 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:Name | Description |
---|
from | The date we are searching from in 'YYYY-MM-DD' format (compulsory). {date string}. |
upto | The date we are searching upto in 'YYYY-MM-DD' format (compulsory). {date string}. |
depot | The ID of the depot to filter by (default is 0=all). (optional) {integer}. |
status | The status of the sub hires to filter. (optional) {float}. |
jobType | The Type of Job of the sub hires to filter. (optional) {string}. |
subTypes | The sub Type of job to filter. (optional) {integer}. |
PaymentStatus | The payment status of the job to filter. {integer}. |
local | User local time (not required). {date string} |
tz | User time zone (not required). {string} |
Return parameters:Name | Description |
---|
data: [ |
0: { |
JOB | The job unique ID of the job which the sub hires used for. {integer} |
JOB_NAME | Name of the job which the sub hires used for. {string} |
JOB_TYPE | Type of job which the sub hires used for. {string} |
NUMBER | Number of the sub hires. {integer} |
AUTH_DATE | Hire authorise date of sub hires. {date string} |
START | The hires received on date. {date string} |
FINISH | The hires retunrs on date. {date string} |
TYPE | Type of sub hires type. {float} |
SUPPLIER | The supplier of the sub hires. {string} |
SUPPLYING | The details of supplier of the sub hires. {string} |
STATUS | The status of the Job. {float} |
DEPOT | The job belongs to which depot. {float} |
NET_TOTAL | Net total of the hires items. {float} |
VAT | Vat of the hired item. {float} |
TOTAL | Total amount of the hired items. {float} |
PAYMENTS | Payment of hired item. {float} |
OWING | Money owing from the job. {float} |
} |
] |
error | Set 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:Name | Description |
---|
Due date | The date we are searching for due date in 'YYYY-MM-DD' format (compulsory). {date} |
depot | The ID of the depot to filter by (default is 0=all). (optional) {integer} |
cat | The ID of the category to filter by (default is 0=all). (optional) {integer} |
test | The type of test to filter by (default us 0 = SERVICE_INTERVAL, 2= PAT_INTERVAL, 3=TEST_INTERVAL). {integer} |
Return parameters:Name | Description |
---|
data: [ |
0: { |
ID | Unique ID of the asset. {integer} |
QTY | The QTY of the asset used for test and service. {integer} |
TITLE | Name of asset item. {string} |
SERIAL | Serial number of the asset item. {string} |
DEPOT | The asset belongs to which depot.{string} |
LAST TEST | last test date of item. {date string} |
NEXT TEST | Next test date of stock item. {date string} |
JOB | Job ID stands for asset used in the job for due test (only checked out items). {integer} |
} |
] |
error | Set 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:Name | Description |
---|
key | The Integration key found in 'Company settings' on the 'Settings' page. Do not use an API token! (required). {string} |
barcode | An optional barcode that will filter the results to one asset with the matching barcode (if found) (optional). {string} |
Return parameters:Name | Description |
---|
data: [ |
0: { |
ID | Unique ID of the asset. {integer} |
STOCK_ID | The parent ID of the stock line. {integer} |
BARCODE | The unique barcode of the asset. {string} |
SERIAL | The unique serial number of the asset. {string} |
STATUS | The 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} |
} |
] |
error | Set 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:Name | Description |
---|
key | The Integration key found in 'Company settings' on the 'Settings' page. Do not use an API token! (required). {string} |
Return parameters:Name | Description |
---|
data: [ |
0: { |
ID | Unique ID of the category. {integer} |
HEADING | The name of the category. {string} |
PARENT_ID | The ID of the parent if any. {string} |
LFT | The left value of the category in the nested tree. {integer} |
RGT | The right value of the category in the nested tree. {integer} |
} |
] |
error | Set 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:Name | Description |
---|
key | The Integration key found in 'Company settings' on the 'Settings' page. Do not use an API token! (required). {string} |
job_id | The ID/job number to get a list of assets checked out (required). {integer} |
Return parameters:Name | Description |
---|
data: [ |
0: { |
ASSET_ID | Unique ID of the asset. {integer} |
} |
] |
error | Set 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:Name | Description |
---|
key | The Integration key found in 'Company settings' on the 'Settings' page. Do not use an API token! (required). {string} |
Return parameters:Name | Description |
---|
data: [ |
0: { |
ID | The number of the job. {integer} |
JOB_NAME | The name of the job. {string} |
VENUE | The name of the delivery address. {string} |
OUT_DATE | The job outgoing date and time. {ISO date string} |
JOB_DATE | The job start date and time. {ISO date string} |
DEPOT_NAME | The name of the depot the job is alloocated to. {string} |
STATUS | The status of the job (4=Part dispatched, 5=Dispatched, 6=Returned incomplete; decimals are additional custom status values of the whole number). {float} |
} |
] |
error | Set 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:Name | Description |
---|
key | The Integration key found in 'Company settings' on the 'Settings' page. Do not use an API token! (required). {string} |
Return parameters:Name | Description |
---|
data: [ |
0: { |
ID | Unique ID of the stock line. {integer} |
TITLE | The name of the stock line. {string} |
CATEGORY_ID | ID of the category of the stock line. {integer} |
IMAGE_ID | ID of the image (if new image assigned, ID will be different). {integer} |
SERVICE_INTERVAL | The period in ISO 8601 of a service. {string} |
PAT_INTERVAL | The period in ISO 8601 of a PAT test. {string} |
TEST_INTERVAL | The period in ISO 8601 of a test. {string} |
IMAGE_URL | The URL of the stock line image. {string} |
THUMBNAIL_URL | The URL of the smaller stock line thumbnail image. {string} |
} |
] |
error | Set 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:Name | Description |
---|
key | The Integration key found in 'Company settings' on the 'Settings' page. Do not use an API token! (required). {string} |
Return parameters:Name | Description |
---|
data: [ |
0: { |
ID | Unique ID of the user. {integer} |
NAME | The name of the user. {string} |
EMAIL | The email address of the user. {string} |
ACTIVE | If true then the user is active. {integer} |
} |
] |
error | Set 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:Name | Description |
---|
key | The Integration key found in 'Company settings' on the 'Settings' page. Do not use an API token! (required). {string} |
type | What is the test/service (0=Service, 1=PAT Test [default], 2=Test, 3=Repair, 4=Maintenance, 5=Other) {integer}. |
user_id | The ID of the Hirehop user. If not set, the HireHop user will be used instead. {integer} |
asset_id | The ID of the asset the test/service is for. If empty, the 'barcode' will be used instead. {integer}. |
barcode | The barcode of the asset the test/service is for. Only used if the 'asset_id' is empty. {string}. |
description | A brief description of the test/service (default is 'Test') {string} |
date | The date and time the test/service was done in UTC (default is now). {ISO datetime string} |
memo | A memo for the test/service. {string} |
pass | Set to '1' (default) if it passed the test/service, or '0' if it failed. {integer} |
Return parameters:Name | Description |
---|
ID | Unique identifier for the test/service/PAT test. {integer} |
ASSET_ID | The ID of the asset the test is for. {integer}. |
error | Set if an error has occurred, either an error message or error number (an http code of 403 or 429 will also be set). |