Update an inventory feed workflow
Update an existing inventory feed workflow by its id.
The server compares each top-level field in the body with the stored workflow and writes only the fields that changed. If rules is sent as an array, every existing rule and condition is deleted and the sent rules are created again. Field changes are written to the workflow change log with the caller's user id. The feed cache for the rooftop is cleared. Sending isActive: false turns the feed off.
Before you call it
- You need the bearer token of a signed-in console user. The route does not check that the workflow belongs to the caller's rooftop.
idis the workflow_idfrom List inventory feed workflows or Create an inventory feed workflow.- The UI sends the full stored workflow merged with its changes, plus
enterpriseId,teamIdanduserId. Fields you leave out are not changed. - Synchronous. It waits for the update, the rule rewrite and the change log. Rate limit: not documented.
Request body
All body fields are optional. They follow the same rules as Create an inventory feed workflow.
| Parameter | Type | Required | Description |
|---|---|---|---|
| Header | — | — | — |
Authorization | string | Required | Bearer YOUR_TOKEN |
| Path | — | — | — |
id | string | Required | <workflowId>. Must be a valid id. |
| Body | — | — | — |
partnerId | string | Optional | If sent, must be a valid id of an existing partner. |
dealerId, name, teamId, enterpriseId | string | Optional | Changed if different. |
isActive | boolean | Optional | false turns the feed off. |
partnerProviderTypes | string[] | Optional | IMS, PHOTO, CGI. |
thresholdCounts | object | Optional | newCars and usedCars. 0 is rejected. |
preliminaryConfigs, productOptions, processingConfigs | object | Optional | As in create. |
rules | array | Optional | Replaces all rules when sent. |
customIntegration | object | Optional | Partner add-on selector. |
_id, __v, createdAt, updatedAt | any | Optional | Ignored. |
- Authenticate: set
Authorization: Bearer YOUR_TOKEN. - Path: put the workflow
_idin the path. - Body: send only the fields to change, or the full workflow.
- Thresholds: send
-1or a positive number, never0. A workflow created without thresholds stores0; echoing that back fails validation. - Rules: send
rulesonly if you mean to replace all rules. - Finish: if this is the IMS workflow, mark the checklist task
IMS Integrationdone on success.
Sample request
curl -X PUT "https://api.spyne.ai/partner/input-workflow/<workflowId>" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"dealerId": "<dealerId>",
"preliminaryConfigs": { "enabled": true, "thresholds": { "new": 5, "used": 3 } },
"enterpriseId": "<enterpriseId>",
"teamId": "<teamId>"
}'import requests
res = requests.put(
"https://api.spyne.ai/partner/input-workflow/<workflowId>",
headers={"Authorization": "Bearer YOUR_TOKEN"},
json={"isActive": False},
)
print(res.json()["message"])const res = await fetch(
"https://api.spyne.ai/partner/input-workflow/<workflowId>",
{
method: "PUT",
headers: {
Authorization: "Bearer YOUR_TOKEN",
"Content-Type": "application/json",
},
body: JSON.stringify({ thresholdCounts: { newCars: -1, usedCars: -1 } }),
}
);
const body = await res.json();Sample response
{
"success": true,
"message": "Input workflow updated successfully",
"data": {
"_id": "<workflowId>",
"name": "Example Inventory Feed - Inventory Provider",
"teamId": "<teamId>",
"partnerId": "<partnerId>",
"dealerId": "<dealerId>",
"isActive": true,
"partnerProviderTypes": ["IMS"],
"preliminaryConfigs": { "enabled": true, "thresholds": { "new": 5, "used": 3 } },
"rules": [],
"latestFileUpload": null,
"updatedAt": "2026-01-02T00:00:00.000Z"
}
}{ "success": true, "message": "No changes detected in input workflow", "data": { "_id": "<workflowId>" } }{ "success": false, "message": "Invalid ID format" }{ "success": false, "message": "Validation failed", "errors": ["Threshold count for new cars cannot be 0 (use -1 to disable, or a positive number)"] }{ "success": false, "error": "Authentication token required" }{ "success": false, "message": "Input workflow not found" }{ "success": false, "message": "Failed to update input workflow", "error": "<error message>" }Response parameters
| Parameter | Type | Description |
|---|---|---|
success | boolean | true on 200. |
message | string | Input workflow updated successfully, or No changes detected in input workflow when no top-level field changed (rules can still have been rewritten). |
data | object | The workflow after the update, with rules and latestFileUpload. Same fields as List inventory feed workflows. |
Errors
| Status | Code | When it happens |
|---|---|---|
400 | Invalid ID format | id is not a valid id. |
400 | Validation failed | Invalid or unknown partnerId, a threshold is 0 or not a number, bad productOptions, bad rules. |
401 | Authentication token required or Invalid Authentication | Missing or rejected token. |
404 | Input workflow not found | No workflow with this id. |
500 | Failed to update input workflow | Database or change log error. |
What happens next
Refresh with List inventory feed workflows. If this was the IMS workflow, the UI calls Mark a checklist task done in the Checklist section with taskName: "IMS Integration". The inventory feed setup is then complete for the checklist. The feed itself starts when the partner delivers files for this dealerId.
Updated about 1 hour ago
