Update feature definitions
const url = 'https://pie.streamline.enterprises/v2/clients/client-1/domains/south_australia/features';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"features":[{"name":"route","json_schema":{"type":"string","enum":["Adelaide to Sydney","Sydney to Adelaide"]},"mandatory":true},{"name":"competitor_count","json_schema":{"type":"integer","minimum":0,"maximum":20},"mandatory":false},{"name":"weekly_demand","json_schema":{"type":"array","items":{"type":"number","minimum":0},"minItems":7,"maxItems":7},"mandatory":false},{"name":"origin_destination_pair","json_schema":{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}],"items":false,"minItems":2,"maxItems":2},"mandatory":false},{"name":"market_ref","json_schema":{"oneOf":[{"type":"string","enum":["spot","auction"]},{"type":"integer","minimum":0}]},"mandatory":false}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://pie.streamline.enterprises/v2/clients/client-1/domains/south_australia/features \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "features": [ { "name": "route", "json_schema": { "type": "string", "enum": [ "Adelaide to Sydney", "Sydney to Adelaide" ] }, "mandatory": true }, { "name": "competitor_count", "json_schema": { "type": "integer", "minimum": 0, "maximum": 20 }, "mandatory": false }, { "name": "weekly_demand", "json_schema": { "type": "array", "items": { "type": "number", "minimum": 0 }, "minItems": 7, "maxItems": 7 }, "mandatory": false }, { "name": "origin_destination_pair", "json_schema": { "type": "array", "prefixItems": [ { "type": "string" }, { "type": "string" } ], "items": false, "minItems": 2, "maxItems": 2 }, "mandatory": false }, { "name": "market_ref", "json_schema": { "oneOf": [ { "type": "string", "enum": [ "spot", "auction" ] }, { "type": "integer", "minimum": 0 } ] }, "mandatory": false } ] }'Replaces all feature definitions for a domain. Services that were initialized using default values will be automatically re-initialized if the resolved features would change under the new definitions.
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
object
Example
routeJSON Schema Draft 2020-12 document for this feature’s value. Standard keywords apply; use default for the value applied when the caller omits this feature. Values are validated against this schema at service init/update. Arrays use type with items; fixed-length tuple shapes use prefixItems with items: false; unions use oneOf / anyOf as in the spec.
object
Example
{ "type": "string", "enum": [ "Adelaide to Sydney", "Sydney to Adelaide" ]}Example
trueExample
{ "name": "route", "json_schema": { "type": "string", "enum": [ "Adelaide to Sydney", "Sydney to Adelaide" ] }, "mandatory": true}Example
{ "features": [ { "name": "route", "json_schema": { "type": "string", "enum": [ "Adelaide to Sydney", "Sydney to Adelaide" ] }, "mandatory": true }, { "name": "competitor_count", "json_schema": { "type": "integer", "minimum": 0, "maximum": 20 }, "mandatory": false }, { "name": "weekly_demand", "json_schema": { "type": "array", "items": { "type": "number", "minimum": 0 }, "minItems": 7, "maxItems": 7 }, "mandatory": false }, { "name": "origin_destination_pair", "json_schema": { "type": "array", "prefixItems": [ { "type": "string" }, { "type": "string" } ], "items": false, "minItems": 2, "maxItems": 2 }, "mandatory": false }, { "name": "market_ref", "json_schema": { "oneOf": [ { "type": "string", "enum": [ "spot", "auction" ] }, { "type": "integer", "minimum": 0 } ] }, "mandatory": false } ]}Responses
Section titled “ Responses ”Features updated; lists services being re-initialized
object
object
JSON Schema Draft 2020-12 document for this feature’s value. Standard keywords apply; use default for the value applied when the caller omits this feature. Values are validated against this schema at service init/update. Arrays use type with items; fixed-length tuple shapes use prefixItems with items: false; unions use oneOf / anyOf as in the spec.
object
Service IDs that are being re-initialized due to resolved feature changes
Service IDs unaffected by the feature update
Example
{ "features": [ { "name": "route", "json_schema": { "type": "string", "default": "Adelaide to Sydney" }, "mandatory": true } ], "reinitializing_services": [ "svc-abc" ], "unchanged_services": [ "svc-xyz" ]}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}