« Return to Index


job

The primary details for a job, particularly the address/contact details, the type of the job, etc. Many details are also stored in the Inspection entity.

Access Level

Read/Write - this entity can be updated/added/deleted.

When a new job is added, three inspection records are created automtatically.

Values

Name Type Access
idjob integer Read Only
idjob_status integer Read + Write
idjob_type integer Read Only (Can be set during insert)
idowner integer Read + Write
idpurpose_of_inspection integer Read + Write
idrepresentative integer Read + Write
address_lat float Read Only
address_long float Read Only
address_one string Read + Write
address_two string Read + Write
address_three string Read + Write
cache_next_inspection_display_date string Read Only
cache_next_inspection_inspector_name string Read Only
cache_owner_name string Read Only
cache_representative_name string Read Only
caller_postcode string Read + Write
comments text Read + Write
country string Read + Write
custom_field_values_json json Read + Write
deleted boolean Read + Write
identifier string Read Only
initial_contact_date datetime Read + Write
local_government_area string Read + Write
lots_on_plan string Read + Write
modified datetime Read Only
notes text Read + Write
asset_location string Read + Write
postcode string Read + Write
reference string Read + Write
starred string Read + Write
state string Read + Write
suburb string Read + Write
tenant_email string Read + Write
tenant_names string Read + Write
tenant_phone string Read + Write

Accessing by Reference

The job entity can be accessed by reference, instead of by idjob:

$apiRequest = array(
  "username" => "user@example.com",
  "password" => "bWy1P2xRdyczAzmfxmUYpPjPc4Vg1",
  "actions" => array(
    array("name" => "fetch", "params" => array("entity" => "job", "reference" => "42"))
  )
);

Adding new Jobs

When adding a new job, you can optionally specify details for the first inspection and create a new owner/representative as part of adding the job:

$apiRequest = array(
  "username" => "user@example.com",
  "password" => "bWy1P2xRdyczAzmfxmUYpPjPc4Vg1",
  "actions" => array(
    array("name" => "add", "params" => array(
      "entity" => "job",
      "values" => array(
        "address_one" => "addr 1",
        "suburb" => 'location2',
        "postcode" => 'location3',
        "state" => 'location_state',
        "country" => "Australia",
        "tenant_names" => 'tenant1',
        "tenant_phone" => 'tenant2',
        "initial_contact_date" => date('Y-m-d H:i:s'),
        "inspection" => array(
          'additional_instructions' => 'Hello World'
        ),
        "owner" => array(
          "business_name" => "foo"
        ),
        "representative" => array(
          "business_name" => "bar"
        )
      )
    ))
  )
);

Inspection Apps API Documentation « Return to Index