This feature is currently in ALPHA preview, and must be enabled on your account before use. Please contact email@example.com if you would like to use this feature.
/step API allows you to send a series of requests in sequence or parallel, and use the response from one request job as the input for another.
For example, the following diagram shows some steps that you might want to complete after receiving an order:
In order to achieve this, we must first assign a step name to each of the steps using the
_step parameter (or
X-Zeplo-Step). Each step can then specify which other steps it depends on, by specifying a list of step names using the
_requires=A,B parameter (or
You can only send
body values as JSON or string values for step requests.
If you add a
_requires parameter (or
X-Zeplo-Requires header), then additional headers will be automatically added in the format
X-Zeplo-Step-<step_name>. Each header will have the ID of the request job matching the name of the step.
For example, if you have a step with the URL
https://url.com/e?_step=E&_requires=C,D, then you would receive the following two additional headers:
If you want to get the response output for these steps, then you can use the ID from the header and the request API.