Skip to content

updateActionStatus - Update asynchronous action status

Request

Description

Updates the final status of an asynchronous action previously initiated through a command event.

Overview

  • When an asynchronous action is requested via command event, an action_id is provided to track the action
  • Use this endpoint to report the final outcome (SUCCESS or FAILURE) of the action
  • For failed actions, detailed error information must be provided

Usage Notes

  • Update should be sent once the action is fully completed
  • Multiple errors can be provided for failed actions
  • The action ID must match the one provided in the original command event
Call Frequency
Maximum usage: Once per action completion
Security
Bearer(Required scopes:
connect-channel-platform:order-a...
)
Path
action_idstringrequired

The unique identifier of the action. This ID was provided in the original command event that initiated the action.

Example:1ba5fc4b-c4fd-4251-880b-3052e301bbd4
Bodyapplication/jsonrequired

The updated status and any error details for the action

errorsArray of objects

List of errors encountered during action processing. Required when status is FAILED. Multiple errors can be included to provide comprehensive failure details.

statusstringrequired

The final status of the asynchronous action:

  • SUCCESS - The action completed successfully with no errors
  • FAILED - The action encountered errors and could not be completed (requires error details in the errors array)

Enum: "SUCCESS", "FAILED"

curl -i -X PUT \
  https://miraklconnect.com/api/channel-platform/v1/orders/actions/1ba5fc4b-c4fd-4251-880b-3052e301bbd4 \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "status": "SUCCESS",
    "errors": [
      {
        "code": "INVALID_INPUT",
        "message": "Cannot process cancellation: order is already shipped"
      }
    ]
  }'

Responses

The action status was successfully updated. No additional content is provided.

Response
No content