Orishare
API reference
GET
/bulk_operations

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

In: header

Query Parameters

limit?integer
Range1 <= value <= 200
Default50
cursor?string
Lengthlength <= 2048
status?string

Value in

  • "proposed"
  • "committed"
  • "running"
  • "paused"
  • "completed"
  • "cancelled"
kind?string

Value in

  • "ledger.adjust"
  • "reward.issue"
  • "reward.cancel"
  • "challenge.enroll"
  • "challenge.unenroll"
  • "segment.membership"
  • "customer.attributes"

Header Parameters

X-Orishare-Environment?string

Required for selected-environment authorization branches; API keys use their bound environment.

Length1 <= length

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/bulk_operations"
{  "data": [    {      "id": "string",      "environment_id": "string",      "kind": "ledger.adjust",      "status": "proposed",      "pause_reason": "authority_revoked",      "parameters": {        "property1": null,        "property2": null      },      "selection": {        "property1": null,        "property2": null      },      "item_count": -9007199254740991,      "items_digest": "string",      "undo_of": "string",      "undo_class": "reversible",      "change_set": {        "id": "string",        "status": "pending",        "plan_digest": "string",        "expires_at": "string"      },      "confirmer_user_id": "string",      "current_pass": -9007199254740991,      "generation": -9007199254740991,      "version": -9007199254740991,      "counts": {        "pending": -9007199254740991,        "succeeded": -9007199254740991,        "failed": -9007199254740991,        "skipped": -9007199254740991      },      "created_at": "string",      "committed_at": "string",      "started_at": "string",      "completed_at": "string"    }  ],  "next_cursor": "string",  "has_more": true}
POST
/bulk_operations

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

In: header

Header Parameters

Idempotency-Key*string

Required. Official clients generate a UUID when omitted by the caller.

Length1 <= length <= 255
X-Orishare-Environment?string

Required for selected-environment authorization branches; API keys use their bound environment.

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

application/json

curl -X POST "https://example.com/bulk_operations" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{    "kind": "ledger.adjust",    "selection": {      "source": "customers",      "customer_ids": [        "cust_a",        "cust_b"      ]    },    "parameters": {      "currency": "points",      "amount": 100,      "reason": "Goodwill credit"    }  }'
{  "id": "string",  "environment_id": "string",  "kind": "ledger.adjust",  "status": "proposed",  "pause_reason": "authority_revoked",  "parameters": {    "property1": null,    "property2": null  },  "selection": {    "property1": null,    "property2": null  },  "item_count": -9007199254740991,  "items_digest": "string",  "undo_of": "string",  "undo_class": "reversible",  "change_set": {    "id": "string",    "status": "pending",    "plan_digest": "string",    "expires_at": "string"  },  "confirmer_user_id": "string",  "current_pass": -9007199254740991,  "generation": -9007199254740991,  "version": -9007199254740991,  "counts": {    "pending": -9007199254740991,    "succeeded": -9007199254740991,    "failed": -9007199254740991,    "skipped": -9007199254740991  },  "created_at": "string",  "committed_at": "string",  "started_at": "string",  "completed_at": "string",  "errors": [    {      "item_id": "string",      "customer_id": "string",      "error_code": "string",      "pass": -9007199254740991    }  ],  "passes": [    {      "pass": -9007199254740991,      "requested_by": "string",      "item_count": -9007199254740991,      "created_at": "string"    }  ],  "resume": {    "resumable": true,    "reason": "dependency_changed"  }}
GET
/bulk_operations/{id}

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

In: header

Path Parameters

id*string
Length1 <= length

Header Parameters

X-Orishare-Environment?string

Required for selected-environment authorization branches; API keys use their bound environment.

