> For the complete documentation index, see [llms.txt](https://docs.hiboo.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hiboo.io/rest-api-reference/fleet-identity/equipment-documents.md).

# Equipment Documents

The following endpoints allow you to manage documents related to your equipments, including uploading, updating, and deleting documents.

## Get documents for a specific equipment

> Retrieve a list of documents for the specified equipment.

```json
{"openapi":"3.0.3","info":{"title":"Hiboo API","version":"2.0.0"},"tags":[{"name":"Equipment Documents","description":"The following endpoints allow you to manage documents related to your equipments, including uploading, updating, and deleting documents."}],"servers":[{"url":"https://api.hiboo.io","description":"Production server"},{"url":"https://api-sandbox.hiboo.io","description":"Sandbox server"}],"security":[{"JWT":[]}],"components":{"securitySchemes":{"JWT":{"type":"apiKey","in":"header","name":"x-access-token","description":"Generate a JWT when you log in. Use it in your following requests in the header as `x-access-token: your-token-here`\n"}},"parameters":{"offset":{"name":"offset","in":"query","description":"The number of items to skip before starting to collect the result set","required":false,"schema":{"type":"integer","format":"int32","default":0}}},"schemas":{"Document":{"required":["id","name","shareable","isPublic","expirationDate","uploadDate","fileInfos"],"type":"object","properties":{"id":{"type":"number","description":"The unique identifier of the document"},"name":{"type":"string","description":"The name of the document"},"shareable":{"type":"boolean","description":"Indicates whether the document can be shared along with the related equipment. If true, the document will be shared automatically when the equipment is shared; if false, the document remains private."},"isPublic":{"type":"boolean","description":"Indicates whether the document can be publicly accessible."},"expirationDate":{"type":"string","description":"Date when the document becomes invalid, formatted as 'YYYY-MM-DD' in UTC.","format":"date","pattern":"/^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$/"},"fileInfos":{"type":"object","description":"Metadata about the file","properties":{"size":{"type":"number","description":"The size of the file in kB (e.g., 2 for a 2kB file)."},"contentType":{"type":"string","description":"The MIME type of the file (e.g., `application/pdf`, `image/jpeg`, `image/png`)."},"uploadDate":{"type":"string","description":"The date and time when the document was uploaded, serialized as an ISO 8601 string with a timezone (YYYY-MM-DDTHH:mm:ssZ).","format":"date-time"}}}}},"Error":{"required":["message","details"],"type":"object","properties":{"message":{"type":"string","description":"A human readable description of the error"},"details":{"type":"object","description":"Additional information about the Error"}}},"NoDetailError":{"required":["message"],"type":"object","properties":{"message":{"type":"string","description":"A human readable description of the error"}}}},"responses":{"400Error":{"description":"Missing parameters or invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401Error":{"description":"Unable to authenticate the token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoDetailError"}}}},"404Error":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoDetailError"}}}}}},"paths":{"/v2/fleet/equipments/{id}/documents":{"get":{"summary":"Get documents for a specific equipment","description":"Retrieve a list of documents for the specified equipment.","tags":["Equipment Documents"],"operationId":"listDocuments","parameters":[{"name":"id","description":"The unique identifier of the equipment.","in":"path","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/offset"},{"name":"limit","in":"query","required":false,"schema":{"default":10,"type":"integer","description":"The number of items to return"}}],"responses":{"200":{"description":"A paginated list of documents for the equipment","content":{"application/json":{"schema":{"type":"object","properties":{"total":{"type":"integer","description":"The total number of documents for the equipment"},"offset":{"type":"integer","description":"The number of items skipped"},"limit":{"type":"integer","description":"The number of items returned"},"rows":{"type":"array","description":"The list of documents","items":{"$ref":"#/components/schemas/Document"}}}}}}},"400":{"$ref":"#/components/responses/400Error"},"401":{"$ref":"#/components/responses/401Error"},"404":{"$ref":"#/components/responses/404Error"}}}}}}
```

## Upload a document for a specific equipment

> Upload a document to be associated with the specified equipment.

```json
{"openapi":"3.0.3","info":{"title":"Hiboo API","version":"2.0.0"},"tags":[{"name":"Equipment Documents","description":"The following endpoints allow you to manage documents related to your equipments, including uploading, updating, and deleting documents."}],"servers":[{"url":"https://api.hiboo.io","description":"Production server"},{"url":"https://api-sandbox.hiboo.io","description":"Sandbox server"}],"security":[{"JWT":[]}],"components":{"securitySchemes":{"JWT":{"type":"apiKey","in":"header","name":"x-access-token","description":"Generate a JWT when you log in. Use it in your following requests in the header as `x-access-token: your-token-here`\n"}},"schemas":{"UploadDocumentBody":{"required":["file","name"],"type":"object","properties":{"name":{"type":"string","description":"The name of the document."},"file":{"type":"string","format":"binary","description":"The document file to be uploaded. The document must be one of the following types PDF, JPEG, PNG, GIF, TIFF, Excel, or Word documents. File size should not exceed 10MB (10,485,760 bytes)."},"shareable":{"type":"boolean","description":"Indicates whether the document can be shared along with the related equipment. If true, the document will be shared automatically when the equipment is shared; if false, the document remains private.","default":false},"isPublic":{"type":"boolean","description":"Indicates whether the document can be publicly accessible.","default":false},"expirationDate":{"type":"string","description":"Date when the document becomes invalid, formatted as 'YYYY-MM-DD' in UTC.","format":"date","pattern":"/^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$/"}}},"Document":{"required":["id","name","shareable","isPublic","expirationDate","uploadDate","fileInfos"],"type":"object","properties":{"id":{"type":"number","description":"The unique identifier of the document"},"name":{"type":"string","description":"The name of the document"},"shareable":{"type":"boolean","description":"Indicates whether the document can be shared along with the related equipment. If true, the document will be shared automatically when the equipment is shared; if false, the document remains private."},"isPublic":{"type":"boolean","description":"Indicates whether the document can be publicly accessible."},"expirationDate":{"type":"string","description":"Date when the document becomes invalid, formatted as 'YYYY-MM-DD' in UTC.","format":"date","pattern":"/^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$/"},"fileInfos":{"type":"object","description":"Metadata about the file","properties":{"size":{"type":"number","description":"The size of the file in kB (e.g., 2 for a 2kB file)."},"contentType":{"type":"string","description":"The MIME type of the file (e.g., `application/pdf`, `image/jpeg`, `image/png`)."},"uploadDate":{"type":"string","description":"The date and time when the document was uploaded, serialized as an ISO 8601 string with a timezone (YYYY-MM-DDTHH:mm:ssZ).","format":"date-time"}}}}},"Error":{"required":["message","details"],"type":"object","properties":{"message":{"type":"string","description":"A human readable description of the error"},"details":{"type":"object","description":"Additional information about the Error"}}},"NoDetailError":{"required":["message"],"type":"object","properties":{"message":{"type":"string","description":"A human readable description of the error"}}}},"responses":{"400Error":{"description":"Missing parameters or invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401Error":{"description":"Unable to authenticate the token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoDetailError"}}}},"403Error":{"description":"Insufficient permissions to access the resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoDetailError"}}}},"404Error":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoDetailError"}}}}}},"paths":{"/v2/fleet/equipments/{id}/documents":{"post":{"summary":"Upload a document for a specific equipment","description":"Upload a document to be associated with the specified equipment.","tags":["Equipment Documents"],"operationId":"uploadDocument","parameters":[{"name":"id","description":"The unique identifier of the equipment.","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"description":"More information about the required payload","required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/UploadDocumentBody"},"encoding":{"file":{"contentType":"application/pdf, image/jpeg, image/png, image/gif, image/tiff, text/csv, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document"}}}}},"responses":{"201":{"description":"Document successfully uploaded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Document"}}}},"400":{"$ref":"#/components/responses/400Error"},"401":{"$ref":"#/components/responses/401Error"},"403":{"$ref":"#/components/responses/403Error"},"404":{"$ref":"#/components/responses/404Error"},"409":{"description":"Conflict with existing document metadata (e.g., duplicate name)"},"413":{"description":"Payload Too Large. File should not exceeds 10MB"},"415":{"description":"Unsupported Media Type"}}}}}}
```

## Delete a specific document

> Deletes a specific document associated with the specified equipment.

```json
{"openapi":"3.0.3","info":{"title":"Hiboo API","version":"2.0.0"},"tags":[{"name":"Equipment Documents","description":"The following endpoints allow you to manage documents related to your equipments, including uploading, updating, and deleting documents."}],"servers":[{"url":"https://api.hiboo.io","description":"Production server"},{"url":"https://api-sandbox.hiboo.io","description":"Sandbox server"}],"security":[{"JWT":[]}],"components":{"securitySchemes":{"JWT":{"type":"apiKey","in":"header","name":"x-access-token","description":"Generate a JWT when you log in. Use it in your following requests in the header as `x-access-token: your-token-here`\n"}},"responses":{"401Error":{"description":"Unable to authenticate the token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoDetailError"}}}},"403Error":{"description":"Insufficient permissions to access the resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoDetailError"}}}},"404Error":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoDetailError"}}}}},"schemas":{"NoDetailError":{"required":["message"],"type":"object","properties":{"message":{"type":"string","description":"A human readable description of the error"}}}}},"paths":{"/v2/fleet/equipments/{id}/documents/{documentId}":{"delete":{"summary":"Delete a specific document","description":"Deletes a specific document associated with the specified equipment.","tags":["Equipment Documents"],"operationId":"deleteDocument","parameters":[{"name":"id","description":"The unique identifier of the equipment.","in":"path","required":true,"schema":{"type":"integer"}},{"name":"documentId","description":"The unique identifier of the document.","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"Document successfully deleted"},"401":{"$ref":"#/components/responses/401Error"},"403":{"$ref":"#/components/responses/403Error"},"404":{"$ref":"#/components/responses/404Error"}}}}}}
```

## Update document metadata

> Update the metadata (e.g., name, isPublic) of a specific document associated with the specified equipment.

```json
{"openapi":"3.0.3","info":{"title":"Hiboo API","version":"2.0.0"},"tags":[{"name":"Equipment Documents","description":"The following endpoints allow you to manage documents related to your equipments, including uploading, updating, and deleting documents."}],"servers":[{"url":"https://api.hiboo.io","description":"Production server"},{"url":"https://api-sandbox.hiboo.io","description":"Sandbox server"}],"security":[{"JWT":[]}],"components":{"securitySchemes":{"JWT":{"type":"apiKey","in":"header","name":"x-access-token","description":"Generate a JWT when you log in. Use it in your following requests in the header as `x-access-token: your-token-here`\n"}},"schemas":{"PatchDocumentBody":{"type":"object","properties":{"name":{"type":"string","description":"The name of the document."},"expirationDate":{"type":"string","description":"Date when the document becomes invalid, formatted as 'YYYY-MM-DD' in UTC.","format":"date","pattern":"/^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$/"}}},"Document":{"required":["id","name","shareable","isPublic","expirationDate","uploadDate","fileInfos"],"type":"object","properties":{"id":{"type":"number","description":"The unique identifier of the document"},"name":{"type":"string","description":"The name of the document"},"shareable":{"type":"boolean","description":"Indicates whether the document can be shared along with the related equipment. If true, the document will be shared automatically when the equipment is shared; if false, the document remains private."},"isPublic":{"type":"boolean","description":"Indicates whether the document can be publicly accessible."},"expirationDate":{"type":"string","description":"Date when the document becomes invalid, formatted as 'YYYY-MM-DD' in UTC.","format":"date","pattern":"/^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$/"},"fileInfos":{"type":"object","description":"Metadata about the file","properties":{"size":{"type":"number","description":"The size of the file in kB (e.g., 2 for a 2kB file)."},"contentType":{"type":"string","description":"The MIME type of the file (e.g., `application/pdf`, `image/jpeg`, `image/png`)."},"uploadDate":{"type":"string","description":"The date and time when the document was uploaded, serialized as an ISO 8601 string with a timezone (YYYY-MM-DDTHH:mm:ssZ).","format":"date-time"}}}}},"Error":{"required":["message","details"],"type":"object","properties":{"message":{"type":"string","description":"A human readable description of the error"},"details":{"type":"object","description":"Additional information about the Error"}}},"NoDetailError":{"required":["message"],"type":"object","properties":{"message":{"type":"string","description":"A human readable description of the error"}}}},"responses":{"400Error":{"description":"Missing parameters or invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401Error":{"description":"Unable to authenticate the token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoDetailError"}}}},"403Error":{"description":"Insufficient permissions to access the resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoDetailError"}}}},"404Error":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoDetailError"}}}}}},"paths":{"/v2/fleet/equipments/{id}/documents/{documentId}":{"patch":{"summary":"Update document metadata","description":"Update the metadata (e.g., name, isPublic) of a specific document associated with the specified equipment.","tags":["Equipment Documents"],"operationId":"updateDocument","parameters":[{"name":"id","description":"The unique identifier of the equipment.","in":"path","required":true,"schema":{"type":"integer"}},{"name":"documentId","in":"path","description":"The unique identifier of the document.","required":true,"schema":{"type":"integer"}}],"requestBody":{"description":"Update an existing document","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchDocumentBody"}}},"required":true},"responses":{"200":{"description":"Document metadata successfully updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Document"}}}},"400":{"$ref":"#/components/responses/400Error"},"401":{"$ref":"#/components/responses/401Error"},"403":{"$ref":"#/components/responses/403Error"},"404":{"$ref":"#/components/responses/404Error"},"409":{"description":"Conflict with existing document metadata (e.g., duplicate name)"}}}}}}
```

## Download a specific document

> Allows the user to download a specific document associated with the specified equipment.

```json
{"openapi":"3.0.3","info":{"title":"Hiboo API","version":"2.0.0"},"tags":[{"name":"Equipment Documents","description":"The following endpoints allow you to manage documents related to your equipments, including uploading, updating, and deleting documents."}],"servers":[{"url":"https://api.hiboo.io","description":"Production server"},{"url":"https://api-sandbox.hiboo.io","description":"Sandbox server"}],"security":[{"JWT":[]}],"components":{"securitySchemes":{"JWT":{"type":"apiKey","in":"header","name":"x-access-token","description":"Generate a JWT when you log in. Use it in your following requests in the header as `x-access-token: your-token-here`\n"}},"responses":{"401Error":{"description":"Unable to authenticate the token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoDetailError"}}}},"404Error":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoDetailError"}}}}},"schemas":{"NoDetailError":{"required":["message"],"type":"object","properties":{"message":{"type":"string","description":"A human readable description of the error"}}}}},"paths":{"/v2/fleet/equipments/{id}/documents/{documentId}/download":{"get":{"summary":"Download a specific document","description":"Allows the user to download a specific document associated with the specified equipment.","tags":["Equipment Documents"],"operationId":"downloadDocument","parameters":[{"name":"id","description":"The unique identifier of the equipment.","in":"path","required":true,"schema":{"type":"integer"}},{"name":"documentId","description":"The unique identifier of the document.","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Document successfully downloaded","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"401":{"$ref":"#/components/responses/401Error"},"404":{"$ref":"#/components/responses/404Error"}}}}}}
```
