# Create a new session Creates a new session record. Endpoint: POST /v1/api/session Version: 1.2.4 Security: X-Api-Key ## Request fields (application/json): - `stationId` (string, required) Station ID where the session was opened. Example: "507f1f77bcf86cd799439011" - `sessionNumber` (string, required) Session number identifier. Example: "S-2025-001" - `openedBy` (string, required) Name of the user who opened the session. Example: "John Doe" - `closedBy` (string) Name of the user who closed the session. Example: "Jane Smith" - `openTime` (string, required) Time when the session was opened. Example: "2025-01-29T09:00:00.000Z" - `closeTime` (string) Time when the session was closed. Example: "2025-01-29T17:00:00.000Z" - `openingAmount` (string, required) Opening cash amount. Example: "200.00" - `closingAmount` (string) Closing cash amount. Example: "2500.00" - `closingReportData` (string) Closing report data in JSON format. Example: "{}" - `notes` (array, required) Notes for the session. Example: ["Opened on time","Register balanced"] - `closingAmounts` (object, required) Closing amounts by payment method. Example: {"cash":"500.00","card":"1500.00","oliverPay":"200.00"} - `closingAmounts.cash` (string) Cash closing amount. Example: "500.00" - `closingAmounts.card` (string) Card closing amount. Example: "1500.00" - `closingAmounts.oliverPay` (string) Oliver Pay closing amount. Example: "200.00" - `closingNote` (string) Note when closing the session. Example: "All transactions verified" - `openingNote` (string, required) Note when opening the session. Example: "Starting new shift" ## Response 201 fields (application/json): - `id` (string) Unique identifier for the Session. Example: "o1p2q3r4s5t6u7v8w9x0y1z2" - `createdAt` (string) Timestamp when the Session was created. Example: "2025-12-07T19:31:48.436+00:00" - `updatedAt` (string) Timestamp when the Session was last updated. Example: "2025-12-07T19:35:48.436+00:00" - `companyId` (string) Company ID associated with the Session. Example: "o1p2q3r4s5t6u7v8w9x0y1z2" - `stationId` (string) Station ID where the session was opened. Example: "507f1f77bcf86cd799439011" - `sessionNumber` (string) Session number identifier. Example: "S-2025-001" - `openedBy` (string) Name of the user who opened the session. Example: "John Doe" - `closedBy` (string) Name of the user who closed the session. Example: "Jane Smith" - `openTime` (string) Time when the session was opened. Example: "2025-01-29T09:00:00.000Z" - `closeTime` (string) Time when the session was closed. Example: "2025-01-29T17:00:00.000Z" - `openingAmount` (string) Opening cash amount. Example: "200.00" - `closingAmount` (string) Closing cash amount. Example: "2500.00" - `closingReportData` (string) Closing report data in JSON format. Example: "{}" - `notes` (array) Notes for the session. Example: ["Opened on time","Register balanced"] - `closingAmounts` (object) Closing amounts by payment method. Example: {"cash":"500.00","card":"1500.00","oliverPay":"200.00"} - `closingAmounts.cash` (string) Cash closing amount. Example: "500.00" - `closingAmounts.card` (string) Card closing amount. Example: "1500.00" - `closingAmounts.oliverPay` (string) Oliver Pay closing amount. Example: "200.00" - `closingNote` (string) Note when closing the session. Example: "All transactions verified" - `openingNote` (string) Note when opening the session. Example: "Starting new shift" ## Response 400 fields (application/json): - `statusCode` (number, required) HTTP status code Example: 400 - `message` (string, required) Error message describing what went wrong Example: "Validation failed: Field `schemaField` is required." - `error` (string, required) Error type/name Enum: "Bad Request", "Unauthorized", "Forbidden", "Not Found", "Conflict", "Unprocessable Entity", "Internal Server Error"