Stream Partner API (1.0)
Download OpenAPI specification:Download
The Enterprise API for all Stream Partners.
createPartnerToken
Authorizations:
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
- Payload
{- "redirect_uris": [
- "string"
], - "org_id": "string",
- "token_name": "string",
- "scopes": [
- "user"
]
}Response samples
- 201
{ }renamePartnerToken
Authorizations:
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
- Payload
{- "redirect_uris": [
- "string"
], - "token_name": "string"
}Response samples
- 200
{ }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
- Payload
{- "grant_type": "client_credentials",
- "client_id": "string",
- "client_secret": "string",
- "exp": 0,
- "scopes": [
- "user"
], - "refresh_token": "string",
- "code": "string",
- "redirect_uri": "string",
- "code_verifier": "string"
}Response samples
- 200
- 201
{- "access_token": "string",
- "token_type": "string",
- "expires_in": 0,
- "refresh_token": "string",
- "scope": "string",
- "orgs": [
- {
- "org_id": "string",
- "merchant_ids": [
- "string"
], - "location_ids": [
- "string"
]
}
]
}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
- Payload
{- "client_name": "string",
- "redirect_uris": [
- "string"
], - "scope": "locations:read menu:read",
- "logo_uri": "string",
- "client_uri": "string"
}Response samples
- 201
{- "client_id": "string",
- "client_id_issued_at": 0,
- "client_name": "string",
- "redirect_uris": [
- "string"
], - "grant_types": [
- "client_credentials"
], - "token_endpoint_auth_method": "none",
- "scope": "string",
- "verification_status": "verified"
}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"
}
}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:
Responses
Response samples
- 200
[- {
- "source": "string",
- "name": "string",
- "icon": "string",
- "image": "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"
}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:
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"
}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",
- "is_eligible_to_onboard": true
}
]
}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"
}
]
}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:
Request Body schema: application/json
| source required | string |
| location_id required | string |
Responses
Request samples
- Payload
{- "source": "string",
- "location_id": "string"
}Response samples
- 201
{- "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:
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,
- "dsp_provider_id": "string",
- "integration_id": "string"
}
]
}
]
}createBillingCustomer
query Parameters
| partner_id | string |
Request Body schema: application/json
string Defaults to the requesting user's email |
Responses
Request samples
- Payload
{- "email": "string"
}Response samples
- 201
{- "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
- Payload
{- "email": "string",
- "name": "string"
}Response samples
- 200
{- "id": "string",
- "email": "string",
- "name": "string",
- "currency": "string"
}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
}