state-machines

Update state machine

Partially updates a state machine by its identifier (name, transitions, active). The code and entity type are immutable. When transitions change, the resulting graph goes through the same structural save validations as creation. Deactivating (active: false) is blocked while a live strategy references the machine, and ORDER machines cannot be deactivated at all (canonical order flow of the account).

patch/api/v1/state-machines/{id}

Path parameters

idstring uuid required
Example:01920000-0000-7000-8000-000000000000

State machine identifier (UUID).

Request body

namestring
activeboolean

Response

State machine updated.

idstring required
entity_type'ORDER' | 'FULFILLMENT_ORDER' required
codestring required
namestring required
activeboolean required
is_defaultboolean required
versionnumber required
created_atstring required
updated_atstring required

Changes

Changed in 2 of the 9 revisions of this API.11416

  • a3b4750a505f114See the full diff
    • added the new required request property generateFulfillmentAction/status

      new-required-request-property

    • added the new optional request property active

      new-optional-request-property

    • added the new optional request property name

      new-optional-request-property

    • added the new optional request property states

      new-optional-request-property

    • added the new optional request property transitions

      new-optional-request-property

    • added the required property active to the response with the 200 status

      response-required-property-added

    • added the required property code to the response with the 200 status

      response-required-property-added

    • added the required property created_at to the response with the 200 status

      response-required-property-added

    • added the required property entity_type to the response with the 200 status

      response-required-property-added

    • added the required property id to the response with the 200 status

      response-required-property-added

    • added the required property is_default to the response with the 200 status

      response-required-property-added

    • added the required property name to the response with the 200 status

      response-required-property-added

    • added the required property transitions to the response with the 200 status

      response-required-property-added

    • added the required property updated_at to the response with the 200 status

      response-required-property-added

    • added the required property version to the response with the 200 status

      response-required-property-added

    This revision also has 2 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

  • 84194c31ab851042See the full diff
    • the response property states/items/actions became optional for the status 200

      response-property-became-optional

    • the response property states/items/status became optional for the status 200

      response-property-became-optional

    • removed the required property active from the response with the 200 status

      response-required-property-removed

    • removed the required property code from the response with the 200 status

      response-required-property-removed

    • removed the required property created_at from the response with the 200 status

      response-required-property-removed

    • removed the required property entity_type from the response with the 200 status

      response-required-property-removed

    • removed the required property id from the response with the 200 status

      response-required-property-removed

    • removed the required property name from the response with the 200 status

      response-required-property-removed

    • removed the required property transitions from the response with the 200 status

      response-required-property-removed

    • removed the required property updated_at from the response with the 200 status

      response-required-property-removed

    • removed the request property active

      request-property-removed

    • removed the request property name

      request-property-removed

    • removed the request property states

      request-property-removed

    • removed the request property transitions

      request-property-removed

    • added the new optional request property generateFulfillmentAction

      new-optional-request-property

    • added the non-success response with the status 409

      response-non-success-status-added

    This revision also has 36 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog