To view this content in our official product documentation, click here.
Introduction
All steps required to initialise a process flow via the Patchworks Core API are detailed below. This page provides a quick overview of these steps.
Summary
{% embed url="https://youtu.be/iQhw4UnP5M4" %}
Prepare your data
If you're passing in a payload via the request body, it must be stringified within a JSON object. For example:
{
"payload": "{\"a-stringified-json-payload\"}"
}
Map your data
If you're passing in a payload via the request body for syncing to a target connection, your process flow will need a map shape - source data fields (for your incoming payload) should be added manually.
Get flow IDs
The initialise flow API request requires two identifiers - one for for the flow to be run and another for the specific flow version.
To find the process flow id, access the required process flow from the dashboard. You'll find the process flow id above the title at the top of the canvas:

And you'll find all process flow version ids at the bottom of process flow settings:

Authenticate
To obtain a Patchworks token for API authentication, send a POST request to the following URL:
https://svc-fabric.pwks.co/api/v1/login
This request must include your Patchworks login credentials in the body:
{
"email": "joe.bloggs@wearepatchworks.com",
"password": "mypassword123*"
}
Initialise flow
To initialise a process flow, send a POST request to the following URL:
https://start.wearepatchworks.com/api/v1/flows/<flowID>/start/<flowVERSION>
Replacing <flowID> and <flowVERSION> with details for your required process flow noted previously, and authenticate with your Patchworks token.
Comments
0 comments
Please sign in to leave a comment.