Skip to main content

Stream Partner API (1.0)

Download OpenAPI specification:Download

The Enterprise API for all Stream Partners.

Tokens

getPartnerTokens

Authorizations:
bearer
query Parameters
org_id
required
string

Responses

Response samples

Content type
application/json
[
  • { }
]

createPartnerToken

Authorizations:
bearer
Request Body schema: application/json
redirect_uris
Array of strings[ items <= 2048 characters ]

https, or http on a loopback host; no fragment. Grants authorization_code when not empty

org_id
required
string
token_name
required
string
scopes
required
Array of strings
Items Enum: "user" "onboarding" "legacy_onboarding" "sso" "billing" "locations:read" "menu:read"

Responses

Request samples

Content type
application/json
{
  • "redirect_uris": [
    ],
  • "org_id": "string",
  • "token_name": "string",
  • "scopes": [
    ]
}

Response samples

Content type
application/json
{ }

renamePartnerToken

Authorizations:
bearer
path Parameters
token_id
required
string
Request Body schema: application/json
redirect_uris
Array of strings[ items <= 2048 characters ]

Replaces the stored redirect URIs; an empty list removes them and the authorization_code grant

token_name
required
string

Responses

Request samples

Content type
application/json
{
  • "redirect_uris": [
    ],
  • "token_name": "string"
}

Response samples

Content type
application/json
{ }

deletePartnerToken

Authorizations:
bearer
path Parameters
token_id
required
string

Responses

OAuth

token

Request Body schema:
grant_type
required
string
Enum: "client_credentials" "refresh_token" "authorization_code"

The type of grant you are requesting, must be "client_credentials", "refresh_token" or "authorization_code"

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" "locations:read" "menu:read"

The list of the permissions that the application requests.

refresh_token
string

The refresh token only when grant_type is set to "refresh_token"

code
string

The authorization code only when grant_type is set to "authorization_code"

redirect_uri
string

The redirect_uri of the authorization request only when grant_type is set to "authorization_code"

code_verifier
string

The PKCE code verifier only when grant_type is set to "authorization_code"

Responses

Request samples

Content type
{
  • "grant_type": "client_credentials",
  • "client_id": "string",
  • "client_secret": "string",
  • "exp": 0,
  • "scopes": [
    ],
  • "refresh_token": "string",
  • "code": "string",
  • "redirect_uri": "string",
  • "code_verifier": "string"
}

Response samples

Content type
application/json
{
  • "access_token": "string",
  • "token_type": "string",
  • "expires_in": 0,
  • "refresh_token": "string",
  • "scope": "string",
  • "orgs": [
    ]
}

register

Request Body schema: application/json
client_name
required
string <= 100 characters

Name shown to the merchant on the consent page

redirect_uris
required
Array of strings[ items <= 2048 characters ]

https, or http on a loopback host; no fragment

scope
string <= 200 characters

Space-delimited scopes; defaults to every delegated scope

logo_uri
string <= 2048 characters
client_uri
string <= 2048 characters

Responses

Request samples

Content type
application/json
{
  • "client_name": "string",
  • "redirect_uris": [
    ],
  • "scope": "locations:read menu:read",
  • "logo_uri": "string",
  • "client_uri": "string"
}

Response samples

Content type
application/json
{
  • "client_id": "string",
  • "client_id_issued_at": 0,
  • "client_name": "string",
  • "redirect_uris": [
    ],
  • "grant_types": [
    ],
  • "token_endpoint_auth_method": "none",
  • "scope": "string",
  • "verification_status": "verified"
}

White Label - SSO

generateSSOSession

Authorizations:
bearer
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

Content type
application/json
{
  • "email": "string",
  • "full_name": "string",
  • "phone_number": "string",
  • "role": "owner",
  • "provider_org_id": "string",
  • "provider_org_name": "string"
}

Response samples

Content type
application/json
{
  • "sso_login_token": "string"
}

Onboarding - Integrations

Initialize OAuth integration flow

Initializes OAuth flow and returns an entry_url to begin authorization.

Authorizations:
bearer
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

