| Summary Item | Total | Failed |
|---|---|---|
| Requests | 24 | 0 |
| Prerequest Scripts | 72 | 0 |
| Test Scripts | 72 | 0 |
| Assertions | 214 | 0 |
| Skipped Tests | 0 | - |
# Auth - Create Token
Authenticates a user against the RESTful Booker API using valid credentials and retrieves a session token.
This is the **first step** in the Full CRUD Lifecycle workflow. The token returned is automatically stored in the `token` collection variable and used by subsequent requests that require authorization (e.g., update, partial update, and delete operations).
---
## Endpoint
`POST https://restful-booker.herokuapp.com/auth`
---
## Request
### Headers
| Key | Value |
| --- | --- |
| Content-Type | application/json |
### Body (raw JSON)
``` json
{
"username": "admin",
"password": "password123"
}
```
| Field | Type | Description |
| --- | --- | --- |
| `username` | string | Valid admin username, sourced from `admin` collection variable |
| `password` | string | Valid admin password, sourced from `password123` collection variable |
---
## Response
### Success — `200 OK`
``` json
{
"token": "abc123xyz"
}
```
| Field | Type | Description |
| --- | --- | --- |
| `token` | string | Token used for authenticated requests |
---
## Post-Response Behaviour
- Validates status code is `200`
- Validates response time is below `1000`
- Validates the response body is JSON with a single `token` property
- Validates the token is a non-empty string
- **Stores the token** in the `token` collection variable for use in downstream requests
---
## Notes
- This request uses **valid credentials** (happy path scenario).
- Ensure `admin` and `password123` are set in the active environment before running.
- The `https://restful-booker.herokuapp.com` variable must also be configured in the collection.
| Header Name | Header Value |
|---|---|
| Content-Type | application/json |
| User-Agent | PostmanRuntime/7.39.1 |
| Accept | */* |
| Cache-Control | no-cache |
| Postman-Token | c5a99cf7-1496-40f6-8d29-bfb45eaaadb9 |
| Host | restful-booker.herokuapp.com |
| Accept-Encoding | gzip, deflate, br |
| Connection | keep-alive |
| Content-Length | 61 |
{
"username": "admin",
"password": "password123"
}
| Header Name | Header Value |
|---|---|
| Content-Length | 27 |
| Content-Type | application/json; charset=utf-8 |
| Date | Mon, 19 Oct 2026 10:33:18 GMT |
| Etag | W/"1b-2slI0jMFKOo7Y/kKkihIIQSnMWo" |
| Nel | {"report_to":"heroku-nel","response_headers":["Via"],"max_age":3600,"success_fraction":0.01,"failure_fraction":0.1} |
| Report-To | {"group":"heroku-nel","endpoints":[{"url":"https://nel.heroku.com/reports?s=Q7XEw7kaUvrmMd8MaaEk4LiWgJHgAQidNYJ77T0Y2Gs%3D\u0026sid=c46efe9b-d3d2-4a0c-8c76-bfafa16c5add\u0026ts=1792405998"}],"max_age":3600} |
| Reporting-Endpoints | heroku-nel="https://nel.heroku.com/reports?s=Q7XEw7kaUvrmMd8MaaEk4LiWgJHgAQidNYJ77T0Y2Gs%3D&sid=c46efe9b-d3d2-4a0c-8c76-bfafa16c5add&ts=1792405998" |
| Server | Heroku |
| Via | 1.1 heroku-router |
| X-Powered-By | Express |
{"token":"88217868bf5995a"}
| Name | Passed | Failed | Skipped |
|---|---|---|---|
| Test_1. Status code is 200 | 1 | 0 | 0 |
| Test_2. Response time is below max_response_time | 1 | 0 | 0 |
| Test_3. Response body is JSON | 1 | 0 | 0 |
| Test_4. Response body contains 'token' property, store it in a collection variable | 1 | 0 | 0 |
| Total | 4 | 0 | 0 |
| Test Name | Assertion Error |
|---|
## Create Booking
Creates a new booking in the RESTful Booker API with a full set of valid booking details.
This is a **positive/happy-path** test. It is used as **Step 2** in the **Workflow 1: Full CRUD Lifecycle** integration flow, immediately after authentication and before the read/update/delete steps.
---
### Endpoint
`POST https://restful-booker.herokuapp.com/booking`
---
### Request Headers
| Header | Value |
| --- | --- |
| Content-Type | application/json |
---
### Request Body
The body is dynamically generated in the **Pre-request Script** and sent as a JSON object:
| Field | Type | Source |
| --- | --- | --- |
| `firstname` | string | Random (`$randomFirstName`) |
| `lastname` | string | Random (`$randomLastName`) |
| `totalprice` | integer | Random (`$randomInt`, 0–1000) |
| `depositpaid` | boolean | Hardcoded: `false` |
| `bookingdates.checkin` | string (date) | Hardcoded: `2026-02-12` |
| `bookingdates.checkout` | string (date) | Hardcoded: `2026-02-15` |
| `additionalneeds` | string | Hardcoded: `"Breakfast"` |
All generated values are saved to **collection variables** for use in downstream validation tests.
---
### Pre-request Script Behaviour
- Generates random `firstname`, `lastname`, and `totalprice` values using Postman dynamic variables.
- Constructs the full booking payload and sets it as the raw request body.
- Persists all values (`firstname`, `lastname`, `totalprice`, `depositpaid`, `checkin`, `checkout`, `additionalneeds`) to collection variables so post-response tests can validate the response against the exact values sent.
---
### Expected Response
**Status:** `200 OK`
``` json
{
"bookingid": 1,
"booking": {
"firstname": "...",
"lastname": "...",
"totalprice": 123,
"depositpaid": false,
"bookingdates": {
"checkin": "2026-02-12",
"checkout": "2026-02-15"
},
"additionalneeds": "Breakfast"
}
}
```
---
### Post-response Tests
| Test | Description |
| --- | --- |
| `Test_1` | Status code is `200` |
| `Test_2` | Response time is below `max_response_time` collection variable |
| `Test_3` | Response body is valid JSON with exactly 2 keys: `bookingid` and `booking` |
| `Test_4` | `bookingid` is present and is an integer; stored in `4457` collection variable |
| `Test_5` | `booking` object is present and contains all 6 expected fields |
| Additional | Each booking field is validated against the values stored in collection variables |
---
### Collection Variables Set
After a successful run, the following collection variables are populated:
- `4457` — ID of the newly created booking (used by subsequent requests in the workflow)
- `Eduardo`, `Steuber`, `255`, `false`, `2026-02-12`, `2026-02-15`, `Breakfast` — booking field values for downstream assertions
| Header Name | Header Value |
|---|---|
| Content-Type | application/json |
| User-Agent | PostmanRuntime/7.39.1 |
| Accept | */* |
| Cache-Control | no-cache |
| Postman-Token | 6f9878fa-7a11-47bf-b2ff-0932a6220992 |
| Host | restful-booker.herokuapp.com |
| Accept-Encoding | gzip, deflate, br |
| Connection | keep-alive |
| Content-Length | 215 |
{
"firstname": "Eduardo",
"lastname": "Steuber",
"totalprice": 255,
"depositpaid": false,
"bookingdates": {
"checkin": "2026-02-12",
"checkout": "2026-02-15"
},
"additionalneeds": "Breakfast"
}
| Header Name | Header Value |
|---|---|
| Content-Length | 204 |
| Content-Type | application/json; charset=utf-8 |
| Date | Mon, 19 Oct 2026 10:33:18 GMT |
| Etag | W/"cc-5M/dblHKKf8Gk3Mr7Pnm4ec6P6g" |
| Nel | {"report_to":"heroku-nel","response_headers":["Via"],"max_age":3600,"success_fraction":0.01,"failure_fraction":0.1} |
| Report-To | {"group":"heroku-nel","endpoints":[{"url":"https://nel.heroku.com/reports?s=Q7XEw7kaUvrmMd8MaaEk4LiWgJHgAQidNYJ77T0Y2Gs%3D\u0026sid=c46efe9b-d3d2-4a0c-8c76-bfafa16c5add\u0026ts=1792405998"}],"max_age":3600} |
| Reporting-Endpoints | heroku-nel="https://nel.heroku.com/reports?s=Q7XEw7kaUvrmMd8MaaEk4LiWgJHgAQidNYJ77T0Y2Gs%3D&sid=c46efe9b-d3d2-4a0c-8c76-bfafa16c5add&ts=1792405998" |
| Server | Heroku |
| Via | 1.1 heroku-router |
| X-Powered-By | Express |
{"bookingid":1245,"booking":{"firstname":"Eduardo","lastname":"Steuber","totalprice":255,"depositpaid":false,"bookingdates":{"checkin":"2026-02-12","checkout":"2026-02-15"},"additionalneeds":"Breakfast"}}
| Name | Passed | Failed | Skipped |
|---|---|---|---|
| Test_1. Status code is 200 | 1 | 0 | 0 |
| Test_2. Response time is below max_response_time | 1 | 0 | 0 |
| Test_3. Response body is JSON | 1 | 0 | 0 |
| Test_4. Response body contains 'bookingid' property, store it in a collection variable | 1 | 0 | 0 |
| Test_5. Response body contains 'booking' property | 1 | 0 | 0 |
| Test_6. Response body contains 'firstname' property | 1 | 0 | 0 |
| Test_7. Response body contains 'lastname' | 1 | 0 | 0 |
| Test_8. Response body contains 'totalprice' | 1 | 0 | 0 |
| Test_9. Response body contains 'depositpaid' | 1 | 0 | 0 |
| Test_10. Response body contains 'bookingdates' property | 1 | 0 | 0 |
| Test_11. 'bookingdates' property contains 'checkin' | 1 | 0 | 0 |
| Test_12. 'bookingdates' property contains 'checkout' | 1 | 0 | 0 |
| Test_13. 'checkout' is greaten than 'checkin' | 1 | 0 | 0 |
| Test_14. Response body contains 'additionalneeds' property | 1 | 0 | 0 |
| Total | 14 | 0 | 0 |
| Test Name | Assertion Error |
|---|
# Get Booking Ids
Retrieves a list of all booking IDs currently stored in the RESTful Booker system. In the context of the **Full CRUD Lifecycle** workflow, this request confirms that the booking created in the previous step is present and unique in the system.
---
### Workflow Context
| Property | Value |
| --- | --- |
| **Collection** | RESTful Booker |
| **Folder** | Workflow 1: Full CRUD Lifecycle |
| **Step** | 3 of Full CRUD Lifecycle |
**Role in workflow:** After creating a new booking, this step validates that it's discoverable via the list endpoint before its details are retrieved next. It checks that `1245` — the ID stored from the creation step — appears exactly once in the returned list.
---
### Request Details
| Property | Value |
| --- | --- |
| **Method** | `GET` |
| **URL** | `https://restful-booker.herokuapp.com/booking` |
| **Request Body** | None |
| **Authentication** | Not required |
---
### Response
**Status:** `200 OK`
Returns a JSON array of objects, each containing a single `bookingid` integer field:
``` json
[
{ "bookingid": 1 },
{ "bookingid": 2 },
{ "bookingid": 3 }
]
```
---
### Automated Test Validations
The following tests run automatically after the response is received:
| # | Test Name | What It Validates |
| --- | --- | --- |
| 1 | **Status code is 200** | The response returns HTTP `200 OK` |
| 2 | **Response time is below** **`1000`** | Response time (ms) is within the acceptable threshold defined by the collection variable |
| 3 | **Response is array of booking IDs** | The response body is a non-empty array where each item has a `bookingid` integer property |
| 4 | **Response contains recently created** **`1245`** | The list includes at least one entry matching the booking ID created earlier in the workflow |
| 5 | **Exactly 1 occurrence of** **`1245`** | The newly created booking ID appears exactly once — no duplicates |
---
### Variables
| Variable | Scope | Description |
| --- | --- | --- |
| `https://restful-booker.herokuapp.com` | Collection | Base URL of the RESTful Booker API |
| `1245` | Collection | ID of the booking created in Step 1 of the workflow; used to verify presence in the list |
| `1000` | Collection | Maximum acceptable response time in milliseconds for performance validation |
| Header Name | Header Value |
|---|---|
| User-Agent | PostmanRuntime/7.39.1 |
| Accept | */* |
| Cache-Control | no-cache |
| Postman-Token | 5cd058ae-c8f6-4101-a694-cb7f2e4429e4 |
| Host | restful-booker.herokuapp.com |
| Accept-Encoding | gzip, deflate, br |
| Connection | keep-alive |
| Header Name | Header Value |
|---|---|
| Content-Length | 15845 |
| Content-Type | application/json; charset=utf-8 |
| Date | Mon, 19 Oct 2026 10:33:18 GMT |
| Etag | W/"3de5-iFzv6egKtRkaFNuM829rzbFDg1c" |
| Nel | {"report_to":"heroku-nel","response_headers":["Via"],"max_age":3600,"success_fraction":0.01,"failure_fraction":0.1} |
| Report-To | {"group":"heroku-nel","endpoints":[{"url":"https://nel.heroku.com/reports?s=Q7XEw7kaUvrmMd8MaaEk4LiWgJHgAQidNYJ77T0Y2Gs%3D\u0026sid=c46efe9b-d3d2-4a0c-8c76-bfafa16c5add\u0026ts=1792405998"}],"max_age":3600} |
| Reporting-Endpoints | heroku-nel="https://nel.heroku.com/reports?s=Q7XEw7kaUvrmMd8MaaEk4LiWgJHgAQidNYJ77T0Y2Gs%3D&sid=c46efe9b-d3d2-4a0c-8c76-bfafa16c5add&ts=1792405998" |
| Server | Heroku |
| Via | 1.1 heroku-router |
| X-Powered-By | Express |
[{"bookingid":1},{"bookingid":2},{"bookingid":3},{"bookingid":4},{"bookingid":5},{"bookingid":6},{"bookingid":7},{"bookingid":8},{"bookingid":9},{"bookingid":10},{"bookingid":11},{"bookingid":12},{"bookingid":13},{"bookingid":14},{"bookingid":15},{"bookingid":16},{"bookingid":17},{"bookingid":18},{"bookingid":19},{"bookingid":20},{"bookingid":21},{"bookingid":22},{"bookingid":23},{"bookingid":24},{"bookingid":27},{"bookingid":28},{"bookingid":30},{"bookingid":31},{"bookingid":32},{"bookingid":34},{"bookingid":35},{"bookingid":36},{"bookingid":38},{"bookingid":39},{"bookingid":40},{"bookingid":41},{"bookingid":42},{"bookingid":43},{"bookingid":45},{"bookingid":46},{"bookingid":47},{"bookingid":48},{"bookingid":49},{"bookingid":51},{"bookingid":52},{"bookingid":53},{"bookingid":54},{"bookingid":55},{"bookingid":56},{"bookingid":57},{"bookingid":59},{"bookingid":60},{"bookingid":61},{"bookingid":62},{"bookingid":63},{"bookingid":64},{"bookingid":65},{"bookingid":67},{"bookingid":68},{"bookingid":69},{"bookingid":70},{"bookingid":72},{"bookingid":73},{"bookingid":74},{"bookingid":75},{"bookingid":78},{"bookingid":79},{"bookingid":80},{"bookingid":82},{"bookingid":83},{"bookingid":84},{"bookingid":85},{"bookingid":86},{"bookingid":88},{"bookingid":89},{"bookingid":90},{"bookingid":91},{"bookingid":93},{"bookingid":94},{"bookingid":96},{"bookingid":97},{"bookingid":98},{"bookingid":99},{"bookingid":100},{"bookingid":102},{"bookingid":103},{"bookingid":104},{"bookingid":105},{"bookingid":106},{"bookingid":107},{"bookingid":108},{"bookingid":110},{"bookingid":112},{"bookingid":113},{"bookingid":114},{"bookingid":115},{"bookingid":116},{"bookingid":117},{"bookingid":119},{"bookingid":120},{"bookingid":121},{"bookingid":122},{"bookingid":123},{"bookingid":125},{"bookingid":126},{"bookingid":127},{"bookingid":128},{"bookingid":130},{"bookingid":132},{"bookingid":133},{"bookingid":134},{"bookingid":135},{"bookingid":138},{"bookingid":139},{"bookingid":140},{"bookingid":141},{"bookingid":144},{"bookingid":145},{"bookingid":146},{"bookingid":147},{"bookingid":150},{"bookingid":151},{"bookingid":152},{"bookingid":153},{"bookingid":156},{"bookingid":157},{"bookingid":158},{"bookingid":160},{"bookingid":161},{"bookingid":163},{"bookingid":164},{"bookingid":166},{"bookingid":167},{"bookingid":168},{"bookingid":169},{"bookingid":171},{"bookingid":173},{"bookingid":175},{"bookingid":176},{"bookingid":177},{"bookingid":178},{"bookingid":180},{"bookingid":182},{"bookingid":183},{"bookingid":184},{"bookingid":185},{"bookingid":187},{"bookingid":188},{"bookingid":189},{"bookingid":190},{"bookingid":194},{"bookingid":195},{"bookingid":196},{"bookingid":197},{"bookingid":199},{"bookingid":200},{"bookingid":201},{"bookingid":203},{"bookingid":205},{"bookingid":206},{"bookingid":207},{"bookingid":209},{"bookingid":210},{"bookingid":211},{"bookingid":212},{"bookingid":215},{"bookingid":216},{"bookingid":217},{"bookingid":218},{"bookingid":221},{"bookingid":222},{"bookingid":223},{"bookingid":224},{"bookingid":225},{"bookingid":228},{"bookingid":229},{"bookingid":231},{"bookingid":232},{"bookingid":234},{"bookingid":236},{"bookingid":237},{"bookingid":238},{"bookingid":240},{"bookingid":241},{"bookingid":243},{"bookingid":245},{"bookingid":246},{"bookingid":247},{"bookingid":249},{"bookingid":251},{"bookingid":252},{"bookingid":253},{"bookingid":254},{"bookingid":256},{"bookingid":257},{"bookingid":258},{"bookingid":260},{"bookingid":261},{"bookingid":262},{"bookingid":263},{"bookingid":266},{"bookingid":268},{"bookingid":269},{"bookingid":270},{"bookingid":271},{"bookingid":272},{"bookingid":273},{"bookingid":275},{"bookingid":276},{"bookingid":277},{"bookingid":280},{"bookingid":281},{"bookingid":283},{"bookingid":284},{"bookingid":285},{"bookingid":287},{"bookingid":289},{"bookingid":290},{"bookingid":292},{"bookingid":294},{"bookingid":295},{"bookingid":296},{"bookingid":298},{"bookingid":299},{"bookingid":300},{"bookingid":302},{"bookingid":303},{"bookingid":304},{"bookingid":306},{"bookingid":307},{"bookingid":308},{"bookingid":309},{"bookingid":310},{"bookingid":311},{"bookingid":312},{"bookingid":314},{"bookingid":318},{"bookingid":319},{"bookingid":320},{"bookingid":321},{"bookingid":324},{"bookingid":325},{"bookingid":326},{"bookingid":328},{"bookingid":330},{"bookingid":331},{"bookingid":332},{"bookingid":333},{"bookingid":336},{"bookingid":337},{"bookingid":338},{"bookingid":339},{"bookingid":342},{"bookingid":343},{"bookingid":344},{"bookingid":346},{"bookingid":348},{"bookingid":349},{"bookingid":350},{"bookingid":351},{"bookingid":352},{"bookingid":353},{"bookingid":356},{"bookingid":358},{"bookingid":359},{"bookingid":360},{"bookingid":361},{"bookingid":362},{"bookingid":363},{"bookingid":364},{"bookingid":366},{"bookingid":368},{"bookingid":369},{"bookingid":370},{"bookingid":372},{"bookingid":374},{"bookingid":375},{"bookingid":376},{"bookingid":378},{"bookingid":379},{"bookingid":381},{"bookingid":382},{"bookingid":383},{"bookingid":385},{"bookingid":386},{"bookingid":387},{"bookingid":388},{"bookingid":389},{"bookingid":390},{"bookingid":393},{"bookingid":394},{"bookingid":395},{"bookingid":397},{"bookingid":398},{"bookingid":400},{"bookingid":401},{"bookingid":402},{"bookingid":403},{"bookingid":406},{"bookingid":408},{"bookingid":409},{"bookingid":410},{"bookingid":412},{"bookingid":414},{"bookingid":416},{"bookingid":417},{"bookingid":418},{"bookingid":421},{"bookingid":422},{"bookingid":423},{"bookingid":424},{"bookingid":427},{"bookingid":428},{"bookingid":429},{"bookingid":430},{"bookingid":431},{"bookingid":432},{"bookingid":435},{"bookingid":437},{"bookingid":438},{"bookingid":439},{"bookingid":441},{"bookingid":442},{"bookingid":443},{"bookingid":444},{"bookingid":446},{"bookingid":447},{"bookingid":449},{"bookingid":452},{"bookingid":453},{"bookingid":454},{"bookingid":455},{"bookingid":457},{"bookingid":458},{"bookingid":459},{"bookingid":460},{"bookingid":462},{"bookingid":464},{"bookingid":466},{"bookingid":467},{"bookingid":468},{"bookingid":469},{"bookingid":470},{"bookingid":472},{"bookingid":473},{"bookingid":474},{"bookingid":475},{"bookingid":478},{"bookingid":479},{"bookingid":481},{"bookingid":482},{"bookingid":483},{"bookingid":485},{"bookingid":486},{"bookingid":487},{"bookingid":489},{"bookingid":490},{"bookingid":492},{"bookingid":494},{"bookingid":495},{"bookingid":496},{"bookingid":497},{"bookingid":499},{"bookingid":500},{"bookingid":502},{"bookingid":503},{"bookingid":504},{"bookingid":507},{"bookingid":508},{"bookingid":510},{"bookingid":511},{"bookingid":513},{"bookingid":514},{"bookingid":516},{"bookingid":517},{"bookingid":519},{"bookingid":520},{"bookingid":522},{"bookingid":523},{"bookingid":525},{"bookingid":526},{"bookingid":528},{"bookingid":529},{"bookingid":531},{"bookingid":534},{"bookingid":535},{"bookingid":536},{"bookingid":537},{"bookingid":538},{"bookingid":539},{"bookingid":540},{"bookingid":544},{"bookingid":545},{"bookingid":546},{"bookingid":548},{"bookingid":549},{"bookingid":550},{"bookingid":552},{"bookingid":553},{"bookingid":554},{"bookingid":557},{"bookingid":558},{"bookingid":559},{"bookingid":560},{"bookingid":561},{"bookingid":562},{"bookingid":565},{"bookingid":566},{"bookingid":568},{"bookingid":569},{"bookingid":570},{"bookingid":571},{"bookingid":573},{"bookingid":574},{"bookingid":576},{"bookingid":578},{"bookingid":579},{"bookingid":580},{"bookingid":582},{"bookingid":584},{"bookingid":585},{"bookingid":586},{"bookingid":587},{"bookingid":588},{"bookingid":589},{"bookingid":592},{"bookingid":594},{"bookingid":595},{"bookingid":596},{"bookingid":597},{"bookingid":600},{"bookingid":601},{"bookingid":602},{"bookingid":604},{"bookingid":606},{"bookingid":607},{"bookingid":608},{"bookingid":610},{"bookingid":612},{"bookingid":613},{"bookingid":614},{"bookingid":616},{"bookingid":618},{"bookingid":619},{"bookingid":621},{"bookingid":622},{"bookingid":623},{"bookingid":624},{"bookingid":625},{"bookingid":627},{"bookingid":629},{"bookingid":631},{"bookingid":632},{"bookingid":633},{"bookingid":634},{"bookingid":636},{"bookingid":638},{"bookingid":639},{"bookingid":640},{"bookingid":642},{"bookingid":643},{"bookingid":645},{"bookingid":646},{"bookingid":647},{"bookingid":648},{"bookingid":651},{"bookingid":652},{"bookingid":654},{"bookingid":655},{"bookingid":656},{"bookingid":657},{"bookingid":658},{"bookingid":660},{"bookingid":661},{"bookingid":663},{"bookingid":664},{"bookingid":666},{"bookingid":667},{"bookingid":668},{"bookingid":669},{"bookingid":672},{"bookingid":673},{"bookingid":674},{"bookingid":675},{"bookingid":676},{"bookingid":677},{"bookingid":681},{"bookingid":682},{"bookingid":683},{"bookingid":684},{"bookingid":686},{"bookingid":688},{"bookingid":689},{"bookingid":690},{"bookingid":691},{"bookingid":692},{"bookingid":695},{"bookingid":696},{"bookingid":697},{"bookingid":698},{"bookingid":699},{"bookingid":702},{"bookingid":703},{"bookingid":704},{"bookingid":705},{"bookingid":708},{"bookingid":709},{"bookingid":710},{"bookingid":711},{"bookingid":713},{"bookingid":715},{"bookingid":716},{"bookingid":718},{"bookingid":719},{"bookingid":721},{"bookingid":722},{"bookingid":723},{"bookingid":724},{"bookingid":725},{"bookingid":726},{"bookingid":730},{"bookingid":731},{"bookingid":732},{"bookingid":733},{"bookingid":734},{"bookingid":736},{"bookingid":737},{"bookingid":738},{"bookingid":739},{"bookingid":741},{"bookingid":743},{"bookingid":744},{"bookingid":747},{"bookingid":749},{"bookingid":750},{"bookingid":751},{"bookingid":753},{"bookingid":755},{"bookingid":756},{"bookingid":757},{"bookingid":758},{"bookingid":761},{"bookingid":762},{"bookingid":763},{"bookingid":764},{"bookingid":765},{"bookingid":768},{"bookingid":770},{"bookingid":771},{"bookingid":772},{"bookingid":773},{"bookingid":776},{"bookingid":777},{"bookingid":778},{"bookingid":779},{"bookingid":780},{"bookingid":783},{"bookingid":784},{"bookingid":785},{"bookingid":786},{"bookingid":789},{"bookingid":790},{"bookingid":791},{"bookingid":792},{"bookingid":793},{"bookingid":796},{"bookingid":797},{"bookingid":798},{"bookingid":799},{"bookingid":800},{"bookingid":803},{"bookingid":804},{"bookingid":805},{"bookingid":806},{"bookingid":807},{"bookingid":808},{"bookingid":809},{"bookingid":810},{"bookingid":812},{"bookingid":815},{"bookingid":816},{"bookingid":817},{"bookingid":819},{"bookingid":820},{"bookingid":821},{"bookingid":822},{"bookingid":824},{"bookingid":825},{"bookingid":826},{"bookingid":829},{"bookingid":830},{"bookingid":831},{"bookingid":832},{"bookingid":834},{"bookingid":835},{"bookingid":837},{"bookingid":839},{"bookingid":840},{"bookingid":842},{"bookingid":843},{"bookingid":844},{"bookingid":845},{"bookingid":846},{"bookingid":849},{"bookingid":850},{"bookingid":852},{"bookingid":853},{"bookingid":854},{"bookingid":855},{"bookingid":856},{"bookingid":857},{"bookingid":861},{"bookingid":862},{"bookingid":863},{"bookingid":864},{"bookingid":865},{"bookingid":868},{"bookingid":869},{"bookingid":870},{"bookingid":871},{"bookingid":872},{"bookingid":875},{"bookingid":876},{"bookingid":877},{"bookingid":878},{"bookingid":881},{"bookingid":882},{"bookingid":883},{"bookingid":884},{"bookingid":887},{"bookingid":888},{"bookingid":890},{"bookingid":891},{"bookingid":892},{"bookingid":893},{"bookingid":894},{"bookingid":897},{"bookingid":898},{"bookingid":899},{"bookingid":901},{"bookingid":903},{"bookingid":904},{"bookingid":905},{"bookingid":906},{"bookingid":907},{"bookingid":909},{"bookingid":911},{"bookingid":912},{"bookingid":914},{"bookingid":915},{"bookingid":916},{"bookingid":917},{"bookingid":919},{"bookingid":920},{"bookingid":922},{"bookingid":924},{"bookingid":925},{"bookingid":927},{"bookingid":928},{"bookingid":929},{"bookingid":930},{"bookingid":931},{"bookingid":934},{"bookingid":935},{"bookingid":936},{"bookingid":937},{"bookingid":940},{"bookingid":941},{"bookingid":942},{"bookingid":943},{"bookingid":944},{"bookingid":945},{"bookingid":948},{"bookingid":949},{"bookingid":950},{"bookingid":951},{"bookingid":954},{"bookingid":955},{"bookingid":956},{"bookingid":957},{"bookingid":959},{"bookingid":962},{"bookingid":963},{"bookingid":964},{"bookingid":965},{"bookingid":968},{"bookingid":969},{"bookingid":970},{"bookingid":971},{"bookingid":974},{"bookingid":975},{"bookingid":976},{"bookingid":977},{"bookingid":978},{"bookingid":981},{"bookingid":982},{"bookingid":983},{"bookingid":984},{"bookingid":985},{"bookingid":986},{"bookingid":990},{"bookingid":991},{"bookingid":992},{"bookingid":994},{"bookingid":996},{"bookingid":997},{"bookingid":998},{"bookingid":999},{"bookingid":1000},{"bookingid":1002},{"bookingid":1004},{"bookingid":1005},{"bookingid":1006},{"bookingid":1007},{"bookingid":1009},{"bookingid":1011},{"bookingid":1012},{"bookingid":1014},{"bookingid":1015},{"bookingid":1018},{"bookingid":1019},{"bookingid":1020},{"bookingid":1022},{"bookingid":1024},{"bookingid":1026},{"bookingid":1027},{"bookingid":1029},{"bookingid":1030},{"bookingid":1031},{"bookingid":1032},{"bookingid":1034},{"bookingid":1036},{"bookingid":1037},{"bookingid":1038},{"bookingid":1040},{"bookingid":1041},{"bookingid":1044},{"bookingid":1045},{"bookingid":1046},{"bookingid":1047},{"bookingid":1050},{"bookingid":1051},{"bookingid":1052},{"bookingid":1053},{"bookingid":1056},{"bookingid":1057},{"bookingid":1058},{"bookingid":1059},{"bookingid":1062},{"bookingid":1063},{"bookingid":1064},{"bookingid":1066},{"bookingid":1067},{"bookingid":1068},{"bookingid":1069},{"bookingid":1070},{"bookingid":1074},{"bookingid":1076},{"bookingid":1077},{"bookingid":1079},{"bookingid":1081},{"bookingid":1082},{"bookingid":1083},{"bookingid":1084},{"bookingid":1085},{"bookingid":1088},{"bookingid":1089},{"bookingid":1090},{"bookingid":1091},{"bookingid":1092},{"bookingid":1094},{"bookingid":1096},{"bookingid":1097},{"bookingid":1098},{"bookingid":1100},{"bookingid":1101},{"bookingid":1103},{"bookingid":1104},{"bookingid":1105},{"bookingid":1106},{"bookingid":1108},{"bookingid":1110},{"bookingid":1111},{"bookingid":1112},{"bookingid":1113},{"bookingid":1114},{"bookingid":1116},{"bookingid":1118},{"bookingid":1119},{"bookingid":1120},{"bookingid":1123},{"bookingid":1124},{"bookingid":1125},{"bookingid":1127},{"bookingid":1129},{"bookingid":1130},{"bookingid":1131},{"bookingid":1133},{"bookingid":1135},{"bookingid":1136},{"bookingid":1137},{"bookingid":1139},{"bookingid":1141},{"bookingid":1142},{"bookingid":1143},{"bookingid":1145},{"bookingid":1146},{"bookingid":1148},{"bookingid":1149},{"bookingid":1150},{"bookingid":1151},{"bookingid":1152},{"bookingid":1154},{"bookingid":1155},{"bookingid":1156},{"bookingid":1160},{"bookingid":1161},{"bookingid":1162},{"bookingid":1164},{"bookingid":1166},{"bookingid":1167},{"bookingid":1168},{"bookingid":1169},{"bookingid":1170},{"bookingid":1171},{"bookingid":1173},{"bookingid":1175},{"bookingid":1176},{"bookingid":1177},{"bookingid":1179},{"bookingid":1181},{"bookingid":1182},{"bookingid":1184},{"bookingid":1185},{"bookingid":1186},{"bookingid":1188},{"bookingid":1190},{"bookingid":1191},{"bookingid":1192},{"bookingid":1194},{"bookingid":1195},{"bookingid":1196},{"bookingid":1197},{"bookingid":1199},{"bookingid":1200},{"bookingid":1202},{"bookingid":1204},{"bookingid":1205},{"bookingid":1207},{"bookingid":1209},{"bookingid":1210},{"bookingid":1211},{"bookingid":1213},{"bookingid":1216},{"bookingid":1217},{"bookingid":1218},{"bookingid":1220},{"bookingid":1222},{"bookingid":1223},{"bookingid":1224},{"bookingid":1226},{"bookingid":1228},{"bookingid":1229},{"bookingid":1230},{"bookingid":1232},{"bookingid":1233},{"bookingid":1234},{"bookingid":1236},{"bookingid":1237},{"bookingid":1239},{"bookingid":1240},{"bookingid":1241},{"bookingid":1243},{"bookingid":1245},{"bookingid":1247},{"bookingid":1248}]
| Name | Passed | Failed | Skipped |
|---|---|---|---|
| Test_1. Status code is 200 | 1 | 0 | 0 |
| Test_2. Response time is below max_response_time | 1 | 0 | 0 |
| Test_3. Response is array of booking IDs | 1 | 0 | 0 |
| Test_4. Response contains bookingid equal to recently created bookingid | 1 | 0 | 0 |
| Test_5. Response contains exactly 1 occurrence of newly created bookingid | 1 | 0 | 0 |
| Total | 5 | 0 | 0 |
| Test Name | Assertion Error |
|---|
## Get Booking by ID
Retrieves a specific booking record by a valid booking ID from the RESTful Booker API. This is a **positive (happy-path) test** that verifies the API returns the correct booking details when provided with an existing, valid `bookingid`. This request is part of **Workflow 1: Full CRUD Lifecycle** (integration workflow).
---
### Prerequisites
The following **collection variables** must be set before running this request:
| Variable | Description |
| --- | --- |
| `bookingid` | A valid booking ID to retrieve |
| `firstname` | Expected first name on the booking |
| `lastname` | Expected last name on the booking |
| `totalprice` | Expected total price of the booking |
| `depositpaid` | Expected deposit paid status (`true`/`false`) |
| `checkin` | Expected check-in date |
| `checkout` | Expected check-out date |
| `additionalneeds` | Expected additional needs/notes on the booking |
| `max_response_time` | Maximum acceptable response time (in ms) |
> The pre-request script asserts that `bookingid` is defined as a collection variable before the request is sent.
---
### Expected Response
- **Status**: `200 OK`
- **Content-Type**: `application/json`
- **Body**: A JSON object with exactly **6 fields**:
``` json
{
"firstname": "string",
"lastname": "string",
"totalprice": "number",
"depositpaid": "boolean",
"bookingdates": {
"checkin": "string",
"checkout": "string"
},
"additionalneeds": "string"
}
```
---
### Test Coverage
- ✅ **Status code** is `200`
- ✅ **Response time** is below the `max_response_time` collection variable
- ✅ **Response body** is valid JSON with exactly 6 fields (`firstname`, `lastname`, `totalprice`, `depositpaid`, `bookingdates`, `additionalneeds`)
- ✅ Each field is validated for **correct type and value** against the corresponding collection variables
| Header Name | Header Value |
|---|---|
| User-Agent | PostmanRuntime/7.39.1 |
| Accept | */* |
| Cache-Control | no-cache |
| Postman-Token | c713bb17-107c-4a07-bfba-998fda9ffba0 |
| Host | restful-booker.herokuapp.com |
| Accept-Encoding | gzip, deflate, br |
| Connection | keep-alive |
| Header Name | Header Value |
|---|---|
| Content-Length | 175 |
| Content-Type | application/json; charset=utf-8 |
| Date | Mon, 19 Oct 2026 10:33:18 GMT |
| Etag | W/"af-XsadmdHYl7zKPQZ/Omt/y5/uLJM" |
| Nel | {"report_to":"heroku-nel","response_headers":["Via"],"max_age":3600,"success_fraction":0.01,"failure_fraction":0.1} |
| Report-To | {"group":"heroku-nel","endpoints":[{"url":"https://nel.heroku.com/reports?s=Q7XEw7kaUvrmMd8MaaEk4LiWgJHgAQidNYJ77T0Y2Gs%3D\u0026sid=c46efe9b-d3d2-4a0c-8c76-bfafa16c5add\u0026ts=1792405998"}],"max_age":3600} |
| Reporting-Endpoints | heroku-nel="https://nel.heroku.com/reports?s=Q7XEw7kaUvrmMd8MaaEk4LiWgJHgAQidNYJ77T0Y2Gs%3D&sid=c46efe9b-d3d2-4a0c-8c76-bfafa16c5add&ts=1792405998" |
| Server | Heroku |
| Via | 1.1 heroku-router |
| X-Powered-By | Express |
{"firstname":"Eduardo","lastname":"Steuber","totalprice":255,"depositpaid":false,"bookingdates":{"checkin":"2026-02-12","checkout":"2026-02-15"},"additionalneeds":"Breakfast"}
| Name | Passed | Failed | Skipped |
|---|---|---|---|
| Prerequisites: booking_id must be set as collection variable | 1 | 0 | 0 |
| Test_1. Status code is 200 | 1 | 0 | 0 |
| Test_2. Response time is below max_response_time | 1 | 0 | 0 |
| Test_3. Response body is JSON | 1 | 0 | 0 |
| Test_4. Response body contains 'firstname' property | 1 | 0 | 0 |
| Test_5. Response body contains 'lastname' property | 1 | 0 | 0 |
| Test_6. Response body contains 'totalprice' property | 1 | 0 | 0 |
| Test_7. Response body contains 'depositpaid' property | 1 | 0 | 0 |
| Test_8. Response body contains 'bookingdates' property | 1 | 0 | 0 |
| Test_9. 'bookingdates' property contains 'checkin' | 1 | 0 | 0 |
| Test_10. 'bookingdates' property contains 'checkout' | 1 | 0 | 0 |
| Test_11. 'additionalneeds' property contains 'Breakfast' | 1 | 0 | 0 |
| Total | 12 | 0 | 0 |
| Test Name | Assertion Error |
|---|
## Update Booking
Sends a full `PUT` request to replace an existing booking record with updated field values. The request updates the **lastname** and **checkout date** while preserving all other booking fields. On success, the API returns the full updated booking object.
---
## Authentication / Authorization
Authentication is handled via a session token passed as a cookie:
| Header | Value | Description |
| --- | --- | --- |
| `Cookie` | `token=88217868bf5995a` | Auth token obtained from the `CreateToken` endpoint. Used as an alternative to the `Authorization` header. |
The `88217868bf5995a` value is expected to be set as a collection variable before this request runs.
---
## Path Variables
| Variable | Description |
| --- | --- |
| `https://restful-booker.herokuapp.com` | Base URL of the RESTful Booker API (e.g. `https://restful-booker.herokuapp.com`) |
| `1245` | The unique ID of the booking to update. Must be set as a collection variable prior to execution. |
---
## Request Headers
| Header | Value | Description |
| --- | --- | --- |
| `Content-Type` | `application/json` | Indicates the request body is JSON. |
| `Cookie` | `token=88217868bf5995a` | Authorization token (see Auth section above). |
---
## Request Body Fields
The body is sent as raw JSON. Fields are either **preserved** (sent with their original values) or **updated** (sent with new values generated in the pre-request script).
| Field | Variable | Type | Status | Notes |
| --- | --- | --- | --- | --- |
| `firstname` | `Eduardo` | String | ✅ Preserved | Original first name from collection variables. |
| `lastname` | `Schmeler` | String | 🔄 Updated | Randomly generated in the pre-request script. |
| `totalprice` | `255` | Integer | ✅ Preserved | Original total price from collection variables. |
| `depositpaid` | `false` | Boolean | ✅ Preserved | Original deposit status from collection variables. |
| `bookingdates.checkin` | `2026-02-12` | String | ✅ Preserved | Original check-in date (`YYYY-MM-DD` format). |
| `bookingdates.checkout` | `2026-02-16` | String | 🔄 Updated | Set to `2026-02-16` in the pre-request script. |
| `additionalneeds` | `Breakfast` | String | ✅ Preserved | Original additional needs from collection variables. |
---
## Pre-request Script Behavior
The pre-request script runs three steps before the request is sent:
**Step 1 — Validate prerequisites**
Asserts that both `bookingid` and `token` collection variables are defined and not `undefined`. This acts as a guard to prevent the request from running without the required context (e.g. if a prior request in the collection failed to set these values).
**Step 2 — Generate updated lastname**
Uses `Kling` to generate a random last name and stores it in the `updated_lastname` collection variable. This value is then used in the request body.
**Step 3 — Set updated checkout date**
Hardcodes the checkout date to `2026-02-16` and stores it in the `updated_checkout` collection variable. This value is then used in the `bookingdates.checkout` field of the request body.
---
## Post-response Tests
11 tests are executed after the response is received:
| Test | What It Validates |
| --- | --- |
| Test_1 | HTTP status code is `200 OK`. |
| Test_2 | Response time is below the `max_response_time` collection variable (performance threshold). |
| Test_3 | Response body is valid JSON, is an object, has exactly **6 keys**: `firstname`, `lastname`, `totalprice`, `depositpaid`, `bookingdates`, `additionalneeds`. |
| Test_4 | `firstname` is a string and matches the preserved `Eduardo` collection variable. |
| Test_5 | `lastname` is a string, matches `Schmeler`, and is **different** from the original `Steuber`. |
| Test_6 | `totalprice` is an integer and matches the preserved `255` collection variable. |
| Test_7 | `depositpaid` is a boolean and matches the preserved `false` collection variable. |
| Test_8 | `bookingdates` is an object with exactly **2 keys**: `checkin` and `checkout`. |
| Test_9 | `checkin` is a string in `YYYY-MM-DD` format and matches the preserved `2026-02-12` collection variable. |
| Test_10 | `checkout` is a string in `YYYY-MM-DD` format and matches the updated value `2026-02-16`. |
| Test_11 | `additionalneeds` is a non-empty string and matches the preserved `Breakfast` collection variable. |
| Header Name | Header Value |
|---|---|
| Content-Type | application/json |
| Cookie | token=88217868bf5995a |
| User-Agent | PostmanRuntime/7.39.1 |
| Accept | */* |
| Cache-Control | no-cache |
| Postman-Token | c16b3b9c-b31e-4da1-ac90-d4661e43afb0 |
| Host | restful-booker.herokuapp.com |
| Accept-Encoding | gzip, deflate, br |
| Connection | keep-alive |
| Content-Length | 248 |
{
"firstname": "Eduardo",
"lastname": "Schmeler",
"totalprice": 255,
"depositpaid": false,
"bookingdates": {
"checkin": "2026-02-12",
"checkout": "2026-02-16"
},
"additionalneeds": "Breakfast"
}
| Header Name | Header Value |
|---|---|
| Content-Length | 176 |
| Content-Type | application/json; charset=utf-8 |
| Date | Mon, 19 Oct 2026 10:33:19 GMT |
| Etag | W/"b0-sNsTXNgUBp/HtYK9LALNzlaRfXo" |
| Nel | {"report_to":"heroku-nel","response_headers":["Via"],"max_age":3600,"success_fraction":0.01,"failure_fraction":0.1} |
| Report-To | {"group":"heroku-nel","endpoints":[{"url":"https://nel.heroku.com/reports?s=%2BWoe63J73vPt0PtbwmYZQTlNZt8wc2tnPjYqfHoCuH0%3D\u0026sid=c46efe9b-d3d2-4a0c-8c76-bfafa16c5add\u0026ts=1792405999"}],"max_age":3600} |
| Reporting-Endpoints | heroku-nel="https://nel.heroku.com/reports?s=%2BWoe63J73vPt0PtbwmYZQTlNZt8wc2tnPjYqfHoCuH0%3D&sid=c46efe9b-d3d2-4a0c-8c76-bfafa16c5add&ts=1792405999" |
| Server | Heroku |
| Via | 1.1 heroku-router |
| X-Powered-By | Express |
{"firstname":"Eduardo","lastname":"Schmeler","totalprice":255,"depositpaid":false,"bookingdates":{"checkin":"2026-02-12","checkout":"2026-02-16"},"additionalneeds":"Breakfast"}
| Name | Passed | Failed | Skipped |
|---|---|---|---|
| Prerequisites: booking_id and token are set | 1 | 0 | 0 |
| Test_1. Status code is 200 | 1 | 0 | 0 |
| Test_2. Response time is below max_response_time | 1 | 0 | 0 |
| Test_3. Response body is JSON | 1 | 0 | 0 |
| Test_4. Response body contains 'firstname' with preserved value | 1 | 0 | 0 |
| Test_5. Response body contains 'lastname' with updated value | 1 | 0 | 0 |
| Test_6. Response body contains 'totalprice' with preserved value | 1 | 0 | 0 |
| Test_7. Response body contains 'depositpaid' with preserved value | 1 | 0 | 0 |
| Test_8. Response body contains 'bookingdates' property | 1 | 0 | 0 |
| Test_9. 'bookingdates' property contains 'checkin' with preserved value | 1 | 0 | 0 |
| Test_10. 'bookingdates' property contains 'checkout' with updated value | 1 | 0 | 0 |
| Test_11. Response body contains 'additionalneeds' with preserved value | 1 | 0 | 0 |
| Total | 12 | 0 | 0 |
| Test Name | Assertion Error |
|---|
## Get Booking by ID
Retrieves a specific booking record by a **valid booking ID** from the RESTful Booker API. This request is **Step 6** in the **Workflow 1: Full CRUD Lifecycle** integration flow and serves as a **post-update verification** step — it confirms that the partial update applied in the previous step (PUT) was persisted correctly, while all non-updated fields remain unchanged.
---
## Endpoint
```
GET https://restful-booker.herokuapp.com/booking/1245
```
---
## Variables Used
| Variable | Scope | Description |
| --- | --- | --- |
| `https://restful-booker.herokuapp.com` | Collection | Base URL of the RESTful Booker API |
| `1245` | Collection | ID of the booking to retrieve (set by a prior create step) |
---
## Prerequisites
- `bookingid` collection variable must be set (validated in the pre-request script).
- The booking must have been previously **updated** (PUT) so that `updated_lastname` and `updated_checkout` collection variables reflect the new values.
---
## Expected Response
**Status:** `200 OK`
**Content-Type:** `application/json`
``` json
{
"firstname": "string",
"lastname": "string",
"totalprice": 0,
"depositpaid": true,
"bookingdates": {
"checkin": "YYYY-MM-DD",
"checkout": "YYYY-MM-DD"
},
"additionalneeds": "string"
}
```
---
## Test Coverage
| Test | Description |
| --- | --- |
| **Test_1** | Status code is `200` |
| **Test_2** | Response time is below `max_response_time` collection variable |
| **Test_3** | Response body is a JSON object with exactly 6 keys: `firstname`, `lastname`, `totalprice`, `depositpaid`, `bookingdates`, `additionalneeds` |
| **Test_4** | `firstname` is a string matching the **preserved** value from `firstname` collection variable |
| **Test_5** | `lastname` is a string matching the **updated** value from `updated_lastname` collection variable |
| **Test_6** | `totalprice` is an integer matching the **preserved** value from `totalprice` collection variable |
| **Test_7** | `depositpaid` is a boolean matching the **preserved** value from `depositpaid` collection variable |
| **Test_8** | `bookingdates` is an object with exactly 2 keys: `checkin` and `checkout` |
| **Test_9** | `bookingdates.checkin` is a non-empty string in `YYYY-MM-DD` format matching the **preserved** `checkin` value |
| **Test_10** | `bookingdates.checkout` is a non-empty string in `YYYY-MM-DD` format matching the **updated** `updated_checkout` value |
| **Test_11** | `additionalneeds` is a non-empty string matching the **preserved** value from `additionalneeds` collection variable |
---
## Notes
- This request has **no authentication** — the GET endpoint is publicly accessible.
- Fields marked **Preserved** should be unchanged from the original booking creation.
- Fields marked **Updated** should reflect the values set by the preceding PUT request.
| Header Name | Header Value |
|---|---|
| User-Agent | PostmanRuntime/7.39.1 |
| Accept | */* |
| Cache-Control | no-cache |
| Postman-Token | c719f4a6-c7db-4ad9-8314-b582108ffcd2 |
| Host | restful-booker.herokuapp.com |
| Accept-Encoding | gzip, deflate, br |
| Connection | keep-alive |
| Header Name | Header Value |
|---|---|
| Content-Length | 176 |
| Content-Type | application/json; charset=utf-8 |
| Date | Mon, 19 Oct 2026 10:33:19 GMT |
| Etag | W/"b0-sNsTXNgUBp/HtYK9LALNzlaRfXo" |
| Nel | {"report_to":"heroku-nel","response_headers":["Via"],"max_age":3600,"success_fraction":0.01,"failure_fraction":0.1} |
| Report-To | {"group":"heroku-nel","endpoints":[{"url":"https://nel.heroku.com/reports?s=%2BWoe63J73vPt0PtbwmYZQTlNZt8wc2tnPjYqfHoCuH0%3D\u0026sid=c46efe9b-d3d2-4a0c-8c76-bfafa16c5add\u0026ts=1792405999"}],"max_age":3600} |
| Reporting-Endpoints | heroku-nel="https://nel.heroku.com/reports?s=%2BWoe63J73vPt0PtbwmYZQTlNZt8wc2tnPjYqfHoCuH0%3D&sid=c46efe9b-d3d2-4a0c-8c76-bfafa16c5add&ts=1792405999" |
| Server | Heroku |
| Via | 1.1 heroku-router |
| X-Powered-By | Express |
{"firstname":"Eduardo","lastname":"Schmeler","totalprice":255,"depositpaid":false,"bookingdates":{"checkin":"2026-02-12","checkout":"2026-02-16"},"additionalneeds":"Breakfast"}
| Name | Passed | Failed | Skipped |
|---|---|---|---|
| Prerequisites: booking_id must be set as collection variable | 1 | 0 | 0 |
| Test_1. Status code is 200 | 1 | 0 | 0 |
| Test_2. Response time is below max_response_time | 1 | 0 | 0 |
| Test_3. Response body is JSON | 1 | 0 | 0 |
| Test_4. Response body contains 'firstname' property with preserved value | 1 | 0 | 0 |
| Test_5. Response body contains 'lastname' property with updated value | 1 | 0 | 0 |
| Test_6. Response body contains 'totalprice' property with preserved value | 1 | 0 | 0 |
| Test_7. Response body contains 'depositpaid' property with preserved value | 1 | 0 | 0 |
| Test_8. Response body contains 'bookingdates' property | 1 | 0 | 0 |
| Test_9. 'bookingdates' property contains 'checkin' with preserved value | 1 | 0 | 0 |
| Test_10. 'bookingdates' property contains 'checkout' with updated value | 1 | 0 | 0 |
| Test_11. Response body contains 'additionalneeds' with preserved valuee | 1 | 0 | 0 |
| Total | 12 | 0 | 0 |
| Test Name | Assertion Error |
|---|
## Partial Update Booking
Partially updates an existing booking by modifying **only** the `firstname` field, while verifying that all other fields remain unchanged. This is a **positive/happy-path** test for the `PATCH /booking/:id` endpoint.
---
## Endpoint
| Method | URL |
| --- | --- |
| `PATCH` | `https://restful-booker.herokuapp.com/booking/1245` |
---
## Authentication
Token-based authentication via the `Cookie` header. A valid session token must be stored in the `token` collection variable before this request runs.
```
Cookie: token=88217868bf5995a
```
---
## Request Headers
| Header | Value |
| --- | --- |
| `Content-Type` | `application/json` |
| `Cookie` | `token=88217868bf5995a` |
---
## Request Body
**Body type:** raw JSON
Only the `firstname` field is sent in the request body. All other booking fields are intentionally omitted to verify partial update behavior.
``` json
{
"firstname": "Orville"
}
```
| Field | Variable | Description |
| --- | --- | --- |
| `firstname` | `Orville` | Randomly generated new first name (set in pre-request script) |
---
## Pre-request Setup
The pre-request script performs the following steps before the request is sent:
1. **Validates prerequisites** — Asserts that both `bookingid` and `token` collection variables are set. The request will not proceed if either is missing.
2. **Generates a new random** **`firstname`** — Uses `Fredy` to produce a new value and stores it in the `partial_updated_firstname` collection variable, which is then used in the request body.
---
## Test Assertions
| Test | Description |
| --- | --- |
| **Test_1** | Status code is `200` |
| **Test_2** | Response time is below `1000` |
| **Test_3** | Response body is JSON with exactly 6 keys: `firstname`, `lastname`, `totalprice`, `depositpaid`, `bookingdates`, `additionalneeds` |
| **Test_4** | `firstname` is updated to the new value stored in `partial_updated_firstname` |
| **Test_5+** | All other fields are **preserved** from their previous values stored in collection variables |
---
## Fields: Updated vs. Preserved
| Field | Status | Source Variable |
| --- | --- | --- |
| `firstname` | ✅ **Updated** | `Orville` |
| `lastname` | 🔒 Preserved | `Schmeler` |
| `totalprice` | 🔒 Preserved | `255` |
| `depositpaid` | 🔒 Preserved | `false` |
| `checkin` | 🔒 Preserved | `2026-02-12` |
| `checkout` | 🔒 Preserved | `2026-02-16` |
| `additionalneeds` | 🔒 Preserved | `Breakfast` |
---
## Notes
- This request is part of **Workflow 1: Full CRUD Lifecycle** inside the **Integration workflows** folder.
- The `PATCH` method is used (not `PUT`), so only the fields included in the body are updated on the server.
- The test suite validates both the updated field and all preserved fields to ensure no unintended side effects occur.
| Header Name | Header Value |
|---|---|
| Content-Type | application/json |
| Cookie | token=88217868bf5995a |
| User-Agent | PostmanRuntime/7.39.1 |
| Accept | */* |
| Cache-Control | no-cache |
| Postman-Token | a80ca9fa-74b9-4623-b3e0-a243d9fe0cef |
| Host | restful-booker.herokuapp.com |
| Accept-Encoding | gzip, deflate, br |
| Connection | keep-alive |
| Content-Length | 33 |
{
"firstname" : "Orville"
}
| Header Name | Header Value |
|---|---|
| Content-Length | 176 |
| Content-Type | application/json; charset=utf-8 |
| Date | Mon, 19 Oct 2026 10:33:19 GMT |
| Etag | W/"b0-1iizwpwIntUjJxsMWLnTCaCNDPE" |
| Nel | {"report_to":"heroku-nel","response_headers":["Via"],"max_age":3600,"success_fraction":0.01,"failure_fraction":0.1} |
| Report-To | {"group":"heroku-nel","endpoints":[{"url":"https://nel.heroku.com/reports?s=%2BWoe63J73vPt0PtbwmYZQTlNZt8wc2tnPjYqfHoCuH0%3D\u0026sid=c46efe9b-d3d2-4a0c-8c76-bfafa16c5add\u0026ts=1792405999"}],"max_age":3600} |
| Reporting-Endpoints | heroku-nel="https://nel.heroku.com/reports?s=%2BWoe63J73vPt0PtbwmYZQTlNZt8wc2tnPjYqfHoCuH0%3D&sid=c46efe9b-d3d2-4a0c-8c76-bfafa16c5add&ts=1792405999" |
| Server | Heroku |
| Via | 1.1 heroku-router |
| X-Powered-By | Express |
{"firstname":"Orville","lastname":"Schmeler","totalprice":255,"depositpaid":false,"bookingdates":{"checkin":"2026-02-12","checkout":"2026-02-16"},"additionalneeds":"Breakfast"}
| Name | Passed | Failed | Skipped |
|---|---|---|---|
| Prerequisites: booking_id and token are set | 1 | 0 | 0 |
| Test_1. Status code is 200 | 1 | 0 | 0 |
| Test_2. Response time is below max_response_time | 1 | 0 | 0 |
| Test_3. Response body is JSON | 1 | 0 | 0 |
| Test_4. Response body contains 'firstname' with updated value | 1 | 0 | 0 |
| Test_5. Response body contains 'lastname' with preserved value | 1 | 0 | 0 |
| Test_6. Response body contains 'totalprice' with preserved value | 1 | 0 | 0 |
| Test_7. Response body contains 'depositpaid' with preserved value | 1 | 0 | 0 |
| Test_8. Response body contains 'bookingdates' property | 1 | 0 | 0 |
| Test_9. 'bookingdates' property contains 'checkin' with preserved value | 1 | 0 | 0 |
| Test_10. 'bookingdates' property contains 'checkout' with preserved value | 1 | 0 | 0 |
| Test_11. Response body contains 'additionalneeds' with preserved value | 1 | 0 | 0 |
| Total | 12 | 0 | 0 |
| Test Name | Assertion Error |
|---|
## Get Booking by ID
Retrieves the details of an existing booking using a valid booking ID. This request is used to verify the state of a booking after a partial update — confirming that updated fields reflect new values while preserved fields remain unchanged.
---
## HTTP Method & URL
```
GET https://restful-booker.herokuapp.com/booking/1245
```
**Path Variable:**
| Variable | Description |
| --- | --- |
| `bookingid` | The unique numeric ID of the booking to retrieve. Appended directly to the URL path. |
---
## Variables Used
| Variable | Scope | Description |
| --- | --- | --- |
| `https://restful-booker.herokuapp.com` | Collection | Base URL of the RESTful Booker API (e.g., `https://restful-booker.herokuapp.com`) |
| `1245` | Collection | The ID of the booking to fetch. Must be set before this request is executed. |
---
## Pre-request Script Behavior
Before the request is sent, the pre-request script validates that the `bookingid` collection variable is defined. If it is not set, the test will fail with the message:
> **Prerequisites: booking_id must be set as collection variable**
This acts as a guard to prevent the request from running without a valid booking ID in scope.
---
## Expected Response
**Status:** `200 OK`
**Content-Type:** `application/json`
The response body is a JSON object with exactly **6 top-level keys**:
``` json
{
"firstname": "string",
"lastname": "string",
"totalprice": 0,
"depositpaid": true,
"bookingdates": {
"checkin": "YYYY-MM-DD",
"checkout": "YYYY-MM-DD"
},
"additionalneeds": "string"
}
```
| Field | Type | Description |
| --- | --- | --- |
| `firstname` | `string` | First name of the guest (partially updated value) |
| `lastname` | `string` | Last name of the guest (preserved value) |
| `totalprice` | `integer` | Total price of the booking (preserved value) |
| `depositpaid` | `boolean` | Whether a deposit has been paid (preserved value) |
| `bookingdates` | `object` | Object containing check-in and check-out dates |
| `bookingdates.checkin` | `string` | Check-in date in `YYYY-MM-DD` format (preserved value) |
| `bookingdates.checkout` | `string` | Check-out date in `YYYY-MM-DD` format (preserved value) |
| `additionalneeds` | `string` | Any additional requirements for the booking (preserved value) |
---
## Test Coverage
This request includes **11 automated tests**:
| Test | Description |
| --- | --- |
| **Test_1** | Status code is `200` |
| **Test_2** | Response time is below the `max_response_time` collection variable |
| **Test_3** | Response body is valid JSON, is an object, and contains exactly 6 keys: `firstname`, `lastname`, `totalprice`, `depositpaid`, `bookingdates`, `additionalneeds` |
| **Test_4** | `firstname` is a string and equals the partially updated value (`partial_updated_firstname`) |
| **Test_5** | `lastname` is a string and equals the preserved value (`updated_lastname`) |
| **Test_6** | `totalprice` is an integer and equals the preserved value (`totalprice`) |
| **Test_7** | `depositpaid` is a boolean and equals the preserved value (`depositpaid`) |
| **Test_8** | `bookingdates` is an object containing both `checkin` and `checkout` keys |
| **Test_9** | `bookingdates.checkin` is a non-empty string in `YYYY-MM-DD` format and equals the preserved value (`checkin`) |
| **Test_10** | `bookingdates.checkout` is a non-empty string in `YYYY-MM-DD` format and equals the preserved value (`updated_checkout`) |
| **Test_11** | `additionalneeds` is a non-empty string and equals the preserved value (`additionalneeds`) |
| Header Name | Header Value |
|---|---|
| User-Agent | PostmanRuntime/7.39.1 |
| Accept | */* |
| Cache-Control | no-cache |
| Postman-Token | 1c4c2f99-d741-4611-b162-4c5b95ded021 |
| Host | restful-booker.herokuapp.com |
| Accept-Encoding | gzip, deflate, br |
| Connection | keep-alive |
| Header Name | Header Value |
|---|---|
| Content-Length | 176 |
| Content-Type | application/json; charset=utf-8 |
| Date | Mon, 19 Oct 2026 10:33:19 GMT |
| Etag | W/"b0-1iizwpwIntUjJxsMWLnTCaCNDPE" |
| Nel | {"report_to":"heroku-nel","response_headers":["Via"],"max_age":3600,"success_fraction":0.01,"failure_fraction":0.1} |
| Report-To | {"group":"heroku-nel","endpoints":[{"url":"https://nel.heroku.com/reports?s=%2BWoe63J73vPt0PtbwmYZQTlNZt8wc2tnPjYqfHoCuH0%3D\u0026sid=c46efe9b-d3d2-4a0c-8c76-bfafa16c5add\u0026ts=1792405999"}],"max_age":3600} |
| Reporting-Endpoints | heroku-nel="https://nel.heroku.com/reports?s=%2BWoe63J73vPt0PtbwmYZQTlNZt8wc2tnPjYqfHoCuH0%3D&sid=c46efe9b-d3d2-4a0c-8c76-bfafa16c5add&ts=1792405999" |
| Server | Heroku |
| Via | 1.1 heroku-router |
| X-Powered-By | Express |
{"firstname":"Orville","lastname":"Schmeler","totalprice":255,"depositpaid":false,"bookingdates":{"checkin":"2026-02-12","checkout":"2026-02-16"},"additionalneeds":"Breakfast"}
| Name | Passed | Failed | Skipped |
|---|---|---|---|
| Prerequisites: booking_id must be set as collection variable | 1 | 0 | 0 |
| Test_1. Status code is 200 | 1 | 0 | 0 |
| Test_2. Response time is below max_response_time | 1 | 0 | 0 |
| Test_3. Response body is JSON | 1 | 0 | 0 |
| Test_4. Response body contains 'firstname' property with partially updated value | 1 | 0 | 0 |
| Test_5. Response body contains 'lastname' property with preserved value | 1 | 0 | 0 |
| Test_6. Response body contains 'totalprice' property with preserved value | 1 | 0 | 0 |
| Test_7. Response body contains 'depositpaid' property with preserved value | 1 | 0 | 0 |
| Test_8. Response body contains 'bookingdates' property | 1 | 0 | 0 |
| Test_9. 'bookingdates' property contains 'checkin' with preserved value | 1 | 0 | 0 |
| Test_10. 'bookingdates' property contains 'checkout' with preserved value | 1 | 0 | 0 |
| Test_11. Response body contains 'additionalneeds' with preserved valuee | 1 | 0 | 0 |
| Total | 12 | 0 | 0 |
| Test Name | Assertion Error |
|---|
## Delete Booking
Deletes an existing booking by its ID from the RESTful Booker API. This is a **positive (happy-path) test** that verifies the API correctly removes a booking when a valid session token is provided.
---
## Endpoint
`DELETE https://restful-booker.herokuapp.com/booking/1245`
---
## Prerequisites
| Variable | Description |
| --- | --- |
| `https://restful-booker.herokuapp.com` | Base URL of the RESTful Booker API |
| `1245` | ID of the booking to be deleted (set by a prior create/get request) |
| `88217868bf5995a` | Valid session token obtained from the `/auth` endpoint |
---
## Request Headers
| Header | Value | Description |
| --- | --- | --- |
| `Content-Type` | `application/json` | Specifies the request format |
| `Cookie` | `token=88217868bf5995a` | Session token used for authorization |
---
## Expected Response
| Field | Value |
| --- | --- |
| **Status Code** | `201 Created` |
| **Content-Type** | `text/plain` |
| **Body** | `Created` |
> ⚠️ Note: The RESTful Booker API returns `201 Created` (instead of the more conventional `200 OK` or `204 No Content`) upon a successful deletion. This is a known quirk of the API.
---
## Automated Tests
| Test | Description |
| --- | --- |
| `Test_1. Status code is 201` | Verifies the response status is `201` |
| `Test_2. Response time is below max_response_time` | Ensures the response time is within the threshold defined by `1000` |
| `Test_3. Response body is JSON` | Confirms the `Content-Type` is `text/plain` and the body equals `"Created"` |
---
## Pre-request Validation
Before the request is sent, the script checks that both `1245` and `88217868bf5995a` collection variables are defined. If either is missing, the test will fail early with a clear error message.
| Header Name | Header Value |
|---|---|
| Content-Type | application/json |
| Cookie | token=88217868bf5995a |
| User-Agent | PostmanRuntime/7.39.1 |
| Accept | */* |
| Cache-Control | no-cache |
| Postman-Token | 28485c63-6424-4fe1-94bb-71b48f4046e9 |
| Host | restful-booker.herokuapp.com |
| Accept-Encoding | gzip, deflate, br |
| Connection | keep-alive |
| Header Name | Header Value |
|---|---|
| Content-Length | 7 |
| Content-Type | text/plain; charset=utf-8 |
| Date | Mon, 19 Oct 2026 10:33:20 GMT |
| Etag | W/"7-rM9AyJuqT6iOan/xHh+AW+7K/T8" |
| Nel | {"report_to":"heroku-nel","response_headers":["Via"],"max_age":3600,"success_fraction":0.01,"failure_fraction":0.1} |
| Report-To | {"group":"heroku-nel","endpoints":[{"url":"https://nel.heroku.com/reports?s=h7Bb4NRsngS%2FSHN6uVviL3%2Fz8FMkLkFKUbLhvMCJ3ho%3D\u0026sid=c46efe9b-d3d2-4a0c-8c76-bfafa16c5add\u0026ts=1792406000"}],"max_age":3600} |
| Reporting-Endpoints | heroku-nel="https://nel.heroku.com/reports?s=h7Bb4NRsngS%2FSHN6uVviL3%2Fz8FMkLkFKUbLhvMCJ3ho%3D&sid=c46efe9b-d3d2-4a0c-8c76-bfafa16c5add&ts=1792406000" |
| Server | Heroku |
| Via | 1.1 heroku-router |
| X-Powered-By | Express |
Created
| Name | Passed | Failed | Skipped |
|---|---|---|---|
| Prerequisites: booking_id and token must be set | 1 | 0 | 0 |
| Test_1. Status code is 201 | 1 | 0 | 0 |
| Test_2. Response time is below max_response_time | 1 | 0 | 0 |
| Test_3. Response body is JSON | 1 | 0 | 0 |
| Total | 4 | 0 | 0 |
| Test Name | Assertion Error |
|---|
## Get Booking by ID (Post-Delete Verification)
This request attempts to retrieve a booking using a **recently removed booking ID**. It is used to verify that the API correctly handles non-existent booking IDs by returning a `404 Not Found` response. This is a **negative / post-condition test** used at the end of the Full CRUD Lifecycle workflow to confirm that the delete operation was successful.
---
### Endpoint
```
GET https://restful-booker.herokuapp.com/booking/1245
```
---
### Variables
| Variable | Description |
| --- | --- |
| `https://restful-booker.herokuapp.com` | Base URL of the RESTful Booker API |
| `1245` | The booking ID used in the request — expected to be non-existent |
---
### Expected Behavior
When an invalid `bookingid` is provided, the API should respond with:
- **Status:** `404 Not Found`
- **Content-Type:** `text/plain`
- **Body:** Contains the text `"Not Found"`
---
### Tests
1. **Test_1 — Response status is 404 (Not Found)**
Verifies that the HTTP response status code is `404`.
2. **Test_2 — Response time is below** **`max_response_time`**
Verifies that the response time is below the threshold defined in the `max_response_time` collection variable.
3. **Test_3 — Response body is not empty and contains "Not Found"**
Verifies that:
- The `Content-Type` header includes `text/plain`
- The response body is not empty
- The response body includes the text `"Not Found"`
| Header Name | Header Value |
|---|---|
| User-Agent | PostmanRuntime/7.39.1 |
| Accept | */* |
| Cache-Control | no-cache |
| Postman-Token | c89a4b82-db34-48c6-858d-f187bdf2a8b1 |
| Host | restful-booker.herokuapp.com |
| Accept-Encoding | gzip, deflate, br |
| Connection | keep-alive |
| Header Name | Header Value |
|---|---|
| Content-Length | 9 |
| Content-Type | text/plain; charset=utf-8 |
| Date | Mon, 19 Oct 2026 10:33:20 GMT |
| Etag | W/"9-0gXL1ngzMqISxa6S1zx3F4wtLyg" |
| Nel | {"report_to":"heroku-nel","response_headers":["Via"],"max_age":3600,"success_fraction":0.01,"failure_fraction":0.1} |
| Report-To | {"group":"heroku-nel","endpoints":[{"url":"https://nel.heroku.com/reports?s=h7Bb4NRsngS%2FSHN6uVviL3%2Fz8FMkLkFKUbLhvMCJ3ho%3D\u0026sid=c46efe9b-d3d2-4a0c-8c76-bfafa16c5add\u0026ts=1792406000"}],"max_age":3600} |
| Reporting-Endpoints | heroku-nel="https://nel.heroku.com/reports?s=h7Bb4NRsngS%2FSHN6uVviL3%2Fz8FMkLkFKUbLhvMCJ3ho%3D&sid=c46efe9b-d3d2-4a0c-8c76-bfafa16c5add&ts=1792406000" |
| Server | Heroku |
| Via | 1.1 heroku-router |
| X-Powered-By | Express |
Not Found
| Name | Passed | Failed | Skipped |
|---|---|---|---|
| Test_1. Response status is 404 (Not Found) | 1 | 0 | 0 |
| Test_2. Response time is below max_response_time | 1 | 0 | 0 |
| Test_3. Response body is NOT empty | 1 | 0 | 0 |
| Total | 3 | 0 | 0 |
| Test Name | Assertion Error |
|---|
## Get Booking IDs (Post-Delete Verification)
Retrieves the full list of booking IDs from the RESTful Booker API and **verifies that the recently deleted booking no longer appears** in the response. This is a **negative / post-condition test** used at the end of the Full CRUD Lifecycle workflow to confirm that the delete operation was successful.
---
## Endpoint
| Field | Value |
| --- | --- |
| Method | `GET` |
| URL | `https://restful-booker.herokuapp.com/booking` |
---
## Query Parameters
No query parameters are required for this request. The endpoint optionally supports filtering by `firstname`, `lastname`, `checkin`, and `checkout`, but none are applied here — the full list is fetched intentionally to confirm the deleted ID is absent from the entire dataset.
---
## Variables Used
| Variable | Scope | Description |
| --- | --- | --- |
| `https://restful-booker.herokuapp.com` | Collection | Base URL of the RESTful Booker API |
| `1245` | Collection | ID of the booking that was deleted in the previous step |
| `1000` | Collection | Maximum acceptable response time in milliseconds |
---
## Expected Response
**Status:** `200 OK`
``` json
[
{ "bookingid": 1 },
{ "bookingid": 2 },
{ "bookingid": 3 }
]
```
> The deleted booking ID should **not** be present in this list.
## Test Coverage
| Test | Description |
| --- | --- |
| **Test_1** | Status code is `200 OK` |
| **Test_2** | Response time is below `1000` |
| **Test_3** | Response body is a non-empty array of objects each containing a `bookingid` integer |
| **Test_4** | The deleted `1245` does **not** appear anywhere in the response array |
| **Test_5** | Exactly `0` occurrences of the deleted `1245` exist in the response |
---
| Header Name | Header Value |
|---|---|
| User-Agent | PostmanRuntime/7.39.1 |
| Accept | */* |
| Cache-Control | no-cache |
| Postman-Token | ab81dc58-9054-4758-a05a-802b546ea4d8 |
| Host | restful-booker.herokuapp.com |
| Accept-Encoding | gzip, deflate, br |
| Connection | keep-alive |
| Header Name | Header Value |
|---|---|
| Content-Length | 16149 |
| Content-Type | application/json; charset=utf-8 |
| Date | Mon, 19 Oct 2026 10:33:20 GMT |
| Etag | W/"3f15-nmxreYkr5s3BV9IzZ5c4Mq6FYUk" |
| Nel | {"report_to":"heroku-nel","response_headers":["Via"],"max_age":3600,"success_fraction":0.01,"failure_fraction":0.1} |
| Report-To | {"group":"heroku-nel","endpoints":[{"url":"https://nel.heroku.com/reports?s=h7Bb4NRsngS%2FSHN6uVviL3%2Fz8FMkLkFKUbLhvMCJ3ho%3D\u0026sid=c46efe9b-d3d2-4a0c-8c76-bfafa16c5add\u0026ts=1792406000"}],"max_age":3600} |
| Reporting-Endpoints | heroku-nel="https://nel.heroku.com/reports?s=h7Bb4NRsngS%2FSHN6uVviL3%2Fz8FMkLkFKUbLhvMCJ3ho%3D&sid=c46efe9b-d3d2-4a0c-8c76-bfafa16c5add&ts=1792406000" |
| Server | Heroku |
| Via | 1.1 heroku-router |
| X-Powered-By | Express |
[{"bookingid":1},{"bookingid":2},{"bookingid":3},{"bookingid":4},{"bookingid":5},{"bookingid":6},{"bookingid":7},{"bookingid":8},{"bookingid":9},{"bookingid":10},{"bookingid":11},{"bookingid":12},{"bookingid":13},{"bookingid":14},{"bookingid":15},{"bookingid":16},{"bookingid":17},{"bookingid":18},{"bookingid":19},{"bookingid":20},{"bookingid":21},{"bookingid":22},{"bookingid":23},{"bookingid":24},{"bookingid":27},{"bookingid":28},{"bookingid":30},{"bookingid":31},{"bookingid":32},{"bookingid":34},{"bookingid":35},{"bookingid":36},{"bookingid":38},{"bookingid":39},{"bookingid":40},{"bookingid":41},{"bookingid":42},{"bookingid":43},{"bookingid":45},{"bookingid":46},{"bookingid":47},{"bookingid":48},{"bookingid":49},{"bookingid":51},{"bookingid":52},{"bookingid":53},{"bookingid":54},{"bookingid":55},{"bookingid":56},{"bookingid":57},{"bookingid":59},{"bookingid":60},{"bookingid":61},{"bookingid":62},{"bookingid":63},{"bookingid":64},{"bookingid":65},{"bookingid":67},{"bookingid":68},{"bookingid":69},{"bookingid":70},{"bookingid":72},{"bookingid":73},{"bookingid":74},{"bookingid":75},{"bookingid":78},{"bookingid":79},{"bookingid":80},{"bookingid":82},{"bookingid":83},{"bookingid":84},{"bookingid":85},{"bookingid":86},{"bookingid":88},{"bookingid":89},{"bookingid":90},{"bookingid":91},{"bookingid":93},{"bookingid":94},{"bookingid":96},{"bookingid":97},{"bookingid":98},{"bookingid":99},{"bookingid":100},{"bookingid":102},{"bookingid":103},{"bookingid":104},{"bookingid":105},{"bookingid":106},{"bookingid":107},{"bookingid":108},{"bookingid":110},{"bookingid":112},{"bookingid":113},{"bookingid":114},{"bookingid":115},{"bookingid":116},{"bookingid":117},{"bookingid":119},{"bookingid":120},{"bookingid":121},{"bookingid":122},{"bookingid":123},{"bookingid":125},{"bookingid":126},{"bookingid":127},{"bookingid":128},{"bookingid":130},{"bookingid":132},{"bookingid":133},{"bookingid":134},{"bookingid":135},{"bookingid":138},{"bookingid":139},{"bookingid":140},{"bookingid":141},{"bookingid":144},{"bookingid":145},{"bookingid":146},{"bookingid":147},{"bookingid":150},{"bookingid":151},{"bookingid":152},{"bookingid":153},{"bookingid":156},{"bookingid":157},{"bookingid":158},{"bookingid":160},{"bookingid":161},{"bookingid":163},{"bookingid":164},{"bookingid":166},{"bookingid":167},{"bookingid":168},{"bookingid":169},{"bookingid":171},{"bookingid":173},{"bookingid":175},{"bookingid":176},{"bookingid":177},{"bookingid":178},{"bookingid":180},{"bookingid":182},{"bookingid":183},{"bookingid":184},{"bookingid":185},{"bookingid":187},{"bookingid":188},{"bookingid":189},{"bookingid":190},{"bookingid":194},{"bookingid":195},{"bookingid":196},{"bookingid":197},{"bookingid":199},{"bookingid":200},{"bookingid":201},{"bookingid":203},{"bookingid":205},{"bookingid":206},{"bookingid":207},{"bookingid":209},{"bookingid":210},{"bookingid":211},{"bookingid":212},{"bookingid":215},{"bookingid":216},{"bookingid":217},{"bookingid":218},{"bookingid":221},{"bookingid":222},{"bookingid":223},{"bookingid":224},{"bookingid":225},{"bookingid":228},{"bookingid":229},{"bookingid":231},{"bookingid":232},{"bookingid":234},{"bookingid":236},{"bookingid":237},{"bookingid":238},{"bookingid":240},{"bookingid":241},{"bookingid":243},{"bookingid":245},{"bookingid":246},{"bookingid":247},{"bookingid":249},{"bookingid":251},{"bookingid":252},{"bookingid":253},{"bookingid":254},{"bookingid":256},{"bookingid":257},{"bookingid":258},{"bookingid":260},{"bookingid":261},{"bookingid":262},{"bookingid":263},{"bookingid":266},{"bookingid":268},{"bookingid":269},{"bookingid":270},{"bookingid":271},{"bookingid":272},{"bookingid":273},{"bookingid":275},{"bookingid":276},{"bookingid":277},{"bookingid":280},{"bookingid":281},{"bookingid":283},{"bookingid":284},{"bookingid":285},{"bookingid":287},{"bookingid":289},{"bookingid":290},{"bookingid":292},{"bookingid":294},{"bookingid":295},{"bookingid":296},{"bookingid":298},{"bookingid":299},{"bookingid":300},{"bookingid":302},{"bookingid":303},{"bookingid":304},{"bookingid":306},{"bookingid":307},{"bookingid":308},{"bookingid":309},{"bookingid":310},{"bookingid":311},{"bookingid":312},{"bookingid":314},{"bookingid":318},{"bookingid":319},{"bookingid":320},{"bookingid":321},{"bookingid":324},{"bookingid":325},{"bookingid":326},{"bookingid":328},{"bookingid":330},{"bookingid":331},{"bookingid":332},{"bookingid":333},{"bookingid":336},{"bookingid":337},{"bookingid":338},{"bookingid":339},{"bookingid":342},{"bookingid":343},{"bookingid":344},{"bookingid":346},{"bookingid":348},{"bookingid":349},{"bookingid":350},{"bookingid":351},{"bookingid":352},{"bookingid":353},{"bookingid":356},{"bookingid":358},{"bookingid":359},{"bookingid":360},{"bookingid":361},{"bookingid":362},{"bookingid":363},{"bookingid":364},{"bookingid":366},{"bookingid":368},{"bookingid":369},{"bookingid":370},{"bookingid":372},{"bookingid":374},{"bookingid":375},{"bookingid":376},{"bookingid":378},{"bookingid":379},{"bookingid":381},{"bookingid":382},{"bookingid":383},{"bookingid":385},{"bookingid":386},{"bookingid":387},{"bookingid":388},{"bookingid":389},{"bookingid":390},{"bookingid":393},{"bookingid":394},{"bookingid":395},{"bookingid":397},{"bookingid":398},{"bookingid":400},{"bookingid":401},{"bookingid":402},{"bookingid":403},{"bookingid":406},{"bookingid":408},{"bookingid":409},{"bookingid":410},{"bookingid":412},{"bookingid":414},{"bookingid":416},{"bookingid":417},{"bookingid":418},{"bookingid":421},{"bookingid":422},{"bookingid":423},{"bookingid":424},{"bookingid":427},{"bookingid":428},{"bookingid":429},{"bookingid":430},{"bookingid":431},{"bookingid":432},{"bookingid":435},{"bookingid":437},{"bookingid":438},{"bookingid":439},{"bookingid":441},{"bookingid":442},{"bookingid":443},{"bookingid":444},{"bookingid":446},{"bookingid":447},{"bookingid":449},{"bookingid":452},{"bookingid":453},{"bookingid":454},{"bookingid":455},{"bookingid":457},{"bookingid":458},{"bookingid":459},{"bookingid":460},{"bookingid":462},{"bookingid":464},{"bookingid":466},{"bookingid":467},{"bookingid":468},{"bookingid":469},{"bookingid":470},{"bookingid":472},{"bookingid":473},{"bookingid":474},{"bookingid":475},{"bookingid":478},{"bookingid":479},{"bookingid":481},{"bookingid":482},{"bookingid":483},{"bookingid":485},{"bookingid":486},{"bookingid":487},{"bookingid":489},{"bookingid":490},{"bookingid":492},{"bookingid":494},{"bookingid":495},{"bookingid":496},{"bookingid":497},{"bookingid":499},{"bookingid":500},{"bookingid":502},{"bookingid":503},{"bookingid":504},{"bookingid":507},{"bookingid":508},{"bookingid":510},{"bookingid":511},{"bookingid":513},{"bookingid":514},{"bookingid":516},{"bookingid":517},{"bookingid":519},{"bookingid":520},{"bookingid":522},{"bookingid":523},{"bookingid":525},{"bookingid":526},{"bookingid":528},{"bookingid":529},{"bookingid":531},{"bookingid":534},{"bookingid":535},{"bookingid":536},{"bookingid":537},{"bookingid":538},{"bookingid":539},{"bookingid":540},{"bookingid":544},{"bookingid":545},{"bookingid":546},{"bookingid":548},{"bookingid":549},{"bookingid":550},{"bookingid":552},{"bookingid":553},{"bookingid":554},{"bookingid":557},{"bookingid":558},{"bookingid":559},{"bookingid":560},{"bookingid":561},{"bookingid":562},{"bookingid":565},{"bookingid":566},{"bookingid":568},{"bookingid":569},{"bookingid":570},{"bookingid":571},{"bookingid":573},{"bookingid":574},{"bookingid":576},{"bookingid":578},{"bookingid":579},{"bookingid":580},{"bookingid":582},{"bookingid":584},{"bookingid":585},{"bookingid":586},{"bookingid":587},{"bookingid":588},{"bookingid":589},{"bookingid":592},{"bookingid":594},{"bookingid":595},{"bookingid":596},{"bookingid":597},{"bookingid":600},{"bookingid":601},{"bookingid":602},{"bookingid":604},{"bookingid":606},{"bookingid":607},{"bookingid":608},{"bookingid":610},{"bookingid":612},{"bookingid":613},{"bookingid":614},{"bookingid":616},{"bookingid":618},{"bookingid":619},{"bookingid":621},{"bookingid":622},{"bookingid":623},{"bookingid":624},{"bookingid":625},{"bookingid":627},{"bookingid":629},{"bookingid":631},{"bookingid":632},{"bookingid":633},{"bookingid":634},{"bookingid":636},{"bookingid":638},{"bookingid":639},{"bookingid":640},{"bookingid":642},{"bookingid":643},{"bookingid":645},{"bookingid":646},{"bookingid":647},{"bookingid":648},{"bookingid":651},{"bookingid":652},{"bookingid":654},{"bookingid":655},{"bookingid":656},{"bookingid":657},{"bookingid":658},{"bookingid":660},{"bookingid":661},{"bookingid":663},{"bookingid":664},{"bookingid":666},{"bookingid":667},{"bookingid":668},{"bookingid":669},{"bookingid":672},{"bookingid":673},{"bookingid":674},{"bookingid":675},{"bookingid":676},{"bookingid":677},{"bookingid":681},{"bookingid":682},{"bookingid":683},{"bookingid":684},{"bookingid":686},{"bookingid":688},{"bookingid":689},{"bookingid":690},{"bookingid":691},{"bookingid":692},{"bookingid":695},{"bookingid":696},{"bookingid":697},{"bookingid":698},{"bookingid":699},{"bookingid":702},{"bookingid":703},{"bookingid":704},{"bookingid":705},{"bookingid":708},{"bookingid":709},{"bookingid":710},{"bookingid":711},{"bookingid":713},{"bookingid":715},{"bookingid":716},{"bookingid":718},{"bookingid":719},{"bookingid":721},{"bookingid":722},{"bookingid":723},{"bookingid":724},{"bookingid":725},{"bookingid":726},{"bookingid":730},{"bookingid":731},{"bookingid":732},{"bookingid":733},{"bookingid":734},{"bookingid":736},{"bookingid":737},{"bookingid":738},{"bookingid":739},{"bookingid":741},{"bookingid":743},{"bookingid":744},{"bookingid":747},{"bookingid":749},{"bookingid":750},{"bookingid":751},{"bookingid":753},{"bookingid":755},{"bookingid":756},{"bookingid":757},{"bookingid":758},{"bookingid":761},{"bookingid":762},{"bookingid":763},{"bookingid":764},{"bookingid":765},{"bookingid":768},{"bookingid":770},{"bookingid":771},{"bookingid":772},{"bookingid":773},{"bookingid":776},{"bookingid":777},{"bookingid":778},{"bookingid":779},{"bookingid":780},{"bookingid":783},{"bookingid":784},{"bookingid":785},{"bookingid":786},{"bookingid":789},{"bookingid":790},{"bookingid":791},{"bookingid":792},{"bookingid":793},{"bookingid":796},{"bookingid":797},{"bookingid":798},{"bookingid":799},{"bookingid":800},{"bookingid":803},{"bookingid":804},{"bookingid":805},{"bookingid":806},{"bookingid":807},{"bookingid":808},{"bookingid":809},{"bookingid":810},{"bookingid":812},{"bookingid":815},{"bookingid":816},{"bookingid":817},{"bookingid":819},{"bookingid":820},{"bookingid":821},{"bookingid":822},{"bookingid":824},{"bookingid":825},{"bookingid":826},{"bookingid":829},{"bookingid":830},{"bookingid":831},{"bookingid":832},{"bookingid":834},{"bookingid":835},{"bookingid":837},{"bookingid":839},{"bookingid":840},{"bookingid":842},{"bookingid":843},{"bookingid":844},{"bookingid":845},{"bookingid":846},{"bookingid":849},{"bookingid":850},{"bookingid":852},{"bookingid":853},{"bookingid":854},{"bookingid":855},{"bookingid":856},{"bookingid":857},{"bookingid":861},{"bookingid":862},{"bookingid":863},{"bookingid":864},{"bookingid":865},{"bookingid":868},{"bookingid":869},{"bookingid":870},{"bookingid":871},{"bookingid":872},{"bookingid":875},{"bookingid":876},{"bookingid":877},{"bookingid":878},{"bookingid":881},{"bookingid":882},{"bookingid":883},{"bookingid":884},{"bookingid":887},{"bookingid":888},{"bookingid":890},{"bookingid":891},{"bookingid":892},{"bookingid":893},{"bookingid":894},{"bookingid":897},{"bookingid":898},{"bookingid":899},{"bookingid":901},{"bookingid":903},{"bookingid":904},{"bookingid":905},{"bookingid":906},{"bookingid":907},{"bookingid":909},{"bookingid":911},{"bookingid":912},{"bookingid":914},{"bookingid":915},{"bookingid":916},{"bookingid":917},{"bookingid":919},{"bookingid":920},{"bookingid":922},{"bookingid":924},{"bookingid":925},{"bookingid":927},{"bookingid":928},{"bookingid":929},{"bookingid":930},{"bookingid":931},{"bookingid":934},{"bookingid":935},{"bookingid":936},{"bookingid":937},{"bookingid":940},{"bookingid":941},{"bookingid":942},{"bookingid":943},{"bookingid":944},{"bookingid":945},{"bookingid":948},{"bookingid":949},{"bookingid":950},{"bookingid":951},{"bookingid":954},{"bookingid":955},{"bookingid":956},{"bookingid":957},{"bookingid":959},{"bookingid":962},{"bookingid":963},{"bookingid":964},{"bookingid":965},{"bookingid":968},{"bookingid":969},{"bookingid":970},{"bookingid":971},{"bookingid":974},{"bookingid":975},{"bookingid":976},{"bookingid":977},{"bookingid":978},{"bookingid":981},{"bookingid":982},{"bookingid":983},{"bookingid":984},{"bookingid":985},{"bookingid":986},{"bookingid":990},{"bookingid":991},{"bookingid":992},{"bookingid":994},{"bookingid":996},{"bookingid":997},{"bookingid":998},{"bookingid":999},{"bookingid":1000},{"bookingid":1002},{"bookingid":1004},{"bookingid":1005},{"bookingid":1006},{"bookingid":1007},{"bookingid":1009},{"bookingid":1011},{"bookingid":1012},{"bookingid":1014},{"bookingid":1015},{"bookingid":1018},{"bookingid":1019},{"bookingid":1020},{"bookingid":1022},{"bookingid":1024},{"bookingid":1026},{"bookingid":1027},{"bookingid":1029},{"bookingid":1030},{"bookingid":1031},{"bookingid":1032},{"bookingid":1034},{"bookingid":1036},{"bookingid":1037},{"bookingid":1038},{"bookingid":1040},{"bookingid":1041},{"bookingid":1044},{"bookingid":1045},{"bookingid":1046},{"bookingid":1047},{"bookingid":1050},{"bookingid":1051},{"bookingid":1052},{"bookingid":1053},{"bookingid":1056},{"bookingid":1057},{"bookingid":1058},{"bookingid":1059},{"bookingid":1062},{"bookingid":1063},{"bookingid":1064},{"bookingid":1066},{"bookingid":1067},{"bookingid":1068},{"bookingid":1069},{"bookingid":1070},{"bookingid":1074},{"bookingid":1076},{"bookingid":1077},{"bookingid":1079},{"bookingid":1081},{"bookingid":1082},{"bookingid":1083},{"bookingid":1084},{"bookingid":1085},{"bookingid":1088},{"bookingid":1089},{"bookingid":1090},{"bookingid":1091},{"bookingid":1092},{"bookingid":1094},{"bookingid":1096},{"bookingid":1097},{"bookingid":1098},{"bookingid":1100},{"bookingid":1101},{"bookingid":1103},{"bookingid":1104},{"bookingid":1105},{"bookingid":1106},{"bookingid":1108},{"bookingid":1110},{"bookingid":1111},{"bookingid":1112},{"bookingid":1113},{"bookingid":1114},{"bookingid":1116},{"bookingid":1118},{"bookingid":1119},{"bookingid":1120},{"bookingid":1123},{"bookingid":1124},{"bookingid":1125},{"bookingid":1127},{"bookingid":1129},{"bookingid":1130},{"bookingid":1131},{"bookingid":1133},{"bookingid":1135},{"bookingid":1136},{"bookingid":1137},{"bookingid":1139},{"bookingid":1141},{"bookingid":1142},{"bookingid":1143},{"bookingid":1145},{"bookingid":1146},{"bookingid":1148},{"bookingid":1149},{"bookingid":1150},{"bookingid":1151},{"bookingid":1152},{"bookingid":1154},{"bookingid":1155},{"bookingid":1156},{"bookingid":1160},{"bookingid":1161},{"bookingid":1162},{"bookingid":1164},{"bookingid":1166},{"bookingid":1167},{"bookingid":1168},{"bookingid":1169},{"bookingid":1170},{"bookingid":1171},{"bookingid":1173},{"bookingid":1175},{"bookingid":1176},{"bookingid":1177},{"bookingid":1179},{"bookingid":1181},{"bookingid":1182},{"bookingid":1184},{"bookingid":1185},{"bookingid":1186},{"bookingid":1188},{"bookingid":1190},{"bookingid":1191},{"bookingid":1192},{"bookingid":1194},{"bookingid":1195},{"bookingid":1196},{"bookingid":1197},{"bookingid":1199},{"bookingid":1200},{"bookingid":1202},{"bookingid":1204},{"bookingid":1205},{"bookingid":1207},{"bookingid":1209},{"bookingid":1210},{"bookingid":1211},{"bookingid":1213},{"bookingid":1216},{"bookingid":1217},{"bookingid":1218},{"bookingid":1220},{"bookingid":1222},{"bookingid":1223},{"bookingid":1224},{"bookingid":1226},{"bookingid":1228},{"bookingid":1229},{"bookingid":1230},{"bookingid":1232},{"bookingid":1233},{"bookingid":1234},{"bookingid":1236},{"bookingid":1237},{"bookingid":1239},{"bookingid":1240},{"bookingid":1241},{"bookingid":1243},{"bookingid":1247},{"bookingid":1248},{"bookingid":1249},{"bookingid":1250},{"bookingid":1251},{"bookingid":1253},{"bookingid":1254},{"bookingid":1255},{"bookingid":1257},{"bookingid":1259},{"bookingid":1260},{"bookingid":1262},{"bookingid":1263},{"bookingid":1265},{"bookingid":1266},{"bookingid":1267},{"bookingid":1268},{"bookingid":1269},{"bookingid":1270}]
| Name | Passed | Failed | Skipped |
|---|---|---|---|
| Test_1. Status code is 200 | 1 | 0 | 0 |
| Test_2. Response time is below max_response_time | 1 | 0 | 0 |
| Test_3. Response is array of booking IDs | 1 | 0 | 0 |
| Test_4. Response does NOT contain recently deleted bookingid | 1 | 0 | 0 |
| Test_5. Response contains exactly 0 occurrence of deleted bookingid | 1 | 0 | 0 |
| Total | 5 | 0 | 0 |
| Test Name | Assertion Error |
|---|
# Auth - Create Token
Authenticates a user against the RESTful Booker API using valid credentials and retrieves a session token. This is the **first step** in the **Workflow 2: Authentication Token Lifecycle**. The token returned is automatically stored in the `token` collection variable and used by subsequent requests that require authorization (e.g., update, partial update, and delete operations).
---
## Endpoint
`POST https://restful-booker.herokuapp.com/auth`
---
## Request
### Headers
| Key | Value |
| --- | --- |
| Content-Type | application/json |
### Body (raw JSON)
``` json
{
"username": "admin",
"password": "password123"
}
```
| Field | Type | Description |
| --- | --- | --- |
| `username` | string | Valid admin username, sourced from the `admin` collection variable |
| `password` | string | Valid admin password, sourced from the `password123` collection variable |
---
## Response
### Success — `200 OK`
``` json
{
"token": "abc123xyz"
}
```
| Field | Type | Description |
| --- | --- | --- |
| `token` | string | Token used for authenticated requests |
---
## Post-Response Behaviour
- Validates status code is `200`
- Validates response time is below the `1000` collection variable
- Validates the response body is JSON with a single `token` property
- Validates the token is a non-empty string
- **Stores the token** in the `token` collection variable for use in downstream requests
---
## Notes
- This request uses **valid credentials** (happy path scenario).
- Ensure `admin` and `password123` are set in the active environment before running.
- The `https://restful-booker.herokuapp.com` variable must also be configured in the collection.
| Header Name | Header Value |
|---|---|
| Content-Type | application/json |
| User-Agent | PostmanRuntime/7.39.1 |
| Accept | */* |
| Cache-Control | no-cache |
| Postman-Token | bce6f25c-0dd6-47f1-b52b-fce8cc9edbaa |
| Host | restful-booker.herokuapp.com |
| Accept-Encoding | gzip, deflate, br |
| Connection | keep-alive |
| Content-Length | 61 |
{
"username": "admin",
"password": "password123"
}
| Header Name | Header Value |
|---|---|
| Content-Length | 27 |
| Content-Type | application/json; charset=utf-8 |
| Date | Mon, 19 Oct 2026 10:33:20 GMT |
| Etag | W/"1b-CkRJoupW+t1PwX89fUNEtEEIxAk" |
| Nel | {"report_to":"heroku-nel","response_headers":["Via"],"max_age":3600,"success_fraction":0.01,"failure_fraction":0.1} |
| Report-To | {"group":"heroku-nel","endpoints":[{"url":"https://nel.heroku.com/reports?s=h7Bb4NRsngS%2FSHN6uVviL3%2Fz8FMkLkFKUbLhvMCJ3ho%3D\u0026sid=c46efe9b-d3d2-4a0c-8c76-bfafa16c5add\u0026ts=1792406000"}],"max_age":3600} |
| Reporting-Endpoints | heroku-nel="https://nel.heroku.com/reports?s=h7Bb4NRsngS%2FSHN6uVviL3%2Fz8FMkLkFKUbLhvMCJ3ho%3D&sid=c46efe9b-d3d2-4a0c-8c76-bfafa16c5add&ts=1792406000" |
| Server | Heroku |
| Via | 1.1 heroku-router |
| X-Powered-By | Express |
{"token":"fb4cdc12acb9672"}
| Name | Passed | Failed | Skipped |
|---|---|---|---|
| Test_1. Status code is 200 | 1 | 0 | 0 |
| Test_2. Response time is below max_response_time | 1 | 0 | 0 |
| Test_3. Response body is JSON | 1 | 0 | 0 |
| Test_4. Response body contains 'token' property, store it in a collection variable | 1 | 0 | 0 |
| Total | 4 | 0 | 0 |
| Test Name | Assertion Error |
|---|
## Create Booking
Creates a new booking in the RESTful Booker API with a full set of valid booking details.
This is a **positive/happy-path** test. It is used as **Step 2** in the **Workflow 2: Authentication Token Lifecycle**, immediately after authentication and before the read/update/delete steps.
---
### Endpoint
`POST https://restful-booker.herokuapp.com/booking`
---
### Request Headers
| Header | Value |
| --- | --- |
| Content-Type | application/json |
---
### Request Body
The body is dynamically generated in the **Pre-request Script** and sent as a JSON object:
| Field | Type | Source |
| --- | --- | --- |
| `firstname` | string | Random (`$randomFirstName`) |
| `lastname` | string | Random (`$randomLastName`) |
| `totalprice` | integer | Random (`$randomInt`, 0–1000) |
| `depositpaid` | boolean | Hardcoded: `false` |
| `bookingdates.checkin` | string (date) | Hardcoded: `2026-02-12` |
| `bookingdates.checkout` | string (date) | Hardcoded: `2026-02-15` |
| `additionalneeds` | string | Hardcoded: `"Breakfast"` |
All generated values are saved to **collection variables** for use in downstream validation tests.
---
### Pre-request Script Behaviour
- Generates random `firstname`, `lastname`, and `totalprice` values using Postman dynamic variables.
- Constructs the full booking payload and sets it as the raw request body.
- Persists all values (`firstname`, `lastname`, `totalprice`, `depositpaid`, `checkin`, `checkout`, `additionalneeds`) to collection variables so post-response tests can validate the response against the exact values sent.
---
### Expected Response
**Status:** `200 OK`
``` json
{
"bookingid": 1,
"booking": {
"firstname": "...",
"lastname": "...",
"totalprice": ...,
"depositpaid": false,
"bookingdates": {
"checkin": "2026-02-12",
"checkout": "2026-02-15"
},
"additionalneeds": "Breakfast"
}
}
```
---
### Post-response Tests
| Test | Description |
| --- | --- |
| `Test_1` | Status code is `200` |
| `Test_2` | Response time is below `max_response_time` collection variable |
| `Test_3` | Response body is valid JSON with exactly 2 keys: `bookingid` and `booking` |
| `Test_4` | `bookingid` is present and is an integer; stored in `1245` collection variable |
| `Test_5` | `booking` object is present and contains all 6 expected fields |
| Additional | Each booking field is validated against the values stored in collection variables |
---
### Collection Variables Set
After a successful run, the following collection variables are populated:
- `1245` — ID of the newly created booking (used by subsequent requests in the workflow)
- `Christy`, `Feeney`, `659`, `false`, `2026-02-12`, `2026-02-15`, `Breakfast` — booking field values for downstream assertions
| Header Name | Header Value |
|---|---|
| Content-Type | application/json |
| User-Agent | PostmanRuntime/7.39.1 |
| Accept | */* |
| Cache-Control | no-cache |
| Postman-Token | 9b9ba605-053d-448a-b166-feb928d24f3b |
| Host | restful-booker.herokuapp.com |
| Accept-Encoding | gzip, deflate, br |
| Connection | keep-alive |
| Content-Length | 214 |
{
"firstname": "Christy",
"lastname": "Feeney",
"totalprice": 659,
"depositpaid": false,
"bookingdates": {
"checkin": "2026-02-12",
"checkout": "2026-02-15"
},
"additionalneeds": "Breakfast"
}
| Header Name | Header Value |
|---|---|
| Content-Length | 203 |
| Content-Type | application/json; charset=utf-8 |
| Date | Mon, 19 Oct 2026 10:33:21 GMT |
| Etag | W/"cb-128g9w1brHZfh0J+W74FV5ga1Jw" |
| Nel | {"report_to":"heroku-nel","response_headers":["Via"],"max_age":3600,"success_fraction":0.01,"failure_fraction":0.1} |
| Report-To | {"group":"heroku-nel","endpoints":[{"url":"https://nel.heroku.com/reports?s=x1dHGrWjyLO%2FMA3etNaLAl4m%2BqCsBT%2FidUgp6sfu3p8%3D\u0026sid=c46efe9b-d3d2-4a0c-8c76-bfafa16c5add\u0026ts=1792406001"}],"max_age":3600} |
| Reporting-Endpoints | heroku-nel="https://nel.heroku.com/reports?s=x1dHGrWjyLO%2FMA3etNaLAl4m%2BqCsBT%2FidUgp6sfu3p8%3D&sid=c46efe9b-d3d2-4a0c-8c76-bfafa16c5add&ts=1792406001" |
| Server | Heroku |
| Via | 1.1 heroku-router |
| X-Powered-By | Express |
{"bookingid":1273,"booking":{"firstname":"Christy","lastname":"Feeney","totalprice":659,"depositpaid":false,"bookingdates":{"checkin":"2026-02-12","checkout":"2026-02-15"},"additionalneeds":"Breakfast"}}
| Name | Passed | Failed | Skipped |
|---|---|---|---|
| Test_1. Status code is 200 | 1 | 0 | 0 |
| Test_2. Response time is below max_response_time | 1 | 0 | 0 |
| Test_3. Response body is JSON | 1 | 0 | 0 |
| Test_4. Response body contains 'bookingid' property, store it in a collection variable | 1 | 0 | 0 |
| Test_5. Response body contains 'booking' property | 1 | 0 | 0 |
| Test_6. Response body contains 'firstname' property | 1 | 0 | 0 |
| Test_7. Response body contains 'lastname' | 1 | 0 | 0 |
| Test_8. Response body contains 'totalprice' | 1 | 0 | 0 |
| Test_9. Response body contains 'depositpaid' | 1 | 0 | 0 |
| Test_10. Response body contains 'bookingdates' property | 1 | 0 | 0 |
| Test_11. 'bookingdates' property contains 'checkin' | 1 | 0 | 0 |
| Test_12. 'bookingdates' property contains 'checkout' | 1 | 0 | 0 |
| Test_13. 'checkout' is greaten than 'checkin' | 1 | 0 | 0 |
| Test_14. Response body contains 'additionalneeds' property | 1 | 0 | 0 |
| Total | 14 | 0 | 0 |
| Test Name | Assertion Error |
|---|
## Get Booking by ID
Retrieves a specific booking record by a valid booking ID from the RESTful Booker API. This is a **positive (happy-path) test** that verifies the API returns the correct booking details when provided with an existing, valid `bookingid`. This request is part of **Workflow 2: Authentication Token Lifecycle**.
---
### Prerequisites
The following **collection variables** must be set before running this request:
| Variable | Description |
| --- | --- |
| `bookingid` | A valid booking ID to retrieve |
| `firstname` | Expected first name on the booking |
| `lastname` | Expected last name on the booking |
| `totalprice` | Expected total price of the booking |
| `depositpaid` | Expected deposit paid status (`true`/`false`) |
| `checkin` | Expected check-in date |
| `checkout` | Expected check-out date |
| `additionalneeds` | Expected additional needs/notes on the booking |
| `max_response_time` | Maximum acceptable response time (in ms) |
> The pre-request script asserts that `bookingid` is defined as a collection variable before the request is sent.
---
### Expected Response
- **Status**: `200 OK`
- **Content-Type**: `application/json`
- **Body**: A JSON object with exactly **6 fields**:
``` json
{
"firstname": "string",
"lastname": "string",
"totalprice": "number",
"depositpaid": "boolean",
"bookingdates": {
"checkin": "string",
"checkout": "string"
},
"additionalneeds": "string"
}
```
---
### Test Coverage
- ✅ **Status code** is `200`
- ✅ **Response time** is below the `max_response_time` collection variable
- ✅ **Response body** is valid JSON with exactly 6 fields (`firstname`, `lastname`, `totalprice`, `depositpaid`, `bookingdates`, `additionalneeds`)
- ✅ Each field is validated for **correct type and value** against the corresponding collection variables
| Header Name | Header Value |
|---|---|
| User-Agent | PostmanRuntime/7.39.1 |
| Accept | */* |
| Cache-Control | no-cache |
| Postman-Token | ea35ca8f-f21a-4394-a49c-f1406219ab81 |
| Host | restful-booker.herokuapp.com |
| Accept-Encoding | gzip, deflate, br |
| Connection | keep-alive |
| Header Name | Header Value |
|---|---|
| Content-Length | 174 |
| Content-Type | application/json; charset=utf-8 |
| Date | Mon, 19 Oct 2026 10:33:21 GMT |
| Etag | W/"ae-DAVv7H6nhvlLWIDEtj9ImAsib2Q" |
| Nel | {"report_to":"heroku-nel","response_headers":["Via"],"max_age":3600,"success_fraction":0.01,"failure_fraction":0.1} |
| Report-To | {"group":"heroku-nel","endpoints":[{"url":"https://nel.heroku.com/reports?s=x1dHGrWjyLO%2FMA3etNaLAl4m%2BqCsBT%2FidUgp6sfu3p8%3D\u0026sid=c46efe9b-d3d2-4a0c-8c76-bfafa16c5add\u0026ts=1792406001"}],"max_age":3600} |
| Reporting-Endpoints | heroku-nel="https://nel.heroku.com/reports?s=x1dHGrWjyLO%2FMA3etNaLAl4m%2BqCsBT%2FidUgp6sfu3p8%3D&sid=c46efe9b-d3d2-4a0c-8c76-bfafa16c5add&ts=1792406001" |
| Server | Heroku |
| Via | 1.1 heroku-router |
| X-Powered-By | Express |
{"firstname":"Christy","lastname":"Feeney","totalprice":659,"depositpaid":false,"bookingdates":{"checkin":"2026-02-12","checkout":"2026-02-15"},"additionalneeds":"Breakfast"}
| Name | Passed | Failed | Skipped |
|---|---|---|---|
| Prerequisites: booking_id must be set as collection variable | 1 | 0 | 0 |
| Test_1. Status code is 200 | 1 | 0 | 0 |
| Test_2. Response time is below max_response_time | 1 | 0 | 0 |
| Test_3. Response body is JSON | 1 | 0 | 0 |
| Test_4. Response body contains 'firstname' property | 1 | 0 | 0 |
| Test_5. Response body contains 'lastname' property | 1 | 0 | 0 |
| Test_6. Response body contains 'totalprice' property | 1 | 0 | 0 |
| Test_7. Response body contains 'depositpaid' property | 1 | 0 | 0 |
| Test_8. Response body contains 'bookingdates' property | 1 | 0 | 0 |
| Test_9. 'bookingdates' property contains 'checkin' | 1 | 0 | 0 |
| Test_10. 'bookingdates' property contains 'checkout' | 1 | 0 | 0 |
| Test_11. 'additionalneeds' property contains 'Breakfast' | 1 | 0 | 0 |
| Total | 12 | 0 | 0 |
| Test Name | Assertion Error |
|---|
## Update Booking
Sends a full `PUT` request to replace an existing booking record with updated field values. The request updates the **lastname** and **checkout date** while preserving all other booking fields. On success, the API returns the full updated booking object.
---
## Authentication / Authorization
Authentication is handled via a session token passed as a cookie:
| Header | Value | Description |
| --- | --- | --- |
| `Cookie` | `token=fb4cdc12acb9672` | Auth token obtained from the `CreateToken` endpoint. Used as an alternative to the `Authorization` header. |
The fb4cdc12acb9672 value is expected to be set as a collection variable before this request runs.
---
## Path Variables
| Variable | Description |
| --- | --- |
| `https://restful-booker.herokuapp.com` | Base URL of the RESTful Booker API (e.g. `https://restful-booker.herokuapp.com`) |
| `1273` | The unique ID of the booking to update. Must be set as a collection variable prior to execution. |
---
## Request Headers
| Header | Value | Description |
| --- | --- | --- |
| `Content-Type` | `application/json` | Indicates the request body is JSON. |
| `Cookie` | `token=fb4cdc12acb9672` | Authorization token (see Auth section above). |
---
## Request Body Fields
The body is sent as raw JSON. Fields are either **preserved** (sent with their original values) or **updated** (sent with new values generated in the pre-request script).
| Field | Variable | Type | Status | Notes |
| --- | --- | --- | --- | --- |
| `firstname` | `Christy` | String | ✅ Preserved | Original first name from collection variables. |
| `lastname` | `McGlynn` | String | 🔄 Updated | Randomly generated in the pre-request script. |
| `totalprice` | `659` | Integer | ✅ Preserved | Original total price from collection variables. |
| `depositpaid` | `false` | Boolean | ✅ Preserved | Original deposit status from collection variables. |
| `bookingdates.checkin` | `2026-02-12` | String | ✅ Preserved | Original check-in date (`YYYY-MM-DD` format). |
| `bookingdates.checkout` | `2026-02-16` | String | 🔄 Updated | Set in the pre-request script. |
| `additionalneeds` | `Breakfast` | String | ✅ Preserved | Original additional needs from collection variables. |
---
## Pre-request Script Behavior
The pre-request script runs three steps before the request is sent:
**Step 1 — Validate prerequisites**
Asserts that both `bookingid` and `token` collection variables are defined and not `undefined`. This acts as a guard to prevent the request from running without the required context (e.g. if a prior request in the collection failed to set these values).
**Step 2 — Generate updated lastname**
Uses `Dietrich` to generate a random last name and stores it in the `updated_lastname` collection variable. This value is then used in the request body.
**Step 3 — Set updated checkout date**
Hardcodes the checkout date to `2026-02-16` and stores it in the `updated_checkout` collection variable. This value is then used in the `bookingdates.checkout` field of the request body.
---
## Post-response Tests
11 tests are executed after the response is received:
| Test | What It Validates |
| --- | --- |
| Test_1 | HTTP status code is `200 OK`. |
| Test_2 | Response time is below the `max_response_time` collection variable (performance threshold). |
| Test_3 | Response body is valid JSON, is an object, has exactly **6 keys**: `firstname`, `lastname`, `totalprice`, `depositpaid`, `bookingdates`, `additionalneeds`. |
| Test_4 | `firstname` is a string and matches the preserved `Christy` collection variable. |
| Test_5 | `lastname` is a string, matches `McGlynn`, and is **different** from the original `Feeney`. |
| Test_6 | `totalprice` is an integer and matches the preserved `659` collection variable. |
| Test_7 | `depositpaid` is a boolean and matches the preserved `false` collection variable. |
| Test_8 | `bookingdates` is an object with exactly **2 keys**: `checkin` and `checkout`. |
| Test_9 | `checkin` is a string in `YYYY-MM-DD` format and matches the preserved `2026-02-12` collection variable. |
| Test_10 | `checkout` is a string in `YYYY-MM-DD` format and matches the updated value in `2026-02-16`. |
| Test_11 | `additionalneeds` is a non-empty string and matches the preserved `Breakfast` collection variable. |
| Header Name | Header Value |
|---|---|
| Content-Type | application/json |
| Cookie | token=fb4cdc12acb9672 |
| User-Agent | PostmanRuntime/7.39.1 |
| Accept | */* |
| Cache-Control | no-cache |
| Postman-Token | 8742f9d8-3237-490d-963e-a42cef6f577c |
| Host | restful-booker.herokuapp.com |
| Accept-Encoding | gzip, deflate, br |
| Connection | keep-alive |
| Content-Length | 247 |
{
"firstname": "Christy",
"lastname": "McGlynn",
"totalprice": 659,
"depositpaid": false,
"bookingdates": {
"checkin": "2026-02-12",
"checkout": "2026-02-16"
},
"additionalneeds": "Breakfast"
}
| Header Name | Header Value |
|---|---|
| Content-Length | 175 |
| Content-Type | application/json; charset=utf-8 |
| Date | Mon, 19 Oct 2026 10:33:21 GMT |
| Etag | W/"af-i8/nL89pe5lHsSCRfdftq3CbFUs" |
| Nel | {"report_to":"heroku-nel","response_headers":["Via"],"max_age":3600,"success_fraction":0.01,"failure_fraction":0.1} |
| Report-To | {"group":"heroku-nel","endpoints":[{"url":"https://nel.heroku.com/reports?s=x1dHGrWjyLO%2FMA3etNaLAl4m%2BqCsBT%2FidUgp6sfu3p8%3D\u0026sid=c46efe9b-d3d2-4a0c-8c76-bfafa16c5add\u0026ts=1792406001"}],"max_age":3600} |
| Reporting-Endpoints | heroku-nel="https://nel.heroku.com/reports?s=x1dHGrWjyLO%2FMA3etNaLAl4m%2BqCsBT%2FidUgp6sfu3p8%3D&sid=c46efe9b-d3d2-4a0c-8c76-bfafa16c5add&ts=1792406001" |
| Server | Heroku |
| Via | 1.1 heroku-router |
| X-Powered-By | Express |
{"firstname":"Christy","lastname":"McGlynn","totalprice":659,"depositpaid":false,"bookingdates":{"checkin":"2026-02-12","checkout":"2026-02-16"},"additionalneeds":"Breakfast"}
| Name | Passed | Failed | Skipped |
|---|---|---|---|
| Prerequisites: booking_id and token are set | 1 | 0 | 0 |
| Test_1. Status code is 200 | 1 | 0 | 0 |
| Test_2. Response time is below max_response_time | 1 | 0 | 0 |
| Test_3. Response body is JSON | 1 | 0 | 0 |
| Test_4. Response body contains 'firstname' with preserved value | 1 | 0 | 0 |
| Test_5. Response body contains 'lastname' with updated value | 1 | 0 | 0 |
| Test_6. Response body contains 'totalprice' with preserved value | 1 | 0 | 0 |
| Test_7. Response body contains 'depositpaid' with preserved value | 1 | 0 | 0 |
| Test_8. Response body contains 'bookingdates' property | 1 | 0 | 0 |
| Test_9. 'bookingdates' property contains 'checkin' with preserved value | 1 | 0 | 0 |
| Test_10. 'bookingdates' property contains 'checkout' with updated value | 1 | 0 | 0 |
| Test_11. Response body contains 'additionalneeds' with preserved value | 1 | 0 | 0 |
| Total | 12 | 0 | 0 |
| Test Name | Assertion Error |
|---|
## Get Booking by ID
Retrieves a specific booking record by a **valid booking ID** from the RESTful Booker API. This request is **Step 5** in the **Workflow 2: Authentication Token Lifecycle** integration flow and serves as a **post-update verification** step — it confirms that the partial update applied in the previous step (PUT) was persisted correctly, while all non-updated fields remain unchanged.
---
## Endpoint
```
GET https://restful-booker.herokuapp.com/booking/1273
```
---
## Variables Used
| Variable | Scope | Description |
| --- | --- | --- |
| `https://restful-booker.herokuapp.com` | Collection | Base URL of the RESTful Booker API |
| `1273` | Collection | ID of the booking to retrieve (set by a prior create step) |
---
## Prerequisites
- `bookingid` collection variable must be set (validated in the pre-request script).
- The booking must have been previously **updated** (PUT) so that `updated_lastname` and `updated_checkout` collection variables reflect the new values.
---
## Expected Response
**Status:** `200 OK`
**Content-Type:** `application/json`
``` json
{
"firstname": "string",
"lastname": "string",
"totalprice": 0,
"depositpaid": true,
"bookingdates": {
"checkin": "YYYY-MM-DD",
"checkout": "YYYY-MM-DD"
},
"additionalneeds": "string"
}
```
---
## Test Coverage
| Test | Description |
| --- | --- |
| **Test_1** | Status code is `200` |
| **Test_2** | Response time is below `max_response_time` collection variable |
| **Test_3** | Response body is a JSON object with exactly 6 keys: `firstname`, `lastname`, `totalprice`, `depositpaid`, `bookingdates`, `additionalneeds` |
| **Test_4** | `firstname` is a string matching the **preserved** value from `firstname` collection variable |
| **Test_5** | `lastname` is a string matching the **updated** value from `updated_lastname` collection variable |
| **Test_6** | `totalprice` is an integer matching the **preserved** value from `totalprice` collection variable |
| **Test_7** | `depositpaid` is a boolean matching the **preserved** value from `depositpaid` collection variable |
| **Test_8** | `bookingdates` is an object with exactly 2 keys: `checkin` and `checkout` |
| **Test_9** | `bookingdates.checkin` is a non-empty string in `YYYY-MM-DD` format matching the **preserved** `checkin` value |
| **Test_10** | `bookingdates.checkout` is a non-empty string in `YYYY-MM-DD` format matching the **updated** `updated_checkout` value |
| **Test_11** | `additionalneeds` is a non-empty string matching the **preserved** value from `additionalneeds` collection variable |
---
## Notes
- This request has **no authentication** — the GET endpoint is publicly accessible.
- Fields marked **Preserved** should be unchanged from the original booking creation.
- Fields marked **Updated** should reflect the values set by the preceding PUT request.
| Header Name | Header Value |
|---|---|
| User-Agent | PostmanRuntime/7.39.1 |
| Accept | */* |
| Cache-Control | no-cache |
| Postman-Token | 125660e9-5a12-42b6-9c84-0b6525fb1e7c |
| Host | restful-booker.herokuapp.com |
| Accept-Encoding | gzip, deflate, br |
| Connection | keep-alive |
| Header Name | Header Value |
|---|---|
| Content-Length | 175 |
| Content-Type | application/json; charset=utf-8 |
| Date | Mon, 19 Oct 2026 10:33:21 GMT |
| Etag | W/"af-i8/nL89pe5lHsSCRfdftq3CbFUs" |
| Nel | {"report_to":"heroku-nel","response_headers":["Via"],"max_age":3600,"success_fraction":0.01,"failure_fraction":0.1} |
| Report-To | {"group":"heroku-nel","endpoints":[{"url":"https://nel.heroku.com/reports?s=x1dHGrWjyLO%2FMA3etNaLAl4m%2BqCsBT%2FidUgp6sfu3p8%3D\u0026sid=c46efe9b-d3d2-4a0c-8c76-bfafa16c5add\u0026ts=1792406001"}],"max_age":3600} |
| Reporting-Endpoints | heroku-nel="https://nel.heroku.com/reports?s=x1dHGrWjyLO%2FMA3etNaLAl4m%2BqCsBT%2FidUgp6sfu3p8%3D&sid=c46efe9b-d3d2-4a0c-8c76-bfafa16c5add&ts=1792406001" |
| Server | Heroku |
| Via | 1.1 heroku-router |
| X-Powered-By | Express |
{"firstname":"Christy","lastname":"McGlynn","totalprice":659,"depositpaid":false,"bookingdates":{"checkin":"2026-02-12","checkout":"2026-02-16"},"additionalneeds":"Breakfast"}
| Name | Passed | Failed | Skipped |
|---|---|---|---|
| Prerequisites: booking_id must be set as collection variable | 1 | 0 | 0 |
| Test_1. Status code is 200 | 1 | 0 | 0 |
| Test_2. Response time is below max_response_time | 1 | 0 | 0 |
| Test_3. Response body is JSON | 1 | 0 | 0 |
| Test_4. Response body contains 'firstname' property with preserved value | 1 | 0 | 0 |
| Test_5. Response body contains 'lastname' property with updated value | 1 | 0 | 0 |
| Test_6. Response body contains 'totalprice' property with preserved value | 1 | 0 | 0 |
| Test_7. Response body contains 'depositpaid' property with preserved value | 1 | 0 | 0 |
| Test_8. Response body contains 'bookingdates' property | 1 | 0 | 0 |
| Test_9. 'bookingdates' property contains 'checkin' with preserved value | 1 | 0 | 0 |
| Test_10. 'bookingdates' property contains 'checkout' with updated value | 1 | 0 | 0 |
| Test_11. Response body contains 'additionalneeds' with preserved valuee | 1 | 0 | 0 |
| Total | 12 | 0 | 0 |
| Test Name | Assertion Error |
|---|
# \[Mocked\] UpdateBooking — Expired Token
Negative test — verifies that a `PUT /booking/:id` request using a **hardcoded, expired token** in the `Cookie` header is correctly rejected with `403 Forbidden`.
---
## Endpoint
| Field | Value |
| --- | --- |
| **Method** | `PUT` |
| **URL** | `https://b46c2b66-2cdd-4ff5-abb5-388678ae176d.mock.pstmn.io/booking/1273` |
| **Auth** | Cookie-based (`token=ccb59d3efd94c3a`) |
---
## Purpose
Validates that the RESTful Booker API enforces token expiry. An expired token value in the `Cookie` header must not grant access to update a booking — the API should respond with `403 Forbidden`.
---
## Headers
| Header | Value | Notes |
| --- | --- | --- |
| `Content-Type` | `application/json` | Required for JSON body |
| `Cookie` | `token=ccb59d3efd94c3a` | Hardcoded expired token — intentionally invalid |
---
## Request Body
``` json
{
"firstname": "Christy",
"lastname": "Green",
"totalprice": 659,
"depositpaid": false,
"bookingdates": {
"checkin": "2026-02-12",
"checkout": "2026-02-15"
},
"additionalneeds": "Breakfast"
}
```
---
## Variables
| Variable | Source | Description |
| --- | --- | --- |
| `restful_booker_mocked` | Collection | Mocked URL of the RESTful Booker API |
| `bookingid` | Collection | ID of the booking to update (set by a prior create step) |
| `firstname` | Collection | Booking first name |
| `updated_lastname` | Collection | Randomly generated last name (set in pre-request script) |
| `totalprice` | Collection | Total price of the booking |
| `depositpaid` | Collection | Whether deposit was paid |
| `checkin` | Collection | Check-in date |
| `checkout` | Collection | Check-out date |
| `additionalneeds` | Collection | Any additional needs |
| `max_response_time` | Collection | Maximum acceptable response time (ms) |
---
## Pre-request Script Summary
1. **Prerequisite check** — asserts that `bookingid` collection variable is set before the request runs.
2. **Generate random last name** — uses `Lehner` to produce a new `updated_lastname` value.
---
## Test Script Summary
| Test | Assertion |
| --- | --- |
| `Test_1` | Response status is `403 Forbidden` |
| `Test_2` | Response time is below `max_response_time` |
| `Test_3` | 'error' property is in response body and contains 'expired' text |
| `Test_4` | 'status' property is in response body and equals '403 Forbidden' |
---
## Expected Response
**Status:** `403 Forbidden`
**Content-Type:** `application/json`
**Body:**
``` json
{
"error": "Token has expired",
"status": "403 Forbidden"
}
```
---
| Header Name | Header Value |
|---|---|
| Content-Type | application/json |
| Cookie | token=ccb59d3efd94c3a |
| User-Agent | PostmanRuntime/7.39.1 |
| Accept | */* |
| Cache-Control | no-cache |
| Postman-Token | f3c8803b-6240-4a4e-a813-03280859cc75 |
| Host | b46c2b66-2cdd-4ff5-abb5-388678ae176d.mock.pstmn.io |
| Accept-Encoding | gzip, deflate, br |
| Connection | keep-alive |
| Content-Length | 245 |
{
"firstname": "Christy",
"lastname": "Green",
"totalprice": 659,
"depositpaid": false,
"bookingdates": {
"checkin": "2026-02-12",
"checkout": "2026-02-15"
},
"additionalneeds": "Breakfast"
}
| Header Name | Header Value |
|---|---|
| Date | Mon, 19 Oct 2026 10:33:22 GMT |
| Content-Type | application/json; charset=utf-8 |
| Transfer-Encoding | chunked |
| Connection | keep-alive |
| x-srv-trace | v=1;t=5fbd50cb5cb7430d |
| x-srv-span | v=1;s=9c479f634463690c |
| access-control-allow-origin | * |
| x-ratelimit-limit | 120 |
| x-ratelimit-remaining | 119 |
| x-ratelimit-reset | 1792406062 |
| etag | W/"46-Dci3bBf+Tj3Eafxn09pflEPqHVw" |
| vary | Accept-Encoding |
| set-cookie | __cf_bm=lXbWGDhCbOGB5NODGT2zSO4JKtzU5fYzG0qc.t4TNIg-1792406002.1628895-1.0.1.1-HHBoUGxPWBI4uS.mMZa8MtTpBee0PIfzh0C7wMKk8WtTc5E1GWDajtfiX.gPIVa4zc75qDPXR6rZh39PWXULoly8A3FjKYtB.bfhU_C3fYAOGxNb2CB1GdQn95HqvxjK; HttpOnly; SameSite=None; Secure; Path=/; Domain=pstmn.io; Expires=Mon, 19 Oct 2026 11:03:22 GMT |
| cf-cache-status | DYNAMIC |
| Content-Encoding | gzip |
| Server | cloudflare |
| CF-RAY | a4cf1fc989a0703c-IAD |
{
"error": "Token has expired",
"status": "403 Forbidden"
}
| Name | Passed | Failed | Skipped |
|---|---|---|---|
| Prerequisites: booking_id and token are set | 1 | 0 | 0 |
| Test_1. Response status is 403 Forbidden | 1 | 0 | 0 |
| Test_2. Response time is below max_response_time | 1 | 0 | 0 |
| Test_3. 'error' property is in response body and contains 'expired' text | 1 | 0 | 0 |
| Test_4. 'status' property is in response body and equals '403 Forbidden' | 1 | 0 | 0 |
| Total | 5 | 0 | 0 |
| Test Name | Assertion Error |
|---|
## Get Booking by Valid ID
Retrieves the full booking details for a specific booking using a valid `bookingid`. This request is part of **Workflow 2: Authentication Token Lifecycle** and is used to verify that booking data is preserved correctly after an unsuccessful update operation.
---
### Method & URL
```
GET https://restful-booker.herokuapp.com/booking/1273
```
---
### Variables
| Variable | Scope | Description |
| --- | --- | --- |
| `https://restful-booker.herokuapp.com` | Collection | Base URL of the RESTful Booker API |
| `1273` | Collection | ID of the booking to retrieve |
---
### Prerequisites
The `bookingid` collection variable must be set before this request is executed. This is validated in the pre-request script.
---
### Response Body
A successful response returns a JSON object with the following structure:
``` json
{
"firstname": "string",
"lastname": "string",
"totalprice": 0,
"depositpaid": true,
"bookingdates": {
"checkin": "YYYY-MM-DD",
"checkout": "YYYY-MM-DD"
},
"additionalneeds": "string"
}
```
---
### Test Coverage
| Test | Description |
| --- | --- |
| **Test_1** | Status code is `200` |
| **Test_2** | Response time is below `max_response_time` (from environment) |
| **Test_3** | Response body is valid JSON with exactly 6 top-level keys |
| **Test_4** | `firstname` is a string matching the preserved collection variable |
| **Test_5** | `lastname` is a string matching the updated `updated_lastname` collection variable |
| **Test_6** | `totalprice` is an integer matching the preserved collection variable |
| **Test_7** | `depositpaid` is a boolean matching the preserved collection variable |
| **Test_8** | `bookingdates` is an object with exactly 2 keys: `checkin` and `checkout` |
| **Test_9** | `checkin` is a non-empty string in `YYYY-MM-DD` format matching the preserved value |
| **Test_10** | `checkout` is a non-empty string in `YYYY-MM-DD` format matching the updated `updated_checkout` value |
| **Test_11** | `additionalneeds` is a non-empty string matching the preserved collection variable |
---
### Notes
- No authentication is required for this endpoint.
- This request is typically executed after an update unsuccessful step to confirm that nothing was modified and all fields remain unchanged.
| Header Name | Header Value |
|---|---|
| User-Agent | PostmanRuntime/7.39.1 |
| Accept | */* |
| Cache-Control | no-cache |
| Postman-Token | a9eb514d-9089-4040-a51d-cfd8bb628abf |
| Host | restful-booker.herokuapp.com |
| Accept-Encoding | gzip, deflate, br |
| Connection | keep-alive |
| Header Name | Header Value |
|---|---|
| Content-Length | 175 |
| Content-Type | application/json; charset=utf-8 |
| Date | Mon, 19 Oct 2026 10:33:22 GMT |
| Etag | W/"af-i8/nL89pe5lHsSCRfdftq3CbFUs" |
| Nel | {"report_to":"heroku-nel","response_headers":["Via"],"max_age":3600,"success_fraction":0.01,"failure_fraction":0.1} |
| Report-To | {"group":"heroku-nel","endpoints":[{"url":"https://nel.heroku.com/reports?s=TNjhH%2FoCvahaKjxJ0f3PVqK5O5FYCydsap2QmxO2%2Bpc%3D\u0026sid=c46efe9b-d3d2-4a0c-8c76-bfafa16c5add\u0026ts=1792406002"}],"max_age":3600} |
| Reporting-Endpoints | heroku-nel="https://nel.heroku.com/reports?s=TNjhH%2FoCvahaKjxJ0f3PVqK5O5FYCydsap2QmxO2%2Bpc%3D&sid=c46efe9b-d3d2-4a0c-8c76-bfafa16c5add&ts=1792406002" |
| Server | Heroku |
| Via | 1.1 heroku-router |
| X-Powered-By | Express |
{"firstname":"Christy","lastname":"McGlynn","totalprice":659,"depositpaid":false,"bookingdates":{"checkin":"2026-02-12","checkout":"2026-02-16"},"additionalneeds":"Breakfast"}
| Name | Passed | Failed | Skipped |
|---|---|---|---|
| Prerequisites: booking_id must be set as collection variable | 1 | 0 | 0 |
| Test_1. Status code is 200 | 1 | 0 | 0 |
| Test_2. Response time is below max_response_time | 1 | 0 | 0 |
| Test_3. Response body is JSON | 1 | 0 | 0 |
| Test_4. Response body contains 'firstname' property with preserved value | 1 | 0 | 0 |
| Test_5. Response body contains 'lastname' property with preserved value | 1 | 0 | 0 |
| Test_6. Response body contains 'totalprice' property with preserved value | 1 | 0 | 0 |
| Test_7. Response body contains 'depositpaid' property with preserved value | 1 | 0 | 0 |
| Test_8. Response body contains 'bookingdates' property | 1 | 0 | 0 |
| Test_9. 'bookingdates' property contains 'checkin' with preserved value | 1 | 0 | 0 |
| Test_10. 'bookingdates' property contains 'checkout' with preserved value | 1 | 0 | 0 |
| Test_11. Response body contains 'additionalneeds' with preserved valuee | 1 | 0 | 0 |
| Total | 12 | 0 | 0 |
| Test Name | Assertion Error |
|---|
## Update Booking — Cookie Header Disabled
Attempts to update an existing booking with a **fully valid request body**, but with the `Cookie` header **disabled** (not sent). This is a **negative test** that verifies the API correctly rejects update requests when no authentication token is provided.
---
## Endpoint
`PUT https://restful-booker.herokuapp.com/booking/1273`
---
## Prerequisites
| Variable | Description |
| --- | --- |
| `https://restful-booker.herokuapp.com` | Base URL of the RESTful Booker API |
| `1273` | ID of the booking to be updated (set by a prior create/get request) |
> ⚠️ The `Cookie` header is intentionally **disabled** in this request, simulating a scenario where no authentication token is passed at all.
---
## Request Headers
| Header | Value | Description |
| --- | --- | --- |
| `Content-Type` | `application/json` | Specifies the request format |
| `Cookie` | _(disabled)_ | No token is sent — intentionally omitted to trigger a `403` response |
---
## Request Body
A full booking object is sent with all required fields. The `lastname` field is dynamically generated in the pre-request script and stored in `Larkin`.
| Field | Value |
| --- | --- |
| `firstname` | `Christy` |
| `lastname` | `Larkin` (randomly generated) |
| `totalprice` | `659` |
| `depositpaid` | `false` |
| `bookingdates.checkin` | `2026-02-12` |
| `bookingdates.checkout` | `2026-02-15` |
| `additionalneeds` | `Breakfast` |
---
## Expected Response
| Field | Value |
| --- | --- |
| **Status Code** | `403 Forbidden` |
| **Content-Type** | `text/plain` |
| **Body** | `Forbidden` |
---
## Automated Tests
| Test | Description |
| --- | --- |
| `Test_1. Response status is 403 (Forbidden)` | Verifies the API rejects the request with a `403` status |
| `Test_2. Response time is below max_response_time` | Ensures the response time is within the threshold defined by `1000` |
| `Test_3. No Cookie header in the request and response` | Confirms that no `Cookie` header is present in either the request or the response |
| `Test_4. Response body is NOT empty` | Confirms the `Content-Type` is `text/plain` and the body equals `"Forbidden"` |
---
## Pre-request Validation
Before the request is sent, the script:
1. Checks that `1273` is set as a collection variable.
2. Generates a new random `lastname` value and stores it in `Larkin` as a local variable (for use in the request body and post-response verification).
| Header Name | Header Value |
|---|---|
| Content-Type | application/json |
| User-Agent | PostmanRuntime/7.39.1 |
| Accept | */* |
| Cache-Control | no-cache |
| Postman-Token | b44644f0-f0f5-4bcc-87e0-dd9ea5d562d3 |
| Host | restful-booker.herokuapp.com |
| Accept-Encoding | gzip, deflate, br |
| Connection | keep-alive |
| Content-Length | 246 |
{
"firstname": "Christy",
"lastname": "Larkin",
"totalprice": 659,
"depositpaid": false,
"bookingdates": {
"checkin": "2026-02-12",
"checkout": "2026-02-15"
},
"additionalneeds": "Breakfast"
}
| Header Name | Header Value |
|---|---|
| Content-Length | 9 |
| Content-Type | text/plain; charset=utf-8 |
| Date | Mon, 19 Oct 2026 10:33:22 GMT |
| Etag | W/"9-PatfYBLj4Um1qTm5zrukoLhNyPU" |
| Nel | {"report_to":"heroku-nel","response_headers":["Via"],"max_age":3600,"success_fraction":0.01,"failure_fraction":0.1} |
| Report-To | {"group":"heroku-nel","endpoints":[{"url":"https://nel.heroku.com/reports?s=TNjhH%2FoCvahaKjxJ0f3PVqK5O5FYCydsap2QmxO2%2Bpc%3D\u0026sid=c46efe9b-d3d2-4a0c-8c76-bfafa16c5add\u0026ts=1792406002"}],"max_age":3600} |
| Reporting-Endpoints | heroku-nel="https://nel.heroku.com/reports?s=TNjhH%2FoCvahaKjxJ0f3PVqK5O5FYCydsap2QmxO2%2Bpc%3D&sid=c46efe9b-d3d2-4a0c-8c76-bfafa16c5add&ts=1792406002" |
| Server | Heroku |
| Via | 1.1 heroku-router |
| X-Powered-By | Express |
Forbidden
| Name | Passed | Failed | Skipped |
|---|---|---|---|
| Prerequisites 1: booking_id and token are set | 1 | 0 | 0 |
| Test_1. Response status is 403 (Forbidden) | 1 | 0 | 0 |
| Test_2. Response time is below max_response_time | 1 | 0 | 0 |
| Test_3. No Cookie header in the request and response | 1 | 0 | 0 |
| Test_4. Response body is NOT empty | 1 | 0 | 0 |
| Total | 5 | 0 | 0 |
| Test Name | Assertion Error |
|---|
## Get Booking by Valid ID
Retrieves the full booking details for a specific booking using a valid `bookingid`. This request is part of **Workflow 2: Authentication Token Lifecycle** and is used to verify that booking data is preserved correctly after an unsuccessful update operation.
---
### Method & URL
```
GET https://restful-booker.herokuapp.com/booking/1273
```
---
### Variables
| Variable | Scope | Description |
| --- | --- | --- |
| `https://restful-booker.herokuapp.com` | Collection | Base URL of the RESTful Booker API |
| `1273` | Collection | ID of the booking to retrieve |
---
### Prerequisites
The `bookingid` collection variable must be set before this request is executed. This is validated in the pre-request script.
---
### Response Body
A successful response returns a JSON object with the following structure:
``` json
{
"firstname": "string",
"lastname": "string",
"totalprice": 0,
"depositpaid": true,
"bookingdates": {
"checkin": "YYYY-MM-DD",
"checkout": "YYYY-MM-DD"
},
"additionalneeds": "string"
}
```
---
### Test Coverage
| Test | Description |
| --- | --- |
| **Test_1** | Status code is `200` |
| **Test_2** | Response time is below `max_response_time` (from environment) |
| **Test_3** | Response body is valid JSON with exactly 6 top-level keys |
| **Test_4** | `firstname` is a string matching the preserved collection variable |
| **Test_5** | `lastname` is a string matching the updated `updated_lastname` collection variable |
| **Test_6** | `totalprice` is an integer matching the preserved collection variable |
| **Test_7** | `depositpaid` is a boolean matching the preserved collection variable |
| **Test_8** | `bookingdates` is an object with exactly 2 keys: `checkin` and `checkout` |
| **Test_9** | `checkin` is a non-empty string in `YYYY-MM-DD` format matching the preserved value |
| **Test_10** | `checkout` is a non-empty string in `YYYY-MM-DD` format matching the updated `updated_checkout` value |
| **Test_11** | `additionalneeds` is a non-empty string matching the preserved collection variable |
---
### Notes
- No authentication is required for this endpoint.
- This request is typically executed after an update unsuccessful step to confirm that nothing was modified and all fields remain unchanged.
| Header Name | Header Value |
|---|---|
| User-Agent | PostmanRuntime/7.39.1 |
| Accept | */* |
| Cache-Control | no-cache |
| Postman-Token | 5d3edb2e-a168-4599-94da-0d6cd86d3f6b |
| Host | restful-booker.herokuapp.com |
| Accept-Encoding | gzip, deflate, br |
| Connection | keep-alive |
| Header Name | Header Value |
|---|---|
| Content-Length | 175 |
| Content-Type | application/json; charset=utf-8 |
| Date | Mon, 19 Oct 2026 10:33:23 GMT |
| Etag | W/"af-i8/nL89pe5lHsSCRfdftq3CbFUs" |
| Nel | {"report_to":"heroku-nel","response_headers":["Via"],"max_age":3600,"success_fraction":0.01,"failure_fraction":0.1} |
| Report-To | {"group":"heroku-nel","endpoints":[{"url":"https://nel.heroku.com/reports?s=1nuwXe9hvyqn%2ByBd%2Bp63rWmblHpL8j3MY8VWtxmtUqs%3D\u0026sid=c46efe9b-d3d2-4a0c-8c76-bfafa16c5add\u0026ts=1792406003"}],"max_age":3600} |
| Reporting-Endpoints | heroku-nel="https://nel.heroku.com/reports?s=1nuwXe9hvyqn%2ByBd%2Bp63rWmblHpL8j3MY8VWtxmtUqs%3D&sid=c46efe9b-d3d2-4a0c-8c76-bfafa16c5add&ts=1792406003" |
| Server | Heroku |
| Via | 1.1 heroku-router |
| X-Powered-By | Express |
{"firstname":"Christy","lastname":"McGlynn","totalprice":659,"depositpaid":false,"bookingdates":{"checkin":"2026-02-12","checkout":"2026-02-16"},"additionalneeds":"Breakfast"}
| Name | Passed | Failed | Skipped |
|---|---|---|---|
| Prerequisites: booking_id must be set as collection variable | 1 | 0 | 0 |
| Test_1. Status code is 200 | 1 | 0 | 0 |
| Test_2. Response time is below max_response_time | 1 | 0 | 0 |
| Test_3. Response body is JSON | 1 | 0 | 0 |
| Test_4. Response body contains 'firstname' property with preserved value | 1 | 0 | 0 |
| Test_5. Response body contains 'lastname' property with preserved value | 1 | 0 | 0 |
| Test_6. Response body contains 'totalprice' property with preserved value | 1 | 0 | 0 |
| Test_7. Response body contains 'depositpaid' property with preserved value | 1 | 0 | 0 |
| Test_8. Response body contains 'bookingdates' property | 1 | 0 | 0 |
| Test_9. 'bookingdates' property contains 'checkin' with preserved value | 1 | 0 | 0 |
| Test_10. 'bookingdates' property contains 'checkout' with preserved value | 1 | 0 | 0 |
| Test_11. Response body contains 'additionalneeds' with preserved valuee | 1 | 0 | 0 |
| Total | 12 | 0 | 0 |
| Test Name | Assertion Error |
|---|
## Partial Update Booking
Partially updates an existing booking by modifying **only** the `firstname` field, while verifying that all other fields remain unchanged. This is a **positive/happy-path** test for the `PATCH /booking/:id` endpoint.
---
## Endpoint
| Method | URL |
| --- | --- |
| `PATCH` | `https://restful-booker.herokuapp.com/booking/1273` |
---
## Authentication
Token-based authentication via the `Cookie` header. A valid session token must be stored in the `token` collection variable before this request runs.
```
Cookie: token=fb4cdc12acb9672
```
---
## Request Headers
| Header | Value |
| --- | --- |
| `Content-Type` | `application/json` |
| `Cookie` | `token=fb4cdc12acb9672` |
---
## Request Body
**Body type:** raw JSON
Only the `firstname` field is sent in the request body. All other booking fields are intentionally omitted to verify partial update behavior.
``` json
{
"firstname": "Ibrahim"
}
```
| Field | Variable | Description |
| --- | --- | --- |
| `firstname` | `Ibrahim` | Randomly generated new first name (set in pre-request script) |
---
## Pre-request Setup
The pre-request script performs the following steps before the request is sent:
1. **Validates prerequisites** — Asserts that both `bookingid` and `token` collection variables are set. The request will not proceed if either is missing.
2. **Generates a new random** **`firstname`** — Uses `Jennyfer` to produce a new value and stores it in the `partial_updated_firstname` collection variable, which is then used in the request body.
---
## Test Assertions
| Test | Description |
| --- | --- |
| **Test_1** | Status code is `200` |
| **Test_2** | Response time is below the `1000` collection variable |
| **Test_3** | Response body is JSON with exactly 6 keys: `firstname`, `lastname`, `totalprice`, `depositpaid`, `bookingdates`, `additionalneeds` |
| **Test_4** | `firstname` is updated to the new value stored in `partial_updated_firstname` |
| **Test_5+** | All other fields are **preserved** from their previous values stored in collection variables |
---
## Fields: Updated vs. Preserved
| Field | Status | Source Variable |
| --- | --- | --- |
| `firstname` | ✅ **Updated** | `Ibrahim` |
| `lastname` | 🔒 Preserved | `Larkin` (already updated by `update_booking_valid` earlier in this workflow) |
| `totalprice` | 🔒 Preserved | `659` |
| `depositpaid` | 🔒 Preserved | `false` |
| `checkin` | 🔒 Preserved | `2026-02-12` |
| `checkout` | 🔒 Preserved | `2026-02-16` (already updated by `update_booking_valid` earlier in this workflow) |
| `additionalneeds` | 🔒 Preserved | `Breakfast` |
---
## Notes
- This request is part of **Workflow 2: Authentication Token Lifecycle** inside the **Integration workflows** folder.
- The `PATCH` method is used (not `PUT`), so only the fields included in the body are updated on the server.
- The test suite validates both the updated field and all preserved fields to ensure no unintended side effects occur.
| Header Name | Header Value |
|---|---|
| Content-Type | application/json |
| Cookie | token=fb4cdc12acb9672 |
| User-Agent | PostmanRuntime/7.39.1 |
| Accept | */* |
| Cache-Control | no-cache |
| Postman-Token | 3203fdde-1f95-4901-88d8-7ddba93fe997 |
| Host | restful-booker.herokuapp.com |
| Accept-Encoding | gzip, deflate, br |
| Connection | keep-alive |
| Content-Length | 33 |
{
"firstname" : "Ibrahim"
}
| Header Name | Header Value |
|---|---|
| Content-Length | 175 |
| Content-Type | application/json; charset=utf-8 |
| Date | Mon, 19 Oct 2026 10:33:23 GMT |
| Etag | W/"af-2AjnlDDiRcazRN0S/QjTf4rCPvM" |
| Nel | {"report_to":"heroku-nel","response_headers":["Via"],"max_age":3600,"success_fraction":0.01,"failure_fraction":0.1} |
| Report-To | {"group":"heroku-nel","endpoints":[{"url":"https://nel.heroku.com/reports?s=1nuwXe9hvyqn%2ByBd%2Bp63rWmblHpL8j3MY8VWtxmtUqs%3D\u0026sid=c46efe9b-d3d2-4a0c-8c76-bfafa16c5add\u0026ts=1792406003"}],"max_age":3600} |
| Reporting-Endpoints | heroku-nel="https://nel.heroku.com/reports?s=1nuwXe9hvyqn%2ByBd%2Bp63rWmblHpL8j3MY8VWtxmtUqs%3D&sid=c46efe9b-d3d2-4a0c-8c76-bfafa16c5add&ts=1792406003" |
| Server | Heroku |
| Via | 1.1 heroku-router |
| X-Powered-By | Express |
{"firstname":"Ibrahim","lastname":"McGlynn","totalprice":659,"depositpaid":false,"bookingdates":{"checkin":"2026-02-12","checkout":"2026-02-16"},"additionalneeds":"Breakfast"}
| Name | Passed | Failed | Skipped |
|---|---|---|---|
| Prerequisites: booking_id and token are set | 1 | 0 | 0 |
| Test_1. Status code is 200 | 1 | 0 | 0 |
| Test_2. Response time is below max_response_time | 1 | 0 | 0 |
| Test_3. Response body is JSON | 1 | 0 | 0 |
| Test_4. Response body contains 'firstname' with partially updated value | 1 | 0 | 0 |
| Test_5. Response body contains 'lastname' with preserved value | 1 | 0 | 0 |
| Test_6. Response body contains 'totalprice' with preserved value | 1 | 0 | 0 |
| Test_7. Response body contains 'depositpaid' with preserved value | 1 | 0 | 0 |
| Test_8. Response body contains 'bookingdates' property | 1 | 0 | 0 |
| Test_9. 'bookingdates' property contains 'checkin' with preserved value | 1 | 0 | 0 |
| Test_10. 'bookingdates' property contains 'checkout' with preserved value | 1 | 0 | 0 |
| Test_11. 'additionalneeds' property contains 'Breakfast' with preserved value | 1 | 0 | 0 |
| Total | 12 | 0 | 0 |
| Test Name | Assertion Error |
|---|
## Get Booking by ID
Retrieves the details of an existing booking using a valid booking ID. This request is used to verify the state of a booking after a partial update — confirming that updated fields reflect new values while preserved fields remain unchanged.
---
## HTTP Method & URL
```
GET https://restful-booker.herokuapp.com/booking/1273
```
**Path Variable:**
| Variable | Description |
| --- | --- |
| `1273` | The unique numeric ID of the booking to retrieve. Appended directly to the URL path. |
---
## Variables Used
| Variable | Scope | Description |
| --- | --- | --- |
| `https://restful-booker.herokuapp.com` | Collection | Base URL of the RESTful Booker API (e.g., `https://restful-booker.herokuapp.com`) |
| `1273` | Collection | The ID of the booking to fetch. Must be set before this request is executed. |
---
## Pre-request Script Behavior
Before the request is sent, the pre-request script validates that the `bookingid` collection variable is defined. If it is not set, the test will fail with the message:
> **Prerequisites: booking_id must be set as collection variable**
This acts as a guard to prevent the request from running without a valid booking ID in scope.
---
## Expected Response
**Status:** `200 OK`
**Content-Type:** `application/json`
The response body is a JSON object with exactly **6 top-level keys**:
``` json
{
"firstname": "string",
"lastname": "string",
"totalprice": 0,
"depositpaid": true,
"bookingdates": {
"checkin": "YYYY-MM-DD",
"checkout": "YYYY-MM-DD"
},
"additionalneeds": "string"
}
```
| Field | Type | Description |
| --- | --- | --- |
| `firstname` | `string` | First name of the guest (partially updated value) |
| `lastname` | `string` | Last name of the guest (preserved value) |
| `totalprice` | `integer` | Total price of the booking (preserved value) |
| `depositpaid` | `boolean` | Whether a deposit has been paid (preserved value) |
| `bookingdates` | `object` | Object containing check-in and check-out dates |
| `bookingdates.checkin` | `string` | Check-in date in `YYYY-MM-DD` format (preserved value) |
| `bookingdates.checkout` | `string` | Check-out date in `YYYY-MM-DD` format (preserved value) |
| `additionalneeds` | `string` | Any additional requirements for the booking (preserved value) |
---
## Test Coverage
This request includes **11 automated tests**:
| Test | Description |
| --- | --- |
| **Test_1** | Status code is `200` |
| **Test_2** | Response time is below the `max_response_time` collection variable |
| **Test_3** | Response body is valid JSON, is an object, and contains exactly 6 keys: `firstname`, `lastname`, `totalprice`, `depositpaid`, `bookingdates`, `additionalneeds` |
| **Test_4** | `firstname` is a string and equals the partially updated value (`partial_updated_firstname`) |
| **Test_5** | `lastname` is a string and equals the preserved value (`updated_lastname`) |
| **Test_6** | `totalprice` is an integer and equals the preserved value (`totalprice`) |
| **Test_7** | `depositpaid` is a boolean and equals the preserved value (`depositpaid`) |
| **Test_8** | `bookingdates` is an object containing both `checkin` and `checkout` keys |
| **Test_9** | `bookingdates.checkin` is a non-empty string in `YYYY-MM-DD` format and equals the preserved value (`checkin`) |
| **Test_10** | `bookingdates.checkout` is a non-empty string in `YYYY-MM-DD` format and equals the preserved value (`updated_checkout`) |
| **Test_11** | `additionalneeds` is a non-empty string and equals the preserved value (`additionalneeds`) |
| Header Name | Header Value |
|---|---|
| User-Agent | PostmanRuntime/7.39.1 |
| Accept | */* |
| Cache-Control | no-cache |
| Postman-Token | 24fe0111-c62c-4046-ade0-be268102ece1 |
| Host | restful-booker.herokuapp.com |
| Accept-Encoding | gzip, deflate, br |
| Connection | keep-alive |
| Header Name | Header Value |
|---|---|
| Content-Length | 175 |
| Content-Type | application/json; charset=utf-8 |
| Date | Mon, 19 Oct 2026 10:33:23 GMT |
| Etag | W/"af-2AjnlDDiRcazRN0S/QjTf4rCPvM" |
| Nel | {"report_to":"heroku-nel","response_headers":["Via"],"max_age":3600,"success_fraction":0.01,"failure_fraction":0.1} |
| Report-To | {"group":"heroku-nel","endpoints":[{"url":"https://nel.heroku.com/reports?s=1nuwXe9hvyqn%2ByBd%2Bp63rWmblHpL8j3MY8VWtxmtUqs%3D\u0026sid=c46efe9b-d3d2-4a0c-8c76-bfafa16c5add\u0026ts=1792406003"}],"max_age":3600} |
| Reporting-Endpoints | heroku-nel="https://nel.heroku.com/reports?s=1nuwXe9hvyqn%2ByBd%2Bp63rWmblHpL8j3MY8VWtxmtUqs%3D&sid=c46efe9b-d3d2-4a0c-8c76-bfafa16c5add&ts=1792406003" |
| Server | Heroku |
| Via | 1.1 heroku-router |
| X-Powered-By | Express |
{"firstname":"Ibrahim","lastname":"McGlynn","totalprice":659,"depositpaid":false,"bookingdates":{"checkin":"2026-02-12","checkout":"2026-02-16"},"additionalneeds":"Breakfast"}
| Name | Passed | Failed | Skipped |
|---|---|---|---|
| Prerequisites: booking_id must be set as collection variable | 1 | 0 | 0 |
| Test_1. Status code is 200 | 1 | 0 | 0 |
| Test_2. Response time is below max_response_time | 1 | 0 | 0 |
| Test_3. Response body is JSON | 1 | 0 | 0 |
| Test_4. Response body contains 'firstname' property with partially updated value | 1 | 0 | 0 |
| Test_5. Response body contains 'lastname' property with preserved value | 1 | 0 | 0 |
| Test_6. Response body contains 'totalprice' property with preserved value | 1 | 0 | 0 |
| Test_7. Response body contains 'depositpaid' property with preserved value | 1 | 0 | 0 |
| Test_8. Response body contains 'bookingdates' property | 1 | 0 | 0 |
| Test_9. 'bookingdates' property contains 'checkin' with preserved value | 1 | 0 | 0 |
| Test_10. 'bookingdates' property contains 'checkout' with preserved value | 1 | 0 | 0 |
| Test_11. Response body contains 'additionalneeds' with preserved valuee | 1 | 0 | 0 |
| Total | 12 | 0 | 0 |
| Test Name | Assertion Error |
|---|
## Delete Booking
Deletes an existing booking by its ID from the RESTful Booker API. This is a **positive (happy-path) test** that verifies the API correctly removes a booking when a valid session token is provided.
---
## Endpoint
`DELETE https://restful-booker.herokuapp.com/booking/1273`
---
## Prerequisites
| Variable | Description |
| --- | --- |
| `https://restful-booker.herokuapp.com` | Base URL of the RESTful Booker API |
| `1273` | ID of the booking to be deleted (set by a prior create/get request) |
| `fb4cdc12acb9672` | Valid session token obtained from the `/auth` endpoint |
---
## Request Headers
| Header | Value | Description |
| --- | --- | --- |
| `Content-Type` | `application/json` | Specifies the request format |
| `Cookie` | `token=fb4cdc12acb9672` | Session token used for authorization |
---
## Expected Response
| Field | Value |
| --- | --- |
| **Status Code** | `201 Created` |
| **Content-Type** | `text/plain` |
| **Body** | `Created` |
> ⚠️ Note: The RESTful Booker API returns `201 Created` (instead of the more conventional `200 OK` or `204 No Content`) upon a successful deletion. This is a known quirk of the API.
---
## Automated Tests
| Test | Description |
| --- | --- |
| `Test_1. Status code is 201` | Verifies the response status is `201` |
| `Test_2. Response time is below max_response_time` | Ensures the response time is within the threshold defined by `1000` |
| `Test_3. Response body is JSON` | Confirms the `Content-Type` is `text/plain` and the body equals `"Created"` |
---
## Pre-request Validation
Before the request is sent, the script checks that both `1273` and `fb4cdc12acb9672` collection variables are defined. If either is missing, the test will fail early with a clear error message.
| Header Name | Header Value |
|---|---|
| Content-Type | application/json |
| Cookie | token=fb4cdc12acb9672 |
| User-Agent | PostmanRuntime/7.39.1 |
| Accept | */* |
| Cache-Control | no-cache |
| Postman-Token | cafe7d35-6aa4-4e49-9494-d91189d3662a |
| Host | restful-booker.herokuapp.com |
| Accept-Encoding | gzip, deflate, br |
| Connection | keep-alive |
| Header Name | Header Value |
|---|---|
| Content-Length | 7 |
| Content-Type | text/plain; charset=utf-8 |
| Date | Mon, 19 Oct 2026 10:33:23 GMT |
| Etag | W/"7-rM9AyJuqT6iOan/xHh+AW+7K/T8" |
| Nel | {"report_to":"heroku-nel","response_headers":["Via"],"max_age":3600,"success_fraction":0.01,"failure_fraction":0.1} |
| Report-To | {"group":"heroku-nel","endpoints":[{"url":"https://nel.heroku.com/reports?s=1nuwXe9hvyqn%2ByBd%2Bp63rWmblHpL8j3MY8VWtxmtUqs%3D\u0026sid=c46efe9b-d3d2-4a0c-8c76-bfafa16c5add\u0026ts=1792406003"}],"max_age":3600} |
| Reporting-Endpoints | heroku-nel="https://nel.heroku.com/reports?s=1nuwXe9hvyqn%2ByBd%2Bp63rWmblHpL8j3MY8VWtxmtUqs%3D&sid=c46efe9b-d3d2-4a0c-8c76-bfafa16c5add&ts=1792406003" |
| Server | Heroku |
| Via | 1.1 heroku-router |
| X-Powered-By | Express |
Created
| Name | Passed | Failed | Skipped |
|---|---|---|---|
| Prerequisites: booking_id and token must be set | 1 | 0 | 0 |
| Test_1. Status code is 201 | 1 | 0 | 0 |
| Test_2. Response time is below max_response_time | 1 | 0 | 0 |
| Test_3. Response body is JSON | 1 | 0 | 0 |
| Total | 4 | 0 | 0 |
| Test Name | Assertion Error |
|---|
## Get Booking by ID (Post-Delete Verification)
This request attempts to retrieve a booking using a **recently removed booking ID**. It is used to verify that the API correctly handles non-existent booking IDs by returning a `404 Not Found` response. This is a **negative / post-condition test** used at the end of the Authentication Token Lifecycle workflow to confirm that the delete operation was successful.
---
### Endpoint
```
GET https://restful-booker.herokuapp.com/booking/1273
```
---
### Variables
| Variable | Description |
| --- | --- |
| `https://restful-booker.herokuapp.com` | Base URL of the RESTful Booker API |
| `1273` | The booking ID used in the request — expected to be non-existent |
---
### Expected Behavior
When an invalid `bookingid` is provided, the API should respond with:
- **Status:** `404 Not Found`
- **Content-Type:** `text/plain`
- **Body:** Contains the text `"Not Found"`
---
### Tests
1. **Test_1 — Response status is 404 (Not Found)**
Verifies that the HTTP response status code is `404`.
2. **Test_2 — Response time is below** **`max_response_time`**
Verifies that the response time is below the threshold defined in the `max_response_time` collection variable.
3. **Test_3 — Response body is not empty and contains "Not Found"**
Verifies that:
- The `Content-Type` header includes `text/plain`
- The response body is not empty
- The response body includes the text `"Not Found"`
| Header Name | Header Value |
|---|---|
| User-Agent | PostmanRuntime/7.39.1 |
| Accept | */* |
| Cache-Control | no-cache |
| Postman-Token | d35b0aa2-0a81-4361-9b8e-19b834484e76 |
| Host | restful-booker.herokuapp.com |
| Accept-Encoding | gzip, deflate, br |
| Connection | keep-alive |
| Header Name | Header Value |
|---|---|
| Content-Length | 9 |
| Content-Type | text/plain; charset=utf-8 |
| Date | Mon, 19 Oct 2026 10:33:24 GMT |
| Etag | W/"9-0gXL1ngzMqISxa6S1zx3F4wtLyg" |
| Nel | {"report_to":"heroku-nel","response_headers":["Via"],"max_age":3600,"success_fraction":0.01,"failure_fraction":0.1} |
| Report-To | {"group":"heroku-nel","endpoints":[{"url":"https://nel.heroku.com/reports?s=gox4lJHGOteDizWlsCu9PO6x%2Bm7dxhaC0oYVEPfjnY0%3D\u0026sid=c46efe9b-d3d2-4a0c-8c76-bfafa16c5add\u0026ts=1792406004"}],"max_age":3600} |
| Reporting-Endpoints | heroku-nel="https://nel.heroku.com/reports?s=gox4lJHGOteDizWlsCu9PO6x%2Bm7dxhaC0oYVEPfjnY0%3D&sid=c46efe9b-d3d2-4a0c-8c76-bfafa16c5add&ts=1792406004" |
| Server | Heroku |
| Via | 1.1 heroku-router |
| X-Powered-By | Express |
Not Found
| Name | Passed | Failed | Skipped |
|---|---|---|---|
| Test_1. Response status is 404 (Not Found) | 1 | 0 | 0 |
| Test_2. Response time is below max_response_time | 1 | 0 | 0 |
| Test_3. Response body is NOT empty | 1 | 0 | 0 |
| Total | 3 | 0 | 0 |
| Test Name | Assertion Error |
|---|