Jobs

The jobs API main endpoint is https://app.tradetrak.com.au/api/job/ and the following functions are currently available.

List all jobs

  • Endpoint: https://app.tradetrak.com.au/api/job/list
  • Request Data: None
  • Request Type: GET
  • Returned Data: A JSON array containing information about each job, including the client and also site contact.

    [{
       "id": 0,
       "name": "Demo Job",
       "client": { See Client API for expected data response },
       "main_contact": {
           "id": 0,
           "first_name": "John",
           "last_name": "Doe",
           "phone_number": null,
           "office_phone_number": null,
           "email": "contact@digitalbasis.com",
           "firm_id": 0,
           "firm": "Demo Client"
       },
       "status_id": 11,
       "status": "In Progress",
       "created_date": "2018-08-30 09:20:01",
       "type": "Projects",
       "start_date": "2018-08-30",
       "end_date": "2019-08-30",
       "preferred_date": null,
       "preferred_time": null,
       "description": "Job involves several stages of work, including getting ready for starting the work, completing the work and testing the work.",
       "address": "7 Riverside Quay, Southbank VIC 3006, Australia"
    }]
    

List single job

  • Endpoint: https://app.tradetrak.com.au/api/job/<JOB #>/list > E.G. https://app.tradetrak.com.au/api/job/0/list
  • Request Data: None
  • Request Type: GET
  • Returned Data: Same data returned as List all jobs, however only one single job will be returned, or an array containing error information if the job wasn't found.

Create job

  • Endpoint: https://app.tradetrak.com.au/api/job/create
  • Request Data: A JSON object containing the following information. Required fields are prefixed with an asterisk (*)

    {
       *"name": "The name you would like to give the job - string",
       *"client": The ID of a client (See below for listing available clients and creating new clients) - integer,
       "start_date": "The start date for a job if applicable, in format 'yyyy-mm-dd' e.g. 2018-08-30",
       "end_date": "The end date for a job if applicable, in format 'yyyy-mm-dd' e.g. 2018-08-30",
       "description": "A description for this job - string",
       "address": "The job address if applicable - string"
    }
    
  • Request Type: POST

  • Returned Data: Returns job information for created job as above, or an array containing error information if the job wasn't created successfully.