> For the complete documentation index, see [llms.txt](https://navixy.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://navixy.com/docs/navixy-api/user-api/resources/field-service/checkin.md).

# Check-ins

What a field employee reported from site, with a comment, a photo, and a filled form.

A check-in is what a field employee sends from where they are standing: the time, the address and coordinates, and whatever they added, which can be a comment, a photo, or a filled [form](/docs/navixy-api/user-api/resources/field-service/form.md). It is how someone on site tells the office what they found without a phone call, whether that is photographic proof of work done or a report of a fault.

Check-ins come from the Mobile Tracker App, for [Android](https://play.google.com/store/apps/details?id=com.navixy.xgps.tracker\&hl=ru) and [iOS](https://apps.apple.com/us/app/x-gps-tracker/id802887190), rather than from this API. [`checkin/create`](#post-checkin-create) exists for exceptional cases only and is described in [how to work with check-ins](/docs/navixy-api/user-api/guides/field-service-management/check-ins.md), so treat this resource as read-mostly.

## Check-in object

## The Checkin object

```json
{"openapi":"3.1.0","info":{"title":"Navixy Platform API","version":"1.0.0"},"components":{"schemas":{"Checkin":{"type":"object","description":"A check-in: a point in time and space recorded by a field employee from the Mobile Tracker App, with an optional comment, photos and a filled form.","properties":{"id":{"type":"integer","description":"ID of the check-in."},"marker_time":{"type":"string","description":"When the check-in was created. Never null."},"user_id":{"type":"integer","description":"ID of the master user. Never null."},"tracker_id":{"type":"integer","description":"ID of the tracker that created this check-in. Never null."},"employee_id":{"type":["integer","null"],"description":"Optional. ID of the employee assigned to that tracker."},"location":{"type":"object","description":"Where the check-in was made. Never null.","properties":{"lat":{"type":"number","description":"Latitude."},"lng":{"type":"number","description":"Longitude."},"address":{"type":"string","description":"Address at that point."},"precision":{"type":"integer","description":"Accuracy of the fix in metres. Note this is `precision`, not the `radius` used elsewhere."}}},"comment":{"type":["string","null"],"description":"Optional. A comment provided by the app user."},"files":{"type":"array","description":"Files attached to the check-in. Never null, may be empty.","items":{"$ref":"#/components/schemas/FormFile"}},"form_id":{"type":["integer","null"],"description":"ID of the form sent with the check-in."},"form_label":{"type":["string","null"],"description":"Label of the form sent with the check-in."}}},"FormFile":{"type":"object","description":"A file attached to a form field.","properties":{"id":{"type":"integer","description":"File ID."},"storage_id":{"type":"integer","description":"ID of the storage holding the file."},"user_id":{"type":"integer","description":"ID of the owning user."},"type":{"type":"string","description":"What kind of file this is.","enum":["image","file"]},"created":{"type":"string","description":"When the file record was created."},"uploaded":{"type":["string","null"],"description":"When the file was uploaded, or null if it has not been."},"name":{"type":"string","description":"File name."},"size":{"type":"integer","description":"Size in bytes. For a file that is not uploaded yet, the maximum size allowed for the upload."},"mime_type":{"type":"string","description":"MIME type of the file."},"metadata":{"type":"object","description":"Metadata for the file. For an image this carries `orientation`, the EXIF orientation.","additionalProperties":true},"state":{"type":"string","description":"Where the file is in its lifecycle.","enum":["created","in_progress","uploaded","deleted"]},"download_url":{"type":["string","null"],"description":"URL the file is available at, or null if it is not uploaded yet."},"bindings":{"type":"object","description":"Every entity this file is linked to. For a form field this carries `form_field` with `form_id`, `field_id` and `submitted`.","additionalProperties":true},"previews":{"type":["array","null"],"description":"Preview images for the file. May be null or empty for any file in any state.","items":{"type":"object","additionalProperties":true}}}}}}}
```

## API actions

API base path: `/checkin`.

The `conditions` parameter of `checkin/list` takes [search conditions](/docs/navixy-api/user-api/resources/commons/entity/search_conditions.md).

***

*Required sub-user rights:* `employee_update`.

## Read check-in

> Return one check-in by ID.\
> \
> Check-ins are created from the Mobile Tracker App, not from this API, so the check-in operations are read-only apart from the exceptional-case create.\
> \
> \*\*No specific right is required\*\*, only a valid session.\
> \
> Also accepts GET with the same parameters as query-string values.

```json
{"openapi":"3.1.0","info":{"title":"Navixy Platform API","version":"1.0.0"},"tags":[{"name":"Check-ins","description":"Check-ins recorded by field employees from the Mobile Tracker App, with their photos and forms. All resources under the /checkin/ path."}],"servers":[{"url":"https://api.eu.navixy.com/v2","description":"Navixy production server on European platform"},{"url":"https://api.us.navixy.com/v2","description":"Navixy production server on American platform"},{"url":"https://api.me.navixy.com/v2","description":"Navixy production server on Middle East platform"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","description":"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.","name":"Authorization","in":"header"}},"schemas":{"Checkin":{"type":"object","description":"A check-in: a point in time and space recorded by a field employee from the Mobile Tracker App, with an optional comment, photos and a filled form.","properties":{"id":{"type":"integer","description":"ID of the check-in."},"marker_time":{"type":"string","description":"When the check-in was created. Never null."},"user_id":{"type":"integer","description":"ID of the master user. Never null."},"tracker_id":{"type":"integer","description":"ID of the tracker that created this check-in. Never null."},"employee_id":{"type":["integer","null"],"description":"Optional. ID of the employee assigned to that tracker."},"location":{"type":"object","description":"Where the check-in was made. Never null.","properties":{"lat":{"type":"number","description":"Latitude."},"lng":{"type":"number","description":"Longitude."},"address":{"type":"string","description":"Address at that point."},"precision":{"type":"integer","description":"Accuracy of the fix in metres. Note this is `precision`, not the `radius` used elsewhere."}}},"comment":{"type":["string","null"],"description":"Optional. A comment provided by the app user."},"files":{"type":"array","description":"Files attached to the check-in. Never null, may be empty.","items":{"$ref":"#/components/schemas/FormFile"}},"form_id":{"type":["integer","null"],"description":"ID of the form sent with the check-in."},"form_label":{"type":["string","null"],"description":"Label of the form sent with the check-in."}}},"FormFile":{"type":"object","description":"A file attached to a form field.","properties":{"id":{"type":"integer","description":"File ID."},"storage_id":{"type":"integer","description":"ID of the storage holding the file."},"user_id":{"type":"integer","description":"ID of the owning user."},"type":{"type":"string","description":"What kind of file this is.","enum":["image","file"]},"created":{"type":"string","description":"When the file record was created."},"uploaded":{"type":["string","null"],"description":"When the file was uploaded, or null if it has not been."},"name":{"type":"string","description":"File name."},"size":{"type":"integer","description":"Size in bytes. For a file that is not uploaded yet, the maximum size allowed for the upload."},"mime_type":{"type":"string","description":"MIME type of the file."},"metadata":{"type":"object","description":"Metadata for the file. For an image this carries `orientation`, the EXIF orientation.","additionalProperties":true},"state":{"type":"string","description":"Where the file is in its lifecycle.","enum":["created","in_progress","uploaded","deleted"]},"download_url":{"type":["string","null"],"description":"URL the file is available at, or null if it is not uploaded yet."},"bindings":{"type":"object","description":"Every entity this file is linked to. For a form field this carries `form_field` with `form_id`, `field_id` and `submitted`.","additionalProperties":true},"previews":{"type":["array","null"],"description":"Preview images for the file. May be null or empty for any file in any state.","items":{"type":"object","additionalProperties":true}}}}},"responses":{"ResponseError":{"description":"Error response object","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Always false."},"status":{"type":"object","description":"Error status. Present only when an error occurred.","properties":{"code":{"type":"integer","description":"An error code in this API, not an HTTP code."},"description":{"type":"string","description":"An error description."}}},"errors":{"type":"array","description":"Per-parameter detail, returned with validation failures such as error code 7. A parameter name here may be an internal field name rather than the documented parameter name.","items":{"type":"object","properties":{"parameter":{"type":"string","description":"Name of the parameter that failed validation."},"error":{"type":"string","description":"What was wrong with it."}}}}}}}}}}},"paths":{"/checkin/read":{"post":{"tags":["Check-ins"],"summary":"Read check-in","description":"Return one check-in by ID.\n\nCheck-ins are created from the Mobile Tracker App, not from this API, so the check-in operations are read-only apart from the exceptional-case create.\n\n**No specific right is required**, only a valid session.\n\nAlso accepts GET with the same parameters as query-string values.","operationId":"checkinRead","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"checkin_id":{"type":"integer","description":"ID of the check-in.","minimum":1}},"required":["checkin_id"]}}}},"responses":{"200":{"description":"The check-in","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"`true` if request finished successfully.","readOnly":true},"value":{"$ref":"#/components/schemas/Checkin"}}}}}},"400":{"description":"Bad request. The response body carries the API-level error code in `status.code`. Validation failures also include an `errors` array naming each offending parameter.","$ref":"#/components/responses/ResponseError"},"404":{"description":"Error 204: no check-in with this ID belongs to the authorized user.","$ref":"#/components/responses/ResponseError"},"default":{"$ref":"#/components/responses/ResponseError"}}}}}}
```

#### Errors

These errors come in addition to the [general error codes](/docs/navixy-api/general/errors.md#error-codes):

* 7 - Invalid parameters.
* 204 - Entity not found.

***

*Required sub-user rights:* `employee_update`.

## List check-ins

> Return check-ins for a set of trackers over a period, as JSON or as a report file.\
> \
> \*\*Setting \`format\` changes the response to a file download\*\* rather than JSON, which is the only way this operation differs from a plain list.\
> \
> \*\*No specific right is required\*\*, only a valid session.

```json
{"openapi":"3.1.0","info":{"title":"Navixy Platform API","version":"1.0.0"},"tags":[{"name":"Check-ins","description":"Check-ins recorded by field employees from the Mobile Tracker App, with their photos and forms. All resources under the /checkin/ path."}],"servers":[{"url":"https://api.eu.navixy.com/v2","description":"Navixy production server on European platform"},{"url":"https://api.us.navixy.com/v2","description":"Navixy production server on American platform"},{"url":"https://api.me.navixy.com/v2","description":"Navixy production server on Middle East platform"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","description":"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.","name":"Authorization","in":"header"}},"schemas":{"Checkin":{"type":"object","description":"A check-in: a point in time and space recorded by a field employee from the Mobile Tracker App, with an optional comment, photos and a filled form.","properties":{"id":{"type":"integer","description":"ID of the check-in."},"marker_time":{"type":"string","description":"When the check-in was created. Never null."},"user_id":{"type":"integer","description":"ID of the master user. Never null."},"tracker_id":{"type":"integer","description":"ID of the tracker that created this check-in. Never null."},"employee_id":{"type":["integer","null"],"description":"Optional. ID of the employee assigned to that tracker."},"location":{"type":"object","description":"Where the check-in was made. Never null.","properties":{"lat":{"type":"number","description":"Latitude."},"lng":{"type":"number","description":"Longitude."},"address":{"type":"string","description":"Address at that point."},"precision":{"type":"integer","description":"Accuracy of the fix in metres. Note this is `precision`, not the `radius` used elsewhere."}}},"comment":{"type":["string","null"],"description":"Optional. A comment provided by the app user."},"files":{"type":"array","description":"Files attached to the check-in. Never null, may be empty.","items":{"$ref":"#/components/schemas/FormFile"}},"form_id":{"type":["integer","null"],"description":"ID of the form sent with the check-in."},"form_label":{"type":["string","null"],"description":"Label of the form sent with the check-in."}}},"FormFile":{"type":"object","description":"A file attached to a form field.","properties":{"id":{"type":"integer","description":"File ID."},"storage_id":{"type":"integer","description":"ID of the storage holding the file."},"user_id":{"type":"integer","description":"ID of the owning user."},"type":{"type":"string","description":"What kind of file this is.","enum":["image","file"]},"created":{"type":"string","description":"When the file record was created."},"uploaded":{"type":["string","null"],"description":"When the file was uploaded, or null if it has not been."},"name":{"type":"string","description":"File name."},"size":{"type":"integer","description":"Size in bytes. For a file that is not uploaded yet, the maximum size allowed for the upload."},"mime_type":{"type":"string","description":"MIME type of the file."},"metadata":{"type":"object","description":"Metadata for the file. For an image this carries `orientation`, the EXIF orientation.","additionalProperties":true},"state":{"type":"string","description":"Where the file is in its lifecycle.","enum":["created","in_progress","uploaded","deleted"]},"download_url":{"type":["string","null"],"description":"URL the file is available at, or null if it is not uploaded yet."},"bindings":{"type":"object","description":"Every entity this file is linked to. For a form field this carries `form_field` with `form_id`, `field_id` and `submitted`.","additionalProperties":true},"previews":{"type":["array","null"],"description":"Preview images for the file. May be null or empty for any file in any state.","items":{"type":"object","additionalProperties":true}}}}},"responses":{"ResponseError":{"description":"Error response object","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Always false."},"status":{"type":"object","description":"Error status. Present only when an error occurred.","properties":{"code":{"type":"integer","description":"An error code in this API, not an HTTP code."},"description":{"type":"string","description":"An error description."}}},"errors":{"type":"array","description":"Per-parameter detail, returned with validation failures such as error code 7. A parameter name here may be an internal field name rather than the documented parameter name.","items":{"type":"object","properties":{"parameter":{"type":"string","description":"Name of the parameter that failed validation."},"error":{"type":"string","description":"What was wrong with it."}}}}}}}}}}},"paths":{"/checkin/list":{"post":{"tags":["Check-ins"],"summary":"List check-ins","description":"Return check-ins for a set of trackers over a period, as JSON or as a report file.\n\n**Setting `format` changes the response to a file download** rather than JSON, which is the only way this operation differs from a plain list.\n\n**No specific right is required**, only a valid session.","operationId":"checkinList","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"trackers":{"type":"array","description":"Optional. Tracker IDs. None may be deleted or blocked. Without this, every available tracker is used.","items":{"type":"integer"}},"from":{"type":"string","description":"Optional. Start of the period."},"to":{"type":"string","description":"Optional. End of the period. Must be after `from`."},"conditions":{"type":"array","description":"Optional. Search conditions to apply. Conditions may be built on `employee` (an ID), `tracker_id`, `marker_time`, `location` (the address), `comment`, and `form` (the template ID).","items":{"type":"object","additionalProperties":true}},"sort":{"type":"array","description":"Optional. Sort options, each a property and direction such as `marker_time=desc`. Sortable properties: `employee` (full name), `employee_fullname`, `tracker_id`, `marker_time`, `location`, `address`, `comment`, `form`, and `form_label`.","items":{"type":"string"}},"location":{"type":"object","description":"Optional. Return only check-ins inside this circle.","properties":{"lat":{"type":"number","description":"Latitude."},"lng":{"type":"number","description":"Longitude."},"radius":{"type":"integer","description":"Radius in metres."}}},"limit":{"type":"integer","description":"Optional. Maximum number of records to return."},"offset":{"type":"integer","description":"Optional. Default 0. Offset into the results, for pagination.","minimum":0},"format":{"type":"string","description":"Optional. Leave it out for JSON. Setting it returns a file download instead.","enum":["pdf","xlsx"]}}}}}},"responses":{"200":{"description":"Matching check-ins, when `format` is not set","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"`true` if request finished successfully.","readOnly":true},"list":{"type":"array","items":{"$ref":"#/components/schemas/Checkin"}},"count":{"type":"integer","description":"Total number of check-ins, ignoring pagination."}}}}}},"400":{"description":"Bad request. The response body carries the API-level error code in `status.code`. Validation failures also include an `errors` array naming each offending parameter.","$ref":"#/components/responses/ResponseError"},"403":{"description":"Error 211: the requested time span is too big. Error 217: one of the given trackers does not exist, is blocked, or lacks the required plan features. Error 221: the device limit set for the user's dealer has been exceeded.","$ref":"#/components/responses/ResponseError"},"default":{"$ref":"#/components/responses/ResponseError"}}}}}}
```

#### Errors

These errors come in addition to the [general error codes](/docs/navixy-api/general/errors.md#error-codes):

* 7 - Invalid parameters.
* 211 - Requested time span is too big.
* 217 - The list contains non-existent entities - if one of the specified trackers does not exist, is blocked or doesn't have required tariff features.
* 221 - Device limit exceeded - if device limit set for the user's dealer has been exceeded.

***

*Required sub-user rights:* `checkin_update`.

## Delete check-ins

> Delete check-ins by ID.\
> \
> Requires the \`checkin\_update\` right, and a caller without it gets error 13. \*\*No security group grants that right.\*\* It follows from the \`fsm\` platform feature together with the \`checkin\` tariff feature on at least one tracker, so on an account with both every sub-user holds it, and on an account missing either nobody does, the master included.\
> \
> Check-ins can therefore exist on an account that cannot delete them: \`checkin/create\` requires no right at all.\
> \
> Also accepts GET with the same parameters as query-string values.

```json
{"openapi":"3.1.0","info":{"title":"Navixy Platform API","version":"1.0.0"},"tags":[{"name":"Check-ins","description":"Check-ins recorded by field employees from the Mobile Tracker App, with their photos and forms. All resources under the /checkin/ path."}],"servers":[{"url":"https://api.eu.navixy.com/v2","description":"Navixy production server on European platform"},{"url":"https://api.us.navixy.com/v2","description":"Navixy production server on American platform"},{"url":"https://api.me.navixy.com/v2","description":"Navixy production server on Middle East platform"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","description":"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.","name":"Authorization","in":"header"}},"responses":{"OK":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"`true` if request finished successfully.","readOnly":true}}}}}},"ResponseError":{"description":"Error response object","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Always false."},"status":{"type":"object","description":"Error status. Present only when an error occurred.","properties":{"code":{"type":"integer","description":"An error code in this API, not an HTTP code."},"description":{"type":"string","description":"An error description."}}},"errors":{"type":"array","description":"Per-parameter detail, returned with validation failures such as error code 7. A parameter name here may be an internal field name rather than the documented parameter name.","items":{"type":"object","properties":{"parameter":{"type":"string","description":"Name of the parameter that failed validation."},"error":{"type":"string","description":"What was wrong with it."}}}}}}}}}}},"paths":{"/checkin/delete":{"post":{"tags":["Check-ins"],"summary":"Delete check-ins","description":"Delete check-ins by ID.\n\nRequires the `checkin_update` right, and a caller without it gets error 13. **No security group grants that right.** It follows from the `fsm` platform feature together with the `checkin` tariff feature on at least one tracker, so on an account with both every sub-user holds it, and on an account missing either nobody does, the master included.\n\nCheck-ins can therefore exist on an account that cannot delete them: `checkin/create` requires no right at all.\n\nAlso accepts GET with the same parameters as query-string values.","operationId":"checkinDelete","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"checkin_ids":{"type":"array","description":"IDs of the check-ins to delete.","items":{"type":"integer"}}},"required":["checkin_ids"]}}}},"responses":{"200":{"description":"Check-ins deleted","$ref":"#/components/responses/OK"},"400":{"description":"Bad request. The response body carries the API-level error code in `status.code`. Validation failures also include an `errors` array naming each offending parameter.","$ref":"#/components/responses/ResponseError"},"403":{"description":"Error 13: the caller does not hold the `checkin_update` right.","$ref":"#/components/responses/ResponseError"},"default":{"$ref":"#/components/responses/ResponseError"}}}}}}
```

#### Errors

These errors come in addition to the [general error codes](/docs/navixy-api/general/errors.md#error-codes):

* 7 - Invalid parameters.
* 201 - Not found in the database - check-ins with the specified IDs don't exist, or their corresponding trackers are not available to current sub-user.

***

*Required sub-user rights:* `checkin_update`.

## Create check-in

> Create a check-in. \*\*For exceptional cases only\*\*: check-ins normally come from the Mobile Tracker App.\
> \
> To send a form with the check-in, create the form first with \`checkin/form/create\` and pass its ID in \`form\_submission\`. Leave optional form fields out of \`values\` entirely rather than sending them empty.\
> \
> Files come from \`checkin/image/create\`, whose returned IDs go in \`file\_ids\`.

```json
{"openapi":"3.1.0","info":{"title":"Navixy Platform API","version":"1.0.0"},"tags":[{"name":"Check-ins","description":"Check-ins recorded by field employees from the Mobile Tracker App, with their photos and forms. All resources under the /checkin/ path."}],"servers":[{"url":"https://api.eu.navixy.com/v2","description":"Navixy production server on European platform"},{"url":"https://api.us.navixy.com/v2","description":"Navixy production server on American platform"},{"url":"https://api.me.navixy.com/v2","description":"Navixy production server on Middle East platform"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","description":"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.","name":"Authorization","in":"header"}},"responses":{"ResponseError":{"description":"Error response object","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Always false."},"status":{"type":"object","description":"Error status. Present only when an error occurred.","properties":{"code":{"type":"integer","description":"An error code in this API, not an HTTP code."},"description":{"type":"string","description":"An error description."}}},"errors":{"type":"array","description":"Per-parameter detail, returned with validation failures such as error code 7. A parameter name here may be an internal field name rather than the documented parameter name.","items":{"type":"object","properties":{"parameter":{"type":"string","description":"Name of the parameter that failed validation."},"error":{"type":"string","description":"What was wrong with it."}}}}}}}}}}},"paths":{"/checkin/create":{"post":{"tags":["Check-ins"],"summary":"Create check-in","description":"Create a check-in. **For exceptional cases only**: check-ins normally come from the Mobile Tracker App.\n\nTo send a form with the check-in, create the form first with `checkin/form/create` and pass its ID in `form_submission`. Leave optional form fields out of `values` entirely rather than sending them empty.\n\nFiles come from `checkin/image/create`, whose returned IDs go in `file_ids`.","operationId":"checkinCreate","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tracker_id":{"type":"integer","description":"ID of the tracker, also known as the object ID. Must belong to the current account and not be blocked.","minimum":1},"location":{"type":"object","description":"Where the check-in happened.","properties":{"lat":{"type":"number","description":"Latitude."},"lng":{"type":"number","description":"Longitude."},"address":{"type":"string","description":"Address at that point."}}},"comment":{"type":"string","description":"Optional. A comment on the check-in."},"file_ids":{"type":"array","description":"Optional. IDs of files created with `checkin/image/create`.","items":{"type":"integer"}},"form_submission":{"type":"object","description":"Optional. A form to send with the check-in.","properties":{"form_id":{"type":"integer","description":"ID of a form previously created with `checkin/form/create`."},"values":{"type":"object","description":"Values for the form fields, keyed by field ID. Omit optional fields entirely rather than sending them empty.","additionalProperties":true}}}},"required":["tracker_id","location"]}}}},"responses":{"200":{"description":"The created check-in","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"`true` if request finished successfully.","readOnly":true},"id":{"type":"integer","description":"ID of the new check-in."}}}}}},"400":{"description":"Bad request. The response body carries the API-level error code in `status.code`. Validation failures also include an `errors` array naming each offending parameter.","$ref":"#/components/responses/ResponseError"},"default":{"$ref":"#/components/responses/ResponseError"}}}}}}
```

#### Errors

These errors come in addition to the [general error codes](/docs/navixy-api/general/errors.md#error-codes):

* 7 - Invalid parameters.
* 201 - Not found in the database - form with the specified IDs don't exist, or their corresponding trackers are not available to current sub-user.
* 242 - There were errors during content validation, if given values are invalid for the form.

***

## Create check-in image

> Reserve a file for a check-in and return the credentials for uploading it.\
> \
> This does not upload anything. It reserves space in the account's file quota and returns where and how to POST the file. Pass the returned \`file\_id\` in \`checkin/create\`.\
> \
> \*\*Leave a brief delay between uploads\*\* when sending several files.

```json
{"openapi":"3.1.0","info":{"title":"Navixy Platform API","version":"1.0.0"},"tags":[{"name":"Check-ins","description":"Check-ins recorded by field employees from the Mobile Tracker App, with their photos and forms. All resources under the /checkin/ path."}],"servers":[{"url":"https://api.eu.navixy.com/v2","description":"Navixy production server on European platform"},{"url":"https://api.us.navixy.com/v2","description":"Navixy production server on American platform"},{"url":"https://api.me.navixy.com/v2","description":"Navixy production server on Middle East platform"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","description":"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.","name":"Authorization","in":"header"}},"schemas":{"FileUploadTarget":{"type":"object","description":"Where to upload a reserved file, and what to send with it. Shared by the service work and task form file operations.\n\n`fields` varies with the storage backend: internal storage returns a single `token`, while Amazon S3 returns the policy, key, signature and encryption headers that the upload must carry.","properties":{"file_id":{"type":"integer","description":"ID of the reserved file. Submit it as the value of the record it belongs to: a service work, or a form field."},"url":{"type":"string","description":"URL to POST the multipart upload to."},"expires":{"type":"string","description":"When this upload target stops being valid."},"file_field_name":{"type":"string","description":"Name to use for the file field in the upload request."},"fields":{"type":"object","description":"Additional fields to send with the upload. Send these before the file part, which must be last.","properties":{"token":{"type":"string","description":"Used to authenticate the upload."}},"additionalProperties":true}}}},"responses":{"ResponseError":{"description":"Error response object","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Always false."},"status":{"type":"object","description":"Error status. Present only when an error occurred.","properties":{"code":{"type":"integer","description":"An error code in this API, not an HTTP code."},"description":{"type":"string","description":"An error description."}}},"errors":{"type":"array","description":"Per-parameter detail, returned with validation failures such as error code 7. A parameter name here may be an internal field name rather than the documented parameter name.","items":{"type":"object","properties":{"parameter":{"type":"string","description":"Name of the parameter that failed validation."},"error":{"type":"string","description":"What was wrong with it."}}}}}}}}}}},"paths":{"/checkin/image/create":{"post":{"tags":["Check-ins"],"summary":"Create check-in image","description":"Reserve a file for a check-in and return the credentials for uploading it.\n\nThis does not upload anything. It reserves space in the account's file quota and returns where and how to POST the file. Pass the returned `file_id` in `checkin/create`.\n\n**Leave a brief delay between uploads** when sending several files.","operationId":"checkinImageCreate","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"size":{"type":"integer","description":"Maximum size in bytes of the file to be uploaded, used to reserve quota. The platform default cap is 16 MB.","minimum":1},"filename":{"type":"string","description":"Optional. Name to give the uploaded file. Without it the name comes from the upload itself."},"metadata":{"type":"object","description":"Optional. Metadata for the file, for images only.","additionalProperties":true}},"required":["size"]}}}},"responses":{"200":{"description":"Where to upload the file","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"`true` if request finished successfully.","readOnly":true},"value":{"$ref":"#/components/schemas/FileUploadTarget"}}}}}},"400":{"description":"Bad request. The response body carries the API-level error code in `status.code`. Validation failures also include an `errors` array naming each offending parameter.","$ref":"#/components/responses/ResponseError"},"402":{"description":"Error 268: the file cannot be created without violating the account's file quota. Error 271: `size` is above the maximum allowed, 16 MB by default.","$ref":"#/components/responses/ResponseError"},"default":{"$ref":"#/components/responses/ResponseError"}}}}}}
```

#### Errors

These errors come in addition to the [general error codes](/docs/navixy-api/general/errors.md#error-codes):

* 268 - File cannot be created due to quota violation.
* 271 - File size is larger than the maximum allowed (by default 16 MB).

### How to upload file data

The upload target returned by `checkin/image/create` and `checkin/form/file/create` is used the same way in both cases. POST the file as `multipart/form-data` to the returned `url`, sending every entry of `fields` first and the file part last, named as `file_field_name` says.

With internal storage `fields` carries a single `token`. With Amazon S3 it carries `policy`, `key`, `success_action_status`, `x-amz-algorithm`, `x-amz-credential`, `x-amz-date`, `x-amz-signature` and `x-amz-server-side-encryption`, and each must be sent as its own form-data part before the file.

***

## Create check-in form

> Create a form that can be sent with a check-in, and return its ID. A form is always created from a form template.\
> \
> Pass the returned ID as \`form\_submission.form\_id\` in \`checkin/create\`.\
> \
> Also accepts GET with the same parameters as query-string values.

```json
{"openapi":"3.1.0","info":{"title":"Navixy Platform API","version":"1.0.0"},"tags":[{"name":"Check-ins","description":"Check-ins recorded by field employees from the Mobile Tracker App, with their photos and forms. All resources under the /checkin/ path."}],"servers":[{"url":"https://api.eu.navixy.com/v2","description":"Navixy production server on European platform"},{"url":"https://api.us.navixy.com/v2","description":"Navixy production server on American platform"},{"url":"https://api.me.navixy.com/v2","description":"Navixy production server on Middle East platform"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","description":"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.","name":"Authorization","in":"header"}},"responses":{"ResponseError":{"description":"Error response object","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Always false."},"status":{"type":"object","description":"Error status. Present only when an error occurred.","properties":{"code":{"type":"integer","description":"An error code in this API, not an HTTP code."},"description":{"type":"string","description":"An error description."}}},"errors":{"type":"array","description":"Per-parameter detail, returned with validation failures such as error code 7. A parameter name here may be an internal field name rather than the documented parameter name.","items":{"type":"object","properties":{"parameter":{"type":"string","description":"Name of the parameter that failed validation."},"error":{"type":"string","description":"What was wrong with it."}}}}}}}}}}},"paths":{"/checkin/form/create":{"post":{"tags":["Check-ins"],"summary":"Create check-in form","description":"Create a form that can be sent with a check-in, and return its ID. A form is always created from a form template.\n\nPass the returned ID as `form_submission.form_id` in `checkin/create`.\n\nAlso accepts GET with the same parameters as query-string values.","operationId":"checkinFormCreate","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tracker_id":{"type":"integer","description":"ID of the tracker, also known as the object ID. Must belong to the current account and not be blocked.","minimum":1},"template_id":{"type":"integer","description":"ID of the form template to build the form from.","minimum":1}},"required":["tracker_id","template_id"]}}}},"responses":{"200":{"description":"The created form","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"`true` if request finished successfully.","readOnly":true},"id":{"type":"integer","description":"ID of the new form."}}}}}},"400":{"description":"Bad request. The response body carries the API-level error code in `status.code`. Validation failures also include an `errors` array naming each offending parameter.","$ref":"#/components/responses/ResponseError"},"default":{"$ref":"#/components/responses/ResponseError"}}}}}}
```

#### Errors

These errors come in addition to the [general error codes](/docs/navixy-api/general/errors.md#error-codes):

* 201 - Not found in the database - if there is no template with such an ID.

***

## Create check-in form file

> Reserve a file against a check-in form field and return the credentials for uploading it.\
> \
> \*\*Give either \`checkin\_id\` or \`form\_id\`, not both.\*\* A request with neither reports a missing parameter named \`has\_at\_least\_one\_id\_field\`, which is the internal name of the validation group rather than a parameter you can send; unusually for this API, it carries a readable message saying which two to choose between.\
> \
> The upload works exactly as for \`checkin/image/create\`.\
> \
> \*\*Leave a brief delay between uploads\*\* when sending several files.

```json
{"openapi":"3.1.0","info":{"title":"Navixy Platform API","version":"1.0.0"},"tags":[{"name":"Check-ins","description":"Check-ins recorded by field employees from the Mobile Tracker App, with their photos and forms. All resources under the /checkin/ path."}],"servers":[{"url":"https://api.eu.navixy.com/v2","description":"Navixy production server on European platform"},{"url":"https://api.us.navixy.com/v2","description":"Navixy production server on American platform"},{"url":"https://api.me.navixy.com/v2","description":"Navixy production server on Middle East platform"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","description":"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.","name":"Authorization","in":"header"}},"schemas":{"FileUploadTarget":{"type":"object","description":"Where to upload a reserved file, and what to send with it. Shared by the service work and task form file operations.\n\n`fields` varies with the storage backend: internal storage returns a single `token`, while Amazon S3 returns the policy, key, signature and encryption headers that the upload must carry.","properties":{"file_id":{"type":"integer","description":"ID of the reserved file. Submit it as the value of the record it belongs to: a service work, or a form field."},"url":{"type":"string","description":"URL to POST the multipart upload to."},"expires":{"type":"string","description":"When this upload target stops being valid."},"file_field_name":{"type":"string","description":"Name to use for the file field in the upload request."},"fields":{"type":"object","description":"Additional fields to send with the upload. Send these before the file part, which must be last.","properties":{"token":{"type":"string","description":"Used to authenticate the upload."}},"additionalProperties":true}}}},"responses":{"ResponseError":{"description":"Error response object","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Always false."},"status":{"type":"object","description":"Error status. Present only when an error occurred.","properties":{"code":{"type":"integer","description":"An error code in this API, not an HTTP code."},"description":{"type":"string","description":"An error description."}}},"errors":{"type":"array","description":"Per-parameter detail, returned with validation failures such as error code 7. A parameter name here may be an internal field name rather than the documented parameter name.","items":{"type":"object","properties":{"parameter":{"type":"string","description":"Name of the parameter that failed validation."},"error":{"type":"string","description":"What was wrong with it."}}}}}}}}}}},"paths":{"/checkin/form/file/create":{"post":{"tags":["Check-ins"],"summary":"Create check-in form file","description":"Reserve a file against a check-in form field and return the credentials for uploading it.\n\n**Give either `checkin_id` or `form_id`, not both.** A request with neither reports a missing parameter named `has_at_least_one_id_field`, which is the internal name of the validation group rather than a parameter you can send; unusually for this API, it carries a readable message saying which two to choose between.\n\nThe upload works exactly as for `checkin/image/create`.\n\n**Leave a brief delay between uploads** when sending several files.","operationId":"checkinFormFileCreate","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"checkin_id":{"type":"integer","description":"ID of the check-in the form is attached to. Use this or `form_id`, not both.","minimum":1},"form_id":{"type":"integer","description":"ID of the form. Use this or `checkin_id`, not both.","minimum":1},"field_id":{"type":"string","description":"ID of the form field the file attaches to. The field must be file-based."},"size":{"type":"integer","description":"Maximum size in bytes of the file to be uploaded, used to reserve quota. The platform default cap is 16 MB.","minimum":1},"filename":{"type":"string","description":"Optional. Name to give the uploaded file. Without it the name comes from the upload itself."},"metadata":{"type":"object","description":"Optional. Metadata for the file, for images only.","additionalProperties":true}},"required":["field_id","size"]}}}},"responses":{"200":{"description":"Where to upload the file","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"`true` if request finished successfully.","readOnly":true},"value":{"$ref":"#/components/schemas/FileUploadTarget"}}}}}},"400":{"description":"Bad request. The response body carries the API-level error code in `status.code`. Validation failures also include an `errors` array naming each offending parameter.","$ref":"#/components/responses/ResponseError"},"402":{"description":"Error 268: the file cannot be created without violating the account's file quota. Error 271: `size` is above the maximum allowed, 16 MB by default.","$ref":"#/components/responses/ResponseError"},"409":{"description":"Error 267: six or more unsubmitted files are already associated with this form field.","$ref":"#/components/responses/ResponseError"},"default":{"$ref":"#/components/responses/ResponseError"}}}}}}
```

#### Errors

These errors come in addition to the [general error codes](/docs/navixy-api/general/errors.md#error-codes):

* 201 - Not found in the database - if there is no check-in with such an ID, or check-in doesn't have form, or form has no field with such a field\_id.
* 231 - Entity type mismatch - if form field is not file-based, i.e. doesn't use file ID as its value.
* 267 - Too many entities - if there are 6 or more unsubmitted files already associated with this form's field.
* 268 - File cannot be created due to quota violation.
* 271 - File size is larger than the maximum allowed (by default 16 MB).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://navixy.com/docs/navixy-api/user-api/resources/field-service/checkin.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
