Compliance Task Reference Values

The fixed value sets used by the compliance task endpoints.

The compliance task endpoints share several value sets. They are listed here once; the endpoint pages and the field descriptions link to the section they need instead of repeating the values.

Most of these sets are fixed. Two can grow: the type of a critical control point and the type of a task template both gain values as new ones ship, and a new value is not treated as a breaking change to this API. Treat a type you do not recognise as valid rather than failing on it.

Critical control points

CCP types

The type of a critical control point:

typeName
1Delivery & Receipt
2Storage
3Preparation
4Processing
5Cooking
6Reheating
7Service
8Food Display
9Waste
10Facility
11Other

Mitigation policy

The mitigation_policy field defines whether a corrective action is required when a related task fails:

mitigation_policyName
0Not required
1Optional
2Required

Task templates

Template types

The type of a task template. It also determines which keys a template's type_specific object holds:

typeNametype_specific keys
temperature_checkTemperature checkccp, temperatures
checklist_taskChecklist taskccp, checklist
general_taskGeneral tasknone ({})
cleaning_sanitationCleaning & Sanitationccp
orderOrdernone ({})
countCountnone ({})
packagingPackagingccp
maintenanceMaintenanceccp
waste_managementWaste Managementccp
pest_controlPest Controlccp
facility_managementFacility Managementccp
stock_managementStock Managementccp
chemical_controlChemical Controlccp
trainingTrainingccp
traceability_recallTraceability & Recallccp

The calendar endpoint is the exception: the template it embeds carries ccp only, never temperatures or checklist. Fetch the occurrence or the template itself for those.

Recurrence

recurrence.frequency is a fixed set of slugs. All keys of recurrence are always present; the ones that do not apply to the frequency are null:

frequencyNameApplicable fields
onceOncestart_date, start_time, interval
dailyDailystart_date, start_time, end_date, interval
weeklyWeeklystart_date, start_time, end_date, interval, weekdays
monthlyMonthlystart_date, start_time, end_date, interval, day_of_month
yearlyYearlystart_date, start_time, end_date, interval, day_of_month, month_of_year

weekdays values: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday.

On write, a field that is not applicable to the frequency is rejected rather than ignored, and the applicable ones are not all optional: weekly requires weekdays, monthly requires day_of_month, and yearly requires both day_of_month and month_of_year. interval defaults to 1, and a value above 1 is accepted only for weekly, monthly and yearlyonce and daily take 1 and nothing else.

Task custom fields

Custom field types

The type of a task custom field is a fixed set of values. It decides whether the definition carries an options list:

typeNameoptions
choicesSingle ChoiceThe allowed values
multiMulti ChoiceThe allowed values
textFree Textnull
long_textLong Free Textnull

Task occurrences

Completion result

completion.resultMeaning
okThe task was completed successfully
nokThe task was completed with a failed outcome
nullThe task is not completed yet (planned or draft)

Did this page help you?