Content type
application/json
{
  • "org_id": "string",
  • "source": "string",
  • "type": "pos",
  • "return_url": "string"
}

Response samples

Content type
application/json
{
  • "onboarding": {
    }
}

List available DSP options

Lists the DSPs this partner can onboard. Use source as the source value when creating integrations, binding locations, or creating orgs.

Authorizations:
bearer

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get OAuth integration status

Retrieves current status and details of an onboarding integration.

Authorizations:
bearer
path Parameters
id
required
string

Responses

Response samples

Content type
application/json
{
  • "_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:
bearer
path Parameters
id
required
string
Request Body schema: application/json
code
required
string

Responses

Request samples

Content type
application/json
{
  • "code": "string"
}

Response samples

Content type
application/json
{
  • "_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"
}

Disconnect integration

Disconnects the integration and removes ALL underlying connections bound through it, which can be more than one location. For a DSP onboarding that is every DSP location bound through this integration. For a POS onboarding it is every POS location on this integration and every DSP connection under those locations, whichever integration they were bound through. The Partner API has no way to unbind a single location through this route. To see which locations and DSP connections are bound, use GET /onboarding/org/{id}/locations; removed connections drop out of that list. When any connection must be deprovisioned manually by Stream the onboarding moves to waiting_for_deprovision, otherwise to deprovisioned. The status does not change on its own once Stream finishes: call this route again to settle it. A repeat call returns the record unchanged and files no new request while any connection still waits, and moves it to deprovisioned once all are severed. A repeat call does not remove connections that were restored since, by a new onboarding for the same account or by Stream cancelling the request. Wait for a call to return before repeating it; overlapping calls for one onboarding are not supported. A disconnected onboarding cannot be reconnected or bound again; start a new onboarding.

Authorizations:
bearer
path Parameters
id
required
string

Responses

Response samples

Content type
application/json
{
  • "_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"
}

Onboarding - Locations

List onboarding locations

Retrieves locations associated with an onboarding integration

Authorizations:
bearer
query Parameters
onboarding_id
required
string

Responses

Response samples

Content type
application/json
{
  • "locations": [
    ]
}

Ingest POS locations

Imports location data from the point-of-sale system

Authorizations:
bearer
Request Body schema: application/json
onboarding_id
required
string
required
Array of objects (IngestOnboardingLocation)

Responses

Request samples

Content type
application/json
{
  • "onboarding_id": "string",
  • "locations": [
    ]
}

Response samples

Content type
application/json
{
  • "locations": [
    ]
}

Bind DSP locations

Associates DSP locations with POS locations

Authorizations:
bearer
Request Body schema: application/json
onboarding_id
required
string
required
Array of objects (BindOnboardingLocation)

Responses

Request samples

Content type
application/json
{
  • "onboarding_id": "string",
  • "locations": [
    ]
}

Response samples

Content type
application/json
{
  • "locations": [
    ]
}

Onboarding - Menus

Publish menus to a DSP connection

Queues a full menu publish for a location on a DSP, the same publish the Stream dashboard triggers. The DSP connection must be approved or pending. Fails if a publish is already in progress or the location is missing required timezone, phone or menu hours.

Authorizations:
bearer
Request Body schema: application/json
source
required
string
location_id
required
string

Responses

Request samples

Content type
application/json
{
  • "source": "string",
  • "location_id": "string"
}

Response samples

Content type
application/json
{
  • "status": "string",
  • "publish_outcome": "queued"
}

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:
bearer
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

Content type
application/json
{
  • "org_id": "string",
  • "dsp_location_id": "string",
  • "menu_provider_ids": [
    ]
}

Response samples

Content type
application/json
{
  • "dsp_location_id": "string",
  • "menu_provider_ids": [
    ]
}

Onboarding - Org

Create organization

Creates a new organization in the partner whitelabel

Authorizations:
bearer
Request Body schema: application/json
name
required
string
provider_id
required
string
required
object (CreateUserOrgUser)

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "provider_id": "string",
  • "user": {
    }
}

Response samples

Content type
application/json
{
  • "org_id": "string",
  • "user_id": "string"
}

List organization locations

