Skip to main content
Contracts

Get a list of contracts

This method requires the Contracts:Get permission to be associated with your role.

GET
/fm/contracts
Authorizationstringheaderrequired

For accessing the API a valid token must be passed in all the queries in the 'Authorization' header.

A valid token is generated by the API and returned by the /authenticate method by supplying a valid username and password.

The following syntax must be used in the 'Authorization' header :

Bearer aaaaaa/bbbbbb.ccccccc.dddddd
group_codestringquery

Client Group Code

client_codestringquery

Client Code

reg_nostringquery

Reg Number

driver_namestringquery

Driver Name

descriptionstringquery

Description

contract_typestringquery

Contract Type

cost_centrestringquery

Cost Centre

divisionstringquery

Division

stateenum<string>query

State

Available options: VIC, NSW, ACT, QLD, WA, SA, TAS, NT, NZ
date_typeenum<string>query

Date Type

Available options: contract_start, contract_end, finance_start, finance_end, insurance_start, insurance_renewal, reg_renewal, roadside_end_date, suspend_date, warranty_expiry
date_fromstringquery

From date (derived based on the selected Date Type).

date_tostringquery

To date (derived based on the selected Date Type).

contract_status_idintegerquery

Contract Status

contract_sub_status_idintegerquery

Contract Sub Status

account_manager_user_idintegerquery

A/C Manager

Required range: 1 <= x
include_suspended_flagenum<string>querydefault:no

Include Suspended Contracts

Available options: yes, no
sortenum<string>querydefault:contract_id

Sort

Available options: contract_id, reg_no, group_code, client_code, driver_name, description, contract_type_code, cost_centre, division, state, date_value, contract_status_id, contract_sub_status_id, account_manager, last_edit
sort_orderenum<string>querydefault:desc

Sort Order

Available options: asc, desc
embedenum<string>query

When set to fbt, each contract in _embedded.fm_contracts[] includes an _embedded.fbt object containing derived Fringe Benefits Tax calculations (equivalent to the legacy FBT screen). These fields are calculated on demand, per contract, and are not stored columns on the contract. Because this adds extra calculation queries for every FBT-eligible contract on the page (up to page_size, currently capped at 25), expect a noticeably higher response time when combined with a large page_size.

Available options: fbt
fbt_year_endingstringquery

The 4 digit calendar year in which the FBT year ends (FBT years run 1 April to 31 March), applied uniformly to every contract in the page. Only used when embed=fbt is supplied; defaults to the current FBT year when omitted. For any contract whose own lifetime does not overlap that FBT year at all (e.g. it predates the contract's first FBT period, or the contract had already ended before that FBT year started), _embedded.fbt is omitted for that row instead of returning a self-contradictory result.

Pattern: ^[0-9]{4}$
pageintegerquerydefault:1

Page

Required range: 1 <= x <= 2147483647
page_sizeintegerquerydefault:25

Page Size

Required range: 1 <= x <= 25
Time-Zonestringheaderdefault:UTC

Quotes will be created in the specified timezone.

The timezone value can be given in several formats, none of which are case sensitive:

  • As a named time zone, such as 'Europe/Helsinki', 'US/Eastern', or 'MET'.
  • As a string indicating an offset from UTC of the form [H]H:MM, prefixed with a + or -, such as '+10:00', '-6:00', or '+05:30'. A leading zero can optionally be used for hours values less than 10;
Maximum string length: 100
Pattern: ^[a-zA-Z0-9\/\:\+\-\_]+$

Response

application/vnd.catch-e-api.v1+json

Success

_embeddedobject
pageinteger
Example: 1
page_countinteger
Example: 1
page_sizeinteger
Example: 25
total_itemsinteger
Example: 1