Workflows
Patch a workflow
Update a workflow.
patch/workflows/{workflowId}
Request
- Base URLhttps://{prefix}.api.sandbox.checkout.com
- Auth
- OAuth 2Client credentialsToken URLstringScopesflow, flow:workflows
- or API key in header Authorization
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
workflowIdstring required
The workflow identifier
Request body
Example request
{
"name": "Webhooks workflow",
"active": true,
"conditions": [
{
"type": "event",
"events": {
"gateway": [
"payment_approved",
"payment_pending",
"payment_declined"
]
}
},
{
"type": "entity",
"entities": [
"ent_xyfdshfudosfdshfdiosfds",
"ent_fidjosfjdisofdjsifdosfu"
]
},
{
"type": "processing_channel",
"processing_channels": [
"pc_axclravnqf5u5ejkweijnp5zc4"
]
}
],
"actions": [
{
"workflow_action_id": "wfa_itja4x7zgzye3andzqq62u4hvq",
"type": "webhook",
"url": "https://example.com/webhooks",
"headers": {
"Authorization": "<AUTHORIZATION_UUID>"
},
"signature": {
"method": "HMACSHA256",
"key": "8V8x0dLK%AyD*DNS8JJr"
}
}
]
}Response
Workflow updated successfully
Example response
{
"id": "wf_c7svxlvo2bbuva4f6s3xu4f7wm",
"name": "Webhooks workflow",
"active": true,
"conditions": [
{
"id": "wfc_tisekcawefze3l27uaai6hz74e",
"type": "event",
"events": {
"gateway": [
"payment_approved",
"payment_pending",
"payment_declined"
]
}
},
{
"id": "wfc_tisekcawefze3l27uaai6hz74y",
"type": "entity",
"entities": [
"ent_xyfdshfudosfdshfdiosfds",
"ent_fidjosfjdisofdjsifdosfu"
]
},
{
"id": "wfc_tisekcawefze3l27uaai6hz26y",
"type": "processing_channel",
"processing_channels": [
"pc_axclravnqf5u5ejkweijnp5zc4"
]
}
],
"actions": [
{
"id": "wfa_itja4x7zgzye3andzqq62u4hvq",
"type": "webhook",
"url": "https://example.com/webhooks",
"headers": {
"Authorization": "<AUTHORIZATION_UUID>"
},
"signature": {
"method": "HMACSHA256",
"key": "8V8x0dLK%AyD*DNS8JJr"
}
}
],
"_links": {
"self": {
"href": "http://flow.cko.lon/client/workflows/wf_c7svxlvo2bbuva4f6s3xu4f7wm"
}
}
}Changes
No recorded changes to this operation across all 1 revision of this API.