Schemas
Incident
categoryThe Incident category. It selects the Loss Prevention shape.
When the Incident happened, local to the location. A date and, when known, a time of day.
location_numberThe Location Number the business uses. It resolves to one location. A leading apostrophe or dropped leading zeros still match. A report with an apprehension needs the exact Location Number.
id^([0-9a-fA-F]{8}-[0-… · requiredThe Incident id, a UUID that the caller mints. The caller reuses it on every retry. The API trims it and folds it to lowercase.
The people involved in the Incident, each under the id the caller minted. An involvement made outside this API has no such id and is not listed.
The items involved in the Incident, each under the id the caller minted.
The vehicles involved in the Incident, each under the id the caller minted.
incident_numberThe number people quote for the Incident, for example C-68.
offender_typeWho committed the Incident. Omit it when unknown, and then any listed Incident Type is valid. The Salesforce system of record refuses an Incident with no Offender Type with 422 INCIDENT_NOT_SUPPORTED_BY_SYSTEM_OF_RECORD.
incident_typeThe kind of Incident, as a key from GET /v1/incidents/options. Keys are the same for every tenant, but clients read them from the options and do not hard-code them. A key that does not apply to the Offender Type gets 422 INCIDENT_TYPE_NOT_ALLOWED. When the Offender Type is unknown, any listed key is valid. Omit it when unknown.
narrativeThe free-text account of the Incident. Omit it when there is none.
The estimated loss from the Incident. Omit it when unknown.
How the theft happened: a primary Theft Method and an optional secondary. An unknown key, a missing primary, or a secondary equal to the primary gets 422 INCIDENT_RULE_VIOLATED with rule theft_method_not_allowed. Omit it when unknown. A stored method that has no key is left out on load.
concealment_deviceThe device used to conceal the goods, as a key from concealment_devices in GET /v1/incidents/options. An unknown key gets 422 INCIDENT_RULE_VIOLATED with rule concealment_device_not_allowed. Omit it when unknown.
register_number^[^\p{Cc}\p{Cf}]*$The register the goods passed, under the domain key register_number from the tenant case mapping. A blank value is left out. This is never a Salesforce field name. A value longer than 80 characters, or with a control or invisible format character such as a zero-width joiner, is a bad request. The refusal is on purpose: an invisible character must not make a blank value count as a register number. A mapping that does not define the key gets 422 INCIDENT_RULE_VIOLATED with rule register_number_not_defined. A mapping that requires it, when the report leaves it out, gets rule register_number_required. A value the org cannot store gets 422 INCIDENT_NOT_SUPPORTED_BY_SYSTEM_OF_RECORD with reason register_number.
entry_pointHow the offender got in, in free text of at most 100 characters, such as a door or a window. Any Incident can have one. A blank value is left out. A longer value gets 422 INCIDENT_RULE_VIOLATED with rule invalid_field. Weapon and injury detail goes in the narrative. Omit it when unknown.
The Law Enforcement Detail: whether the police were called and, when they were, the facts about the call. A load returns it whenever the answer was recorded.
reported_at^(?:(?:\d\d[2468][04…When the system of record received the Incident. It is absent when the system of record keeps no reported time.
The system the Incident came from and its id there, or null for an Incident made here or one that carries no reference. The API always sends it.
IncidentOptions
The valid Incident Types, keyed by Offender Type. They are the ThinkLP Loss Prevention list, which is the same for every tenant. A type that applies to both Offender Types appears under each. Send an entry's key as incident_type. Clients read keys here and do not hard-code them.
rolesEvery Role a person can be reported as playing in an Incident.
The valid Theft Methods. Send a key as theft_method.primary or theft_method.secondary. Clients read keys here and do not hard-code them.
The valid Concealment Devices. Send a key as concealment_device. Clients read keys here and do not hard-code them.
The states and provinces that can issue a plate, as key and label. Send a key as the state of an involved vehicle. Clients read keys here and do not hard-code them.
The valid item categories. Send a key as the category of an involved item. Clients read keys here and do not hard-code them.
The tenant's customer fields, in the order the case mapping gives them. Each key is the domain property key from the tenant case mapping, never a Salesforce field name. This is the one part of the options read from the system of record. It is empty when the tenant has no system of record, when the org defines none, or when the org cannot be reached. The register number has its own field, so it is never listed here.
Pagination
totalThe number of matches
next_cursorThe cursor of the next page, absent on the last
pageThe number of this page, from 1
page_sizeThe most matches a page holds
has_moreWhether matches remain after this page
ReportIncidentRequest
categoryThe Incident category. It selects the Loss Prevention shape.
When the Incident happened, local to the location. A date and, when known, a time of day.
location_numberThe Location Number the business uses. It resolves to one location. A leading apostrophe or dropped leading zeros still match. A report with an apprehension needs the exact Location Number.
idThe Incident id. The caller mints this UUID and reuses it on every retry, so a retry names the same Incident.
offender_typeWho committed the Incident. Omit it when unknown, and then any listed Incident Type is valid. The deprecated value both also means unknown. The Salesforce system of record refuses an Incident with no Offender Type with 422 INCIDENT_NOT_SUPPORTED_BY_SYSTEM_OF_RECORD.
incident_typeThe kind of Incident, as a key from GET /v1/incidents/options. Keys are the same for every tenant, but clients read them from the options and do not hard-code them. A key that does not apply to the Offender Type gets 422 INCIDENT_TYPE_NOT_ALLOWED. When the Offender Type is unknown, any listed key is valid. Omit it when unknown.
narrativeThe free-text account of the Incident. Omit it when there is none.
The estimated loss from the Incident. Omit it when unknown.
How the theft happened: a primary Theft Method and an optional secondary. An unknown key, a missing primary, or a secondary equal to the primary gets 422 INCIDENT_RULE_VIOLATED with rule theft_method_not_allowed. Omit it when unknown. A stored method that has no key is left out on load.
concealment_deviceThe device used to conceal the goods, as a key from concealment_devices in GET /v1/incidents/options. An unknown key gets 422 INCIDENT_RULE_VIOLATED with rule concealment_device_not_allowed. Omit it when unknown.
register_number^[^\p{Cc}\p{Cf}]*$The register the goods passed, under the domain key register_number from the tenant case mapping. A blank value is left out. This is never a Salesforce field name. A value longer than 80 characters, or with a control or invisible format character such as a zero-width joiner, is a bad request. The refusal is on purpose: an invisible character must not make a blank value count as a register number. A mapping that does not define the key gets 422 INCIDENT_RULE_VIOLATED with rule register_number_not_defined. A mapping that requires it, when the report leaves it out, gets rule register_number_required. A value the org cannot store gets 422 INCIDENT_NOT_SUPPORTED_BY_SYSTEM_OF_RECORD with reason register_number.
entry_pointHow the offender got in, in free text of at most 100 characters, such as a door or a window. Any Incident can have one. A blank value is left out. A longer value gets 422 INCIDENT_RULE_VIOLATED with rule invalid_field. Weapon and injury detail goes in the narrative. Omit it when unknown.
The Law Enforcement Detail: whether the police were called and, when they were, the facts about the call. A load returns it whenever the answer was recorded.
The people involved in the Incident, at most 100.
The items involved in the Incident, at most 100.
The vehicles involved in the Incident, at most 100.
The system this Incident came from and its id there. A second report with the same source and id answers 200 with the first Incident and creates no second one. A report made while the first is still being filed gets 409 EXTERNAL_REFERENCE_IN_FLIGHT with Retry-After; retry it. Omit it for an Incident made here.
The values of the tenant's customer fields. Each key is the domain property key from the tenant case mapping, as customer_fields[].key in GET /v1/incidents/options names it, and never a Salesforce field name. Each value is text. Values are trimmed, and a blank value is left out. A key that does not match ^[A-Za-z][A-Za-z0-9_]{0,79}$, the key register_number, a value longer than 32768 characters, or more than 50 entries gets 422 INCIDENT_RULE_VIOLATED with rule invalid_field and field customer_fields. A key the mapping does not define gets rule customer_field_not_defined, and a required field left out gets rule customer_field_required, both with field customer_fields. A value the org cannot store gets 422 INCIDENT_NOT_SUPPORTED_BY_SYSTEM_OF_RECORD with reason customer_field. After any of those three refusals, read the options again. An API instance remembers the fields for up to 5 minutes, so that read can still return the old list for a while.
ReportIncidentResult
id^([0-9a-fA-F]{8}-[0-… · requiredThe id of the reported Incident.
incident_numberNot returned for a Loss Prevention incident: its number is given by the system of record, so read the incident to see it.
audit.assignment.get.v1_audits_assignable-users.response
user_id^([0-9a-fA-F]{8}-[0-… · requireddisplay_nameemailrole_codeaudit.assignment.patch.v1_audits_by-id.body
notesauditor_user_id^([0-9a-fA-F]{8}-[0-…audit.assignment.patch.v1_audits_by-id_lead.body
user_id^([0-9a-fA-F]{8}-[0-… · requiredaudit.assignment.post.v1_audits.body
template_id^([0-9a-fA-F]{8}-[0-… · requiredlocation_hierarchy_node_id^([0-9a-fA-F]{8}-[0-… · requiredauditor_user_id^([0-9a-fA-F]{8}-[0-…due_date^(?:(?:\d\d[2468][04…notesaudit.assignment.post.v1_audits.response
id^([0-9a-fA-F]{8}-[0-… · requiredtenant_id^([0-9a-fA-F]{8}-[0-… · requiredtemplate_id^([0-9a-fA-F]{8}-[0-… · requiredtemplate_versionprogram_id^([0-9a-fA-F]{8}-[0-… · requiredschedule_id^([0-9a-fA-F]{8}-[0-… · requiredlocation_hierarchy_node_id^([0-9a-fA-F]{8}-[0-… · requiredlocation_pathlocation_nameauditor_nameprogram_nametemplate_categoryThe originating template's category, resolved server-side from template_id. Null only when the audit has no template or the template has no category — a soft-deleted template still resolves, since the audit retains template_id.
auditor_user_id^([0-9a-fA-F]{8}-[0-… · requirednameaudit_numberaudit_typestatusscoremax_scorepassedscheduled_datecompleted_datedue_datenotessignature_urlsalesforce_idcreated_atupdated_atis_multi_auditormy_sections_completeaudit.assignment.post.v1_audits_by-id_section-assignments_by-section-id_reassign.body
user_id^([0-9a-fA-F]{8}-[0-… · requiredaudit.assignment.post.v1_audits_by-id_section-assignments_by-section-id_reassign.response
audit.assignment.post.v1_audits_by-id_section-assignments_complete.body
audit.assignment.post.v1_audits_by-id_section-assignments_complete.response
audit_statusaudit.scheduling.get.v1_audit-program-templates_by-id_impact.response
pending_auditsin_progress_auditshas_historyone_off_pending_auditsmanual_schedulesmanual_pending_auditsaudit.scheduling.get.v1_audit-schedules.response
id^([0-9a-fA-F]{8}-[0-… · requiredtenant_id^([0-9a-fA-F]{8}-[0-… · requiredprogram_id^([0-9a-fA-F]{8}-[0-… · requiredprogram_template_id^([0-9a-fA-F]{8}-[0-… · requiredtemplate_id^([0-9a-fA-F]{8}-[0-… · requiredlocation_hierarchy_node_id^([0-9a-fA-F]{8}-[0-… · requiredlocation_hierarchy_node_idsresolved_user_id^([0-9a-fA-F]{8}-[0-… · requiredschedule_typenext_due_datelast_run_datestart_dateend_datestatussourcecreated_by^([0-9a-fA-F]{8}-[0-… · requiredsort_ordercreated_atupdated_ataudit.scheduling.patch.v1_audit-schedules_by-id.body
statusnext_due_dateend_date^(?:(?:\d\d[2468][04…sort_orderschedule_typelocation_hierarchy_node_idslocation_hierarchy_node_id^([0-9a-fA-F]{8}-[0-…audit.scheduling.post.v1_audit-program-templates_by-id_activate.response
id^([0-9a-fA-F]{8}-[0-… · requiredtenant_id^([0-9a-fA-F]{8}-[0-… · requiredprogram_id^([0-9a-fA-F]{8}-[0-… · requiredtemplate_id^([0-9a-fA-F]{8}-[0-… · requiredactive_template_id^([0-9a-fA-F]{8}-[0-… · requiredsort_orderstatusversionactivated_athas_pending_changesaudit.scheduling.post.v1_audit-program-templates_by-id_deactivate.response
schedules_deactivatedaudits_removedaudits_left_in_progressaudit.scheduling.post.v1_audit-program-templates_by-id_reactivate.response
schedules_reactivatedaudit.scheduling.post.v1_audit-schedules.body
program_template_id^([0-9a-fA-F]{8}-[0-… · requiredtemplate_id^([0-9a-fA-F]{8}-[0-… · requiredlocation_hierarchy_node_idsprogram_id^([0-9a-fA-F]{8}-[0-…location_hierarchy_node_id^([0-9a-fA-F]{8}-[0-…schedule_typenext_due_datestart_date^(?:(?:\d\d[2468][04…end_date^(?:(?:\d\d[2468][04…audit.scheduling.post.v1_audit-schedules.response
id^([0-9a-fA-F]{8}-[0-… · requiredtenant_id^([0-9a-fA-F]{8}-[0-… · requiredprogram_id^([0-9a-fA-F]{8}-[0-… · requiredprogram_template_id^([0-9a-fA-F]{8}-[0-… · requiredtemplate_id^([0-9a-fA-F]{8}-[0-… · requiredlocation_hierarchy_node_id^([0-9a-fA-F]{8}-[0-… · requiredlocation_hierarchy_node_idsresolved_user_id^([0-9a-fA-F]{8}-[0-… · requiredschedule_typenext_due_datelast_run_datestart_dateend_datestatussourcecreated_by^([0-9a-fA-F]{8}-[0-… · requiredsort_ordercreated_atupdated_ataudit.scheduling.post.v1_audit-schedules_by-id_run.response
id^([0-9a-fA-F]{8}-[0-… · requiredtenant_id^([0-9a-fA-F]{8}-[0-… · requiredtemplate_id^([0-9a-fA-F]{8}-[0-… · requiredtemplate_versionprogram_id^([0-9a-fA-F]{8}-[0-… · requiredschedule_id^([0-9a-fA-F]{8}-[0-… · requiredlocation_hierarchy_node_id^([0-9a-fA-F]{8}-[0-… · requiredlocation_pathlocation_nameauditor_nameprogram_nametemplate_categoryThe originating template's category, resolved server-side from template_id. Null only when the audit has no template or the template has no category — a soft-deleted template still resolves, since the audit retains template_id.
auditor_user_id^([0-9a-fA-F]{8}-[0-… · requirednameaudit_numberaudit_typestatusscoremax_scorepassedscheduled_datecompleted_datedue_datenotessignature_urlsalesforce_idcreated_atupdated_atis_multi_auditormy_sections_completeaudit.scheduling.post.v1_audit-section-library_by-id_cascade.response
updatedalready_currentneeds_attention_countremainingcompletestalled