Skip to content

API Guide

Actual documentation (self-documented approach)

Full and actual API documentation with actual request examples you can find here:

  • Swagger UI (you can send requests directly from your browser 🔥)
  • ReDoc

Authorization

Overview

All API requests require access token placed in the header:

Authorization: Bearer <access-token>

Perpetual token

You can request a perpetual token from OneSoil team to have access to API.

OAuth2: Client Credentials

You can request a pair of parameters (client_id and client_secret) from OneSoil team to have ability to request a temporary access token via API.

Adding Authorization to Your Requests

Once you have your API token, you can include it in all API requests. The API token should be included in the HTTP Authorization header using the "Bearer" schema.

curl -X GET "https://api-b2b.prod-be.onesoil.ai/some-resource" -H "Authorization: Bearer ${API_TOKEN}"
import requests

API_TOKEN = "your_api_token_here"

headers = {
    "Authorization": f"Bearer {API_TOKEN}",
}

response = requests.get("https://api-b2b.prod-be.onesoil.ai/some-resource", headers=headers)

print(response.json())