ascora_list_customers
List customers
Search Ascora customers (sites and billing customers): id, number, name, contact, email, phone, addresses, on-hold flags, customer type, lead source, billing customer and assigned user. GET /Customers/Customers.
输入参数pagepage_sizefilter_textlead_sourcephone_numberassigned_usercustomer_typesite_billing_type
ascora_get_customer
Get customer
One Ascora customer by id (GUID from ascora_list_customers), including custom fields. GET /Customers/Customer/{id}.
输入参数customer_id必填
ascora_list_contacts
List contacts
Search contacts across all customers by name, email or phone. GET /Customers/Contacts.
输入参数pagepage_sizefilter_textphone_number
ascora_list_customer_contacts
List contacts of a customer
All contacts of one customer, with role and default-contact flag. GET /Customers/GetContactsForCustomer/{customerId}.
输入参数pagepage_sizecustomer_id必填
ascora_list_supplies
List supplies (price list)
Search the inventory price list: materials and services with part number, description, cost, sell price ex/inc tax, supplier, categories and reorder flags. Use the supply id to add items to quotes. GET /Inventory/Supplies.
输入参数pagepage_sizefilter_textfavourite_onlycategory_one_idcategory_two_id
ascora_list_kits
List kits
Search kits (bundles of supplies and labour) with part number, description, markup, sell price and pricing method. GET /Inventory/Kits.
输入参数pagepage_sizefilter_textfavourite_onlycategory_one_idcategory_two_id
ascora_list_categories
List inventory categories
Inventory categories (Category 1 or 2, top-level or sub-categories) used to filter supplies and kits. GET /Inventory/Categories.
输入参数pagepage_sizefilter_textparent_onlycategory_number
ascora_list_labour_roles
List labour roles
Labour roles with their hourly rate ex tax, ordered by name. Use the role id to add labour to a quote. GET /Quotes/LabourRoles.
无需输入参数。
ascora_list_quotes
List quotes
Search quotes: number, name, status, date, totals ex/inc tax, pricing method, job type and site/billing customer. Status defaults to OPEN (in progress or sent) when omitted. GET /Quotes/Quotes.
输入参数pageend_datejob_typepage_sizestart_datefilter_textquote_statusassigned_usercustomer_name
ascora_get_quote
Get quote
One quote by its full number (e.g. Q57): status, dates, totals, pricing method, addresses, job type, customers and custom fields. GET /Quotes/Quote/{quoteNumber}.
输入参数quote_number必填
ascora_list_jobs
List jobs
Search jobs: number, name, status, totals, pricing method, job type, site/billing customer, secondary status and pipeline phase. Status defaults to OPEN when omitted. GET /Jobs/Jobs.
输入参数pageend_datejob_typepage_sizejob_statusstart_datefilter_textassigned_usercustomer_nameinclude_child_jobs
One job by its full number (e.g. J112): status, dates, totals, pricing method, job type, customers, secondary status and pipeline phase. A deleted job reads as not found. GET /Jobs/Job/{jobNumber}.
输入参数job_number必填
ascora_get_job_labour
Get job labour
Labour lines on a job: role, hours, hourly rate, totals, staff member, chargeable and invoiced flags. GET /Jobs/JobLabour/{jobNumber}.
输入参数job_number必填
ascora_get_job_timesheets
Get job timesheets
Timesheet entries on a job: staff member, start/end, hours, meal break and payroll-sent flag (pay and cost rates are not returned). GET /Jobs/JobTimesheets/{jobNumber}.
输入参数job_number必填
ascora_list_bookings
List bookings (schedule)
Search the schedule: bookings of jobs, quotes and activities with staff member, start/end, notes, arrival window and the job or quote they belong to. Archived bookings are excluded unless include_archived. GET /Bookings/Bookings.
输入参数pageusersort_byend_datepage_sizeteam_namejob_numberjob_statusstart_datecustomer_idfilter_textbooking_type另有 6 个
ascora_get_booking
Get booking
One booking by id: type, times (local and UTC), staff member, job/quote/activity, customers, address, notes, arrival window, rates and reminder flags. GET /Bookings/Booking/{bookingId}.
输入参数booking_id必填
ascora_list_activity_types
List activity types
Activity types that non-job bookings (training, leave-style activities, etc.) can be made with. GET /Bookings/ActivityTypes.
无需输入参数。
ascora_list_users
List staff users
Staff users of the Ascora company (archived users excluded): id, name, email, mobile, job title, team, scheduler group, licence and access flags. Pay rates are not returned. GET /Users/Users.
输入参数pagelast_namepage_sizeteam_namefirst_namefilter_textscheduler_group_name
ascora_list_suppliers
List suppliers
Search suppliers by name, supplier number or exact business number (ABN). GET /Suppliers/Suppliers.
输入参数pagepage_sizesupplier_namebusiness_numbersupplier_number
ascora_list_supplier_invoices
List supplier invoices
Search supplier invoices and credit notes: supplier, dates, tracking number, lines and totals. GET /SupplierInvoices/SupplierInvoices.
输入参数pagepage_sizesupplier_nametracking_numberinvoice_date_endinvoice_date_startto_be_sent_to_accounting
ascora_create_enquiry
Create enquiry (lead)
WRITE: create a new enquiry (lead) in Ascora. Every call creates another enquiry (not idempotent; Ascora allows 500 enquiries an hour per company), so do not repeat it. Needs at least a name, company, email, phone or mobile. POST /Enquiry.
输入参数emailphonestatemobilesuburbcountrypostcodelast_namefirst_namedescriptionlead_sourcecompany_name另有 3 个
ascora_create_customer
Create customer
WRITE: create a new customer (site or billing) in Ascora. Always creates a new record (it never updates an existing customer), so search with ascora_list_customers first to avoid duplicates. A customer type or lead source name that does not exist is created. POST /Customers/Customer.
输入参数emailphonemobilelast_namefirst_namelead_sourcecompany_namestreet_line1street_line2street_statecustom_fieldscustomer_type另有 3 个
WRITE: add a note to an enquiry, job, quote, invoice or customer (the entity must already exist). Notes cannot be edited or removed through this server, and every call adds another note. POST /Notes/Note.
输入参数content必填entity_id必填entity_type必填created_by_name
ascora_create_quote
Create quote
WRITE: create a new quote (status In Progress; it is NOT sent to the customer) for a site customer, optionally with supplies, kits and labour from the price list. Ids that Ascora cannot find are skipped silently when creating, so check the totals in the reply. Every call creates another quote. POST /Quotes/Quote.
输入参数kitslaboursuppliesquote_namedescriptionjob_type_namepricing_methodsite_customer_idsite_customer_namebilling_customer_idclient_order_numberpurchase_order_number
ascora_update_quote_status
Update quote status
WRITE: change a quote's status to IN-PROGRESS, SENT-TO-CUSTOMER, LOST or WON. WON converts the quote into a new Job (the same as ascora_convert_quote_to_job; a second WON returns the existing job). Ascora's reference documents only a status change, not an email to the customer. POST /Quotes/UpdateStatus.
输入参数status必填quote_number必填reason_for_loss
ascora_convert_quote_to_job
Convert quote to job
WRITE: convert a quote into a Job (what Convert to Job does in Ascora): supplies, labour, notes, bookings and attachments carry over and the quote is marked converted. Never forces a new job: a variation quote is added onto its original job, a quote whose job still exists is reconnected to it, and a quote already converted is refused with a message naming the existing job. Specify the parent quote number, not a section. POST /Quotes/ConvertToJob.
输入参数quote_number必填
ascora_create_job
Create job
WRITE: create a new job for a site customer (it never updates an existing job). Every call creates another job; add work with a quote or in Ascora. The job is not booked and nothing is sent to the customer. POST /Jobs/Job.
输入参数job_namedescriptionjob_type_namepricing_methodsite_customer_idsite_customer_namebilling_customer_idclient_order_numberpurchase_order_number
ascora_create_booking
Create booking
WRITE: schedule staff on a job or a quote (give exactly one of job_number / quote_number). One booking is created per staff member and the job or quote moves to Booked; the bookings show on the Scheduler and the staff mobile apps, and Ascora's own reminder settings may notify the customer or staff. Repeating the identical request returns the existing booking. By default a clash with another booking or leave refuses the whole request (reject_conflicts). POST /Bookings/Booking.
输入参数notesusers必填end_timejob_numberstart_time必填time_windowquote_numberduration_minutesreject_conflicts