Returns POS or DSP locations for an organization

Authorizations:
bearer
path Parameters
id
required
string
query Parameters
location_id
string

Responses

Response samples

Content type
application/json
{
  • "locations": [
    ]
}

getBillingReports

query Parameters
partner_id
string

Responses

Response samples

Content type
application/json
{ }

getRawReportData

query Parameters
file_name
required
string
partner_id
required
string

Responses

Response samples

Content type
application/json
{
  • "reportMonth": "string",
  • "partnerId": "string",
  • "locations": [
    ],
  • "metrics": {
    }
}

getBillingReportInvoice

query Parameters
file_name
required
string
partner_id
required
string

Responses

Response samples

Content type
application/json
"string"

getReportCounts

query Parameters
report_month
required
string
partner_id
required
string

Responses

Response samples

Content type
application/json
{ }

getBillingCustomer

query Parameters
partner_id
string

Responses

Response samples

Content type
application/json
{ }

createBillingCustomer

query Parameters
partner_id
string
Request Body schema: application/json
email
string

Defaults to the requesting user's email

Responses

Request samples

Content type
application/json
{
  • "email": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "email": "string",
  • "name": "string",
  • "currency": "string"
}

updateBillingCustomer

query Parameters
partner_id
string
Request Body schema: application/json
email
required
string

Stripe sends invoices to this address

name
string

Responses

Request samples

Content type
application/json
{
  • "email": "string",
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "email": "string",
  • "name": "string",
  • "currency": "string"
}

Feature Flags

List all feature flags visible to the authenticated partner

Authorizations:
bearer
query Parameters
partner_id
required
string

Responses

Response samples

Content type
application/json
{
  • "flags": [
    ]
}

Get details of a specific feature flag

Authorizations:
bearer
path Parameters
flagKey
required
string
query Parameters
partner_id
required
string

Responses

Response samples

Content type
application/json
{
  • "flag": { }
}

List all contexts targeted by a flag

Authorizations:
bearer
path Parameters
flagKey
required
string
query Parameters
partner_id
required
string

Responses

Response samples

Content type
application/json
{
  • "targets": { }
}

Add contexts to a flag's targeting

Authorizations:
bearer
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
key
required
string

Context key (user ID or entity ID)

kind
required
string

Context kind

Responses

Request samples

Content type
application/json
{
  • "contexts": [
    ]
}

Remove contexts from a flag's targeting

Authorizations:
bearer
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
key
required
string

Context key (user ID or entity ID)

kind
required
string

Context kind

Responses

Request samples

Content type
application/json
{
  • "contexts": [
    ]
}

Feature Flags - Segments

List all segments visible to the authenticated partner

Authorizations:
bearer
query Parameters
partner_id
required
string

Responses

Response samples

Content type
application/json
{
  • "segments": [
    ]
}

Get details of a specific segment

Authorizations:
bearer
path Parameters
segmentKey
required
string
query Parameters
partner_id
required
string

Responses

Response samples

Content type
application/json
{
  • "segment": { }
}

List all contexts in a segment

Authorizations:
bearer
path Parameters
segmentKey
required
string
query Parameters
partner_id
required
string

Responses

Response samples

Content type
application/json
{
  • "contexts": [
    ]
}

Add contexts to a segment

Authorizations:
bearer
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
key
required
string

Context key (user ID or entity ID)

kind
required
string

Context kind

Responses

Request samples

Content type
application/json
{
  • "contexts": [
    ]
}

Remove contexts from a segment

Authorizations:
bearer
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
key
required
string

Context key (user ID or entity ID)

kind
required
string

Context kind

Responses

Request samples

Content type
application/json
{
  • "contexts": [
    ]
}

Feature Flags - Contexts

Search contexts accessible to the partner across flags and segments

Authorizations:
bearer
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

Content type
application/json
{
  • "contexts": [
    ]
}

Evaluate a flag for a given context key/kind

Authorizations:
bearer
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

Content type
application/json
{
  • "key": "string",
  • "kind": "user"
}

Response samples

Content type
application/json
{
  • "flagKey": "string",
  • "value": { },
  • "enabled": true
}