Orishare
API reference
GET
/friend_quest_definitions

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

In: header

Query Parameters

limit?integer
Range1 <= value <= 100
Default50
cursor?string
status?string

Value in

  • "draft"
  • "active"
  • "paused"
  • "archived"

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/friend_quest_definitions"
{  "data": [    {      "id": "string",      "key": "string",      "name": "string",      "status": "draft",      "revision": -9007199254740991,      "created_at": "2019-08-24T14:15:22Z",      "updated_at": "2019-08-24T14:15:22Z",      "config": {        "schema": "friend_quest/v1",        "period": {          "kind": "week",          "start_weekday": 1,          "start_minute": 0,          "timezone": "environment"        },        "target": 1,        "metric": {          "source": "direct"        },        "reward": [          {            "currency": "string",            "amount": 1          }        ],        "pairing": "manual"      }    }  ],  "next_cursor": "string",  "has_more": true}
POST
/friend_quest_definitions

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

curl -X POST "https://example.com/friend_quest_definitions" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{    "key": "weekly-duo",    "name": "Weekly duo",    "config": {      "schema": "friend_quest/v1",      "period": {        "kind": "week",        "start_weekday": 1,        "start_minute": 0,        "timezone": "environment"      },      "target": 500,      "metric": {        "source": "direct"      },      "reward": [        {          "currency": "gems",          "amount": 50        },        {          "type": "item",          "item": "xp_boost_15m",          "quantity": 1        }      ],      "pairing": "manual"    }  }'
{  "id": "string",  "key": "string",  "name": "string",  "status": "draft",  "revision": -9007199254740991,  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z",  "config": {    "schema": "friend_quest/v1",    "period": {      "kind": "week",      "start_weekday": 1,      "start_minute": 0,      "timezone": "environment"    },    "target": 1,    "metric": {      "source": "direct"    },    "reward": [      {        "currency": "string",        "amount": 1      }    ],    "pairing": "manual"  }}
GET
/friend_quest_definitions/{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/friend_quest_definitions/string"
{  "id": "string",  "key": "string",  "name": "string",  "status": "draft",  "revision": -9007199254740991,  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z",  "config": {    "schema": "friend_quest/v1",    "period": {      "kind": "week",      "start_weekday": 1,      "start_minute": 0,      "timezone": "environment"    },    "target": 1,    "metric": {      "source": "direct"    },    "reward": [      {        "currency": "string",        "amount": 1      }    ],    "pairing": "manual"  }}
PATCH
/friend_quest_definitions/{id}

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
If-Match*string

Required 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 PATCH "https://example.com/friend_quest_definitions/string" \  -H "Idempotency-Key: string" \  -H "If-Match: string" \  -H "Content-Type: application/json" \  -d '{    "name": "Weekly duo"  }'
{  "id": "string",  "key": "string",  "name": "string",  "status": "draft",  "revision": -9007199254740991,  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z",  "config": {    "schema": "friend_quest/v1",    "period": {      "kind": "week",      "start_weekday": 1,      "start_minute": 0,      "timezone": "environment"    },    "target": 1,    "metric": {      "source": "direct"    },    "reward": [      {        "currency": "string",        "amount": 1      }    ],    "pairing": "manual"  }}
POST
/friend_quest_definitions/{id}/activate

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/friend_quest_definitions/string/activate" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{    "expected_revision": 2  }'
{  "id": "string",  "key": "string",  "name": "string",  "status": "draft",  "revision": -9007199254740991,  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z",  "config": {    "schema": "friend_quest/v1",    "period": {      "kind": "week",      "start_weekday": 1,      "start_minute": 0,      "timezone": "environment"    },    "target": 1,    "metric": {      "source": "direct"    },    "reward": [      {        "currency": "string",        "amount": 1      }    ],    "pairing": "manual"  }}
POST
/friend_quest_definitions/{id}/pause

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/friend_quest_definitions/string/pause" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{    "expected_revision": 2  }'
{  "id": "string",  "key": "string",  "name": "string",  "status": "draft",  "revision": -9007199254740991,  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z",  "config": {    "schema": "friend_quest/v1",    "period": {      "kind": "week",      "start_weekday": 1,      "start_minute": 0,      "timezone": "environment"    },    "target": 1,    "metric": {      "source": "direct"    },    "reward": [      {        "currency": "string",        "amount": 1      }    ],    "pairing": "manual"  }}
POST
/friend_quest_definitions/{id}/resume

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/friend_quest_definitions/string/resume" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{    "expected_revision": 2  }'
{  "id": "string",  "key": "string",  "name": "string",  "status": "draft",  "revision": -9007199254740991,  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z",  "config": {    "schema": "friend_quest/v1",    "period": {      "kind": "week",      "start_weekday": 1,      "start_minute": 0,      "timezone": "environment"    },    "target": 1,    "metric": {      "source": "direct"    },    "reward": [      {        "currency": "string",        "amount": 1      }    ],    "pairing": "manual"  }}
POST
/friend_quest_definitions/{id}/archive

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/friend_quest_definitions/string/archive" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{    "expected_revision": 2  }'
{  "id": "string",  "key": "string",  "name": "string",  "status": "draft",  "revision": -9007199254740991,  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z",  "config": {    "schema": "friend_quest/v1",    "period": {      "kind": "week",      "start_weekday": 1,      "start_minute": 0,      "timezone": "environment"    },    "target": 1,    "metric": {      "source": "direct"    },    "reward": [      {        "currency": "string",        "amount": 1      }    ],    "pairing": "manual"  }}
GET
/friend_streak_definitions

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

In: header

Query Parameters

limit?integer
Range1 <= value <= 100
Default50
cursor?string
status?string

Value in

  • "draft"
  • "active"
  • "paused"
  • "archived"

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/friend_streak_definitions"
{  "data": [    {      "id": "string",      "key": "string",      "name": "string",      "status": "draft",      "revision": -9007199254740991,      "created_at": "2019-08-24T14:15:22Z",      "updated_at": "2019-08-24T14:15:22Z",      "config": {        "schema": "friend_streak/v1",        "timezone": "environment",        "milestones": []      }    }  ],  "next_cursor": "string",  "has_more": true}
POST
/friend_streak_definitions

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

curl -X POST "https://example.com/friend_streak_definitions" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{    "key": "daily-duo",    "name": "Daily duo",    "config": {      "schema": "friend_streak/v1",      "timezone": "environment",      "milestones": [        {          "length": 3,          "reward": [            {              "currency": "gems",              "amount": 10            }          ]        },        {          "length": 7,          "reward": [            {              "currency": "gems",              "amount": 30            },            {              "type": "item",              "item": "streak_badge",              "quantity": 1            }          ]        }      ]    }  }'
{  "id": "string",  "key": "string",  "name": "string",  "status": "draft",  "revision": -9007199254740991,  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z",  "config": {    "schema": "friend_streak/v1",    "timezone": "environment",    "milestones": []  }}
GET
/friend_streak_definitions/{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/friend_streak_definitions/string"
{  "id": "string",  "key": "string",  "name": "string",  "status": "draft",  "revision": -9007199254740991,  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z",  "config": {    "schema": "friend_streak/v1",    "timezone": "environment",    "milestones": []  }}
PATCH
/friend_streak_definitions/{id}

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
If-Match*string

Required 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 PATCH "https://example.com/friend_streak_definitions/string" \  -H "Idempotency-Key: string" \  -H "If-Match: string" \  -H "Content-Type: application/json" \  -d '{    "name": "Daily duo"  }'
{  "id": "string",  "key": "string",  "name": "string",  "status": "draft",  "revision": -9007199254740991,  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z",  "config": {    "schema": "friend_streak/v1",    "timezone": "environment",    "milestones": []  }}
POST
/friend_streak_definitions/{id}/activate

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/friend_streak_definitions/string/activate" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{    "expected_revision": 2  }'
{  "id": "string",  "key": "string",  "name": "string",  "status": "draft",  "revision": -9007199254740991,  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z",  "config": {    "schema": "friend_streak/v1",    "timezone": "environment",    "milestones": []  }}
POST
/friend_streak_definitions/{id}/pause

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/friend_streak_definitions/string/pause" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{    "expected_revision": 2  }'
{  "id": "string",  "key": "string",  "name": "string",  "status": "draft",  "revision": -9007199254740991,  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z",  "config": {    "schema": "friend_streak/v1",    "timezone": "environment",    "milestones": []  }}
POST
/friend_streak_definitions/{id}/resume

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/friend_streak_definitions/string/resume" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{    "expected_revision": 2  }'
{  "id": "string",  "key": "string",  "name": "string",  "status": "draft",  "revision": -9007199254740991,  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z",  "config": {    "schema": "friend_streak/v1",    "timezone": "environment",    "milestones": []  }}
POST
/friend_streak_definitions/{id}/archive

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/friend_streak_definitions/string/archive" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{    "expected_revision": 2  }'
{  "id": "string",  "key": "string",  "name": "string",  "status": "draft",  "revision": -9007199254740991,  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z",  "config": {    "schema": "friend_streak/v1",    "timezone": "environment",    "milestones": []  }}
GET
/friend_quest_definitions/{id}/quests

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

In: header

Path Parameters

id*string
Length1 <= length

Query Parameters

limit?integer
Range1 <= value <= 100
Default50
cursor?string
status?string

Value in

  • "active"
  • "completed"
  • "expired"
  • "cancelled"

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/friend_quest_definitions/string/quests"
{  "data": [    {      "id": "string",      "definition_id": "string",      "period_key": "string",      "customer_low": "string",      "customer_high": "string",      "starts_at": "2019-08-24T14:15:22Z",      "ends_at": "2019-08-24T14:15:22Z",      "config": {        "schema": "friend_quest/v1",        "period": {          "kind": "week",          "start_weekday": 1,          "start_minute": 0,          "timezone": "environment"        },        "target": 1,        "metric": {          "source": "direct"        },        "reward": [          {            "currency": "string",            "amount": 1          }        ],        "pairing": "manual"      },      "target": -9007199254740991,      "progress_low": -9007199254740991,      "progress_high": -9007199254740991,      "status": "active",      "completed_at": "2019-08-24T14:15:22Z",      "reward": [        {          "currency": "string",          "amount": -9007199254740991        }      ],      "reward_status": "none",      "reward_granted_at": "2019-08-24T14:15:22Z",      "created_at": "2019-08-24T14:15:22Z"    }  ],  "next_cursor": "string",  "has_more": true}
POST
/friend_quest_definitions/{id}/contributions

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/friend_quest_definitions/string/contributions" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{    "customer_id": "cust_0192f0c0a0b07c3d8e9f0a1b2c3d4e5a",    "amount": 25  }'
{  "quest": {    "id": "string",    "definition_id": "string",    "period_key": "string",    "customer_low": "string",    "customer_high": "string",    "starts_at": "2019-08-24T14:15:22Z",    "ends_at": "2019-08-24T14:15:22Z",    "config": {      "schema": "friend_quest/v1",      "period": {        "kind": "week",        "start_weekday": 1,        "start_minute": 0,        "timezone": "environment"      },      "target": 1,      "metric": {        "source": "direct"      },      "reward": [        {          "currency": "string",          "amount": 1        }      ],      "pairing": "manual"    },    "target": -9007199254740991,    "progress_low": -9007199254740991,    "progress_high": -9007199254740991,    "status": "active",    "completed_at": "2019-08-24T14:15:22Z",    "reward": [      {        "currency": "string",        "amount": -9007199254740991      }    ],    "reward_status": "none",    "reward_granted_at": "2019-08-24T14:15:22Z",    "created_at": "2019-08-24T14:15:22Z"  },  "replayed": true,  "applied": true,  "completed": true}
POST
/friend_streak_definitions/{id}/activities

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/friend_streak_definitions/string/activities" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{    "customer_id": "cust_0192f0c0a0b07c3d8e9f0a1b2c3d4e5a"  }'
{  "day_key": "string",  "recorded": true,  "streaks": [    {      "definition_id": "string",      "customer_low": "string",      "customer_high": "string",      "length": -9007199254740991,      "effective_length": -9007199254740991,      "longest": -9007199254740991,      "last_day_key": "string",      "status": "active",      "started_at": "2019-08-24T14:15:22Z",      "updated_at": "2019-08-24T14:15:22Z"    }  ],  "milestones": [    {      "definition_id": "string",      "customer_low": "string",      "customer_high": "string",      "length": -9007199254740991    }  ]}