Orishare
Api
GET
/currencies
AuthorizationBearer <token>

Secret key (osk_…), publishable key (opk_…) or personal access token (opat_…).

In: header

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/currencies"
{  "data": [    {      "id": "string",      "code": "string",      "name": "string",      "precision": 0,      "expiration_policy": {        "type": "never",        "days": 1      },      "negative_balance": "forbid",      "version": 0,      "created_at": "string",      "updated_at": "string"    }  ],  "next_cursor": "string",  "has_more": true}
POST
/currencies
AuthorizationBearer <token>

Secret key (osk_…), publishable key (opk_…) or personal access token (opat_…).

In: header

Header Parameters

Idempotency-Key?string

Required by the API on this route (400 idempotency_key_required without it); the official clients generate a UUID when you omit it.

Length1 <= length <= 255

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/currencies" \  -H "Content-Type: application/json" \  -d '{    "code": "string",    "name": "string"  }'
{  "id": "string",  "code": "string",  "name": "string",  "precision": 0,  "expiration_policy": {    "type": "never",    "days": 1  },  "negative_balance": "forbid",  "version": 0,  "created_at": "string",  "updated_at": "string"}
GET
/currencies/{id}
AuthorizationBearer <token>

Secret key (osk_…), publishable key (opk_…) or personal access token (opat_…).

In: header

Path Parameters

id*string
Length1 <= length

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/currencies/string"
{  "id": "string",  "code": "string",  "name": "string",  "precision": 0,  "expiration_policy": {    "type": "never",    "days": 1  },  "negative_balance": "forbid",  "version": 0,  "created_at": "string",  "updated_at": "string"}
PATCH
/currencies/{id}
AuthorizationBearer <token>

Secret key (osk_…), publishable key (opk_…) or personal access token (opat_…).

In: header

Path Parameters

id*string
Length1 <= length

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/currencies/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "id": "string",  "code": "string",  "name": "string",  "precision": 0,  "expiration_policy": {    "type": "never",    "days": 1  },  "negative_balance": "forbid",  "version": 0,  "created_at": "string",  "updated_at": "string"}
DELETE
/currencies/{id}
AuthorizationBearer <token>

Secret key (osk_…), publishable key (opk_…) or personal access token (opat_…).

In: header

Path Parameters

id*string
Length1 <= length

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X DELETE "https://example.com/currencies/string"
Empty
GET
/ledger_entries
AuthorizationBearer <token>

Secret key (osk_…), publishable key (opk_…) or personal access token (opat_…).

In: header

Query Parameters

limit?integer
Range1 <= value <= 200
Default50
cursor?string
Lengthlength <= 2048
customer_id?string
currency?string
type?string

Value in

  • "earn"
  • "spend"
  • "expire"
  • "reverse"
  • "adjust"

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/ledger_entries"
{  "data": [    {      "id": "string",      "customer_id": "string",      "currency": "string",      "type": "earn",      "status": "pending",      "amount": 0,      "remaining": 0,      "confirm_at": "string",      "expires_at": "string",      "reversal_of": "string",      "source_type": "string",      "source_id": "string",      "idempotency_key": "string",      "reason": "string",      "created_at": "string"    }  ],  "next_cursor": "string",  "has_more": true}
POST
/ledger_entries
AuthorizationBearer <token>

Secret key (osk_…), publishable key (opk_…) or personal access token (opat_…).

In: header

Header Parameters

Idempotency-Key?string

Required by the API on this route (400 idempotency_key_required without it); the official clients generate a UUID when you omit it.

Length1 <= length <= 255

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/ledger_entries" \  -H "Content-Type: application/json" \  -d '{    "customer_id": "cust_123",    "currency": "points",    "amount": 500,    "reason": "goodwill credit"  }'
{  "id": "string",  "customer_id": "string",  "currency": "string",  "type": "earn",  "status": "pending",  "amount": 0,  "remaining": 0,  "confirm_at": "string",  "expires_at": "string",  "reversal_of": "string",  "source_type": "string",  "source_id": "string",  "idempotency_key": "string",  "reason": "string",  "created_at": "string"}
GET
/ledger_entries/{id}
AuthorizationBearer <token>

Secret key (osk_…), publishable key (opk_…) or personal access token (opat_…).

In: header

Path Parameters

id*string
Length1 <= length

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/ledger_entries/string"
{  "id": "string",  "customer_id": "string",  "currency": "string",  "type": "earn",  "status": "pending",  "amount": 0,  "remaining": 0,  "confirm_at": "string",  "expires_at": "string",  "reversal_of": "string",  "source_type": "string",  "source_id": "string",  "idempotency_key": "string",  "reason": "string",  "created_at": "string"}
GET
/customers/{id}/balances
AuthorizationBearer <token>

Secret key (osk_…), publishable key (opk_…) or personal access token (opat_…).

In: header

Path Parameters

id*string
Length1 <= length

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/customers/string/balances"
{  "data": [    {      "customer_id": "string",      "currency": "string",      "available": 0,      "pending": 0,      "lifetime_earned": 0,      "updated_at": "string"    }  ],  "next_cursor": "string",  "has_more": true}