- A form type is the definition. It describes which fields exist, what they mean, and how to fill them in.
roe,t4, andtd1onare form types. - A form is one filled-in instance of a type, tied to an owner. A T4 for one employee is a form.
Forms are self-describing
The fields on a form are not a fixed schema you hard-code. They depend on the form type and its version, and they change over time as the government revises each form. So you don’t build a T4 by memorizing its boxes. You ask the API what the current T4 looks like, then render and fill what it returns. This is the core idea: the API hands you the field definitions at runtime, and you build against them. A form editor built this way keeps working when a form gains a box or a new version ships.Listing form types
Retrieve the available form types with the List form types endpoint. RequestRetrieving a form type
Retrieve one form type with the Retrieve a form type endpoint to get its full definition: its version, its capabilities, and every field. RequestField definitions
Each entry infields tells you how to render and handle one input:
key: the field to read and write, for exampleblock_10_first_day_worked. This is the name you send back when you fill the form.label: the display name.type: which control to render. One oftext,numeric,currency,date,boolean, orselect.required: whether to mark the input as required.readonly: whether to disable the input.options: forselectfields, the allowed values as a map of value to label. Render these as the choices.group: which section the field belongs to. The top-levelgroupsmap gives each group its heading. The grouping is a suggestion for laying out your form, and it may change.help: guidance to show alongside the field, when the form provides it.
select field carries its own options:
Versions and effective_date
effective_date picks the version of the form. Governments revise their forms over time: new fields appear, a select gains options, claim amounts and validation rules change. Each revision is a new version, and the API resolves your effective_date to the version in effect on that date. Pass the date the form applies to and you always build against the right version.
If you omit effective_date, it defaults to today.
Owners
owner_types tells you what a form attaches to. It’s one or more of employee, contractor, or work_assignment. A T4 belongs to an employee; a TD1 belongs to a work assignment; a T4A can belong to either an employee or a contractor. You set the owner when you create the form, and the owner’s type is inferred from its ID prefix (emp_, ctr_, wrkas_).
Capabilities vary by form type
Not every form supports every operation. Three fields on the definition tell you what a given form type can do:supports_population: you can fetch suggested field values from the employee’s payroll data.supports_generation: the API can build completed forms for you in the background.exportable_as: which file formats you can export, such asxmlorpdf. An empty list means the form is not exportable.
Creating a form
Create a form with the Create a form endpoint. Send thetype and the owner_id. You can set field values in the same request, or leave them empty and fill them later.
Request
null.
Response
data. Read them by the same key the definition uses.
Populating a form
For form types wheresupports_population is true, the API can suggest field values from the employee’s payroll data instead of you calculating them. Fetch the suggestions with the Populate a form endpoint.
Request
Generating forms
For form types wheresupports_generation is true, the API can build completed forms for you: it creates each form and fills its fields from the owner’s payroll data in one step. Start a run with the Generate forms endpoint.
Generation runs in the background, so the endpoint returns an async task rather than the forms. Poll the task or listen for the async_task_completed webhook to know when it finishes. Each form type shapes its own request, and one request can create many forms.
Reading and editing a form
Retrieve a form with the Retrieve a form endpoint, and list a company’s forms with List forms. Two fields on a form tell you its editing state:is_editable: whether the form can still be changed. A submitted form is not editable.validation_error_count: how many fields currently fail validation.
Validating a form
Check a form’s fields before submission with the Validate a form endpoint. Send the form’seffective_date and the fields you want to check. The effective_date picks the version to validate against, so use the form’s own date. The response lists any errors, keyed by field.
Request
Submitting a form
Submit a form with the Submit a form endpoint. What submission means depends on the form type. Some forms, like the ROE, are filed with a government agency and move through a status lifecycle (draft, processing, submitted, done, rejected). Others are records you complete and export yourself. See the form-specific guide for what a given form does on submission.
Exporting a form
For form types with a non-emptyexportable_as, retrieve the file from the Retrieve a form endpoint by setting the Accept header to the format you want:
Accept: application/pdffor a PDF.Accept: application/xmlfor XML.
exportable_as is not always available for every form. The ROE is the clearest example: a managed ROE exports as a PDF only once Service Canada has accepted it, and never as XML, because Nmbr files it for you. When a format is not available for a given form, the endpoint returns 406 Not Acceptable. The form-specific guides spell out the conditions.

