NAV
Header Body Response Sample Data

Introduction

Welcome to the Toolyt API document! You can use our API to access Toolyt API endpoints, which can get information on users, leads, customers, expences, visits, and products in our database.

We build all our code as json response. You can view code examples in the dark area to the right, and you can switch the header, body, response and smaple data with the tabs in the top right.

Sample data include format of input if the method is post. Body and header shows the input format. Response is output sample.

Get Token : GET

URL : https://toolyt.com/api/get-token


      {
        "status": 200,
        "error": false,
        "token": "txKjR0HkEmXymNPPYNMYzD72ZP5KowcRCGA3c93r"
      }
    

      {
       AuthorizationKey: apiKey
     }

Make sure to replace apiKey with key generated in Toolyt api module.
 apiKey  : o9orfl4km83luxzd7vlt

Toolyt uses API keys to allow access to the API. You will get API key from our website, if you are registered with Toolyt and API module is activated.

For all other API calls Toolyt expects API key to be included in header of all API requests to the server, that looks like the following:

AuthorizationKey: apiKey

Return error false and a token, if the request is success. Otherwise it will return a error tru with message.

Get Company Details : GET

URL : https://toolyt.com/api/get-company-details


      {
       AuthorizationKey: apiKey
     }

Make sure to replace apiKey with key generated in Toolyt api module.

    {
      "status": 200,
      "error": false,
      "company": {
      "id": 11,
      "company_name": "Toolyt",
      "full_name": "Toolyt",
      "phone": "0000000000",
      "email": "example@toolyt.com",
      "user_limit": 10,
      "company_address": "",
      "order_id_prefix": "ORD_TOOLYT",
      "order_id_number": 100,
      "job_reference_prefix": "JB_TOOLYT",
      "job_reference_number": 0
    }
  }
 apiKey  : o9orfl4km83luxzd7vlt

This endpoint retrieves company details. You can use "company_id" in response of this API call for other API calls, which passsing company id as input parameter.

Get Users : GET

URL : https://toolyt.com/api/get-users/{pageNumber}/{limit}


  {
   AuthorizationKey: apiKey
 }

Make sure to replace apiKey with key generated in Toolyt api module.

  {
    "status": 200,
    "error": false,
    "total_users": 4,
    "baseUrl": "https://toolyt.com/app/public/images/profile_pic/",
    "users": [
    {
      "user_id": 15,
      "first_name": "Vidhya",
      "last_name": "M",
      "phone": "0000000000",
      "email": "user1.toolyt.com",
      "profile_pic": "",
      "address": "Nasscom Warehouse ​Diamond District,Bangalore, India​",
      "designation": "Manager"
    },
    {
      "user_id": 16,
      "first_name": "Amjad",
      "last_name": "Ali",
      "phone": "0000000000",
      "email": "user2@toolyt.com",
      "profile_pic": "20160323120554.jpg",
      "address": "Nasscom Warehouse ​Diamond District,Bangalore, India",
      "designation": "Executive"
    }
    ]
  }
 
  apiKey  : o9orfl4km83luxzd7vlt 
  pageNumber : Start from 1.
  limit :  No of users per page.

This endpoint retrieves users added in Toolyt. "pageNumber" in url is for defining page and limit is for defining numbers of users return per page. API will return total user count with all response.

Get User Details : GET

URL : https://toolyt.com/api/get-user-details/{userId}


  {
   AuthorizationKey: apiKey
 }

Make sure to replace apiKey with key generated in Toolyt api module.

  {
    "status": 200,
    "error": false,
    "baseUrl": "https://toolyt.com/app/public/images/profile_pic/",
    "user": {
    "user_id": 50,
    "first_name": "My user b",
    "last_name": "M",
    "phone": "0000000002",
    "email": "",
    "profile_pic": "",
    "address": "",
    "designation": "Sales Executive",
    "middle_name": "",
    "employee_number": "EMP071",
    "department": "Sales"
  }
}
 
  apiKey  : o9orfl4km83luxzd7vlt 

This endpoint retrieves specific user details. "userId" in url specify "user_id" return in Get Users API.

Create Customer Form : GET

URL : https://toolyt.com/api/get-customer-form


  {
   AuthorizationKey: apiKey
 }

Make sure to replace apiKey with key generated in Toolyt api module.

 
 
  apiKey  : o9orfl4km83luxzd7vlt 
 

Create Lead : POST

URL : https://toolyt.com/api/create-lead


  {
   AuthorizationKey: apiKey
 }

