# Server

***

### axiam\_hotdogcart:shiftStarted

Fired on the **server** when a player begins active service and the shift token is issued.

```lua
AddEventHandler('axiam_hotdogcart:shiftStarted', function(source, info)
end)
```

* **source:** `number` - Player server id.
* **info:** `table` - Shift start context.

| Field       | Type     | Description                             |
| ----------- | -------- | --------------------------------------- |
| `citizenid` | `string` | Framework character id.                 |
| `cartId`    | `number` | Server cart registry id for this shift. |

***

### axiam\_hotdogcart:shiftEnded

Fired on the **server** when a player finishes a shift and the end-shift payload is accepted.

```lua
AddEventHandler('axiam_hotdogcart:shiftEnded', function(source, stats)
end)
```

* **source:** `number` - Player server id.
* **stats:** `table` - Final shift statistics (same shape as client `getCurrentShiftStats`).

| Field             | Type     | Description |
| ----------------- | -------- | ----------- |
| `customersServed` | `number` |             |
| `totalEarnings`   | `number` |             |
| `totalTips`       | `number` |             |
| `supplySpend`     | `number` |             |
| `totalRating`     | `number` |             |
| `reviewCount`     | `number` |             |
| `xpEarned`        | `number` |             |
| `customersLost`   | `number` |             |


---

# 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.axiam.shop/axiam_hotdogcart/events/server.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.
