API Reference
The BebasKirim Partner API is organized around REST principles with predictable resource-oriented URLs. We use standard HTTP response codes and authentication methods.
Base URL
Production: https://open.bebaskirim.com/api/partner/v1Authentication
All API requests require authentication using API key in the Authorization header and tenant identification:
Authorization: YOUR_API_KEY
X-Tenant-Id: YOUR_TENANT_IDNote: Some endpoints may not require the X-Tenant-Id header. Check individual endpoint documentation for specific requirements.
Content Type
All requests and responses use JSON format:
Content-Type: application/jsonResponse Format
All responses follow a consistent structure:
{
"status": "ok",
"data": { ... },
"errors": null,
"request_id" : "..."
}Error Format
Error responses include detailed information:
{
"status": "bad_request",
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid request parameters",
"details": {
"field": "product_name",
"issue": "Product name is required"
}
},
"request_id" : "..."
}HTTP Status Codes
| Code | Description |
|---|---|
| 200 | Success |
| 201 | Created |
| 400 | Bad Request |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
| 422 | Validation Error |
| 429 | Rate Limited |
| 500 | Server Error |
Rate Limiting
API requests are rate limited, but you can request to upgrade the limit by contacting our support team at partner-support@bebaskirim.com
- Small: 1000 requests per minute
- Medium: 2000 requests per minute
- Large: 5000 requests per minute
Rate limit information is included in response headers:
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1642248000Pagination
List endpoints support pagination using page and per_page parameters:
GET /api/v1/products?page=2&per_page=50Response includes pagination metadata:
{
"status": "ok",
"data": {
"products": [...],
"pagination": {
"current_page": 2,
"per_page": 50,
"total_pages": 10,
"total_items": 500,
"has_next": true,
"has_prev": true
}
},
"errors": null,
"request_id" : "..."
}