# Attach documents to a delivery

This endpoint allows you to attach files such as PDFs or images directly to specific deliveries using multipart forms. You can upload fiscal documents or proof of delivery.

## Attach Documents

> Attach documents to a delivery.

```json
{"openapi":"3.0.0","info":{"title":"Shippify Api","version":"1.0.0"},"servers":[{"url":"https://api.shippify.co","description":"Development server"}],"security":[{"Basic_Auth":[]}],"components":{"securitySchemes":{"Basic_Auth":{"type":"http","scheme":"basic"}},"schemas":{"uploadFile":{"successfulResponse":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}},"request":{"type":"object","required":["files","type","deliveryId"],"properties":{"files":{"description":"Document to attach to the delivery.","type":"file"},"type":{"description":"Type of document to attach.","type":"string","enum":["fiscal_document","proof_of_delivery"]},"deliveryId":{"description":"Identifier of the delivery to which the file is to be attached.","type":"string"},"referenceId":{"description":"Reference identifier of the delivery to which the file is to be attached.","type":"string"},"extraDataName":{"description":"Name of the extra data of the delivery to which the file is to be attached.","type":"string"},"extraDataValue":{"description":"Value of the extra data of the delivery to which the file is to be attached.","type":"string"}}}},"Unauthenticated":{"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"}}},"paths":{"/v2/integrations/deliveries/files":{"post":{"tags":["Deliveries"],"summary":"Attach Documents","description":"Attach documents to a delivery.","responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/uploadFile/successfulResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthenticated"}}}}},"requestBody":{"description":"","content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/uploadFile/request"}}}}}}}}
```

## Use cases <a href="#endpoint" id="endpoint"></a>

<details>

<summary>Attach documents to a delivery by the ID</summary>

Use deliveryId in the parameters.&#x20;

</details>

<details>

<summary>Attach documents to a delivery by the referenceID</summary>

Use referenceId in the parameters.

</details>

<details>

<summary>Attach documents to a delivery by extra data</summary>

Use extraDataName and extraDataValue in the parameters.&#x20;

</details>


---

# 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://docs.shippify.co/developers/en/shippify-api/deliveries/attach-documents-to-a-delivery.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.
