# Modificar entrega

Endpoint para atualizar dados da entrega, isso inclui o endereço e as informações de contato do ponto de entrega, assim como também propriedades como pacotes, etiquetas, pacotes, cod, identificador de referência, entre outros.

## Editar dados da entrega

> Endpoint que permite editar os dados de uma ou múltiplas entregas.

```json
{"openapi":"3.0.0","info":{"title":"API Shippify","version":"1.0.0"},"servers":[{"url":"https://api.shippify.co","description":"Servidor de desenvolvimento"}],"security":[{"Basic_Auth":[]}],"components":{"securitySchemes":{"Basic_Auth":{"type":"http","scheme":"basic"}},"schemas":{"editDropoff":{"successfulResponse":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"data":{"type":"object","description":"Information of additional processes created (if the delivery belongs to a route)","properties":{"jobs":{"description":"Identifier of the external process created","type":"string"}}}}},"request":{"type":"object","required":["deliveryIds","deliveryChanges"],"properties":{"deliveryIds":{"description":"List of delivery identifiers to be edited, up to 10 deliveries can be edited in a single request","type":"array","items":{"type":"string"}},"referenceIds":{"description":"List of reference identifiers of orders to be edited, up to 10 deliveries can be edited in a single request. If this property is used, do not include deliveryIds ","type":"array","items":{"type":"string"}},"deliveryChanges":{"description":"Mudanças a serem feitas na tarefa","type":"object","properties":{"location":{"$ref":"#/components/schemas/delivery/location"},"contact":{"$ref":"#/components/schemas/delivery/contact"},"packages":{"description":"Informações dos pacotes.","type":"array","items":{"$ref":"#/components/schemas/delivery/package"}},"cod":{"description":"Pagamento na entrega","type":"number","minimum":0},"referenceId":{"description":"Identificador externo da entrega, pode ser o número do pedido","type":"string","maxLength":40},"addTags":{"description":"Ids of digital tags to be added to the delivery","type":"array","items":{"type":"integer","minimum":1}},"removeTags":{"description":"Ids of digital tags to be removed from the delivery","type":"array","items":{"type":"integer","minimum":1}}}},"recalculatePrice":{"description":"Indicates whether to recalculate the price after modification (recommended)","type":"boolean"},"reorderRoute":{"description":"Indicates whether to reorder the route (if the delivery belongs to a route) after modification (recommended)","type":"boolean"},"recalculateCity":{"description":"Indicates whether to recalculate the city after modification (recommended)","type":"boolean"}}}},"Unauthenticated":{"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"},"delivery":{"location":{"description":"Informações do endereço do local de coleta dos pacotes de entrega.","type":"object","required":["address"],"properties":{"address":{"description":"Endereço de entrega.","type":"string"},"instructions":{"description":"Informações extras sobre o endereço.","type":"string"},"lat":{"description":"Latitude do ponto de coleta.","type":"string"},"lng":{"description":"Longitude do ponto de coleta.","type":"string"}}},"contact":{"description":"Informações de contato da pessoa responsável por entregar os pacotes no armazém de coleta.","type":"object","required":["name","email"],"properties":{"name":{"description":"Nome da pessoa responsável.","type":"string"},"email":{"description":"Email da pessoa responsável.","type":"string","format":"email"},"phonenumber":{"description":"Número de telefone da pessoa responsável.","type":"string"}}},"package":{"type":"object","required":["name","qty","size"],"properties":{"id":{"type":"string","description":"Identificador do pacote"},"name":{"type":"string","description":"Nome do pacote"},"qty":{"description":"Número de pacotes no pedido (não o número de produtos dentro do pacote).","type":"integer","minimum":0},"weight":{"description":"Peso unitário * quantidade em Kg","type":"number","minimum":0},"size":{"description":"Package size","type":"string","enum":["xs","s","m","l","xl"]},"price":{"description":"Preço unitário * quantidade na moeda da empresa","type":"number","minimum":0}}}}}},"paths":{"/v1/deliveries/dropoff":{"patch":{"tags":["Editar entrega"],"summary":"Editar dados da entrega","description":"Endpoint que permite editar os dados de uma ou múltiplas entregas.","responses":{"200":{"description":"Operação bem-sucedida","content":{"application/json":{"schema":{"$ref":"#/components/schemas/editDropoff/successfulResponse"}}}},"401":{"description":"Não autorizado","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthenticated"}}}}},"requestBody":{"description":"Aqui vai a descrição","content":{"application/json":{"schema":{"$ref":"#/components/schemas/editDropoff/request"}}}}}}}}
```

