---
title: "Hands a ticket the customer bought to someone else, before its guest opened it and before the event starts; the old guest's ticket ends."
---

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

Path: Sherpo customer API › checkout

`PUT /v1/stores/{store}/products/{product}/guests/{guest}`

## Authentication

- `bearer`, http, header `Authorization`, scopes: `checkout:write`

## Path parameters

- `store` (`changeEventGuest.path.store`; string, required) — A hostname of the store.
- `product` (`changeEventGuest.path.product`; string, required) — An id, or `slug:<slug>`.
  - minLength 1
- `guest` (`changeEventGuest.path.guest`; string, required)
  - minLength 1

## Request body

_Required._

- `email` (`changeEventGuest.email`; string, required) — Who takes the ticket now.
  - minLength 3; maxLength 254
- `name` (`changeEventGuest.name`; any of, optional)
  - any of: `string`, `null`

## Example request

```json
{
  "email": "string",
  "name": "string"
}
```

## Code samples

### cURL

```bash
curl --request PUT \
  --url 'https://api.sherpo.io/customer/v1/stores/<store>/products/<product>/guests/<guest>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "email": "string",
  "name": "string"
}
'
```

### TypeScript

```typescript
const url = 'https://api.sherpo.io/customer/v1/stores/<store>/products/<product>/guests/<guest>';
const options = {
  method: 'PUT',
  headers: {'Content-Type': 'application/json', Authorization: 'Bearer <token>'},
  body: JSON.stringify({email: 'string', name: 'string'})
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.sherpo.io/customer/v1/stores/<store>/products/<product>/guests/<guest>"

payload = {
    "email": "string",
    "name": "string"
}
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
}

response = requests.put(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 200

Hands a ticket the customer bought to someone else, before its guest opened it and before the event starts; the old guest's ticket ends.

#### Example

```json
{
  "id": "string",
  "product_id": "string",
  "order_id": "string",
  "order_item_id": "string",
  "name": "string",
  "email": "string",
  "status": "string",
  "opened_at": "string",
  "created_at": "string",
  "ended_at": "string",
  "changeable": true,
  "resendable": true
}
```

- `id` (`changeEventGuest.response.200.id`; string, required)
- `product_id` (`changeEventGuest.response.200.product_id`; string, required)
- `order_id` (`changeEventGuest.response.200.order_id`; string, required)
- `order_item_id` (`changeEventGuest.response.200.order_item_id`; string, required)
- `name` (`changeEventGuest.response.200.name`; any of, required)
  - any of: `string`, `null`
- `email` (`changeEventGuest.response.200.email`; any of, required)
  - any of: `string`, `null`
- `status` (`changeEventGuest.response.200.status`; string, required) — `active` while theirs, `refunded` once a refund ended it.
- `opened_at` (`changeEventGuest.response.200.opened_at`; any of, required) — When they signed in holding it, else first were let in at the door; null while neither.
  - any of: `string`, `null`
- `created_at` (`changeEventGuest.response.200.created_at`; any of, required)
  - any of: `string`, `null`
- `ended_at` (`changeEventGuest.response.200.ended_at`; any of, required)
  - any of: `string`, `null`
- `changeable` (`changeEventGuest.response.200.changeable`; boolean, required) — Whether the buyer may still hand it to someone else: before its guest opened it, before the event starts, and while it stands.
- `resendable` (`changeEventGuest.response.200.resendable`; boolean, required) — Whether the buyer may send its mail again; never once the event is canceled.

### default

A problem; see https://api.sherpo.io/customer/docs/errors.

#### Example

```json
{
  "type": "http://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "code": "string",
  "context": {},
  "reached_core": true,
  "core_answer": "string"
}
```

- `type` (`changeEventGuest.response.default.type`; string, required)
  - format `uri`
- `title` (`changeEventGuest.response.default.title`; string, required)
- `status` (`changeEventGuest.response.default.status`; integer, required)
- `detail` (`changeEventGuest.response.default.detail`; string, required)
- `code` (`changeEventGuest.response.default.code`; string, optional)
- `context` (`changeEventGuest.response.default.context`; object, optional)
- `reached_core` (`changeEventGuest.response.default.reached_core`; boolean, optional)
- `core_answer` (`changeEventGuest.response.default.core_answer`; string, optional)


Source: https://docs.sherpo.io/customer-api/reference/change-event-guest/index.md
