Update an inventory feed workflow

Update an existing inventory feed workflow by its id.

PUThttps://api.spyne.ai/partner/input-workflow/{id}
AuthBearer token (console user)Rate limitNot documentedProcessingSynchronous. Waits for the update, the rule rewrite and the change log.

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.
  • id is the workflow _id from List inventory feed workflows or Create an inventory feed workflow.
  • The UI sends the full stored workflow merged with its changes, plus enterpriseId, teamId and userId. 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.

Requiredalways sendOptionalcan be left out
ParameterTypeRequiredDescription
Header———
AuthorizationstringRequiredBearer YOUR_TOKEN
Path———
idstringRequired<workflowId>. Must be a valid id.
Body———
partnerIdstringOptionalIf sent, must be a valid id of an existing partner.
dealerId, name, teamId, enterpriseIdstringOptionalChanged if different.
isActivebooleanOptionalfalse turns the feed off.
partnerProviderTypesstring[]OptionalIMS, PHOTO, CGI.
thresholdCountsobjectOptionalnewCars and usedCars. 0 is rejected.
preliminaryConfigs, productOptions, processingConfigsobjectOptionalAs in create.
rulesarrayOptionalReplaces all rules when sent.
customIntegrationobjectOptionalPartner add-on selector.
_id, __v, createdAt, updatedAtanyOptionalIgnored.
Request checklist
  1. Authenticate: set Authorization: Bearer YOUR_TOKEN.
  2. Path: put the workflow _id in the path.
  3. Body: send only the fields to change, or the full workflow.
  4. Thresholds: send -1 or a positive number, never 0. A workflow created without thresholds stores 0; echoing that back fails validation.
  5. Rules: send rules only if you mean to replace all rules.
  6. Finish: if this is the IMS workflow, mark the checklist task IMS Integration done 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

ParameterTypeDescription
successbooleantrue on 200.
messagestringInput workflow updated successfully, or No changes detected in input workflow when no top-level field changed (rules can still have been rewritten).
dataobjectThe workflow after the update, with rules and latestFileUpload. Same fields as List inventory feed workflows.

Errors

StatusCodeWhen it happens
400Invalid ID formatid is not a valid id.
400Validation failedInvalid or unknown partnerId, a threshold is 0 or not a number, bad productOptions, bad rules.
401Authentication token required or Invalid AuthenticationMissing or rejected token.
404Input workflow not foundNo workflow with this id.
500Failed to update input workflowDatabase 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.


Did this page help you?