Endpoints for managing customer records, renter profiles, and pending renter approvals.
Customers
Get customer for authenticated user
GET /customer
Retrieves the customer record associated with the authenticated user
Responses
| Code | Description |
|---|---|
200 | Successfully retrieved customer |
401 | Unauthorized |
404 | User or customer not found |
500 | Server error |
Update customer
PATCH /customer
Updates the customer record associated with the authenticated user. Handles subscription changes via Stripe.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | No | |
email | string | No | |
permissions | object | No | |
integrations | object | No | Integration settings (merged with existing) |
Responses
| Code | Description |
|---|---|
200 | Customer updated successfully |
400 | No data provided or subscription change failed |
401 | Unauthorized |
404 | Customer not found |
500 | Server error |
Create a new customer
POST /customer
Creates a new customer record and associates it with the authenticated user. Also creates a Stripe customer.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | |
email | string | No | |
business_name | string | No | |
affiliateCode | string | No | Affiliate/partner code for tracking conversions |
permissions | object | No |
Responses
| Code | Description |
|---|---|
201 | Customer created successfully |
400 | Customer name is required |
401 | Unauthorized |
500 | Server error |
Create Stripe customer
POST /customer/create-stripe-customer
Creates a Stripe customer for an existing customer if one does not already exist
Responses
| Code | Description |
|---|---|
200 | Stripe customer created or already exists |
401 | Unauthorized |
404 | Customer not found |
500 | Server error |
Attach payment method
POST /customer/payment-method
Attaches a payment method to the customer's Stripe account and sets it as default
Request body
| Field | Type | Required | Description |
|---|---|---|---|
paymentMethodId | string | Yes | Stripe payment method ID |
Responses
| Code | Description |
|---|---|
200 | Payment method attached successfully |
400 | Payment method ID is required |
401 | Unauthorized |
404 | Customer or Stripe customer not found |
500 | Server error |
Create Stripe SetupIntent
POST /customer/create-setup-intent
Creates a SetupIntent for setting up a payment method via Stripe Elements
Responses
| Code | Description |
|---|---|
200 | SetupIntent created successfully |
401 | Unauthorized |
404 | Customer or Stripe customer not found |
500 | Server error |
Get saved payment methods
GET /customer/payment-methods
Retrieves all saved payment methods for the customer from Stripe
Responses
| Code | Description |
|---|---|
200 | Successfully retrieved payment methods |
401 | Unauthorized |
404 | Customer or Stripe customer not found |
500 | Server error |
Get subscription details
GET /customer/subscription
Retrieves the customer's current subscription details from Stripe
Responses
| Code | Description |
|---|---|
200 | Successfully retrieved subscription |
401 | Unauthorized |
404 | Customer not found |
500 | Server error |
Cancel subscription
POST /customer/cancel-subscription
Cancels the customer's subscription at the end of the current billing period
Responses
| Code | Description |
|---|---|
200 | Subscription scheduled for cancellation |
401 | Unauthorized |
404 | No active subscription found |
500 | Server error |
Reactivate subscription
POST /customer/reactivate-subscription
Reactivates a subscription that was scheduled for cancellation
Responses
| Code | Description |
|---|---|
200 | Subscription reactivated successfully |
401 | Unauthorized |
404 | No active subscription found |
500 | Server error |
Renters
Get paginated list of renters
GET /renters
Fetches renters with server-side search, filtering, sorting, and optional accounting enrichment
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
customerId | query | string | Yes | The customer ID to filter renters by |
page | query | integer | No | Page number for pagination |
limit | query | integer | No | Number of renters per page (max 100) |
includeAccounting | query | boolean | No | Include accounting data (balance, debits, credits) |
search | query | string | No | Search term to filter renters by name, email, phone, or license |
status | query | string | No | Filter by renter status |
sortField | query | string | No | Field to sort by |
sortDirection | query | string | No | Sort direction |
Responses
| Code | Description |
|---|---|
200 | Successfully retrieved renters |
400 | Missing required customerId parameter |
401 | Unauthorized access |
500 | Server error |
Create or update a renter
POST /renters
Creates a new renter or updates an existing one if email and customerId match. Also creates a Stripe customer if needed.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
firstName | string | Yes | |
lastName | string | Yes | |
email | string | Yes | |
address | string | Yes | |
customerId | string | Yes | |
dob | string | No | |
waivers_signed_urls | array | No | |
id_verifications | object | No | |
transactions | array | No | |
additional_info | object | No | |
stripe_customer_id | string | No |
Responses
| Code | Description |
|---|---|
200 | Existing renter updated successfully |
201 | New renter created successfully |
400 | Missing required fields |
500 | Server error |
Export renters data
GET /renters/export
Export renters data as CSV or JSON format with optional filtering
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
customerId | query | string | Yes | The customer ID to filter renters by |
format | query | string | No | Export format |
includeAccounting | query | boolean | No | Include accounting data in export |
search | query | string | No | Search term to filter renters |
status | query | string | No | Filter by renter status |
sortField | query | string | No | Field to sort by |
sortDirection | query | string | No | Sort direction |
Responses
| Code | Description |
|---|---|
200 | Successfully exported renters data |
400 | Invalid request parameters |
401 | Unauthorized access |
500 | Server error |
Get search suggestions for autocomplete
GET /renters/search-suggestions
Returns suggestions based on renter names, emails, phone numbers, and license numbers
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
customerId | query | string | Yes | The customer ID to search within |
query | query | string | Yes | Search query (minimum 2 characters) |
Responses
| Code | Description |
|---|---|
200 | Successfully retrieved suggestions |
400 | Missing required customerId parameter |
401 | Unauthorized access |
500 | Server error |
Get a single renter by ID
GET /renters/{id}
Fetches a single renter with their accounting information
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | The renter ID |
Responses
| Code | Description |
|---|---|
200 | Successfully retrieved renter |
400 | Renter ID is required |
401 | Unauthorized access |
404 | Renter not found |
500 | Server error |
Update a renter
PATCH /renters/{id}
Updates renter fields. Can also append notes using add_note flag.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | The renter ID |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
add_note | boolean | No | If true, appends the note to the notes array |
note | object | No | Note to append (used with add_note) |
firstName | string | No | |
lastName | string | No | |
email | string | No | |
address | string | No | |
status | string | No | |
riskScore | number | No | |
additional_info | object | No | |
transactions | array | No | Transactions are appended to existing array |
Responses
| Code | Description |
|---|---|
200 | Renter updated successfully |
400 | Invalid request or no valid fields provided |
401 | Unauthorized access |
404 | Renter not found |
500 | Server error |
Delete a renter
DELETE /renters/{id}
Deletes a renter from DynamoDB and also deletes the associated Stripe customer
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | The renter ID |
Responses
| Code | Description |
|---|---|
200 | Renter deleted successfully |
400 | Renter ID is required |
401 | Unauthorized access |
404 | Renter not found |
500 | Server error |
Attach a payment method to a renter
POST /renters/{id}/payment-method
Attaches a payment method to the renter's Stripe customer and sets it as the default
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | The renter ID |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
payment_method_id | string | Yes | Stripe payment method ID |
Responses
| Code | Description |
|---|---|
200 | Payment method added successfully |
400 | Renter ID or payment method ID is required |
404 | Renter or Stripe customer not found |
500 | Server error |
Get renters with outstanding balances
GET /owing/renters
Fetches all renters who owe money (balance >= $1) with optional historical date filtering
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
asOfDate | query | string | No | Calculate balances as of this date (for historical reporting) |
Responses
| Code | Description |
|---|---|
200 | Successfully retrieved renters with outstanding balances |
500 | Server error |
Get journal entries for a renter
GET /renters/journal-entries/{id}
Fetches all non-deleted journal entries for a specific renter
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | The renter ID |
Responses
| Code | Description |
|---|---|
200 | Successfully retrieved journal entries |
400 | Renter ID is required |
401 | Unauthorized access |
404 | Renter not found |
500 | Server error |
Get renter's saved payment methods
GET /renters/{id}/payment-methods
Retrieves all saved payment methods (cards) for a renter from Stripe
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | Renter ID |
Responses
| Code | Description |
|---|---|
200 | Payment methods retrieved successfully |
404 | Renter not found or no Stripe customer ID |
500 | Server error |
Pending Renters
Create a new waiver number
POST /pending-renters
Creates a new waiver number with a unique PIN for waiver signing
Request body
| Field | Type | Required | Description |
|---|---|---|---|
customerId | string | Yes | The customer ID |
locationId | string | No | The location ID |
firstName | string | No | |
lastName | string | No | |
email | string | No | |
phone | string | No | |
dob | string | No | |
address | object | No | |
assignTo | string | No | |
assetId | string | No | |
transactionId | string | No | |
renterId | string | No | |
templateId | string | No | |
rawData | object | No |
Responses
| Code | Description |
|---|---|
201 | Waiver number created successfully |
400 | Missing required customerId |
409 | Waiver number already exists |
500 | Could not create waiver number |
Get waiver numbers
GET /pending-renters
Retrieves waiver numbers by transactionId, customerId, or locationId
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
transactionId | query | string | No | Transaction ID to filter by |
customerId | query | string | No | Customer ID to filter by |
locationId | query | string | No | Location ID to filter by |
status | query | string | No | Status to filter by (e.g., PENDING, COMPLETED) |
Responses
| Code | Description |
|---|---|
200 | Waiver numbers retrieved successfully |
400 | transactionId, customerId, or locationId is required |
500 | Could not fetch waiver numbers |
Validate a waiver PIN
GET /pending-renters/validate
Validates a PIN and returns waiver details if valid and not expired
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
pin | query | string | Yes | The PIN to validate |
Responses
| Code | Description |
|---|---|
200 | PIN validated successfully |
400 | PIN is required |
404 | Invalid PIN or waiver already completed |
410 | Waiver has expired |
500 | Could not validate PIN |
Update a waiver number
PATCH /pending-renters/{waiverNumber}
Updates waiver details with optimistic locking support
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
waiverNumber | path | string | Yes | The waiver number to update |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
firstName | string | No | |
lastName | string | No | |
email | string | No | |
phone | string | No | |
dob | string | No | |
address | object | No | |
assignTo | string | No | |
assetId | string | No | |
status | string | No | |
renterId | string | No | |
waiverUrl | string | No | |
templateId | string | No | |
expectedVersion | string | No | For optimistic locking |
Responses
| Code | Description |
|---|---|
200 | Waiver updated successfully |
400 | waiverNumber is required or no valid fields to update |
404 | Waiver number not found |
409 | Record has been modified by another user |
500 | Could not update waiver number |
Delete a waiver number
DELETE /pending-renters/{waiverNumber}
Deletes a waiver number (only if it is in pending status)
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
waiverNumber | path | string | Yes | The waiver number to delete |
Responses
| Code | Description |
|---|---|
200 | Waiver number deleted successfully |
400 | waiverNumber is required |
409 | Can only delete pending waiver numbers |
500 | Could not delete waiver number |
Complete a waiver
PATCH /pending-renters/{waiverNumber}/complete
Marks a waiver as completed, removes the PIN, and optionally updates the renter record
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
waiverNumber | path | string | Yes | The waiver number to complete |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
renterId | string | Yes | The renter ID |
waiverUrl | string | Yes | URL to the completed waiver |
signatureId | string | No | |
completionData | object | No | Additional data to store with the waiver |
expectedVersion | string | No | For optimistic locking |
Responses
| Code | Description |
|---|---|
200 | Waiver completed successfully |
400 | waiverNumber, renterId, and waiverUrl are required |
404 | Waiver number not found |
409 | Waiver is not in pending status or has been modified |
500 | Could not complete waiver |

