Skip to content

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/v1

Authentication

All API requests require authentication using API key in the Authorization header and tenant identification:

http
Authorization: YOUR_API_KEY
X-Tenant-Id: YOUR_TENANT_ID

Note: 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:

http
Content-Type: application/json

Response Format

All responses follow a consistent structure:

json
{
  "status": "ok",
  "data": { ... },
  "errors": null,
  "request_id" : "..."
}

Error Format

Error responses include detailed information:

json
{
  "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

CodeDescription
200Success
201Created
400Bad Request
401Unauthorized
403Forbidden
404Not Found
422Validation Error
429Rate Limited
500Server 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:

http
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1642248000

Pagination

List endpoints support pagination using page and per_page parameters:

http
GET /api/v1/products?page=2&per_page=50

Response includes pagination metadata:

json
{
  "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" : "..."
}