Secret API key bound to an environment.
In: header
Query Parameters
1 <= value <= 20050length <= 2048Value in
- "tier"
- "quest"
- "campaign"
- "reward"
- "streak"
- "badge"
- "leaderboard"
- "referral"
Value in
- "draft"
- "active"
- "paused"
- "ended"
- "archived"
Header Parameters
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/programs"{ "data": [ { "id": "string", "environment_id": "string", "kind": "tier", "key": "string", "name": "string", "status": "draft", "active_version_id": "string", "authority": "legacy", "legacy_table": "string", "version": -9007199254740991, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "archived_at": "2019-08-24T14:15:22Z" } ], "next_cursor": "string", "has_more": true}Secret API key bound to an environment.
In: header
Header Parameters
Required. Official clients generate a UUID when omitted by the caller.
1 <= length <= 255Request 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/programs" \ -H "Idempotency-Key: string" \ -H "Content-Type: application/json" \ -d '{ "kind": "quest", "key": "welcome", "name": "Welcome" }'{ "id": "string", "environment_id": "string", "kind": "tier", "key": "string", "name": "string", "status": "draft", "active_version_id": "string", "authority": "legacy", "legacy_table": "string", "version": -9007199254740991, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "archived_at": "2019-08-24T14:15:22Z"}Secret API key bound to an environment.
In: header
Path Parameters
1 <= lengthHeader Parameters
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/programs/string"{ "id": "string", "environment_id": "string", "kind": "tier", "key": "string", "name": "string", "status": "draft", "active_version_id": "string", "authority": "legacy", "legacy_table": "string", "version": -9007199254740991, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "archived_at": "2019-08-24T14:15:22Z"}Secret API key bound to an environment.
In: header
Path Parameters
1 <= lengthHeader Parameters
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X DELETE "https://example.com/programs/string"{ "error": { "type": "invalid_request", "code": "validation_failed", "message": "string", "param": "string", "doc_url": "string", "request_id": "string", "details": null }}Secret API key bound to an environment.
In: header
Path Parameters
1 <= lengthQuery Parameters
1 <= value <= 20050length <= 2048Header Parameters
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/programs/string/versions"{ "data": [ { "id": "string", "program_id": "string", "number": -9007199254740991, "definition": { "schema": "orishare.program/v1", "kind": "tier", "semantics": "native_v2", "definition": { "kind": "tier", "legacy": { "property1": "string", "property2": "string" }, "currency": "string", "basis": { "type": "lifetime_earned" }, "downgrade_check": "daily", "levels": [ { "key": "string", "threshold": 0 } ] }, "qualification": { "sources": [ { "event": "string", "conditions": { "path": "string", "op": "eq", "value": null }, "value": 0, "step": "string", "occurrence": "lifetime" } ], "audience": [ "string" ], "starts_at": "2019-08-24T14:15:22Z", "ends_at": "2019-08-24T14:15:22Z", "campaign": "string" }, "calendar": { "schema": "orishare.calendar/v1", "period": "none", "run_per_period": true, "timezone_source": "environment", "timezone": "string", "day_start_offset_minutes": 0, "ambiguous_local_time": "earlier", "nonexistent_local_time": "next_valid", "event_time": { "merchant": "occurred_at", "client": "received_at" }, "grace_seconds": 0, "max_lateness_seconds": 0, "settlement_delay_seconds": 0, "after_finalization": "correction_only" }, "trust": { "minimum_trust": "anonymous_claim", "allowed_sources": [ "publishable_event" ], "on_insufficient": "ignore", "liability_caps": [ { "trust": "anonymous_claim", "currency": "string", "scope": "customer", "window": "day", "maximum_minor": 0 } ], "recognition_caps": [ { "trust": "anonymous_claim", "per": "period", "contributions": 1, "value": 1 } ], "allow_legacy_unknown": false }, "correction": { "qualification": "reverse", "spendable": "reverse", "xp": "reverse", "recognition": "keep", "after_finalization": "correcting_revision", "allowance_on_refund": "consumed" }, "reward": { "on": { "property1": [ { "type": "points.award", "currency": "string", "amount": 0, "reason": "string", "confirm_after": "string", "expires_after": "string", "effect_key": "string", "liability": { "currency": "string", "amount_minor": 1 } } ], "property2": [ { "type": "points.award", "currency": "string", "amount": 0, "reason": "string", "confirm_after": "string", "expires_after": "string", "effect_key": "string", "liability": { "currency": "string", "amount_minor": 1 } } ] } }, "display": { "title": "string", "description": "string", "image_url": "http://example.com", "icon": "string", "color": "string", "sort_order": 0, "hidden": false, "locales": {} }, "enrollment": { "mode": "automatic" } }, "definition_hash": "string", "created_at": "2019-08-24T14:15:22Z" } ], "next_cursor": "string", "has_more": true}Secret API key bound to an environment.
In: header
Path Parameters
1 <= lengthHeader Parameters
Required. Official clients generate a UUID when omitted by the caller.
1 <= length <= 255Required revision, checked in the owning transaction.
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/programs/string/versions" \ -H "Idempotency-Key: string" \ -H "If-Match: string" \ -H "Content-Type: application/json" \ -d '{ "definition": { "schema": "orishare.program/v1", "kind": "quest", "semantics": "native_v2", "definition": { "kind": "quest", "steps": [ { "key": "buy", "aggregation": "count", "target": 2 } ], "repeatable": false }, "qualification": { "sources": [ { "event": "purchase", "step": "buy", "occurrence": "lifetime" } ] }, "calendar": { "schema": "orishare.calendar/v1", "period": "none", "run_per_period": false, "timezone_source": "environment", "day_start_offset_minutes": 0, "ambiguous_local_time": "earlier", "nonexistent_local_time": "next_valid", "event_time": { "merchant": "occurred_at", "client": "received_at" }, "grace_seconds": 0, "max_lateness_seconds": 0, "settlement_delay_seconds": 0, "after_finalization": "correction_only" }, "trust": { "minimum_trust": "merchant_asserted", "allowed_sources": [ "secret_key_event", "operator_command" ], "on_insufficient": "ignore", "liability_caps": [], "recognition_caps": [], "allow_legacy_unknown": false }, "correction": { "qualification": "reverse", "spendable": "reverse", "xp": "reverse", "recognition": "keep", "after_finalization": "correcting_revision", "allowance_on_refund": "consumed" }, "reward": { "on": { "completion": [ { "type": "points.award", "currency": "points", "amount": 5, "effect_key": "completion_points" } ] } }, "display": { "sort_order": 0, "hidden": false, "locales": {} }, "enrollment": { "mode": "automatic" } } }'{ "program": { "id": "string", "environment_id": "string", "kind": "tier", "key": "string", "name": "string", "status": "draft", "active_version_id": "string", "authority": "legacy", "legacy_table": "string", "version": -9007199254740991, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "archived_at": "2019-08-24T14:15:22Z" }, "version": { "id": "string", "program_id": "string", "number": -9007199254740991, "definition": { "schema": "orishare.program/v1", "kind": "tier", "semantics": "native_v2", "definition": { "kind": "tier", "legacy": { "property1": "string", "property2": "string" }, "currency": "string", "basis": { "type": "lifetime_earned" }, "downgrade_check": "daily", "levels": [ { "key": "string", "threshold": 0 } ] }, "qualification": { "sources": [ { "event": "string", "conditions": { "path": "string", "op": "eq", "value": null }, "value": 0, "step": "string", "occurrence": "lifetime" } ], "audience": [ "string" ], "starts_at": "2019-08-24T14:15:22Z", "ends_at": "2019-08-24T14:15:22Z", "campaign": "string" }, "calendar": { "schema": "orishare.calendar/v1", "period": "none", "run_per_period": true, "timezone_source": "environment", "timezone": "string", "day_start_offset_minutes": 0, "ambiguous_local_time": "earlier", "nonexistent_local_time": "next_valid", "event_time": { "merchant": "occurred_at", "client": "received_at" }, "grace_seconds": 0, "max_lateness_seconds": 0, "settlement_delay_seconds": 0, "after_finalization": "correction_only" }, "trust": { "minimum_trust": "anonymous_claim", "allowed_sources": [ "publishable_event" ], "on_insufficient": "ignore", "liability_caps": [ { "trust": "anonymous_claim", "currency": "string", "scope": "customer", "window": "day", "maximum_minor": 0 } ], "recognition_caps": [ { "trust": "anonymous_claim", "per": "period", "contributions": 1, "value": 1 } ], "allow_legacy_unknown": false }, "correction": { "qualification": "reverse", "spendable": "reverse", "xp": "reverse", "recognition": "keep", "after_finalization": "correcting_revision", "allowance_on_refund": "consumed" }, "reward": { "on": { "property1": [ { "type": "points.award", "currency": "string", "amount": 0, "reason": "string", "confirm_after": "string", "expires_after": "string", "effect_key": "string", "liability": { "currency": "string", "amount_minor": 1 } } ], "property2": [ { "type": "points.award", "currency": "string", "amount": 0, "reason": "string", "confirm_after": "string", "expires_after": "string", "effect_key": "string", "liability": { "currency": "string", "amount_minor": 1 } } ] } }, "display": { "title": "string", "description": "string", "image_url": "http://example.com", "icon": "string", "color": "string", "sort_order": 0, "hidden": false, "locales": {} }, "enrollment": { "mode": "automatic" } }, "definition_hash": "string", "created_at": "2019-08-24T14:15:22Z" }}Secret API key bound to an environment.
In: header
Path Parameters
1 <= length1 <= lengthHeader Parameters
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/programs/string/versions/string"{ "id": "string", "program_id": "string", "number": -9007199254740991, "definition": { "schema": "orishare.program/v1", "kind": "tier", "semantics": "native_v2", "definition": { "kind": "tier", "legacy": { "property1": "string", "property2": "string" }, "currency": "string", "basis": { "type": "lifetime_earned" }, "downgrade_check": "daily", "levels": [ { "key": "string", "threshold": 0 } ] }, "qualification": { "sources": [ { "event": "string", "conditions": { "path": "string", "op": "eq", "value": null }, "value": 0, "step": "string", "occurrence": "lifetime" } ], "audience": [ "string" ], "starts_at": "2019-08-24T14:15:22Z", "ends_at": "2019-08-24T14:15:22Z", "campaign": "string" }, "calendar": { "schema": "orishare.calendar/v1", "period": "none", "run_per_period": true, "timezone_source": "environment", "timezone": "string", "day_start_offset_minutes": 0, "ambiguous_local_time": "earlier", "nonexistent_local_time": "next_valid", "event_time": { "merchant": "occurred_at", "client": "received_at" }, "grace_seconds": 0, "max_lateness_seconds": 0, "settlement_delay_seconds": 0, "after_finalization": "correction_only" }, "trust": { "minimum_trust": "anonymous_claim", "allowed_sources": [ "publishable_event" ], "on_insufficient": "ignore", "liability_caps": [ { "trust": "anonymous_claim", "currency": "string", "scope": "customer", "window": "day", "maximum_minor": 0 } ], "recognition_caps": [ { "trust": "anonymous_claim", "per": "period", "contributions": 1, "value": 1 } ], "allow_legacy_unknown": false }, "correction": { "qualification": "reverse", "spendable": "reverse", "xp": "reverse", "recognition": "keep", "after_finalization": "correcting_revision", "allowance_on_refund": "consumed" }, "reward": { "on": { "property1": [ { "type": "points.award", "currency": "string", "amount": 0, "reason": "string", "confirm_after": "string", "expires_after": "string", "effect_key": "string", "liability": { "currency": "string", "amount_minor": 1 } } ], "property2": [ { "type": "points.award", "currency": "string", "amount": 0, "reason": "string", "confirm_after": "string", "expires_after": "string", "effect_key": "string", "liability": { "currency": "string", "amount_minor": 1 } } ] } }, "display": { "title": "string", "description": "string", "image_url": "http://example.com", "icon": "string", "color": "string", "sort_order": 0, "hidden": false, "locales": {} }, "enrollment": { "mode": "automatic" } }, "definition_hash": "string", "created_at": "2019-08-24T14:15:22Z"}Secret API key bound to an environment.
In: header
Header Parameters
Required. Official clients generate a UUID when omitted by the caller.
1 <= length <= 255Required revision, checked in the owning transaction.
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/program_activations" \ -H "Idempotency-Key: string" \ -H "If-Match: string" \ -H "Content-Type: application/json" \ -d '{ "program_id": "prog_example", "status": "paused" }'{ "id": "string", "environment_id": "string", "kind": "tier", "key": "string", "name": "string", "status": "draft", "active_version_id": "string", "authority": "legacy", "legacy_table": "string", "version": -9007199254740991, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "archived_at": "2019-08-24T14:15:22Z"}Secret API key bound to an environment.
In: header
Header Parameters
Required. Official clients generate a UUID when omitted by the caller.
1 <= length <= 255Required revision, checked in the owning transaction.
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/program_archivals" \ -H "Idempotency-Key: string" \ -H "If-Match: string" \ -H "Content-Type: application/json" \ -d '{ "program_id": "prog_example" }'{ "id": "string", "environment_id": "string", "kind": "tier", "key": "string", "name": "string", "status": "draft", "active_version_id": "string", "authority": "legacy", "legacy_table": "string", "version": -9007199254740991, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "archived_at": "2019-08-24T14:15:22Z"}Secret API key bound to an environment.
In: header
Path Parameters
1 <= lengthQuery Parameters
1 <= value <= 10050length <= 2048Header Parameters
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/customers/string/participations"{ "data": [ { "program_id": "string", "program_key": "string", "kind": "tier", "program_name": "string", "program_version": -9007199254740991, "participation_id": "string", "status": "enrolled", "state_revision": "string", "updated_at": "2019-08-24T14:15:22Z", "standing": "current" } ], "next_cursor": "string", "has_more": true}Secret API key bound to an environment.
In: header
Path Parameters
1 <= lengthQuery Parameters
1 <= value <= 10050length <= 2048Header Parameters
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/program_participations/string/contributions"{ "data": [ { "id": "string", "participation_id": "string", "event_id": "string", "step_key": "string", "slot": "string", "value": "string", "created_at": "2019-08-24T14:15:22Z", "correction_state": "none" } ], "next_cursor": "string", "has_more": true}Secret API key bound to an environment.
In: header
Header Parameters
Required. Official clients generate a UUID when omitted by the caller.
1 <= length <= 255Required revision, checked in the owning transaction.
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/program_successions" \ -H "Idempotency-Key: string" \ -H "If-Match: string" \ -H "Content-Type: application/json" \ -d '{ "customer_id": "cust_00000000000000000000000000000001", "participation_id": "pp_example", "program_revision": 2, "operation_key": "upgrade-42", "command": { "type": "version", "program_version_id": "pv_example" } }'{ "id": "string", "program_id": "string", "customer_id": "string", "participation_id": "string", "predecessor_id": "string", "program_version_id": "string", "state_revision": 0, "status": "succeeded", "work_id": "string", "effective_at": "string"}Secret API key bound to an environment.
In: header
Path Parameters
1 <= lengthHeader Parameters
Required. Official clients generate a UUID when omitted by the caller.
1 <= length <= 255Required revision, checked in the owning transaction.
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/program_participations/string/successions" \ -H "Idempotency-Key: string" \ -H "If-Match: string" \ -H "Content-Type: application/json" \ -d '{ "customer_id": "cust_00000000000000000000000000000001", "program_revision": 2, "operation_key": "upgrade-42", "command": { "type": "version", "program_version_id": "pv_example" } }'{ "id": "string", "program_id": "string", "customer_id": "string", "participation_id": "string", "predecessor_id": "string", "program_version_id": "string", "state_revision": 0, "status": "succeeded", "work_id": "string", "effective_at": "string"}Secret API key bound to an environment.
In: header
Path Parameters
1 <= lengthHeader Parameters
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/program_successions/string"{ "id": "string", "program_id": "string", "customer_id": "string", "participation_id": "string", "predecessor_id": "string", "program_version_id": "string", "state_revision": 0, "status": "succeeded", "work_id": "string", "effective_at": "string"}Secret API key bound to an environment.
In: header
Header Parameters
Required. Official clients generate a UUID when omitted by the caller.
1 <= length <= 255Required revision, checked in the owning transaction.
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
application/json
curl -X POST "https://example.com/program_enrollments" \ -H "Idempotency-Key: string" \ -H "If-Match: string" \ -H "Content-Type: application/json" \ -d '{ "program_id": "prg_example", "customer_id": "cust_00000000000000000000000000000001", "program_revision": 2, "operation_key": "enroll-42" }'{ "id": "string", "program_id": "string", "customer_id": "string", "participation_id": "string", "state_revision": 0, "execution_id": "string", "outcome": "string", "effects": [ null ], "transition_ids": [ "string" ]}Secret API key bound to an environment.
In: header
Path Parameters
1 <= lengthHeader Parameters
Required. Official clients generate a UUID when omitted by the caller.
1 <= length <= 255Required revision, checked in the owning transaction.
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
application/json
curl -X POST "https://example.com/programs/string/enrollments" \ -H "Idempotency-Key: string" \ -H "If-Match: string" \ -H "Content-Type: application/json" \ -d '{ "customer_id": "cust_00000000000000000000000000000001", "program_revision": 2, "operation_key": "enroll-42" }'{ "id": "string", "program_id": "string", "customer_id": "string", "participation_id": "string", "state_revision": 0, "execution_id": "string", "outcome": "string", "effects": [ null ], "transition_ids": [ "string" ]}Secret API key bound to an environment.
In: header
Header Parameters
Required. Official clients generate a UUID when omitted by the caller.
1 <= length <= 255Required revision, checked in the owning transaction.
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/program_corrections" \ -H "Idempotency-Key: string" \ -H "If-Match: string" \ -H "Content-Type: application/json" \ -d '{ "customer_id": "cust_00000000000000000000000000000001", "participation_id": "pp_example", "contribution_id": "pc_original", "operation_key": "refund-42", "correction": { "kind": "refund", "fraction": "0.5", "reason": "Returned half" } }'{ "id": "string", "program_id": "string", "customer_id": "string", "participation_id": "string", "state_revision": 0, "execution_id": "string", "outcome": "string", "effects": [ null ], "transition_ids": [ "string" ], "fact_revision": 1, "fraction": "string"}Secret API key bound to an environment.
In: header
Path Parameters
1 <= lengthHeader Parameters
Required. Official clients generate a UUID when omitted by the caller.
1 <= length <= 255Required revision, checked in the owning transaction.
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/program_participations/string/corrections" \ -H "Idempotency-Key: string" \ -H "If-Match: string" \ -H "Content-Type: application/json" \ -d '{ "customer_id": "cust_00000000000000000000000000000001", "contribution_id": "pc_original", "operation_key": "refund-42", "correction": { "kind": "refund", "fraction": "0.5", "reason": "Returned half" } }'{ "id": "string", "program_id": "string", "customer_id": "string", "participation_id": "string", "state_revision": 0, "execution_id": "string", "outcome": "string", "effects": [ null ], "transition_ids": [ "string" ], "fact_revision": 1, "fraction": "string"}Secret API key bound to an environment.
In: header
Path Parameters
1 <= lengthHeader Parameters
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/program_corrections/string"{ "id": "string", "program_id": "string", "customer_id": "string", "participation_id": "string", "state_revision": 0, "execution_id": "string", "outcome": "string", "effects": [ null ], "transition_ids": [ "string" ], "fact_revision": 1, "fraction": "string"}Secret API key bound to an environment.
In: header
Path Parameters
1 <= lengthHeader Parameters
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/program_enrollments/string"{ "id": "string", "program_id": "string", "customer_id": "string", "participation_id": "string", "state_revision": 0, "execution_id": "string", "outcome": "string", "effects": [ null ], "transition_ids": [ "string" ]}