Skip to main content

Become a Stream DSP (0.1)

Download OpenAPI specification:Download

This is a spec for integrating with Stream as a DSP. We are prescribing an OAuth System for Location Configuration and a 2-Way Webhook System for an Event Driven Partnership. Please send any feedback or questions to marc@streamorders.com.

Authorize (Stream -> DSP)

You will have to build this endpoint into your system. This is where Stream will initiate the oAuth process.

query Parameters
client_id
required
string
response_type
required
string
Value: "code"
redirect_uri
required
string

Responses

Request Token (Stream –> DSP)

You will have to build this endpoint into your system. This is where Stream will request and refresh access tokens.

Request Body schema: application/json
One of
grant_type
required
string
Default: "authorization_code"
client_id
required
string

The client ID to be provided to Stream for identifying us.

client_secret
required
string

The client secret to be provided to Stream for security.

code
required
string

The authorization code received from successful authorization.

Responses

Request samples

Content type
application/json
Example
{
  • "grant_type": "authorization_code",
  • "client_id": "string",
  • "client_secret": "string",
  • "code": "string"
}

Response samples

Content type
application/json
{
  • "access_token": "string",
  • "refresh_token": "string",
  • "expire_time": 0,
  • "refresh_token_expire_time": 0,
  • "id": "string"
}

Get Locations (Stream –> DSP via OAuth)

You will have to build this endpoint into your system. This is where Stream will query the locations attached to the OAuth token.

header Parameters
authorization
required
string
Authorization
string

The OAuth Bearer token for the merchant. Format will be Bearer <TOKEN>.

Responses

Response samples

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

Connect Location (Stream –> DSP via OAuth)

You will have to build this endpoint into your system. This is where Stream will notify you about locations connected to Stream.

header Parameters
Authorization
string

The OAuth Bearer token for the merchant. Format will be Bearer <TOKEN>.

Request Body schema: application/json
location_id
required
string

Responses

Request samples

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

Get Location Connection (Stream –> DSP via OAuth)

You will have to build this endpoint into your system. This is where Stream will check a locations connection state to Stream.

query Parameters
location_id
required
string
header Parameters
Authorization
string

The OAuth Bearer token for the merchant. Format will be Bearer <TOKEN>.

Responses

Response samples

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

Disconnect Location (Stream –> DSP via OAuth)

You will have to build this endpoint into your system. This is where Stream will notify you about locations disconnected from Stream.

header Parameters
Authorization
string

The OAuth Bearer token for the merchant. Format will be Bearer <TOKEN>.

Request Body schema: application/json
location_id
required
string

Responses

Request samples

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

New Webhook Event (Stream –> DSP via Webhook)

You will have to build this endpoint into your system. This is where Stream will send all webhook events.

header Parameters
Authorization
string

The OAuth Bearer token for the merchant. Format will be Bearer <TOKEN>.

Request Body schema: application/json
One of
type
required
string
Default: "location.paused"

The type of event that this is.

location_id
required
string

The location ID that should be paused

until_ms
number

The time in milliseconds to pause until. If not specified, the location will be paused indefinitely.

Responses

Request samples

Content type
application/json
Example
{
  • "type": "location.paused",
  • "location_id": "string",
  • "until_ms": 0
}

Response samples

Content type
application/json
{ }

Menu Ingestion File (DSP -> URL)

This is where you will retrieve all menu contents, the URL will be provided in the location.publish event. Response schema version (v1 or v2) is determined by partner configuration flag. Partners must contact support to enable v2 schema access.

Responses

Response samples

Content type
application/json
Example
{
  • "prep_time_minutes": 30,
  • "menus": [
    ],
  • "holidays": [
    ],
  • "taxes": [
    ]
}

New Webhook Event (DSP –> Stream via Webhook)

You will have to call this endpoint from your system. This is how you will notify Stream about events that happen in your system.

header Parameters
Stream-Webhook-Signature
string

The HMAC-SHA256 signature of the request body, using the webhook secret as the key.

Request Body schema: application/json
One of
type
required
string
Default: "new_order"
required
object

A new order. This property should only exist if this is a new order event.

location_id
required
string

The ID of the location that this event is for.

Responses

Request samples

Content type
application/json
Example
{
  • "type": "new_order",
  • "order": {
    },
  • "location_id": "string"
}