HTTP Status Codes
| Status | Meaning |
|---|---|
200 | Success |
401 | Authentication failed (missing, invalid, or expired API key) |
402 | Subscription expired or inactive |
403 | Permission denied (insufficient API key scope, inactive tenant, or feature not available on plan) |
404 | Resource not found |
409 | Idempotency reference conflicts with an earlier request |
422 | Validation error (invalid input or invalid state transition) |
429 | Rate limit exceeded |
500 | Server error |
Error Response Format
All error responses follow this format:
{
"success": false,
"error": "Human-readable error message"
}Validation errors (422) may include field-level details:
{
"success": false,
"error": "The given data was invalid.",
"errors": {
"status": ["The selected status is invalid."],
"stock_qty": ["The stock qty must be at least 0."]
}
}Authentication Errors (401)
"API key required"
Cause: No API key was provided in the request.
Fix: Include your key in one of these headers:
X-API-Key: sk_your_key_hereor
Authorization: Bearer sk_your_key_here"Invalid or expired API key"
Cause: The key doesn't exist, was deleted, is disabled, or has passed its expiration date.
Fix:
- Check for typos in the key.
- Go to Settings > API Keys and verify the key is active and not expired.
- If the key was deleted, create a new one.
Permission Errors (403)
"Insufficient permissions. Required: orders:write"
Cause: Your API key has the correct authentication but lacks the specific permission needed for this endpoint.
Fix: Go to Settings > API Keys, delete the current key, and create a new one with the required permissions.
"Organization account is inactive"
Cause: Your SalesPro Hub account has been suspended or deactivated.
Fix: Contact your account administrator or SalesPro Hub support.
"API access is not available on the current plan"
Cause: The API is only available on Professional and Enterprise plans.
Fix: Upgrade your subscription at Settings > Billing.
Validation Errors (422)
Order Status Updates
"Cannot transition from 'delivered' to 'confirmed'"
Order statuses can only move forward through the lifecycle. Valid transitions:
| Current Status | Can Move To |
|---|---|
pending | confirmed, cancelled |
confirmed | processing, delivered, cancelled |
processing | delivered, cancelled |
delivered | (none - terminal) |
cancelled | (none - terminal) |
Inventory Updates
"The stock qty must be at least 0"
Stock quantities cannot be negative. If you need to represent a backorder, set stock to 0.
"SKU 'XYZ' not found" (in bulk update)
The SKU doesn't match any active product in SalesPro Hub. Check:
- SKU is spelled correctly (case-sensitive).
- The product exists and is active in SalesPro Hub.
Rate Limiting (429)
"Daily API call limit exceeded"
| Plan | Daily Limit |
|---|---|
| Professional | 5,000 requests/day |
| Enterprise | Unlimited |
The daily counter resets at midnight UTC. The response includes Retry-After,
X-RateLimit-Limit, and X-RateLimit-Remaining headers. External routes also
apply a 60-request-per-minute throttle. If you're hitting a limit:
- Reduce polling frequency (every 15 min instead of every 1 min).
- Use
?updated_since=for incremental sync instead of fetching all orders. - Use bulk endpoints instead of individual updates.
Webhook Troubleshooting
Webhook not being received
- Check endpoint URL — Is it publicly accessible? Test with
curlfrom an external machine. - Check endpoint is enabled — Go to Settings > Webhooks and verify it shows "Active".
- Check event subscription — The endpoint must be subscribed to the specific event.
- Check delivery history — Settings > Webhooks > View Deliveries shows all attempts.
- Check for auto-disable — After 10 consecutive failures, the endpoint is automatically disabled.
Webhook signature verification failing
- Use the raw request body — Don't parse JSON before verifying. The signature is computed on the raw string.
- Use the correct secret — Each endpoint has its own secret. They are not interchangeable.
- Check timestamp format —
X-Webhook-Timestampis a Unix timestamp (seconds since epoch), not ISO 8601. - Verify the signed payload format — It's
{timestamp}.{raw_body}with a literal period between them.
Webhook endpoint auto-disabled
After 10 consecutive failures, the endpoint is disabled to prevent continued failed deliveries.
To re-enable:
- Go to Settings > Webhooks.
- Fix the underlying issue (endpoint URL, server error, etc.).
- Click the toggle to re-enable.
- Click "Send Test" to verify it's working.
This resets the failure counter back to 0.
Common Integration Issues
Orders appear in SalesPro Hub but not in the API
- Orders must be submitted (status:
pendingor later) to appear in the API. Draft orders are internal to SalesPro Hub. - Verify your API key has
orders:readpermission. - Check your query filters —
?status=pending&acknowledged=truewould return nothing if orders haven't been acknowledged yet.
Stock levels don't match between systems
Stock in SalesPro Hub changes due to:
- Order submissions — Stock is reserved (increases
reserved_qty). - Order deliveries — Reserved stock is deducted (decreases
stock_qty). - Order cancellations — Reserved stock is released (decreases
reserved_qty). - Manual adjustments — Admins can adjust stock in the dashboard.
- API syncs — Your external system pushes updates.
Use the stock movements endpoint to audit changes:
GET /api/v1/inventory/movements?sku=WDG-001Duplicate orders in Sage
Use the acknowledge endpoint to prevent reprocessing:
- After creating the order in Sage, immediately call
POST /acknowledgewith the Sage reference. - Always poll with
?acknowledged=falseto skip already-processed orders. - Store the SalesPro Hub
order_numberin Sage as a cross-reference.
Timeout errors
API requests have a 30-second timeout. For large inventories:
- Use pagination:
?per_page=100for order and inventory listing. - Limit bulk updates to 500 products per request.
- Use
?updated_since=for incremental order polling instead of full listing.
Getting Help
If you're stuck:
- Check the delivery history (Settings > Webhooks > View Deliveries) for error details.
- Use the stock movements endpoint to audit inventory changes.
- Test your API key with a simple
GET /api/v1/orderscall using cURL. - Contact support through the SalesPro Hub dashboard.