# Fichiers

## Envoyer un fichier

> Envoie un fichier au niveau de l'instance. Une fois lié à une fiche, le fichier\
> ne peut plus être réutilisé. Envoyez le binaire brut dans le corps de la requête\
> avec le bon en-tête \`Content-Type\`.<br>

```json
{"openapi":"3.0.3","info":{"title":"Daxium Air API","version":"v1.3"},"tags":[{"name":"files"}],"servers":[{"url":"https://api.daxium-air.com","description":"Production"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}},"parameters":{"AppShort":{"name":"app_short","in":"path","required":true,"description":"Nom court de l'instance (ex. `daxium-test`)","schema":{"type":"string"}}},"schemas":{"FileUploadResponse":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","description":"Référencez cet UUID dans les champs de fiche de type image/signature/fichier"},"mime-type":{"type":"string","description":"Type MIME du fichier"},"size":{"type":"integer","description":"Taille du fichier en octets"}}}}},"paths":{"/{app_short}/files/upload":{"post":{"summary":"Envoyer un fichier","description":"Envoie un fichier au niveau de l'instance. Une fois lié à une fiche, le fichier\nne peut plus être réutilisé. Envoyez le binaire brut dans le corps de la requête\navec le bon en-tête `Content-Type`.\n","tags":["files"],"operationId":"uploadFile","parameters":[{"$ref":"#/components/parameters/AppShort"}],"requestBody":{"required":true,"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"responses":{"200":{"description":"Fichier envoyé avec succès","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileUploadResponse"}}}}}}}}}
```

## Télécharger un fichier d'erreurs

> Retourne le fichier d'erreurs généré par un worker en arrière-plan (ex. job d'import).

```json
{"openapi":"3.0.3","info":{"title":"Daxium Air API","version":"v1.3"},"tags":[{"name":"files"}],"servers":[{"url":"https://api.daxium-air.com","description":"Production"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}},"parameters":{"AppShort":{"name":"app_short","in":"path","required":true,"description":"Nom court de l'instance (ex. `daxium-test`)","schema":{"type":"string"}}}},"paths":{"/{app_short}/files/download_errors/{worker_unique_id}":{"get":{"summary":"Télécharger un fichier d'erreurs","description":"Retourne le fichier d'erreurs généré par un worker en arrière-plan (ex. job d'import).","tags":["files"],"operationId":"downloadErrorFile","parameters":[{"$ref":"#/components/parameters/AppShort"},{"name":"worker_unique_id","in":"path","required":true,"description":"Identifiant unique du worker (UUID)","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Contenu binaire du fichier","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}}}}}}
```


---

# Agent Instructions: 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:

```
GET https://www.center.daxium-air.com/api-reference/doc-api/fichiers.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