Make sure to replace apiKey with key generated in Toolyt api module.

  {
    "status":200,
    "error":false,
    "message":"Lead added successfully."
  } 

  If there is any error, it will return error as true and send error message in 'message' value.
 
  POST api/create-lead HTTP/1.1
  Host: https://toolyt.com
  AuthorizationKey: o0orfl4km83luxzd7vlt
  Content-Type: application/json



  {
    "user_id":18,
    "full_name": "Full Name",
    "company_name":"Company Name",
    "address":4,
    "location_latitude":"45.3232",
    "location_longitude":"23.543",
    "mobile":1234567890,
    "photos":[{"0":"Base 64 Encoded Image 1","1":"Base 64 Encoded Image 2"}]
    "next_action_date":"2016-01-01",
    "next_action_time":"10:00:00",
    "no__of_fieldforce1":"2",
    "test_check3":"ddd",
    "test_check3":"val 1,val 2",
    "test_radio4":"b,d,c",
    "test_select_box5": box 1,
    "assign_to": 179,
    "industry": 15,
    "lead_source": 343,
    "lead_owner": 1815,
    "status_type": 0,
    "lead_progress" : 187,
    "country": 2,
    "image":"Base 64 Encoded Image",
    "lct1": "asa",
    "designation": Developer,
    "alternate_phone": 1234567890,
    "mark_as_visited_val": 1,
    "visit_mode_id": 12

  }

This endpoint is to create lead. Pass the user_id who has permissions to add lead. Data will pass as form data.

Pass token with api as field '_token'.If custom field is check box, send value as comma(,) separated list. Photos and images are base 64 encoded values.

Pass the assigned_to_id products as an array.

Get Leads : GET

URL : https://toolyt.com/api/get-leads/{pageNumber}/{limit}


  {
   AuthorizationKey: apiKey
 }

Make sure to replace apiKey with key generated in Toolyt api module.

  {
    "status": 200,
    "error": false,
    "baseUrl": "https://toolyt.com/app/public/images/customer_pic/",
    "total_leads": 18,
    "leads": [
    {
      "lead_id": 103,
      "full_name": "Sajith I K",
      "company_name": "MN Enterprises",
      "designation": "HR",
      "phone": null,
      "alternate_phone": null,
      "land_line": null,
      "email": null,
      "address": null,
      "website": null,
      "profile_pic": "345443544435.jpg",
    },
    {
      "lead_id": 127,
      "full_name": "Amjad Ali",
      "company_name": "MCR",
      "designation": "CEO",
      "phone": "",
      "alternate_phone": "23456787654",
      "land_line": "",
      "email": "amjad@gmail.com",
      "address": " ​Nasscom Warehouse ​Diamond District, Bangalore",
      "website": "",
      "profile_pic": "345443544495.jpg",
    }
    ]
  }
 
  apiKey  : o9orfl4km83luxzd7vlt 
  pageNumber : Start from 1.
  limit :  No of leads per page.

This endpoint retrieves leads added in Toolyt. "pageNumber" in url is for defining page and limit is for defining numbers of leads return per page. API will return total leads count with all response.

Get Lead Details : GET

URL : https://toolyt.com/api/get-lead-details/{leadId}


  {
   AuthorizationKey: apiKey
 }

Make sure to replace apiKey with key generated in Toolyt api module.

  {
    "status": 200,
    "error": false,
    "profilePicUrl": "https://toolyt.com/app/public/images/customer_pic/",
    "photoUrl": "https://toolyt.com/app/public/images/customer_photos/",
    "documentUrl": "https://toolyt.com/app/public/images/customer_documents/",
    "lead": {
    "lead_id": 122,
    "full_name": "Rahman",
    "company_name": "Rahman Clinics",
    "designation": "CEO",
    "phone": "",
    "alternate_phone": "2345678909876",
    "land_line": "",
    "email": "amjad@qbics.in",
    "address": "MES Pattambi",
    "website": "",
    "profile_pic": "20161012052942.png",
    "location": "",
    "country_name": "India",
    "state_name": null,
    "district_name": null,
    "area_name": null,
    "expected_value": 3900,
    "assigned_date": "2016-10-12 17:29:40",
    "lead_status": "First Contact to customer pending",
    "lead_source": "Cold Call",
    "photos": {
    "0": "201610120529400.png",
  },
  "documents": {
},
"assigned_user_id": 4,
"assigned_user": "Prashob K",
"industry": "Hospitals",
"industry_category": null,
"industry_sub_category": null,
"ceo_name": "Rahman",
"contact_days": "Sunday, Monday",
"gender": "Male",
"lead_type": "Large Scale",
"no._of_beds": "4",
"description": "Lead with large value.",
"pin_code": "",
}
}
 
  apiKey  : o9orfl4km83luxzd7vlt 

