# Update Estimate by estimate token.

`PUT /api/public/invoice/{id}/{token}`

Authentication: no security requirement declared for this operation.

Request body: application/json (required)

Type: object

Schema: [PublicEstimateUpdateDTO](https://sourcey-gauzy.pages.dev/api-reference/models/publicestimateupdatedto/index.md)

- `isEstimate` (optional)
  Type: boolean
  
  readOnly: true

- `status` (required)
  Type: string
  
  enum: ["DRAFT","SENT","VIEWED","ACCEPTED","REJECTED","VOID"]
  
  readOnly: true

Responses:

- 202: Estimate updated successfully.

- 404: Record not found.

## Examples

### cURL

```bash
curl -X PUT 'http://localhost:3000/api/public/invoice/%7Bid%7D/%7Btoken%7D' \
  -H 'Content-Type: application/json' \
  --data-raw '{}'
```

### JavaScript

```javascript
const response = await fetch('http://localhost:3000/api/public/invoice/%7Bid%7D/%7Btoken%7D', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
  },
  body: '{}',
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.put(
    'http://localhost:3000/api/public/invoice/%7Bid%7D/%7Btoken%7D',
    data='{}'.encode('utf-8'),
    headers={
        'Content-Type': 'application/json',
    },
)
print(response.text)
```
