API Reference

Comprehensive reference for all Payload CMS collections and globals endpoints.

Base URL

Development: https://dev-api.picoshealth.com/v1
Production: https://api.picoshealth.com/v1

Authentication

All endpoints require a Bearer JWT token:

Authorization: Bearer YOUR_JWT_TOKEN

##s (24)

Users

Endpoint: GET/POST /api/users

FieldTypeDescription
emailstringUser email address
passwordstringHashed password
rolestringadmin, provider, patient
firstNamestringFirst name
lastNamestringLast name

Create User:

POST /api/users
Content-Type: application/json

{
  "email": "user@example.com",
  "password": "SecurePass123",
  "role": "patient",
  "firstName": "John",
  "lastName": "Doe"
}

Products

Endpoint: GET/POST /api/products

FieldTypeDescription
titlestringProduct name
pricenumberPrice in USD
skustringStock keeping unit
hcpcs_codearrayMedical procedure codes
statusstringdraft, published, archived

Orders

Endpoint: GET/POST /api/orders

FieldTypeDescription
customerIDCustomer user ID
line_itemsarrayItems in order
totalnumberOrder total
statusstringpending, approved, shipped, delivered, cancelled

Transactions

Endpoint: GET/POST /api/transactions

FieldTypeDescription
userIDUser ID
typestringcharge, credit, refund
amountnumberTransaction amount
statusstringcompleted, pending, failed

Patients

Endpoint: GET/POST /api/patients

FieldTypeDescription
userIDAssociated user ID
dateOfBirthdateDate of birth
medicalConditionsarrayHealth conditions
medicationsarrayCurrent medications

Messages

Endpoint: GET/POST /api/messages

FieldTypeDescription
subjectstringMessage subject
bodystringMessage content (HTML)
from_userIDSender user ID
to_userIDRecipient user ID
readbooleanRead status

My CareList

Endpoint: GET/POST /api/my-care-list

FieldTypeDescription
titlestringCare list name
ownerIDOwner user ID
itemsarrayCare list items
spendingLimitsarrayBudget limits

Payment Methods

Endpoint: GET/POST /api/payment-methods

FieldTypeDescription
userIDUser ID
typestringcredit_card, bank_account
last4stringLast 4 digits
isDefaultbooleanDefault payment method

Others

  • Groups - User grouping/teams
  • Media - File uploads and storage
  • Documents - File management
  • Overseers - Care supervision relationships
  • Fulfillment - Order shipping/tracking
  • Invites - User invitations
  • Members - Organization members
  • ProductCategories - Product categorization
  • ProductTags - Product tagging
  • ProductFavorites - Saved products
  • CheckoutSessions - Payment sessions
  • OrdersActivityFeed - Order history
  • TransactionLogs - Financial audit trail
  • UserPermissionsConfig - Permission settings
  • WalletBalance - Account balances
  • OrderAggregations - Analytics data

Globals (9)

SiteSettings

Endpoint: GET/POST /globals/site-settings

Global site configuration including brand name, contact information, and business hours.

OrganizationSettings

Endpoint: GET/POST /globals/organization-settings

Organization-wide settings including tier, max users, feature flags, and network summary.

MessageSettings

Endpoint: GET/POST /globals/message-settings

Messaging system configuration for email, SMS, and push notifications.

Wallet

Endpoint: GET/POST /globals/wallet

Wallet and payment system configuration including auto-charge settings and fees.

HCPCSFinder

Endpoint: GET /globals/hcpcs-finder

Index of medical procedure codes for product lookups.

SKUFinder

Endpoint: GET /globals/sku-finder

Index of SKUs for product lookups.

GlobalOrgDashboard

Endpoint: GET/POST /globals/organization

Organization dashboard configuration and summary metrics.

GlobalStorefrontHomepage

Endpoint: GET/POST /globals/storefront-homepage

Homepage configuration for the storefront.

GlobalFormularySettings

Endpoint: GET/POST /globals/formulary-settings

Formulary and product display settings.


HTTP Methods

MethodPurpose
GETRetrieve documents
POSTCreate new documents or update globals
PATCHUpdate existing documents
DELETEDelete documents

Query Parameters

ParameterTypeExample
limitnumber?limit=50
pagenumber?page=1
sortstring?sort=-createdAt
whereJSON?where={"status":{"equals":"published"}}
depthnumber?depth=2
localestring?locale=en

Status Codes

CodeMeaning
200OK - Request successful
201Created - Resource created
400Bad Request - Invalid parameters
401Unauthorized - Missing/invalid token
403Forbidden - Insufficient permissions
404Not Found - Resource doesn't exist
429Too Many Requests - Rate limited
500Internal Server Error

Rate Limiting

  • Limit: 100 requests per minute
  • Headers: Check X-RateLimit-Remaining header
  • Backoff: Use exponential backoff for retries

Webhooks

Webhooks are sent for collection events:

  • collection.create - New document created
  • collection.update - Document updated
  • collection.delete - Document deleted

Last Updated: June 22, 2026