We’re developing a private Equipment Master add-on. After a user selects equipment, it previews seven existing job fields—Asset Number, Rego, VIN, Make, Model, Year and Engine Number—and applies only explicitly confirmed changes.
ServiceM8 Support suggested asking here:
Can a private add-on use GET /custom_fields_1.0 through OAuth? The documentation mentions Public Applications. What minimum scope is required to read field definitions?
What is the supported request for updating selected custom job fields while preserving unrelated values? The Job POST schema lists status as required. Must we include the current status, and what happens to omitted fields?
Could resubmitting the current status trigger notifications, automations or other side effects?
An example of the supported request would be helpful.
We understand that manage_jobs grants broader access than individual fields or a single job. Our prototype has passed local simulated tests, but the add-on remains disabled and no live job writes have been made.
We want to confirm the supported approach before requesting broader permissions and testing on one designated job.
Hi Aaron,
Your OAuth add-on can remain unlisted while using the Custom Fields API; the “Public Application” registration doesn’t require public availability.
For definitions, use GET https://api.servicem8.com/custom_fields_1.0. Definitions include the backend field_name and user-facing display_name.
For values, use customfield_<field_name> properties on the Job, rather than display names. The update endpoint is POST https://api.servicem8.com/api_1.0/job/{uuid}.json, requiring manage_jobs.
The relevant guides are Custom Fields and Update a Job.
We’ll confirm with the team the minimum definition-reading scope, application-specific definition visibility and cross-application value access, preservation of omitted fields and whether status can be omitted, unchanged-status side effects, and handling of unknown customfield_ names.
Thanks,
Cody
Thanks for confirming that our add-on can remain unlisted and explaining the field mappings and update endpoint. We’ll use the Custom Fields and Update a Job guides to continue the local build.
Could you please follow up with your team on the outstanding questions:
What minimum OAuth scope is needed to read custom-field definitions?
Can our add-on read and update the existing job custom fields created by another integration?
Will fields omitted from an update remain unchanged?
Can we omit status when updating only custom fields? If it is required, could submitting the existing status trigger notifications, automations or other side effects?
What happens if an unknown customfield_ name is submitted?
Could you also provide a minimal example request that updates only the intended custom fields while preserving all other job information?
Our Equipment Master add-on is intended to preview equipment details from our fleet list and apply them only when the user selects “Apply to Job”. We’re continuing local development, with live writes disabled until these points are confirmed.
Hi Aaron,
For your local build, the permissions for Job access are read_jobs for read-only access and manage_jobs for full access, including updates. These are Job endpoint permissions, not a separate confirmation of the scope needed to read custom-field definitions.
The Update a Job reference lists status as required in its request schema for POST /api_1.0/job/{uuid}.json. That schema requirement shouldn’t be treated as an assurance that resubmitting the current status is side-effect-free.
Here’s a definition-reading request you can use as the starting point for your local implementation. It uses an OAuth bearer token and doesn’t submit a Job update:
The response includes field_name, display_name, field_type and max_length. Custom-field values use customfield_<field_name> properties through the REST API. Use the actual backend names rather than assuming names from the seven equipment labels.
We’ll confirm with the team the minimum definition-reading scope, visibility and read/write access for fields created by another integration, preservation of omitted fields, whether status can be omitted, unchanged-status notification and automation side effects, handling of unknown customfield_ names, and a minimal update request that preserves unrelated Job information.
Thanks,
Cody
Thanks for your help. We haven’t read the custom-field definitions yet because we don’t have a usable OAuth token. Our installed Add-on Kit requests manage_addons even when read_jobs is added.
Could you confirm the exact scope required for GET https://api.servicem8.com/custom_fields_1.0 and the supported way to authorise that read? Alternatively, could you provide—or arrange—an export of our Job custom-field labels, internal names and data types, especially Year?
Is there also an update on whether updating only the equipment fields preserves all unrelated Job fields, and whether submitting an unchanged status can trigger notifications or automations?
Apply to Job remains disabled, and we haven’t changed any live jobs.
Thanks for your help. We haven’t read the custom-field definitions yet because we don’t have a usable OAuth token. Our installed Add-on Kit requests manage_addons even when read_jobs is added.
Could you confirm the exact scope required for GET https://api.servicem8.com/custom_fields_1.0 and the supported way to authorise that read? Alternatively, could you provide—or arrange—an export of our Job custom-field labels, internal names and data types, especially Year?
Is there also an update on whether updating only the equipment fields preserves all unrelated Job fields, and whether submitting an unchanged status can trigger notifications or automations?
Apply to Job remains disabled, and we haven’t changed any live jobs.
Hi Aaron, thanks for your patience. Here are confirmed answers:
Token / scope: The Add-on Kit only grants the manifest scopes that the deploying credential already holds; any others are dropped. Deploy using a full-access account API key and read_jobs / manage_jobs will carry through to the add-on’s token.
Custom field definitions:GET /custom_fields_1.0 accepts any valid token. However, it only lists fields created by your own app. Fields created in Settings > Custom Fields or by another integration won’t appear. To find the internal names of your existing fields, fetch any job with GET /api_1.0/job/{uuid}.json and look at the customfield_* properties.
Updating selected fields: Send only the fields you want to change:
POST https://api.servicem8.com/api_1.0/job/{uuid}.json
Authorization: Bearer YOUR_ACCESS_TOKEN
Content-Type: application/json
{"customfield_<field_name_1>": "new value", "customfield_<field_name_2>": "new value"}
Omitted fields are left unchanged.
status isn’t required for updates, so leave it out.
Resending an identical status is a no-op, but leaving it out removes any risk.
Unknown customfield_ names are ignored without an error (the request still returns 200), so check your names against a job GET before going live.
Hi Aaron,
Addon Kit always requests manage_addons; adding read_jobs supplements that scope rather than replacing it. For Job read access, include read_jobs in both your manifest’s oauth.scope and the CLI login request.
whoami shows the authenticated account and granted scopes. You can check your installed version and its login options with npx addon-kit --version and npx addon-kit login --help. These commands don’t deploy or activate your add-on.
For the Custom Fields API, the supported authentication route is a Public Application using OAuth 2.0, which can remain unlisted. With your application’s App ID and App Secret, authorisation starts at https://go.servicem8.com/oauth/authorize, followed by exchanging the returned code at https://go.servicem8.com/oauth/access_token; API requests then use Authorization: Bearer YOUR_ACCESS_TOKEN.
The definition response includes display_name, field_name and field_type, which are the properties needed for your labels, internal names and data types. Use the returned field_type to identify how your existing Year field is configured.
We can’t access your account or produce an account-specific export from this forum. Please email support@servicem8.com about the export request and token problem, including your Addon Kit version, redacted login command and any error text, without API keys, tokens or secrets.
We’ll confirm with the team the exact minimum definition-reading scope and its use with Addon Kit credentials, cross-integration field access, preservation of omitted Job fields, whether status can be omitted, unchanged-status notification and automation effects, unknown customfield_ handling, and a minimal update request that preserves unrelated Job information.
Thanks,
Cody
Hi Aaron,
Addon Kit always requests manage_addons. Adding read_jobs requests it in addition to, rather than instead of, manage_addons. To request Job read access and inspect the granted scopes, use:
If your function needs Job read access, also include read_jobs in your manifest’s oauth.scope. This is a Job-access permission, not a separate custom-field-definition permission.
For the Custom Fields API, the supported authentication route is a Public Application using OAuth 2.0, and that application can remain unlisted. The Authentication guide covers registering the application, obtaining its App ID and App Secret, authorising access and exchanging the returned code for a bearer token.
The definition response includes display_name, field_name and field_type. The returned field_type is the property to check for your existing Year field.
We can’t access your account or supply its field export from this forum. Please email support@servicem8.com with the export request and details of the authorisation problem, including your Addon Kit version, redacted login command and any error text, without API keys, tokens or secrets.
We’ll confirm with the team the exact minimum definition-reading scope and suitability of Addon Kit credentials, access to another integration’s fields, preservation of omitted Job fields, whether status can be omitted, unchanged-status notification and automation effects, handling of unknown customfield_ names, and a minimal update request that preserves unrelated Job information.
Thanks,
Cody
short answer no scope needed to create custom fields, you would need the read_jobs as custom field is stored in job endpoint and read_customers to read the client custom fields
What you are wanting to build is asset management which is a core servicem8 addon,
Alternative instead of using custom fields you could use key value storage
I think Asset management add-on should give you enough functionality and you do not need custom fields. More custom fields will only allow you to add one additional piece of information with Client / Job entity. Where in this case you may have 1 to Many relation (one job multiple assets, similarly client > multiple assets)
So you can use Asset Add-On, infact you can also think of using Materials
Please see screen shot below, these custom fields are what I am trying to populate automatically through selecting the item of plant in the drop-down box “Xero Plant & Equipment”.
Each item of plant has a custom “On-hire or Off-hire” sheet attached to it, to save time we would like to have these sheets pre-populate so the mechanics don’t have to waste time completing this constantly.
Any assistance on this would be greatly helpful.
(We have Asset Management add-on however this does not particularly efficient in this case)
This is exactly what the asset module does, scan the qr code, open a form and all the details of the asset populate the form
While it is traditionally designed for customer assets, if you are managing your own assets you just use your own company as the customer and assign all the assets to that customer
We have quite a few clients that use assets for this exact workflow, allowing them to do daily prestart for machinery and the form is prefilled with all static asset data like serial/vin make, model, fuel type, engine size etc all the user needs to do is answer questions like current hours , safety checks etc.