Initialize a new service
const url = 'https://pie.streamline.enterprises/v2/clients/client-1/domains/south_australia/service/init';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"service_id":"service-1","departure_datetime":"2025-07-01T12:00:00Z","static_features":{"route":"Adelaide to Sydney","competitor_count":5}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://pie.streamline.enterprises/v2/clients/client-1/domains/south_australia/service/init \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "service_id": "service-1", "departure_datetime": "2025-07-01T12:00:00Z", "static_features": { "route": "Adelaide to Sydney", "competitor_count": 5 } }'Creates and initializes a service within the domain. Validates static features against domain feature definitions, applies defaults where not provided, then triggers inference on the domain’s assigned model.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Example
client-1Example
south_australiaRequest Body required
Section titled “Request Body required ”object
Feature key-value pairs. Mandatory features without defaults must be provided.
object
Example
{ "service_id": "service-1", "departure_datetime": "2025-07-01T12:00:00Z", "static_features": { "route": "Adelaide to Sydney", "competitor_count": 5 }}Responses
Section titled “ Responses ”Service initialization started
object
Durable model job ID for the initialization job.
Example
{ "service_id": "service-1", "job_id": "123456789012"}Validation error — malformed input, invalid path parameters, or request that fails syntactic validation.
object
Human-readable error message
Example
{ "success": false}Missing or invalid Authorization bearer token, expired token, or token rejected by the
authorization layer (e.g. API Gateway JWT authorizer or application validation).
object
Human-readable error message
Example
{ "success": false}Authenticated caller lacks the permission required for this operation.
object
Human-readable error message
Example
{ "success": false}Requested resource was not found.
object
Human-readable error message
Example
{ "success": false}Semantically invalid request — e.g. domain not active, no model assigned, feature contract mismatch, or invalid feature definitions.
object
Human-readable error message
Example
{ "success": false}