# 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>