This endpoint retrieves specific lead details. "leadId" in url specify "lead_id" return in Get Leads API.

Create Customer : POST

URL : https://toolyt.com/api/create-customer


  {
   AuthorizationKey: apiKey
 }

Make sure to replace apiKey with key generated in Toolyt api module.

  {
    "status":200,
    "error":false,
    "message":"Customer added successfully."
  } 

  If there is any error, it will return error as true and send error message in 'message' value.
 
  POST api/create-customer HTTP/1.1
  Host: https://toolyt.com
  AuthorizationKey: o0orfl4km83luxzd7vlt
  Content-Type: application/json



  {
    "user_id":18,
    "full_name": "Full Name",
    "company_name":"Company Name",
    "address":4,
    "location_latitude":"45.3232",
    "location_longitude":"23.543",
    "mobile":1234567890,
    "photos":[{"0":"Base 64 Encoded Image 1","1":"Base 64 Encoded Image 2"}]
    "next_action_date":"2016-01-01",
    "next_action_time":"10:00:00",
    "no__of_fieldforce1":"2",
    "test_check3":"ddd",
    "test_check3":"val 1,val 2",
    "test_radio4":"b,d,c",
    "test_select_box5": box 1,
    "assign_to": 179,
    "industry": 15,
    "lead_source": 343,
    "lead_owner": 1815,
    "status_type": 1,
    "lead_progress" : 187,
    "country": 2,
    "image":"Base 64 Encoded Image",
    "lct1": "asa",
    "designation": Developer,
    "alternate_phone": 1234567890,
    "mark_as_visited_val": 1,
    "visit_mode_id": 12

  }

This endpoint is to create lead. Pass the user_id who has permissions to add customer. Data will pass as form data.

Pass token with api as field '_token'.If custom field is check box, send value as comma(,) separated list. Photos and images are base 64 encoded values.

Pass the assigned_to_id products as an array.

Get Customers : GET

URL : https://toolyt.com/api/get-customers/{pageNumber}/{limit}


  {
   AuthorizationKey: apiKey
 }

Make sure to replace apiKey with key generated in Toolyt api module.

  {
    "status": 200,
    "error": false,
    "baseUrl": "https://toolyt.com/app/public/images/customer_pic/",
    "total_customers": 158,
    "customers": [
    {
      "customer_id": 3036,
      "full_name": "Rassack K",
      "company_name": "DELL",
      "designation": "",
      "phone": "",
      "alternate_phone": null,
      "land_line": null,
      "email": "",
      "address": "",
      "website": "",
      "profile_pic": ""
    },
    {
      "customer_id": 3037,
      "full_name": "Amjad",
      "company_name": "NDA",
      "designation": "",
      "phone": "9889898989",
      "alternate_phone": "",
      "land_line": "09588888885",
      "email": "amjad@qbics.in",
      "address": "Bangalore, Karnataka",
      "website": "",
      "profile_pic": ""
    }
    ]
  }
 
  apiKey  : o9orfl4km83luxzd7vlt 
  pageNumber : Start from 1.
  limit :  No of customers per page.

This endpoint retrieves customers added in Toolyt. "pageNumber" in url is for defining page and limit is for defining numbers of customers return per page. API will return total customers count with all response.

Get Customer Details : GET

URL : https://toolyt.com/api/get-customer-details/{customerId}


  {
   AuthorizationKey: apiKey
 }

