1.0.52 • Published 5 months ago
zuper-sdk v1.0.52
Zuper-SDK
Zuper Field Service Management platform lets you reimagine field service delivery and delight your customers. Collaborate Seamlessly with your field teams anytime, anywhere.
Download & Installation:
npm i -s zuper-sdk
To generate API Key:
- On Zuper Webapp, Click on Settings from the left menu.
- Under 'General setting' click on "Account".
- In the "Account Settings" click on "API Keys".
- Under the "Your API Key" section, click on "New API Key", in the pop-up enter the "API Key Name" and click on create.
- Your API key will be generated and displayed.
Modules:
Module | Permitted Operations |
---|---|
Jobs | get, getAll, create, update, updateStatus, delete, updateSchedule, updateAssignment, getJobTimelogs, rollbackStatus, getAllRecurringJobs, getAssistedScheduling |
Property | get, getAll, create, update, updateStatus, delete |
Customers | get, getAll, create, update, sendEmail, delete |
Organizations | get, getAll, create, update, delete |
Users | get, getAll, create, update, delete, getWorkHours, getUserTeams |
Assets | get, getAll, create, update, getHistory, getInspectionForm, updateStatus, getPPM, delete |
Quotes | get, getAll, create, update, delete, updateStatus |
Invoices | get, getAll, create, update, delete, updateStatus |
Parts & Services | get, getAll, create, update, createTranscation, getTranscations, delete |
Activity | get, create |
Misc | notify ( Send Email / SMS ) |
Service Taks | get, getAll, create, update, delete, bulkAction, updateStatus, assignUsers, reorder |
Proposal | get, getAll, create, update, delete, updateStatus |
Requests | get, getAll, create, update, updateStatus, delete, rollbackStatus, createAssignment, createAttachment, updateAttachment, deleteAttachment |
Example:
const Zuper = require("zuper-sdk");
const zuper = Zuper.init("<origin>", "<Zuper API key>");
const jobs = async () => {
try {
let jobs = await zuper.jobs.get("<job_uid>");
console.log("Get Job details", jobs);
} catch (e) {
console.log("Error:", e);
}
};
let jobsList = async () => {
try {
let options = {
page: 1,
count: 2,
filter: {
priority: "LOW",
},
};
let jobs = await zuper.jobs.getAll(options);
console.log("Get Job details", jobs);
} catch (e) {
console.log("Error:", e);
}
};
More:
- get(property_uid)
- getAll(options)
- create(payload)
- update(property_uid, payload)
- updateStatus(property_uid, payload)
delete(property_uid)
get(customer_uid)
- getAll(options)
- create(payload)
- update(customer_uid, payload)
- sendEmail(customer_uid, payload)
delete(customer_uid)
get(organization_uid)
- getAll(options)
- create(payload)
- update(organization_uid, payload)
delete(organization_uid)
get(user_uid)
- getAll(options)
- create(payload)
- update(user_uid, payload)
- delete(user_uid)
- getWorkHours(user_uid)
getUserTeams(user_uid)
get(asset_uid)
- getAll(options)
- create(payload)
- update(asset_uid, payload)
- getHistory(asset_uid, options)
- getInspectionForm(asset_uid, options)
- updateStatus(asset_uid, params)
- getPPM(options)
delete(asset_uid)
get(estimate_uid)
- getAll(options)
- create(payload)
- updateStatus(estimate_uid, payload)
- update(estimate_uid, payload)
delete(estimate_uid)
get(invoice_uid)
- getAll(options)
- create(payload)
- updateStatus(invoice_uid, payload)
- update(invoice_uid, payload)
delete(invoice_uid)
get(product_uid)
- getAll(options)
- create(payload)
- update(product_uid, payload)
- createTranscation(product_uid, type, payload)
- getTranscations(params)
delete(product_uid)
get(payload)
create(payload)
notify(module, entity_uid, payload)
getAll(options)
- get(service_task_uid)
- create(payload)
- update(service_task_uid, payload)
- delete(service_task_uid)
- bulkAction(payload)
- updateStatus(service_task_uid, payload)
- assignUsers(service_task_uid, payload)
reorder(payload)
get(proposal_uid)
- getAll(options)
- create(payload)
- updateStatus(proposal_uid, payload)
- update(proposal_uid, payload)
delete(proposal_uid)
get(request_uid)
- getAll(options)
- create(payload)
- update(request_uid, payload)
- updateStatus(request_uid, payload)
- delete(request_uid)
- rollbackStatus(request_uid, payload)
- createAssignment(payload)
- createAttachment(request_uid,payload)
- updateAttachment(request_uid,attachment_uid,payload)
- deleteAttachment(request_uid,attachment_uid)