Length1 <= length

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/bulk_operations/string"
{  "id": "string",  "environment_id": "string",  "kind": "ledger.adjust",  "status": "proposed",  "pause_reason": "authority_revoked",  "parameters": {    "property1": null,    "property2": null  },  "selection": {    "property1": null,    "property2": null  },  "item_count": -9007199254740991,  "items_digest": "string",  "undo_of": "string",  "undo_class": "reversible",  "change_set": {    "id": "string",    "status": "pending",    "plan_digest": "string",    "expires_at": "string"  },  "confirmer_user_id": "string",  "current_pass": -9007199254740991,  "generation": -9007199254740991,  "version": -9007199254740991,  "counts": {    "pending": -9007199254740991,    "succeeded": -9007199254740991,    "failed": -9007199254740991,    "skipped": -9007199254740991  },  "created_at": "string",  "committed_at": "string",  "started_at": "string",  "completed_at": "string",  "errors": [    {      "item_id": "string",      "customer_id": "string",      "error_code": "string",      "pass": -9007199254740991    }  ],  "passes": [    {      "pass": -9007199254740991,      "requested_by": "string",      "item_count": -9007199254740991,      "created_at": "string"    }  ],  "resume": {    "resumable": true,    "reason": "dependency_changed"  }}
GET
/bulk_operations/{id}/items

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

In: header

Path Parameters

id*string
Length1 <= length

Query Parameters

limit?integer
Range1 <= value <= 200
Default50
cursor?string
Lengthlength <= 2048
status?string

Value in

  • "pending"
  • "succeeded"
  • "failed"
  • "skipped"

Header Parameters

X-Orishare-Environment?string

Required for selected-environment authorization branches; API keys use their bound environment.

Length1 <= length

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/bulk_operations/string/items"
{  "data": [    {      "id": "string",      "bulk_operation_id": "string",      "customer_id": "string",      "status": "pending",      "error_code": "string",      "skip_reason": "string",      "pass": -9007199254740991,      "attempts": -9007199254740991,      "input": {        "property1": null,        "property2": null      },      "pins": {        "property1": null,        "property2": null      },      "bound": {        "property1": null,        "property2": null      },      "result": {        "property1": null,        "property2": null      },      "updated_at": "string"    }  ],  "next_cursor": "string",  "has_more": true}
POST
/bulk_operation_runs

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

In: header

Header Parameters

Idempotency-Key*string

Required. Official clients generate a UUID when omitted by the caller.

Length1 <= length <= 255
X-Orishare-Environment?string

Required for selected-environment authorization branches; API keys use their bound environment.

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

application/json

curl -X POST "https://example.com/bulk_operation_runs" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{    "bulk_operation_id": "blk_00000000000000000000000000000001"  }'
{  "id": "string",  "environment_id": "string",  "kind": "ledger.adjust",  "status": "proposed",  "pause_reason": "authority_revoked",  "parameters": {    "property1": null,    "property2": null  },  "selection": {    "property1": null,    "property2": null  },  "item_count": -9007199254740991,  "items_digest": "string",  "undo_of": "string",  "undo_class": "reversible",  "change_set": {    "id": "string",    "status": "pending",    "plan_digest": "string",    "expires_at": "string"  },  "confirmer_user_id": "string",  "current_pass": -9007199254740991,  "generation": -9007199254740991,  "version": -9007199254740991,  "counts": {    "pending": -9007199254740991,    "succeeded": -9007199254740991,    "failed": -9007199254740991,    "skipped": -9007199254740991  },  "created_at": "string",  "committed_at": "string",  "started_at": "string",  "completed_at": "string",  "errors": [    {      "item_id": "string",      "customer_id": "string",      "error_code": "string",      "pass": -9007199254740991    }  ],  "passes": [    {      "pass": -9007199254740991,      "requested_by": "string",      "item_count": -9007199254740991,      "created_at": "string"    }  ],  "resume": {    "resumable": true,    "reason": "dependency_changed"  }}
POST
/bulk_operations/{id}/retries

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

In: header

Path Parameters

id*string
Length1 <= length

Header Parameters

Idempotency-Key*string

Required. Official clients generate a UUID when omitted by the caller.

Length1 <= length <= 255
X-Orishare-Environment?string

Required for selected-environment authorization branches; API keys use their bound environment.

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

application/json

