Stream Partner API (1.0)
Download OpenAPI specification:Download
The Enterprise API for all Stream Partners.
createPartnerToken
Authorizations:
Request Body schema: application/json
| org_id required | string |
| token_name required | string |
| scopes required | Array of strings Items Enum: "user" "onboarding" "legacy_onboarding" "sso" "billing" |
Responses
Request samples
- Payload
{- "org_id": "string",
- "token_name": "string",
- "scopes": [
- "user"
]
}Response samples
- 201
{ }token
Request Body schema: application/json
| grant_type required | string Enum: "client_credentials" "refresh_token" The type of grant you are requesting, must be "client_credentials" or "refresh_token" |
| client_id required | string The API Key given by the application |
| client_secret required | string The API Token given by the application |
| exp | number The expiration time of the assertion, specified as seconds since 00:00:00 UTC, January 1, 1970. This value has a maximum of 1 hour after the issued time. |
| scopes | Array of strings Items Enum: "user" "onboarding" "legacy_onboarding" "sso" "billing" The list of the permissions that the application requests. |
| refresh_token | string The refresh token only when grant_type is set to "refresh_token" |
Responses
Request samples
- Payload
{- "grant_type": "client_credentials",
- "client_id": "string",
- "client_secret": "string",
- "exp": 0,
- "scopes": [
- "user"
], - "refresh_token": "string"
}Response samples
- 201
{- "access_token": "string",
- "token_type": "bearer",
- "refresh_token": "string",
- "expires_in": 0,
- "refresh_token_expires_in": 0,
- "scopes": [
- "user"
]
}generateSSOSession
Authorizations:
query Parameters
| partner_id | string |
Request Body schema: application/json
| email required | string |
| full_name required | string |
| phone_number required | string |
| role | string Enum: "owner" "admin" "manager" "team_member" "custom" |
| provider_org_id | string |
| provider_org_name | string |
Responses
Request samples
- Payload
{- "email": "string",
- "full_name": "string",
- "phone_number": "string",
- "role": "owner",
- "provider_org_id": "string",
- "provider_org_name": "string"
}Response samples
- 201
{- "sso_login_token": "string"
}Initialize OAuth integration flow
Initializes OAuth flow and returns an entry_url to begin authorization.
Authorizations:
Request Body schema: application/json
| org_id required | string |
| source required | string |
| type required | string Enum: "pos" "dsp" |
| return_url required | string |
Responses
Request samples
- Payload
{- "org_id": "string",
- "source": "string",
- "type": "pos",
- "return_url": "string"
}Response samples
- 201
{- "onboarding": {
- "_id": "string",
- "org_id": "string",
- "merchant_id": "string",
- "type": "pos",
- "status": "pending",
- "partner_id": "string",
- "partner_org_id": "string",
- "source": "string",
- "entry_url": "string",
- "return_url": "string",
- "integration_id": "string"
}
}Get OAuth integration status
Retrieves current status and details of an onboarding integration.
Authorizations:
path Parameters
| id required | string |
Responses
Response samples
- 200
{- "_id": "string",
- "org_id": "string",
- "merchant_id": "string",
- "type": "pos",
- "status": "pending",
- "partner_id": "string",
- "partner_org_id": "string",
- "source": "string",
- "entry_url": "string",
- "return_url": "string",
- "integration_id": "string"
}Complete OAuth integration
Exchanges OAuth code from redirect URL and activates the integration.
Authorizations:
path Parameters
| id required | string |
Request Body schema: application/json
| code required | string |
Responses
Request samples
- Payload
{- "code": "string"
}Response samples
- 200
{- "_id": "string",
- "org_id": "string",
- "merchant_id": "string",
- "type": "pos",
- "status": "pending",
- "partner_id": "string",
- "partner_org_id": "string",
- "source": "string",
- "entry_url": "string",
- "return_url": "string",
- "integration_id": "string"
}List onboarding locations
Retrieves locations associated with an onboarding integration
Authorizations:
query Parameters
| onboarding_id required | string |
Responses
Response samples
- 200
{- "locations": [
- {
- "provider_id": "string",
- "name": "string",
- "address": {
- "formatted_address": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "address_line_3": "string",
- "postal_code": "string",
- "locality": "string",
- "administrative_district_level_1": "string",
- "country": "string",
- "latitude": 0,
- "longitude": 0
}, - "source": "string"
}
]
}Ingest POS locations
Imports location data from the point-of-sale system
Authorizations:
Request Body schema: application/json
| onboarding_id required | string |
required | Array of objects (IngestOnboardingLocation) |
Responses
Request samples
- Payload
{- "onboarding_id": "string",
- "locations": [
- {
- "provider_id": "string"
}
]
}Response samples
- 201
{- "locations": [
- {
- "_id": "string",
- "provider_id": "string"
}
]
}Bind DSP locations
Associates DSP locations with POS locations
Authorizations:
Request Body schema: application/json
| onboarding_id required | string |
required | Array of objects (BindOnboardingLocation) |
Responses
Request samples
- Payload
{- "onboarding_id": "string",
- "locations": [
- {
- "pos_location_id": "string",
- "dsp_provider_id": "string",
- "dsp_store_name": "string"
}
]
}Response samples
- 201
{- "locations": [
- {
- "_id": "string",
- "dsp_provider_id": "string",
- "dsp_store_name": "string",
- "status": "APPROVED"
}
]
}Assign menus to a DSP connection
Sets the menus assigned to a DSP connection for a location, referenced by the menu provider_ids supplied in your catalog. Replaces any existing assignment for that connection. On catalog update, each DSP connection receives the menus currently assigned to it. Pass an empty menu_provider_ids array to remove the assignment and restore default (publish all menus) behaviour.
Authorizations:
Request Body schema: application/json
| org_id required | string Organization id the DSP connection belongs to |
| dsp_location_id required | string DSP connection id, as returned by GET /onboarding/org/:id/locations (dsps[]._id) |
| menu_provider_ids required | Array of strings Full set of menu provider_ids (the ids you supplied in your catalog) to assign to this DSP connection. Replaces any existing assignment. On catalog update, the connection receives only these menus. Pass an empty array to remove the assignment and restore the default behaviour of publishing all of the location's menus. |
Responses
Request samples
- Payload
{- "org_id": "string",
- "dsp_location_id": "string",
- "menu_provider_ids": [
- "string"
]
}Response samples
- 200
{- "dsp_location_id": "string",
- "menu_provider_ids": [
- "string"
]
}Create organization
Creates a new organization in the partner whitelabel
Authorizations:
Request Body schema: application/json
| name required | string |
| provider_id required | string |
required | object (CreateUserOrgUser) |
Responses
Request samples
- Payload
{- "name": "string",
- "provider_id": "string",
- "user": {
- "email": "string",
- "first_name": "string",
- "last_name": "string"
}
}Response samples
- 201
{- "org_id": "string",
- "user_id": "string"
}List organization locations
Returns POS or DSP locations for an organization
Authorizations:
path Parameters
| id required | string |
query Parameters
| location_id | string |
Responses
Response samples
- 200
{- "locations": [
- {
- "_id": "string",
- "name": "string",
- "source": "string",
- "status": "active",
- "address": {
- "formatted_address": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "address_line_3": "string",
- "postal_code": "string",
- "locality": "string",
- "administrative_district_level_1": "string",
- "country": "string",
- "latitude": 0,
- "longitude": 0
}, - "dsps": [
- {
- "_id": "string",
- "name": "string",
- "source": "string",
- "status": "APPROVED",
- "change_time": 0
}
]
}
]
}Add contexts to a flag's targeting
Authorizations:
path Parameters
| flagKey required | string |
query Parameters
| partner_id required | string |
Request Body schema: application/json
required | Array of objects (ContextDto) Contexts to add | ||||
Array
| |||||
Responses
Request samples
- Payload
{- "contexts": [
- {
- "key": "string",
- "kind": "string"
}
]
}Remove contexts from a flag's targeting
Authorizations:
path Parameters
| flagKey required | string |
query Parameters
| partner_id required | string |
Request Body schema: application/json
required | Array of objects (ContextDto) Contexts to remove | ||||
Array
| |||||
Responses
Request samples
- Payload
{- "contexts": [
- {
- "key": "string",
- "kind": "string"
}
]
}Add contexts to a segment
Authorizations:
path Parameters
| segmentKey required | string |
query Parameters
| partner_id required | string |
Request Body schema: application/json
required | Array of objects (ContextDto) Contexts to add | ||||
Array
| |||||
Responses
Request samples
- Payload
{- "contexts": [
- {
- "key": "string",
- "kind": "string"
}
]
}Remove contexts from a segment
Authorizations:
path Parameters
| segmentKey required | string |
query Parameters
| partner_id required | string |
Request Body schema: application/json
required | Array of objects (ContextDto) Contexts to remove | ||||
Array
| |||||
Responses
Request samples
- Payload
{- "contexts": [
- {
- "key": "string",
- "kind": "string"
}
]
}Search contexts accessible to the partner across flags and segments
Authorizations:
query Parameters
| q | string Substring match on context key |
| kind | string Context kind filter |
| limit | string Example: limit=20 Maximum number of results (1-50) |
| partner_id | string |
Responses
Response samples
- 200
{- "contexts": [
- { }
]
}Evaluate a flag for a given context key/kind
Authorizations:
path Parameters
| flagKey required | string |
query Parameters
| partner_id required | string |
Request Body schema: application/json
| key required | string Context key (e.g., user or entity id) |
| kind | string Default: "user" Context kind |
Responses
Request samples
- Payload
{- "key": "string",
- "kind": "user"
}Response samples
- 200
{- "flagKey": "string",
- "value": { },
- "enabled": true
}