Make sure to replace apiKey with key generated in Toolyt api module.

  {
    "status": 200,
    "error": false,
    "profilePicUrl": "https://toolyt.com/app/public/images/customer_pic/",
    "photoUrl": "https://toolyt.com/app/public/images/customer_photos/",
    "documentUrl": "https://toolyt.com/app/public/images/customer_documents/",
    "customer": {
    "customer_id": 3037,
    "full_name": "Amjad",
    "company_name": "NDA",
    "designation": "",
    "phone": "9889898989",
    "alternate_phone": "",
    "land_line": "09588888885",
    "email": "amjad@qbics.in",
    "address": "Bangalore, Karnataka",
    "website": "",
    "profile_pic": "",
    "location": "12.3633,72.3654",
    "country_name": "India",
    "state_name": "Karnataka",
    "district_name": null,
    "area_name": null,
    "expected_value": 5000,
    "created_date": "2016-12-09 17:36:12",
    "lead_status": "Data added",
    "lead_source": "Reseller",
    "photos": {
    "0": ""
  },
  "documents": {
  "0": ""
},
"assigned_user_id": 179,
"assigned_user": "Amjad Ali U T ",
"industry": "Small/Medium Enterprises",
"industry_category": null,
"industry_sub_category": null,
"no._of_fieldforce": "",
"distributor": "",
"description": "",
"pin_code": "",
"age": "",
"type": "",
"education": "",
}
}
 
  apiKey  : o9orfl4km83luxzd7vlt 

This endpoint retrieves specific customer details. "customerId" in url specify "customer_id" return in Get Customers API.

Get Lost Leads : GET

URL : https://toolyt.com/api/get-lost-leads/{pageNumber}/{limit}


  {
   AuthorizationKey: apiKey
 }

Make sure to replace apiKey with key generated in Toolyt api module.

  {
    "status": 200,
    "error": false,
    "baseUrl": "https://toolyt.com/app/public/images/customer_pic/",
    "total_leads": 23,
    "leads": [
    {
      "lead_id": 9399,
      "full_name": "Abcpqr",
      "company_name": "Pqruvz",
      "designation": "",
      "phone": "",
      "alternate_phone": "1289253685",
      "land_line": "5242810185",
      "email": "",
      "address": "12°57'35.2\"N 77°38'37.1\"E, Diamond District Office Building, H A L Old Airport Rd, ISRO Colony, Kodihalli, Bengaluru, Karnataka 560017, India",
      "website": "",
      "profile_pic": "20170206954323.png"
    },
    {
      "lead_id": 423,
      "full_name": "Ajay Bhalaria",
      "company_name": "Walplast Products Pvt. Ltd.",
      "designation": "Marketing Head",
      "phone": "7738398983",
      "alternate_phone": "",
      "land_line": "",
      "email": "ajay.bhalaria@walplast.com",
      "address": "",
      "website": "",
      "profile_pic": ""
    }
    ]
  }		
 
    apiKey  : o9orfl4km83luxzd7vlt 
    pageNumber : Start from 1.
    limit :  No of leads per page.
  

This endpoint retrieves lost leads in Toolyt. "pageNumber" in url is for defining page and limit is for defining numbers of leads return per page. API will return total lost leads count with all response.

Get Lost Lead Details : GET

URL : https://toolyt.com/api/get-lost-lead-details/{leadId}


    {
     AuthorizationKey: apiKey
   }

Make sure to replace apiKey with key generated in Toolyt api module.

  {
    "status": 200,
    "error": false,
    "profilePicUrl": "https://toolyt.com/app/public/images/customer_pic/",
    "photoUrl": "https://toolyt.com/app/public/images/customer_photos/",
    "documentUrl": "https://toolyt.com/app/public/images/customer_documents/",
    "lead": {
    "lead_id": 423,
    "full_name": "Ajay Bhalaria",
    "company_name": "Walplast Products Pvt. Ltd.",
    "designation": "Marketing Head",
    "phone": "7738392983",
    "alternate_phone": "",
    "land_line": "",
    "email": "ajay.bhalaria@walplast.com",
    "address": "",
    "website": "",
    "profile_pic": "",
    "location": "",
    "country_name": "India",
    "state_name": "Maharashtra",
    "district_name": null,
    "area_name": null,
    "expected_value": 0,
    "created_date": "2016-11-29 19:22:10",
    "lead_status": "Competition",
    "lead_source": "Cold Call",
    "photos": {
    "0": ""
  },
  "documents": {
  "0": ""
},
"assigned_user_id": 27,
"assigned_user": "Nizamudheen V",
"industry": "Manufacturing",
"industry_category": null,
"industry_sub_category": null,
"no._of_fieldforce": "",
"distributor": "",
"description": "",
"pin_code": "",
"age": "",
"type": "",
"education": "",
}
}		
 
  apiKey  : o9orfl4km83luxzd7vlt 

This endpoint retrieves specific lost lead details. "leadId" in url specify "lead_id" return in Get Lost Leads API.

Search Lead/Customer : POST

URL : https://toolyt.com/api/search-customer-or-lead


  {
   AuthorizationKey: apiKey
 }

