For the complete documentation index, see llms.txt. This page is also available as Markdown.

Service task file

Reserve and upload a file to attach to a service task.

A service task can carry files: an invoice, a photograph of the work, a signed job sheet. This operation reserves one and returns the credentials for uploading it.

The exchange works the same way as for task form files. Reserving the file is the first step, uploading it to the returned URL is the second, and every file counts against the account's file storage quota.

API actions

API base path: /vehicle/service_task/file.

Operations that list no errors of their own return only the general error codes.

Creates a file to specify its ID in service work later.

Upload with a POST multipart request to the returned url: send the values from fields first, then the file part last, named as file_field_name says. token authenticates the upload.


Create service task file

post
/vehicle/service_task/file/create

Reserve a file so its ID can be attached to a service work later. Returns an upload URL and the fields to send with it.

Upload with a POST multipart request to the returned url, sending the values from fields first and the file part last, named as file_field_name says.

Authorizations
AuthorizationstringRequired

Either a user session hash or an API key, with the "NVX " prefix, for example "NVX 22eac1c27af4be7b9d04da2ce1af111b". Obtain a session hash from the userAuth operation, or create an API key from the API keys operations. A small number of operations accept a session hash only and reject an API key with error code 4; each says so in its description.

Body
sizeintegerRequired

Maximum size in bytes of the file to be uploaded. Reserves that much of the disk quota.

filenamestringOptional

Optional. Name to store the file under. Taken from the upload form when omitted.

typestring · enumOptional

Optional. Default file.

Possible values:
Responses
200

Where and how to upload

application/json
successbooleanRead-onlyOptional

true if request finished successfully.

Example: true
post/vehicle/service_task/file/create
POST /v2/vehicle/service_task/file/create HTTP/1.1
Host: api.eu.navixy.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 93

{
  "size": 1,
  "filename": "text",
  "metadata": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  },
  "type": "image"
}
{
  "success": true,
  "value": {
    "file_id": 1,
    "url": "text",
    "expires": "text",
    "file_field_name": "text",
    "fields": {
      "token": "text",
      "ANY_ADDITIONAL_PROPERTY": "anything"
    }
  }
}

Last updated

Was this helpful?