Orishare
API reference
GET
/reward_suppliers

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

In: header

Query Parameters

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

Header Parameters

X-Orishare-Environment?string

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

Length1 <= length
X-Orishare-Audit-Reason?string

Required for staff authorization. Records the reason for staff access.

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/reward_suppliers"
{  "data": [    {      "id": "string",      "key": "string",      "name": "string",      "kind": "gift_card",      "status": "active",      "adapter": "fake",      "config": {        "property1": null,        "property2": null      },      "credentials_configured": true,      "version": 0,      "created_at": "2019-08-24T14:15:22Z",      "updated_at": "2019-08-24T14:15:22Z"    }  ],  "next_cursor": "string",  "has_more": true}
POST
/reward_suppliers

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
X-Orishare-Audit-Reason?string

Required for staff authorization. Records the reason for staff access.

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

application/json

curl -X POST "https://example.com/reward_suppliers" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{    "key": "giftly",    "name": "Giftly gift cards",    "kind": "gift_card",    "adapter": "manual"  }'
{  "id": "string",  "key": "string",  "name": "string",  "kind": "gift_card",  "status": "active",  "adapter": "fake",  "config": {    "property1": null,    "property2": null  },  "credentials_configured": true,  "version": 0,  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}
GET
/reward_suppliers/{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
X-Orishare-Audit-Reason?string

Required for staff authorization. Records the reason for staff access.

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/reward_suppliers/string"
{  "id": "string",  "key": "string",  "name": "string",  "kind": "gift_card",  "status": "active",  "adapter": "fake",  "config": {    "property1": null,    "property2": null  },  "credentials_configured": true,  "version": 0,  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}
PATCH
/reward_suppliers/{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
X-Orishare-Audit-Reason?string

Required for staff authorization. Records the reason for staff access.

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

application/json

curl -X PATCH "https://example.com/reward_suppliers/string" \  -H "Content-Type: application/json" \  -d '{    "name": "Giftly"  }'
{  "id": "string",  "key": "string",  "name": "string",  "kind": "gift_card",  "status": "active",  "adapter": "fake",  "config": {    "property1": null,    "property2": null  },  "credentials_configured": true,  "version": 0,  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}
DELETE
/reward_suppliers/{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
X-Orishare-Audit-Reason?string

Required for staff authorization. Records the reason for staff access.

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 DELETE "https://example.com/reward_suppliers/string"
{  "id": "string",  "key": "string",  "name": "string",  "kind": "gift_card",  "status": "active",  "adapter": "fake",  "config": {    "property1": null,    "property2": null  },  "credentials_configured": true,  "version": 0,  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}
GET
/reward_suppliers/{id}/catalogue_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

Header Parameters

X-Orishare-Environment?string

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

Length1 <= length
X-Orishare-Audit-Reason?string

Required for staff authorization. Records the reason for staff access.

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/reward_suppliers/string/catalogue_items"
{  "data": [    {      "id": "string",      "supplier_id": "string",      "sku": "string",      "brand": "string",      "title": "string",      "face_value_minor": 0,      "face_currency": "string",      "cost_minor": 0,      "status": "active",      "version": 0,      "created_at": "2019-08-24T14:15:22Z",      "updated_at": "2019-08-24T14:15:22Z"    }  ],  "next_cursor": "string",  "has_more": true}
POST
/reward_suppliers/{id}/catalogue_items

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
X-Orishare-Audit-Reason?string

Required for staff authorization. Records the reason for staff access.

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/reward_suppliers/string/catalogue_items" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{    "sku": "AMZ-25",    "brand": "Amazon",    "title": "Amazon gift card 25 USD",    "face_value_minor": 2500,    "face_currency": "USD",    "cost_minor": 2375  }'
{  "id": "string",  "supplier_id": "string",  "sku": "string",  "brand": "string",  "title": "string",  "face_value_minor": 0,  "face_currency": "string",  "cost_minor": 0,  "status": "active",  "version": 0,  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}
PATCH
/reward_suppliers/{id}/catalogue_items/{item_id}

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

In: header

Path Parameters

id*string
Length1 <= length
item_id*string
Length1 <= length

Header Parameters

X-Orishare-Environment?string

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

Length1 <= length
X-Orishare-Audit-Reason?string

Required for staff authorization. Records the reason for staff access.

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 PATCH "https://example.com/reward_suppliers/string/catalogue_items/string" \  -H "Content-Type: application/json" \  -d '{    "cost_minor": 2350  }'
{  "id": "string",  "supplier_id": "string",  "sku": "string",  "brand": "string",  "title": "string",  "face_value_minor": 0,  "face_currency": "string",  "cost_minor": 0,  "status": "active",  "version": 0,  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}
DELETE
/reward_suppliers/{id}/catalogue_items/{item_id}

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

In: header

Path Parameters

id*string
Length1 <= length
item_id*string
Length1 <= length

Header Parameters

X-Orishare-Environment?string

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

Length1 <= length
X-Orishare-Audit-Reason?string

Required for staff authorization. Records the reason for staff access.

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 DELETE "https://example.com/reward_suppliers/string/catalogue_items/string"
{  "id": "string",  "supplier_id": "string",  "sku": "string",  "brand": "string",  "title": "string",  "face_value_minor": 0,  "face_currency": "string",  "cost_minor": 0,  "status": "active",  "version": 0,  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}
GET
/reward_suppliers/{id}/links

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
open?string

Value in

  • "true"
  • "false"

Header Parameters

X-Orishare-Environment?string

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

Length1 <= length
X-Orishare-Audit-Reason?string

Required for staff authorization. Records the reason for staff access.

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/reward_suppliers/string/links"
{  "data": [    {      "id": "string",      "supplier_id": "string",      "catalogue_item_id": "string",      "offer_version_id": "string",      "reward_id": "string",      "funding": {        "funded_percent": 0      },      "effective_from": "2019-08-24T14:15:22Z",      "closed_at": "2019-08-24T14:15:22Z",      "created_at": "2019-08-24T14:15:22Z"    }  ],  "next_cursor": "string",  "has_more": true}
POST
/reward_suppliers/{id}/links

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
X-Orishare-Audit-Reason?string

Required for staff authorization. Records the reason for staff access.

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/reward_suppliers/string/links" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{    "catalogue_item_id": "sci_00000000000000000000000000000042",    "offer_version_id": "rov_00000000000000000000000000000042",    "funding": {      "funded_percent": 50    }  }'
{  "id": "string",  "supplier_id": "string",  "catalogue_item_id": "string",  "offer_version_id": "string",  "reward_id": "string",  "funding": {    "funded_percent": 0  },  "effective_from": "2019-08-24T14:15:22Z",  "closed_at": "2019-08-24T14:15:22Z",  "created_at": "2019-08-24T14:15:22Z"}
GET
/reward_suppliers/{id}/orders

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"
  • "fulfilled"
  • "failed"
  • "cancelled"
  • "fulfilled_after_cancel"

Header Parameters

X-Orishare-Environment?string

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

Length1 <= length
X-Orishare-Audit-Reason?string

Required for staff authorization. Records the reason for staff access.

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/reward_suppliers/string/orders"
{  "data": [    {      "id": "string",      "redemption_id": "string",      "supplier_id": "string",      "catalogue_item_id": "string",      "link_id": "string",      "external_order_id": "string",      "status": "pending",      "sku": "string",      "face_value_minor": 0,      "face_currency": "string",      "cost_minor": 0,      "partner_funded_minor": 0,      "merchant_funded_minor": 0,      "funding": {        "funded_percent": 0      },      "evidence_digest": "string",      "code_stored": true,      "failure_reason": "string",      "attempts": 0,      "created_at": "2019-08-24T14:15:22Z",      "updated_at": "2019-08-24T14:15:22Z",      "fulfilled_at": "2019-08-24T14:15:22Z",      "failed_at": "2019-08-24T14:15:22Z",      "cancelled_at": "2019-08-24T14:15:22Z"    }  ],  "next_cursor": "string",  "has_more": true}
GET
/reward_suppliers/{id}/reconciliation

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

Header Parameters

X-Orishare-Environment?string

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

Length1 <= length
X-Orishare-Audit-Reason?string

Required for staff authorization. Records the reason for staff access.

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/reward_suppliers/string/reconciliation"
{  "data": [    {      "id": "string",      "redemption_id": "string",      "supplier_id": "string",      "catalogue_item_id": "string",      "link_id": "string",      "external_order_id": "string",      "status": "pending",      "sku": "string",      "face_value_minor": 0,      "face_currency": "string",      "cost_minor": 0,      "partner_funded_minor": 0,      "merchant_funded_minor": 0,      "funding": {        "funded_percent": 0      },      "evidence_digest": "string",      "code_stored": true,      "failure_reason": "string",      "attempts": 0,      "created_at": "2019-08-24T14:15:22Z",      "updated_at": "2019-08-24T14:15:22Z",      "fulfilled_at": "2019-08-24T14:15:22Z",      "failed_at": "2019-08-24T14:15:22Z",      "cancelled_at": "2019-08-24T14:15:22Z",      "attention": "fulfilled_after_cancel"    }  ],  "next_cursor": "string",  "has_more": true}
POST
/reward_suppliers/{id}/orders/{order_id}/reconcile

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

In: header

Path Parameters

id*string
Length1 <= length
order_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
X-Orishare-Audit-Reason?string

Required for staff authorization. Records the reason for staff access.

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

application/json

curl -X POST "https://example.com/reward_suppliers/string/orders/string/reconcile" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{    "outcome": "fulfilled"  }'
{  "order": {    "id": "string",    "redemption_id": "string",    "supplier_id": "string",    "catalogue_item_id": "string",    "link_id": "string",    "external_order_id": "string",    "status": "pending",    "sku": "string",    "face_value_minor": 0,    "face_currency": "string",    "cost_minor": 0,    "partner_funded_minor": 0,    "merchant_funded_minor": 0,    "funding": {      "funded_percent": 0    },    "evidence_digest": "string",    "code_stored": true,    "failure_reason": "string",    "attempts": 0,    "created_at": "2019-08-24T14:15:22Z",    "updated_at": "2019-08-24T14:15:22Z",    "fulfilled_at": "2019-08-24T14:15:22Z",    "failed_at": "2019-08-24T14:15:22Z",    "cancelled_at": "2019-08-24T14:15:22Z"  },  "fulfillment_status": "string"}
GET
/reward_suppliers/{id}/settlement

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

In: header

Path Parameters

id*string
Length1 <= length

Query Parameters

from*string
Match^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
Formatdate-time
to*string
Match^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
Formatdate-time
format?string
Default"json"

Value in

  • "json"
  • "csv"

Header Parameters

X-Orishare-Environment?string

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

Length1 <= length
X-Orishare-Audit-Reason?string

Required for staff authorization. Records the reason for staff access.

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/reward_suppliers/string/settlement?from=2019-08-24T14%3A15%3A22Z&to=2019-08-24T14%3A15%3A22Z"
{  "supplier_id": "string",  "from": "2019-08-24T14:15:22Z",  "to": "2019-08-24T14:15:22Z",  "items": [    {      "catalogue_item_id": "string",      "sku": "string",      "brand": "string",      "title": "string",      "currency": "string",      "orders_fulfilled": 0,      "orders_cancelled": 0,      "face_value_minor": "string",      "cost_minor": "string",      "partner_funded_minor": "string",      "merchant_funded_minor": "string"    }  ],  "totals": [    {      "currency": "string",      "orders_fulfilled": 0,      "orders_cancelled": 0,      "face_value_minor": "string",      "cost_minor": "string",      "partner_funded_minor": "string",      "merchant_funded_minor": "string"    }  ],  "adjustments": [    {      "order_id": "string",      "redemption_id": "string",      "catalogue_item_id": "string",      "sku": "string",      "currency": "string",      "reason": "redemption_cancelled_after_fulfilment",      "face_value_minor": "string",      "cost_minor": "string",      "partner_funded_minor": "string",      "merchant_funded_minor": "string",      "fulfilled_at": "2019-08-24T14:15:22Z",      "adjusted_at": "2019-08-24T14:15:22Z"    }  ],  "csv": "string"}