---
updatedAt: 2026-09-17T08:29:47.000Z
agentTools:
  projectIndex: https://nexp.readme.io/llms.txt
---

# Alterar endereço de entrega

Use esta API para alterar o endereço de entrega de um pedido

> 🚧 Importante
>
> Em caso de mudança do endereço de entrega de um pedido já expedido, o sistema regride o status, obrigando a impressão de uma nova etiqueta e que seja feita uma nova expedição. Além disso, será feito um novo envio das informações para a transportadora responsável pela entrega.
>
> *Somente usuários de perfil autorizado podem alterar o endereço de entrega de um pedido e a mudança é registrada para fins de histórico.*

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "logstore",
    "version": "2"
  },
  "servers": [
    {
      "url": "https://{environment}.app",
      "variables": {
        "environment": {
          "default": "environment"
        }
      }
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "oauth2",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://example.com/oauth2/token",
            "scopes": {}
          }
        }
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/orders/{id}/shipping-addresses": {
      "post": {
        "summary": "Alterar endereço de entrega",
        "description": "Use esta API para alterar o endereço de entrega de um pedido",
        "operationId": "alterar-endereco-entrega",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Identificador único do pedido",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "required": true
          },
          {
            "name": "x-customer-key",
            "in": "header",
            "description": "Um hash que identifica a conta.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "description": "Chave de acesso",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "postalCode",
                  "streetName",
                  "neighborhood",
                  "city",
                  "state",
                  "latitude",
                  "longitude"
                ],
                "properties": {
                  "postalCode": {
                    "type": "string",
                    "description": "CEP contendo apenas números (ex.: 01227200)"
                  },
                  "streetName": {
                    "type": "string",
                    "description": "Endereço (ex.: av . angélica, 2529)"
                  },
                  "streetNumber": {
                    "type": "string",
                    "description": "Número (ex.: s/n)"
                  },
                  "neighborhood": {
                    "type": "string",
                    "description": "Bairro (ex.: Consolação)"
                  },
                  "city": {
                    "type": "string",
                    "description": "Cidade (ex.: São Paulo)"
                  },
                  "state": {
                    "type": "string",
                    "description": "Sigla do estado contendo 2 caracteres (ex.: SP)"
                  },
                  "latitude": {
                    "type": "number",
                    "description": "Latitude (ex.: -23.5541903)",
                    "format": "float"
                  },
                  "longitude": {
                    "type": "number",
                    "description": "Longitude (ex.: -46.662169)",
                    "format": "float"
                  },
                  "extraInfo": {
                    "type": "string",
                    "description": "Complemento do endereço (ex.: apto 123 bloco A)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n\t\"statusCode\": 200,\n\t\"content\": {\n\t\t\"orderNumber\": \"pedido-01\",\n\t\t\"pdfUrl\": \"https://folder/files/abb84fda8b5349508f8f2af84c343a62.pdf\",\n\t\t\"createdAt\": \"2024-04-08T20:28:30.5170347Z\"\n\t},\n\t\"hasError\": false,\n\t\"data\": null\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "statusCode": {
                      "type": "integer",
                      "example": 200,
                      "default": 0
                    },
                    "content": {
                      "type": "object",
                      "properties": {
                        "orderNumber": {
                          "type": "string",
                          "example": "pedido-01"
                        },
                        "pdfUrl": {
                          "type": "string",
                          "example": "https://folder/files/abb84fda8b5349508f8f2af84c343a62.pdf"
                        },
                        "createdAt": {
                          "type": "string",
                          "example": "2024-04-08T20:28:30.5170347Z"
                        }
                      }
                    },
                    "hasError": {
                      "type": "boolean",
                      "example": false,
                      "default": true
                    },
                    "data": {}
                  }
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "examples": {
                  "Não autenticado": {
                    "value": "{\n\t\"statusCode\": 401,\n\t\"content\": {\n\t\t\"code\": \"unauthorized\",\n\t\t\"number\": 401,\n\t\t\"details\": \"Acesso restrito.\",\n\t\t\"type\": \"https://httpstatuses.com/401\"\n\t},\n\t\"hasError\": true,\n\t\"data\": null\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "statusCode": {
                      "type": "integer",
                      "example": 401,
                      "default": 0
                    },
                    "content": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "unauthorized"
                        },
                        "number": {
                          "type": "integer",
                          "example": 401,
                          "default": 0
                        },
                        "details": {
                          "type": "string",
                          "example": "Acesso restrito."
                        },
                        "type": {
                          "type": "string",
                          "example": "https://httpstatuses.com/401"
                        }
                      }
                    },
                    "hasError": {
                      "type": "boolean",
                      "example": true,
                      "default": true
                    },
                    "data": {}
                  }
                }
              }
            }
          },
          "404": {
            "description": "404",
            "content": {
              "application/json": {
                "examples": {
                  "Pedido não encontrado": {
                    "value": "{\n\t\"statusCode\": 404,\n\t\"content\": {\n\t\t\"code\": \"order_not_found\",\n\t\t\"number\": 403,\n\t\t\"details\": \"Pedido não encontrado.\"\n\t},\n\t\"hasError\": true,\n\t\"data\": null\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "statusCode": {
                      "type": "integer",
                      "example": 404,
                      "default": 0
                    },
                    "content": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "order_not_found"
                        },
                        "number": {
                          "type": "integer",
                          "example": 403,
                          "default": 0
                        },
                        "details": {
                          "type": "string",
                          "example": "Pedido não encontrado."
                        }
                      }
                    },
                    "hasError": {
                      "type": "boolean",
                      "example": true,
                      "default": true
                    },
                    "data": {}
                  }
                }
              }
            }
          },
          "409": {
            "description": "409",
            "content": {
              "application/json": {
                "examples": {
                  "Não autorizado": {
                    "value": "{\n\t\"statusCode\": 404,\n\t\"content\": {\n\t\t\"code\": \"forbidden\",\n\t\t\"number\": 403,\n\t\t\"details\": \"Sem autorização.\"\n\t},\n\t\"hasError\": true,\n\t\"data\": null\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "statusCode": {
                      "type": "integer",
                      "example": 404,
                      "default": 0
                    },
                    "content": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "forbidden"
                        },
                        "number": {
                          "type": "integer",
                          "example": 403,
                          "default": 0
                        },
                        "details": {
                          "type": "string",
                          "example": "Sem autorização."
                        }
                      }
                    },
                    "hasError": {
                      "type": "boolean",
                      "example": true,
                      "default": true
                    },
                    "data": {}
                  }
                }
              }
            }
          },
          "422": {
            "description": "422",
            "content": {
              "application/json": {
                "examples": {
                  "Dados inválidos": {
                    "value": "{\n\t\"statusCode\": 422,\n\t\"content\": {\n\t\t\"code\": \"unprocessable_entity\",\n\t\t\"number\": 422,\n\t\t\"details\": {\n\t\t\t\"errors\": [\n\t\t\t\t{\n\t\t\t\t\t\"key\": \"postalCode\",\n\t\t\t\t\t\"errors\": [\n\t\t\t\t\t\t\"O parâmetro PostalCode não pode ser vazio.\"\n\t\t\t\t\t]\n\t\t\t\t}\n\t\t\t]\n\t\t},\n\t\t\"type\": \"https://httpstatuses.com/422\"\n\t},\n\t\"hasError\": true,\n\t\"data\": null\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "statusCode": {
                      "type": "integer",
                      "example": 422,
                      "default": 0
                    },
                    "content": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "unprocessable_entity"
                        },
                        "number": {
                          "type": "integer",
                          "example": 422,
                          "default": 0
                        },
                        "details": {
                          "type": "object",
                          "properties": {
                            "errors": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "key": {
                                    "type": "string",
                                    "example": "postalCode"
                                  },
                                  "errors": {
                                    "type": "array",
                                    "items": {
                                      "type": "string",
                                      "example": "O parâmetro PostalCode não pode ser vazio."
                                    }
                                  }
                                }
                              }
                            }
                          }
                        },
                        "type": {
                          "type": "string",
                          "example": "https://httpstatuses.com/422"
                        }
                      }
                    },
                    "hasError": {
                      "type": "boolean",
                      "example": true,
                      "default": true
                    },
                    "data": {}
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```