API Overview
The Hoard Agent communicates with the Hoard server via a REST API. All endpoints use Bearer token authentication with your API key.
Base URL
https://www.tryhoard.com/api/v1
Authentication
Every request must include your API key in the Authorization header:
Authorization: Bearer YOUR_API_KEY
Get your API key from Settings > Account.
Endpoints
| Method | Path | Purpose |
|---|
| POST | /heartbeat | Agent keep-alive signal |
| GET | /sync/pending | Check if a sync should run |
| POST | /sync | Upload inventory CSV (gzipped) |
| POST | /sync/cancel | Release sync lock on failure |
| GET | /export/price-updates | Download repricing CSV |
| POST | /orders | Upload order data |
| POST | /sales_report | Upload sales report |
| GET | /sales_report/gaps | Get months missing data |
| POST | /repricing_events | Record a price import event |
All endpoints return JSON. Successful responses include the relevant data. Error responses follow this format:
{"error": "description of what went wrong"}
Status codes
| Code | Meaning |
|---|
| 200 | Success |
| 401 | Invalid or missing API key |
| 413 | Payload too large |
| 422 | Validation error |
| 500 | Server error |
This API is designed for the Hoard Agent, not for general-purpose use. The agent handles all API communication automatically. You don’t need to call these endpoints directly unless you’re building a custom integration.