Make sure to replace apiKey with key generated in Toolyt api module.

  { 
    pageNumber: '1',
    limit: '10',
    status: '1',
    email: 'steverasa@aab.com',
    phone:'9847278434' 
  }

  {
    "status": 200,
    "error": false,
    "customer": {
    "totalLeads": 1,
    "customer": [
    {
      "customer_id": 14372,
      "full_name": "Steve",
      "company_name": "AAB Group",
      "designation": "",
      "phone": "9847278434",
      "alternate_phone": "",
      "land_line": "",
      "email": "rasa@vv.com",
      "address": "Hoodi Main Road, Hoodi Main Rd, Hoodi, Bengaluru, Karnataka, India",
      "website": "",
      "profile_pic": "20171213100645.png"
    }
    ]
  }
}
 
  apiKey  : o9orfl4km83luxzd7vlt 
  pageNumber : Start from 1.
  limit :  No of data per page.

This endpoint is for searching Lead/Customer/Lost Lead in Toolyt with Email Id or Phone number. "pageNumber" is for defining page and limit is for defining numbers of data return per page. API will return total data count with all response. It's mandatory to pass Phone number or Email that you need to search. If both Phone number and Email passed then it will check for data which is matching with both. It will return customer/ Lead/ Lost lead based on status value passing. If status is 0 , return leads, for 1 return customer and and 2 retrun lost lead.

Get Products : GET

URL : https://toolyt.com/api/get-products/{pageNumber}/{limit}


  {
   AuthorizationKey: apiKey
 }

Make sure to replace apiKey with key generated in Toolyt api module.

  {
    "status": 200,
    "error": false,
    "productIconUrl": "https://toolyt.com/app/public/images/product_icon/",
    "attachmentUrl": "https://toolyt.com/app/public/images/attachments/",
    "total_products": 38,
    "products": [
    {
      "product_id": 234,
      "product_name": " Alcohol Swabs",
      "product_sku": "KV-100P-AS",
      "price": 55,
      "description": "100/pack, PTD - 55, MRP - 400",
      "product_icon": "20161030084338.jpg",
      "attachments": "20161101000828.pdf",
      "product_category": "KRIVIDA LANCETS, ALOCHOL SWABS & LANCING DEVICE",
      "country_name": "India"
    },
    {
      "product_id": 222,
      "product_name": "ACD tube (1:4) ",
      "product_sku": "KV-8.5ACD-V ",
      "price": 11,
      "description": "13x75, 600/C, 8.5, 11.00",
      "product_icon": "20161030092151000000.PNG",
      "attachments": "",
      "product_category": "KRIVIDA VACUUM BLOOD COLLECTION TUBES",
      "country_name": "India"
    }
    ]
  }	
 
    apiKey  : o9orfl4km83luxzd7vlt 
    pageNumber : Start from 1.
    limit :  No of products per page.
  

This endpoint retrieves products added in Toolyt. "pageNumber" in url is for defining page and limit is for defining numbers of products return per page. API will return total products count with all response.

Get Product Details : GET

URL : https://toolyt.com/api/get-product-details/{productId}


    {
     AuthorizationKey: apiKey
   }

Make sure to replace apiKey with key generated in Toolyt api module.

  {
    "status": 200,
    "error": false,
    "productIconUrl": "https://toolyt.com/app/public/images/product_icon/",
    "attachmentUrl": "https://toolyt.com/app/public/images/attachments/",
    "product": {
    "product_id": 234,
    "product_name": " Alcohol Swabs",
    "product_sku": "KV-100P-AS",
    "price": 55,
    "description": "100/pack, PTD - 55, MRP - 400",
    "product_icon": "20161031084338.jpg",
    "attachments": "20161101100828.pdf",
    "product_category": "KRIVIDA LANCETS, ALOCHOL SWABS & LANCING DEVICE",
    "country_name": "India",
    "dimension": "NA",
    "packaging": "100/Pack",
    "volume_(ml)": "NA",
    "mrp": "400"
  }
}		
 
  apiKey  : o9orfl4km83luxzd7vlt 

This endpoint retrieves specific product details. "productId" in url specify "product_id" return in Get Products API.

Get Jobs : GET

URL : https://toolyt.com/api/get-jobs/{pageNumber}/{limit}


  {
   AuthorizationKey: apiKey
 }

