Introduction

Welcome to the RK Development API documentation. This API provides developers with access to various services and data endpoints provided by RK Development.

The API follows RESTful principles and returns JSON responses. All requests should be made to https://rkd.my.id/api/v1/ endpoint.

Base URL

https://rkd.my.id/api/v1/

Requirements

  • All API requests must be made over HTTPS
  • All data is sent and received as JSON
  • Authentication is required for most endpoints

Authentication

Most RK Development API endpoints require authentication using API keys. You can obtain an API key by registering as a developer on our platform.

Using API Keys

Include your API key in the Authorization header of your requests:

Authorization: Bearer YOUR_API_KEY

Example Authenticated Request

GET /api/v1/protected-endpoint

Headers:

{ "Authorization": "Bearer YOUR_API_KEY", "Content-Type": "application/json" }

Example Endpoint

The example endpoint provides a simple way to test API connectivity and see sample responses.

GET /example?code={test_code}

Returns example data based on the provided test code.

Parameters

Parameter Type Required Description
code string Yes The test code to include in the response

Example Request

GET https://rkd.my.id/example?code=test

Example Response

{ "status": "success", "code": 200, "message": "Request processed successfully", "data": { "provided_code": "test", "timestamp": "2023-11-15T14:30:22Z", "service": "RK Development API", "version": "1.0.0" } }

Sample Code

JavaScript (Fetch API)

fetch('https://rkd.my.id/example?code=test') .then(response => response.json()) .then(data => console.log(data)) .catch(error => console.error('Error:', error));

Python (requests)

import requests response = requests.get('https://rkd.my.id/example?code=test') data = response.json() print(data)

PHP (cURL)

cURL

curl -X GET "https://rkd.my.id/example?code=test"

Response Codes

The RK Development API uses standard HTTP status codes to indicate the success or failure of an API request.

Code Description
200 OK The request was successful
201 Created The resource was successfully created
400 Bad Request The request was malformed or missing required parameters
401 Unauthorized Authentication failed or not provided
403 Forbidden Authenticated user doesn't have access to the resource
404 Not Found The requested resource doesn't exist
429 Too Many Requests Rate limit exceeded
500 Internal Server Error An error occurred on the server

Error Handling

When an error occurs, the API will return an appropriate HTTP status code along with a JSON response containing error details.

Error Response Format

{ "status": "error", "code": 400, "message": "Invalid parameter: code", "errors": [ { "field": "code", "message": "Code parameter is required" } ] }

Common Errors

Error Code Message Solution
400 Missing required parameter Check that all required parameters are included
401 Invalid API key Verify your API key is correct and properly included in the Authorization header
404 Endpoint not found Check the endpoint URL for typos
429 Rate limit exceeded Wait before making additional requests or contact support for higher limits

Rate Limiting

To ensure fair usage and maintain service quality, the RK Development API implements rate limiting.

Rate Limits

  • Free tier: 100 requests per hour
  • Basic tier: 1,000 requests per hour
  • Pro tier: 10,000 requests per hour

Checking Rate Limits

Rate limit information is included in response headers:

X-RateLimit-Limit: 100 X-RateLimit-Remaining: 99 X-RateLimit-Reset: 3600

When you exceed your rate limit, you'll receive a 429 Too Many Requests response.

Available APIs

Explore our collection of powerful and easy-to-use APIs