## Casos de uso

<details>

<summary>Modificar entrega por deliveryId</summary>

```json
{
    "deliveryIds": [
        "t-pruaas-4973"
    ],
    "reorderRoute": true,
    "recalculatePrice": true,
    "recalculateCity": false,
    "deliveryChanges": {
        "location": {
            "address": "av. echeñique 8861, 7860169 la reina, región metropolitana, chile",
            "instructions": "CLIENTE RETIRA PRODUTOS NO POLICENTRO 2",
            "lat": -23.557166,
            "lng": -46.664559
        },
        "contact": {
            "name": "Juan Perez",
            "email": "example@shippify.co"
        },
        "packages": [
            {
                "id": "SSSTP002",
                "name": "XIAOMI REDMI 10S",
                "size": 2,
                "price": 0,
                "weight": 5,
                "qty": 1
            }
        ],
        "cod": 10,
        "referenceId": "0987837468",
        "addTags":[1003],
        "removeTags": [],
        "extraData": [{"name":"Billing", "value":"0000-123-334"}]
    }
}
```

</details>

<details>

<summary>Modificar entrega por referenceId</summary>

```json
{
    "referenceIds": [
        "0987837468"
    ],
    "reorderRoute": true,
    "recalculatePrice": true,
    "recalculateCity": false,
    "deliveryChanges": {
        "location": {
            "address": "av. echeñique 8861, 7860169 la reina, región metropolitana, chile",
            "instructions": "CLIENTE RETIRA PRODUTOS NO POLICENTRO 2",
            "lat": -23.557166,
            "lng": -46.664559
        },
        "contact": {
            "name": "Juan Perez",
            "email": "example@shippify.co"
        },
        "packages": [
            {
                "id": "SSSTP002",
                "name": "XIAOMI REDMI 10S",
                "size": 2,
                "price": 0,
                "weight": 5,
                "qty": 1
            }
        ],
        "cod": 10,
        "referenceId": "0987837468",
        "addTags":[1003],
        "removeTags": [],
        "extraData": [{"name":"Billing", "value":"0000-123-334"}]
    }
}
```

</details>

<details>

<summary>Modificar dados do destinatário</summary>

```json
{
    "deliveryIds": [
        "t-pruaas-4973"
    ],
    "deliveryChanges": {
        "contact": {
            "name": "Juan Perez",
            "email": "example@shippify.co"
        }
    }
}
```

</details>

<details>

<summary>Modificar endereço de entrega</summary>

```json
{
    "deliveryIds": [
        "t-pruaas-4973"
    ],
    "deliveryChanges": {
        "location": {
            "address": "av. echeñique 8861, 7860169 la reina, región metropolitana, chile",
            "instructions": "CLIENTE RETIRA PRODUTOS NO POLICENTRO 2",
            "lat": -23.557166,
            "lng": -46.664559
        }
    }
}
```

</details>

<details>

<summary>Modificar etiquetas</summary>

```json
{
    "deliveryIds": [
        "t-pruaas-4973"
    ],
    "deliveryChanges": {
        "addTags":[1003],
        "removeTags": []
    }
}
```

</details>

<details>

<summary>Modificar referenceId</summary>

```json
{
    "deliveryIds": [
        "t-pruaas-4973"
    ],
    "deliveryChanges": {
        "referenceId": "0987837468"
    }
}
```

</details>

<details>

<summary>Modificar pacotes da entrega</summary>

```json
{
    "deliveryIds": [
        "t-pruaas-4973"
    ],
    "deliveryChanges": {
       "packages": [
            {
                "id": "SSSTP002",
                "name": "XIAOMI REDMI 10S",
                "size": 2,
                "price": 0,
                "weight": 5,
                "qty": 1
            }
        ]
    }
}
```

</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/pt/shippify-api/entregas/modificar-entrega.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.
