Raw schema
{
"type": "object",
"properties": {
"shop_id": {
"type": "string",
"format": "uuid"
},
"tags_any": {
"type": "array",
"maxItems": 20,
"items": {
"type": "string",
"minLength": 1,
"maxLength": 50
},
"description": "Customers with at least one of these tags."
},
"tags_all": {
"type": "array",
"maxItems": 20,
"items": {
"type": "string",
"minLength": 1,
"maxLength": 50
},
"description": "Customers with every one of these tags."
},
"tags_none": {
"type": "array",
"maxItems": 20,
"items": {
"type": "string",
"minLength": 1,
"maxLength": 50
},
"description": "Leave out customers with any of these tags."
},
"lead_sources": {
"type": "array",
"maxItems": 20,
"items": {
"type": "string",
"minLength": 1,
"maxLength": 100
}
},
"kind": {
"type": "string",
"enum": [
"person",
"company"
]
},
"autopay": {
"type": "boolean"
},
"created_from": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "Customer added on or after this day (shop time zone)."
},
"created_to": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"has_jobs": {
"type": "boolean",
"description": "true: at least one job that is not cancelled. false: none."
},
"last_job_from": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "The customer's most recent job (not cancelled) is on or after this day, shop time zone. Customers with no jobs are left out."
},
"last_job_to": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "The most recent job is on or before this day. Use it for customers not served since a date; pair with has_jobs:false in a second call for those never served."
},
"job_kinds": {
"type": "array",
"maxItems": 5,
"items": {
"type": "string",
"enum": [
"one_time",
"estimate",
"callback",
"warranty",
"service_plan_visit"
]
},
"description": "Has a job (not cancelled) of one of these kinds."
},
"job_tags_any": {
"type": "array",
"maxItems": 20,
"items": {
"type": "string",
"minLength": 1,
"maxLength": 50
},
"description": "Has a job (not cancelled) with one of these tags, for example the service or trade."
},
"job_summary_contains": {
"type": "string",
"minLength": 2,
"maxLength": 100,
"description": "Has a job (not cancelled) whose summary contains these words, for example 'furnace'."
},
"jobs_from": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "With job_kinds, job_tags_any or job_summary_contains: only jobs dated on or after this day count."
},
"jobs_to": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"has_open_quote": {
"type": "boolean",
"description": "A quote sent and not yet signed or declined."
},
"plan_status": {
"type": "string",
"enum": [
"active",
"cancelled",
"none",
"any"
],
"description": "Maintenance plans. active: has an active plan. cancelled: had plans, none active now. none: never had one. any: has or had one."
},
"plan_term_ends_from": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "Has an active maintenance plan whose current term ends on or after this day (renewals)."
},
"plan_term_ends_to": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"cities": {
"type": "array",
"maxItems": 50,
"items": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"description": "A service property (not archived) or a job address (job not cancelled) in one of these cities; case is ignored."
},
"postal_codes": {
"type": "array",
"maxItems": 100,
"items": {
"type": "string",
"minLength": 1,
"maxLength": 20
},
"description": "A service property or job address in one of these postal codes. End a code with * to match a prefix, for example 838*."
},
"has_email": {
"type": "boolean",
"description": "Has an email address on the customer or on a current contact. This is not consent to marketing email; Doing Work keeps no marketing consent yet."
},
"has_phone": {
"type": "boolean"
},
"owes_money": {
"type": "boolean",
"description": "Has sent invoices with money still owed. Needs see_prices."
},
"overdue": {
"type": "boolean",
"description": "Has an invoice past its due day with money owed. Needs see_prices."
},
"min_owed_minor": {
"type": "integer",
"minimum": 1,
"description": "Owes at least this much in total. Needs see_prices."
},
"min_spent_minor": {
"type": "integer",
"minimum": 0,
"description": "Lifetime invoiced (sent and later, not voided, tax included) at least this. Needs see_prices."
},
"max_spent_minor": {
"type": "integer",
"minimum": 0,
"description": "Lifetime invoiced at most this. Needs see_prices."
},
"include_archived": {
"type": "boolean",
"description": "Default false. Erased and merged customers are never included."
},
"sort": {
"type": "string",
"enum": [
"name",
"last_job_oldest",
"last_job_newest",
"created_newest"
],
"description": "name (default), last_job_oldest (never served first), last_job_newest or created_newest."
},
"limit": {
"type": "integer",
"minimum": 0,
"maximum": 200
},
"cursor": {
"type": "string",
"maxLength": 500
}
},
"required": [
"shop_id"
]
}