Make sure to replace apiKey with key generated in Toolyt api module.

  {
    "status": 200,
    "error": false,
    "jobImage": "https://toolyt.com/app/public/images/job_pic/",
    "total_jobs": 54,
    "jobs": [
    {
      "job_id": 2,
      "reference_id": "TSFA_101",
      "customer_id": 494,
      "customer_name": "Sreejith",
      "job_assign_to_user_id": 179,
      "assign_to_user": "Amjad Ali U T ",
      "job_type": 1,
      "job_type_name": "Fix issue",
      "product_id": null,
      "product_name": null,
      "purchase_date": "2016-09-04",
      "warranty_date": "2017-09-03",
      "finish_job_by_date": "2016-12-20 13:00:00",
      "image": "20161206125759.png",
      "job_status": "Issue solved"
    },
    {
      "job_id": 3,
      "reference_id": "TSFA_102",
      "customer_id": 494,
      "customer_name": "Sreejith",
      "job_assign_to_user_id": 179,
      "assign_to_user": "Amjad Ali U T ",
      "job_type": 1,
      "job_type_name": "Fix issue",
      "product_id": null,
      "product_name": null,
      "purchase_date": "2016-12-06",
      "warranty_date": "2016-12-06",
      "finish_job_by_date": "2016-12-06 18:46:35",
      "image": "",
      "job_status": "Collected Machine"
    }
    ]
  }	
 
    apiKey  : o9orfl4km83luxzd7vlt 
    pageNumber : Start from 1.
    limit :  No of jobs per page.
  

This endpoint retrieves jobs added in Toolyt. "pageNumber" in url is for defining page and limit is for defining numbers of jobs return per page. API will return total jobs count with all response.

Get Job Details : GET

URL : https://toolyt.com/api/get-job-details/{jobId}


    {
     AuthorizationKey: apiKey
   }

Make sure to replace apiKey with key generated in Toolyt api module.

  {
    "status": 200,
    "error": false,
    "jobPhotos": "https://toolyt.com/app/public/images/job_photos/",
    "jobImage": "https://toolyt.com/app/public/images/job_pic/",
    "job": {
    "job_id": 2,
    "reference_id": "TSFA_101",
    "customer_id": 494,
    "customer_name": "Sreejith",
    "job_assign_to_user_id": 179,
    "assign_to_user": "Amjad Ali U T ",
    "job_type": 1,
    "job_type_name": "Fix issue",
    "product_id": null,
    "product_name": null,
    "purchase_date": "2016-09-04",
    "warranty_date": "2017-09-03",
    "finish_job_by_date": "2016-12-20 13:00:00",
    "job_details": "This is a test job",
    "extra_task": "no extra task",
    "alternate_phone": "",
    "priority": "Medium",
    "satisfaction": 0,
    "completion_image": "",
    "signature": "20170110074519.png",
    "created_date": "2016-12-06 12:57:59",
    "job_completion_status": "Not Completed",
    "reopen_status": "",
    "latitude": "",
    "longitude": "",
    "location_name": "",
    "image": "20161206125759.png",
    "photos": {
    "0": "201612061257590.png",
    "1": "201612061257591.png",
    "2": "201612061257592.png"
  },
  "job_status": "Issue solved",
  "finished_at": "2017-01-10 19:45:19",
  "status_history": [
  {
    "job_status": "Issue solved",
    "notes": "",
    "comments": "",
    "updated_by": 0,
    "updated_user_name": "Admin",
    "updated_date": "2017-01-10 19:45:19"
  },
  {
    "job_status": "Reported issue",
    "notes": "",
    "comments": "",
    "updated_by": 0,
    "updated_user_name": "Admin",
    "updated_date": "2016-12-06 12:57:59"
  }
  ],
  "reason": "",
  "remarks": ""
}
}		
 
  apiKey  : o9orfl4km83luxzd7vlt 

This endpoint retrieves specific job details. "jobId" in url specify "job_id" return in Get Jobs API.

Note : Job image and completed image path are same.

Create Job : POST

URL : https://toolyt.com/api/create-job


  {
   AuthorizationKey: apiKey
 }

Make sure to replace apiKey with key generated in Toolyt api module.

  {
   "status":200,
   "error":false,
   "message":"Job added successfully."
 }	

 If there is any error, it will return error as true and send error message in 'message' value.
 
  POST api/create-job HTTP/1.1
  Host: https://toolyt.com
  AuthorizationKey: o0orfl4km83luxzd7vlt
  Content-Type: application/json

  {
   "customer_id":96,
   "created_by_user_id":4,
   "job_details":"Testing new job",
   "assign_to_user_id":4,
   "extra_task":"NA",
   "priority":"Low",
   "purchase_date":"2013-12-12",
   "warranty_date":"2016-01-01",
   "finish_job_by_date":"2017-10-10 10:00:00",
   "job_type":"JB Type 1",
   "job_status":"pql",
   "text_job1":"ddd",
   "radio_job4":"val 1",
   "check_test3":"b,d,c",
   "image":"Base 64 Encoded Image",
   "photos":[{"0":"Base 64 Encoded Image 1","1":"Base 64 Encoded Image 2"}]
 }

