Journey Docs
Getting Started

Bruno Setup

Configure Bruno API client for Journey API testing

Bruno is the recommended API client for testing Journey API endpoints.

Installation

brew install bruno

Repository Setup

# Clone the Journey API repository
git clone https://github.com/Journey-Rewards/api.git
cd api

# Open Bruno with the collection
bruno open bruno/

Collection Structure

bruno/
├── Members (Surface)/
│   ├── Auth/
│   ├── Me/
│   ├── Properties/
│   └── Reservations/
├── Admin/
│   ├── Auth/
│   ├── Members/
│   └── Reservations/
├── Public (Surface)/
│   ├── Properties/
│   └── Reservations/
└── environments/
    ├── local.bru
    ├── development.bru
    └── production.bru

Environment Configuration

1. Select Environment

Choose the appropriate environment in Bruno:

  • Local: http://localhost:3000
  • Development: https://api-dev.cf.journey.com/v1
  • Production: https://api-prd.cf.journey.com/v1

2. Get a Members Token (Dev)

The Members API authenticates via Clerk. To get a token in the development environment:

  1. Open the Members (Surface) → Auth → Login request in Bruno
  2. Enter a test phone number — use any 555 area code number ending in 01xx, e.g. +15550010100
  3. Clerk will send an OTP to the number (test numbers are handled automatically in dev)
  4. Complete the OTP step — Bruno will store the resulting Clerk JWT in CLERK_TOKEN

555 numbers ending in 01xx (+1555XXX0100 through +1555XXX0199) are Clerk test numbers. No real SMS is sent — the OTP completes automatically in the dev Clerk environment.

3. Set Admin Token (WorkOS)

// In environment variables
WORKOS_TOKEN = "your-workos-jwt-token"

Example Requests

Members Profile Request

File: bruno/Members (Surface)/Me/Profile/Get Me.bru

GET {{BASE_URL}}/members/me
Authorization: Bearer {{CLERK_TOKEN}}

Admin Member Query

File: bruno/Admin/Members/Query Members.bru

POST {{BASE_URL}}/admin/members/query
Authorization: Bearer {{WORKOS_TOKEN}}
Content-Type: application/json

{
  "limit": 10,
  "offset": 0,
  "filters": {
    "status": "active"
  }
}

Public Property Request

File: bruno/Public (Surface)/Properties/Get Property.bru

GET {{BASE_URL}}/public/properties/{{PROPERTY_ID}}

Testing Workflows

1. Member Onboarding Flow

  1. Run Members (Surface)/Auth/Validate.bru
  2. Run Members (Surface)/Me/Update Me.bru
  3. Run Members (Surface)/Me/Profile/Update Profile.bru

2. Property Search Flow

  1. Run Members (Surface)/Properties/Search.bru
  2. Run Members (Surface)/Properties/Get Property.bru
  3. Run Members (Surface)/Properties/Availability.bru

3. Admin Operations

  1. Run Admin/Auth/WorkOS Callback.bru
  2. Run Admin/Members/Query.bru
  3. Run Admin/Members/Gift Points.bru

Assertions and Tests

Bruno supports JavaScript-based assertions:

// In Tests tab
test("Status is 200", () => {
  expect(res.status).to.equal(200);
});

test("Member has external ID", () => {
  expect(res.body.member.externalId).to.exist;
});

test("Response time under 500ms", () => {
  expect(res.responseTime).to.be.below(500);
});

Tips

  1. Use environment variables for sensitive data
  2. Save responses to variables for chaining requests
  3. Create folders for organizing test scenarios
  4. Use pre-request scripts for dynamic data
  5. Export/import collections for team sharing

Troubleshooting

IssueSolution
401 UnauthorizedCheck token in environment variables
404 Not FoundVerify endpoint URL and parameters
Connection refusedEnsure API server is running
CORS errorsUse Bruno instead of browser

On this page