curl -X POST "https://example.com/bulk_operations/string/retries" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{}'
{  "id": "string",  "environment_id": "string",  "kind": "ledger.adjust",  "status": "proposed",  "pause_reason": "authority_revoked",  "parameters": {    "property1": null,    "property2": null  },  "selection": {    "property1": null,    "property2": null  },  "item_count": -9007199254740991,  "items_digest": "string",  "undo_of": "string",  "undo_class": "reversible",  "change_set": {    "id": "string",    "status": "pending",    "plan_digest": "string",    "expires_at": "string"  },  "confirmer_user_id": "string",  "current_pass": -9007199254740991,  "generation": -9007199254740991,  "version": -9007199254740991,  "counts": {    "pending": -9007199254740991,    "succeeded": -9007199254740991,    "failed": -9007199254740991,    "skipped": -9007199254740991  },  "created_at": "string",  "committed_at": "string",  "started_at": "string",  "completed_at": "string",  "errors": [    {      "item_id": "string",      "customer_id": "string",      "error_code": "string",      "pass": -9007199254740991    }  ],  "passes": [    {      "pass": -9007199254740991,      "requested_by": "string",      "item_count": -9007199254740991,      "created_at": "string"    }  ],  "resume": {    "resumable": true,    "reason": "dependency_changed"  }}
POST
/bulk_operations/{id}/cancellations

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

In: header

Path Parameters

id*string
Length1 <= length

Header Parameters

Idempotency-Key*string

Required. Official clients generate a UUID when omitted by the caller.

Length1 <= length <= 255
X-Orishare-Environment?string

Required for selected-environment authorization branches; API keys use their bound environment.

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

application/json

curl -X POST "https://example.com/bulk_operations/string/cancellations" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{}'
{  "id": "string",  "environment_id": "string",  "kind": "ledger.adjust",  "status": "proposed",  "pause_reason": "authority_revoked",  "parameters": {    "property1": null,    "property2": null  },  "selection": {    "property1": null,    "property2": null  },  "item_count": -9007199254740991,  "items_digest": "string",  "undo_of": "string",  "undo_class": "reversible",  "change_set": {    "id": "string",    "status": "pending",    "plan_digest": "string",    "expires_at": "string"  },  "confirmer_user_id": "string",  "current_pass": -9007199254740991,  "generation": -9007199254740991,  "version": -9007199254740991,  "counts": {    "pending": -9007199254740991,    "succeeded": -9007199254740991,    "failed": -9007199254740991,    "skipped": -9007199254740991  },  "created_at": "string",  "committed_at": "string",  "started_at": "string",  "completed_at": "string",  "errors": [    {      "item_id": "string",      "customer_id": "string",      "error_code": "string",      "pass": -9007199254740991    }  ],  "passes": [    {      "pass": -9007199254740991,      "requested_by": "string",      "item_count": -9007199254740991,      "created_at": "string"    }  ],  "resume": {    "resumable": true,    "reason": "dependency_changed"  }}
POST
/bulk_operations/{id}/undo_proposals

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

In: header

Path Parameters

id*string
Length1 <= length

Header Parameters

Idempotency-Key*string

Required. Official clients generate a UUID when omitted by the caller.

Length1 <= length <= 255
X-Orishare-Environment?string

Required for selected-environment authorization branches; API keys use their bound environment.

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

application/json

curl -X POST "https://example.com/bulk_operations/string/undo_proposals" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{}'
{  "id": "string",  "environment_id": "string",  "kind": "ledger.adjust",  "status": "proposed",  "pause_reason": "authority_revoked",  "parameters": {    "property1": null,    "property2": null  },  "selection": {    "property1": null,    "property2": null  },  "item_count": -9007199254740991,  "items_digest": "string",  "undo_of": "string",  "undo_class": "reversible",  "change_set": {    "id": "string",    "status": "pending",    "plan_digest": "string",    "expires_at": "string"  },  "confirmer_user_id": "string",  "current_pass": -9007199254740991,  "generation": -9007199254740991,  "version": -9007199254740991,  "counts": {    "pending": -9007199254740991,    "succeeded": -9007199254740991,    "failed": -9007199254740991,    "skipped": -9007199254740991  },  "created_at": "string",  "committed_at": "string",  "started_at": "string",  "completed_at": "string",  "errors": [    {      "item_id": "string",      "customer_id": "string",      "error_code": "string",      "pass": -9007199254740991    }  ],  "passes": [    {      "pass": -9007199254740991,      "requested_by": "string",      "item_count": -9007199254740991,      "created_at": "string"    }  ],  "resume": {    "resumable": true,    "reason": "dependency_changed"  }}