This endpoint is to create job. Depends on form customization value passing to create job will vary. If any mandatory value not added or value format mismatch will return error. Data will pass as form data.

Pass token with api as field '_token'. assign_to_user_id set to 0 is job is not assigning to any one. If you need to add a job without any status send job_status filed 0. If custom field is check box, send value as comma(,) separated list. Photos and images are base 64 encoded values.

Create Schedule : POST

URL : https://toolyt.com/api/create-schedule


  {
   AuthorizationKey: apiKey
 }

Make sure to replace apiKey with key generated in Toolyt api module.

  {
    "status":200,
    "error":false,
    "message":"Visit Scheduled successfully."
  } 

  If there is any error, it will return error as true and send error message in 'message' value.
 
  POST api/create-schedule HTTP/1.1
  Host: https://toolyt.com
  AuthorizationKey: o0orfl4km83luxzd7vlt
  Content-Type: application/json


  {
    "user_id":28,
    "customer_lead_id": 2830,
    "schedule_content":"Some content",
    "schedule_date":2018-02-06,
    "schedule_time":"20:55:00",
    "schedule_user_id":"123"
  }

This endpoint is to schedule a visit. Pass the user_id who has permissions to create schedule. Data will pass as form data.

Pass token with api as field '_token'.If custom field is check box, send value as comma(,) separated list. Photos and images are base 64 encoded values.

Pass the schedule content as per your requirement

Create Visit : POST

URL : https://toolyt.com/api/create-visit


  {
   AuthorizationKey: apiKey
 }

Make sure to replace apiKey with key generated in Toolyt api module.

  {
    "status":200,
    "error":false,
    "message":"Visit added successfully."
  } 

  If there is any error, it will return error as true and send error message in 'message' value.
 
  POST api/create-visit HTTP/1.1
  Host: https://toolyt.com
  AuthorizationKey: o0orfl4km83luxzd7vlt
  Content-Type: application/json


  {
    "user_id":28,
    "customer_lead_id": 2830,
    "schedule_content":"Some content",
    "schedule_date":2018-02-06,
    "schedule_time":"20:55:00",
    "schedule_user_id":"123",
    "image":Base 64 Encoded Image,
    "new_field2":dads,
    "visit_mode_id":12,
    "latitude":23.4343,
    "longitude":17.232,
    "check_in_time":20:55:00,
    "check_out_time":20:56:01,
    "reason_id":1,
    "sub_reason_id":3,
    "customer_status_type":0,
    "lead_status_id":22,
    "next_action_date":2018-02-07,
    "next_action_time":10:55:00
  }

This endpoint is to schedule a visit. Pass the user_id, customer/lead id who exists in your data. Data will pass as form data.

Pass token with api as field '_token'.If custom field is check box, send value as comma(,) separated list. Photos and images are base 64 encoded values.

Pass the visit mode id for which mode you want to add the visit. Pass the reason and sub reason id which you have in your data. Pass "0" as customer status type if its a lead and "1" if its a customer.

Pass the next action data and time if you want to schedule a visit for the customer/lead

View Visits : POST

URL : https://toolyt.com/api/view-visits


  {
   AuthorizationKey: apiKey
 }

