Custom Workflows Changes
Changes in public API for release R4b: Custom Workflows.
Overview
With the release of custom workflows several APIs have been deprecated, 2 have been removed and several have been added. The deprecations are mainly around taking actions on specific milestones. Since a custom workflow may not contain all the legacy milestones, these endpoints are deprecated in favor of new generic endpoints that can perform actions any milestone.
Deprecated
- GET
/v1/teams/{team_id}/order_milestone_configs
Milestone configs are no longer recognized in the system - they have been replaced by the features in custom workflows. However, the legacy milestone configs were saved during the migration to R4b and will remain accessible till a major version update
Many of the order actions endpoints have been deprecated, since the milestone they operate on is no longer guaranteed to exist in the workflow / order. Instead, you should use the new generic /confirm
and /reject
endpoints in the Added section.
- POST
/v1/teams/{team_id}/purchase_orders/{order_id}/delay_delivery
- POST
/v1/teams/{team_id}/purchase_orders/{order_id}/confirm_delivery
- POST
/v1/teams/{team_id}/purchase_orders/{order_id}/delay_shipment
- POST
/v1/teams/{team_id}/purchase_orders/{order_id}/confirm_shipment
- POST
/v1/teams/{team_id}/purchase_orders/{order_id}/delay_production_start
- POST
/v1/teams/{team_id}/purchase_orders/{order_id}/confirm_production_start
- POST
/v1/teams/{team_id}/purchase_orders/{order_id}/reject_purchase_order
Removed
The on_track_to_ship milestone, which was updated in the delay/confirm_ship_date endpoints, has been entirely removed. It is instead a task and should be manipulated with the task endpoints. Since no workflows contain this milestone post release. These endpoints have been removed and will return a 410 - GONE
.
- POST
/v1/teams/{team_id}/purchase_orders/{order_id}/delay_ship_date
- POST
/v1/teams/{team_id}/purchase_orders/{order_id}/confirm_ship_date
Added
- GET
/v1/teams/{team_id}/purchase_orders/{order_id}/milestones
- GET
/v1/teams/{team_id}/purchase_orders/{order_id}/milestones/{milestone_id}
- POST
/v1/teams/{team_id}/purchase_orders/{order_id}/milestones/{milestone_id}/reject
- POST
/v1/teams/{team_id}/purchase_orders/{order_id}/milestones/{milestone_id}/confirm
- POST
/v1/teams/{team_id}/purchase_orders/{order_id}/workflow_milestones/{workflow_milestone_id}/reject
- POST
/v1/teams/{team_id}/purchase_orders/{order_id}/workflow_milestones/{workflow_milestone_id}/confirm
Milestone IDs are unique to an order. To make it easier for 3rd party scripts to always confirm a specific kind of milestone, the workflow_milestones/{workflow_milestone_id}/confirm
and workflow_milestones/{workflow_milestone_id}/reject
milestones were added. These will take the workflow milestone type (example Shipment milestone) and if the order belongs to that workflow, find the corresponding order milestone that is that type (the specific shipment milestone for that order).
Modified
- PATCH
/v1/teams/{team_id}/purchase_orders/{order_id}/edit_timeline
The edit_timeline
order action has had its parameters modified. It will still accept specific dates like delivery_date
in the body. However, it is preferred to pass either order_milestone_key_dates
or workflow_order_milestone_key_dates
as parameters instead. These are hashes that take either order milestone IDs or Workflow Milestone IDs as keys and the value you wish to set the milestone to as values.
Updated 9 months ago