Making API Calls
How to integrate with CPS APIs in your application
Learn how to make HTTP requests to CPS APIs for photo browsing, order management, and system integration.
HTTP Methods
CPS APIs use standard REST HTTP methods:
- GET: Retrieve data (events, photos, orders)
- POST: Create resources (orders, feedback)
- PUT: Update resources (order status)
Base URLs
Use the appropriate base URL for each platform:
Request Headers
Include standard headers for all requests:
Response Handling
All APIs return JSON responses. Handle both success and error cases:
Common Patterns
Pagination
Photo endpoints support pagination:
Error Handling
Implement comprehensive error handling:
CORS Considerations
All CPS APIs include CORS headers for web integration. No proxy required for browser-based requests.
Code Examples
Browse Events
Create Order
Check Order Status
Rate Limiting
- Public browsing: No limits
- Order submission: CAPTCHA required
- Admin access: Authenticated requests only
Best Practices
- Cache responses for photo metadata
- Implement retry logic for transient failures
- Validate data before submission
- Handle network errors gracefully
- Use HTTPS for all requests
Quick example
Here’s a minimal example showing navigation structure in docs.yml:
docs.yml
For complete navigation options, see the navigation documentation.