> ## Documentation Index
> Fetch the complete documentation index at: https://docs.eazecustoms.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a declaration

> Update an existing import declaration with a full update payload.

Update an existing import declaration. This endpoint supports full replacement semantics for the declaration fields, parties, and document groups.

### Path Parameters

<ParamField path="id" type="number" required>
  The unique declaration ID.
</ParamField>

### Query Parameters

<ParamField query="partyUpdateMode" type="object">
  Optional per-party update mode override. Keys are case-insensitive and underscore-friendly (e.g. `consignee`, `consignor`, `vat_payer`, `importer`, `exporter`). Values must be one of: `replace`, `link`, `unlink`.
</ParamField>

### Response

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "declarationId": 42,
    "status": "processing"
  }
  ```

  ```json 400 Bad Request theme={null}
  {
    "statusCode": 400,
    "message": [
      "DeclarationItems.0.commodityCode must be a valid HS code"
    ],
    "error": "Bad Request"
  }
  ```

  ```json 404 Not Found theme={null}
  {
    "statusCode": 404,
    "message": "Declaration not found or not accessible.",
    "error": "Not Found"
  }
  ```
</ResponseExample>