Make sure to replace apiKey with key generated in Toolyt api module.

  {
    "status": 200,
    "error": false,
    "Visits": [
    [
    {
      "id": 2351,
      "user_id": 27,
      "first_name": "Nizamudheen",
      "last_name": "V",
      "address": "NA",
      "phone": "1234567890",
      "category_id": 11,
      "user_assigned": 1,
      "created_at": "2018-02-06 10:18:06",
      "updated_at": "2018-02-06 10:18:06",
      "company_id": 16,
      "created_by": 27,
      "customer_id": 2772,
      "latitude": "",
      "longitude": "",
      "location_name": "",
      "accuracy": "",
      "visit_mode_id": null,
      "remarks": "",
      "schedule_content": "",
      "date": "0000-00-00",
      "time": "00:00:00",
      "schedule_date": "07 Feb 2018",
      "schedule_time": "10:55 AM",
      "comments": "",
      "next_action_date": "0000-00-00",
      "next_action_time": "00:00:00",
      "status": 0,
      "cancel_reason": "",
      "cancelled_user": null,
      "cancelled_datetime": null,
      "reschedule_status": 0,
      "image": "",
      "image_url": "",
      "check_in_time": null,
      "check_out_time": null,
      "customer_contact_id": 0,
      "customer_opportunity_id": 0,
      "customer_opportunity_stage_id": 0,
      "customer_status_type": 0,
      "customer_progress_id": 0,
      "reason_id": null,
      "sub_reason_id": null,
      "along_with_user": 0,
      "order_added": 0,
      "recurrence_added": 0,
      "recurrence_id": null,
      "user_name": "Nizamudheen V",
      "full_name": "Dajumma",
      "customer_name": "Customer name",
      "customer_company": "Company",
      "website": "",
      "email": "",
      "company_name": "Toolyt"
    }
    ]
    ]
  } 

  If there is any error, it will return error as true and send error message in 'message' value.
 
  POST api/view-visits HTTP/1.1
  Host: https://toolyt.com
  AuthorizationKey: o0orfl4km83luxzd7vlt
  Content-Type: application/json


  {
    "userId":28,
    "customerId": 2830,
    "visitDate":2018-02-03,
  }

This endpoint is to schedule a visit. Pass the user_id, customer/lead id who exists in your data. Data will pass as form data.

Pass token with api as field '_token'.

Pass the parameters userId, customerId, visitDate for filtering the visits data. All parameters are optional.

Update Visit : POST

URL : https://toolyt.com/api/update-visits


  {
   AuthorizationKey: apiKey
 }

Make sure to replace apiKey with key generated in Toolyt api module.

  {
    "status":200,
    "error":false,
    "message":"Visit added successfully."
  } 

  If there is any error, it will return error as true and send error message in 'message' value.
 
  POST api/create-visit HTTP/1.1
  Host: https://toolyt.com
  AuthorizationKey: o0orfl4km83luxzd7vlt
  Content-Type: application/json


  {
    "visit_id":2349,
    "user_id":28,
    "customer_lead_id": 2830,
    "schedule_content":"Some content",
    "schedule_date":2018-02-06,
    "schedule_time":"20:55:00",
    "schedule_user_id":"123",
    "image":Base 64 Encoded Image,
    "new_field2":dads,
    "visit_mode_id":12,
    "latitude":23.4343,
    "longitude":17.232,
    "check_in_time":20:55:00,
    "check_out_time":20:56:01,
    "reason_id":1,
    "sub_reason_id":3,
    "customer_status_type":0,
    "lead_status_id":22
  }

This endpoint is to schedule a visit. Pass the user_id, customer/lead id who exists in your data. Data will pass as form data. Pass the existing visit id retrieved from the scheduled visits.

Pass token with api as field '_token'.If custom field is check box, send value as comma(,) separated list. Photos and images are base 64 encoded values.

Pass the visit mode id for which mode you want to add the visit. Pass the reason and sub reason id which you have in your data. Pass "0" as customer status type if its a lead and "1" if its a customer.

Pass the next action data and time if you want to schedule another visit for the customer/lead

Cancel Visit : POST

URL : https://toolyt.com/api/cancel-visits


  {
   AuthorizationKey: apiKey
 }

Make sure to replace apiKey with key generated in Toolyt api module.

  {
    "status":200,
    "error":false,
    "message":"Visit cacnelled successfully."
  } 

  If there is any error, it will return error as true and send error message in 'message' value.
 
  POST api/create-visit HTTP/1.1
  Host: https://toolyt.com
  AuthorizationKey: o0orfl4km83luxzd7vlt
  Content-Type: application/json


  {
    "visit_id":2349,
    "user_id":28,
    "cacncel_reason": "Some reason"
  }

This endpoint is to schedule a visit. Pass the user_id, customer/lead id who exists in your data. Data will pass as form data. Pass the existing visit id retrieved from the scheduled visits.

Pass token with api as field '_token'.

Errors

The Kittn API uses the following error codes:

Error Code Meaning
400 Bad Request – Your request sucks
401 Unauthorized – Your API key is wrong
500 Internal Server Error – We had a problem with our server. Try again later.
503 Service Unavailable – We’re temporarially offline for maintanance. Please try again later.