Response Object
The following API operations all return a response of type PipelineResponse
.
POST https://api.pipe0.com/v1/run
(used to run the pipeline)GET https://api.pipe0.com/v1/check
(used to check the processing state)POST https://api.pipe0.com/v1/run/sync
(used to run the pipeline synchronously)
At first, seeing the full response object can be intimidating. But our response object has been designed to make your life easy. Here are some things our responses are designed for:
💅 Building UIs inspired by tools like Clay or Airtable
📀 Enriching server-side to push to a CRM, ATS, or database
🧙🏻 Perform actions like lead scoring, CRM updates, or outreach without writing code
The raw response object
Response object properties
id
This is the task id
. During and after processing you can use this id to look up
your processing result. We store tasks for up to three days after processing is completed.
status
The status of the response object.
Status ‘pending’
Your request has been validated and an enrichment task has been created. Processing has not yet begun.
Status ‘processing’
Your request has been validated and processing has begun. During processing, the status of your record fields is continuously updated.
Status ‘completed’
Processing has finished without global errors. Individual fields still may have failed to process.
Status ‘failed’
Pipeline validation or processing has failed. See the global errors
property for more information on why
the failure occurred.
order
We transform the list of input data into an object called records
. The records
object has keys
that match the ids
of your input data. However, the order of your input data is not preserved in the records
object.
To preserve the original order of your input data we create the order
property. An ordered list of input data ids
.
field_definitions
Metadata for all fields that exist in your pipeline.
Think of each input object as the rows of a table. If input data are the rows, then fields_definitions
are the columns.
The field_definitions
object contains all fields that
exist in your pipeline. This includes pipe output fields and field derived from input objects.
field_definitions
is an object. The keys contain field names and the values field properties.
pipes
The list of pipes that you sent as part of your request along with the pipe configuration. The pipes are reordered according to their valid processing order. If pipeline validation failed, pipes are returned in the original order.
errors
Global task errors. If your response contains errors at the top level, your task failed. Use this error array to understand why your task failed. Aside from the top-level response, individual fields can fail too. In that case, the field will contain a local error.
records
Each input object is transformed into a record
object during processing.
record.id
The id
you provided in your input object
record.fields
If your original request contained an input
array of the shape [{id: 1, foo: "bar"}, {id: 2, "bar": "baz"}]
,
all output records
will have the fields id
, foo
, and bar
.
Notice, that the fields are normalized. All output records have the same fields. If an input object contains a property, it is added to all output records.
In addition to fields derived from input objects, the record.fields
property contains pipe output fields too.
It is guaranteed field_definitions
and record.fields
have the same keys.
record.field.value
The value of the field. If the value was provided as part of your input data it is copied over. If the value was generated from an enrichment operation, it is added.
record.field.status
The status of the field. Possible values are completed
, failed
, pending
, queued
, processing
, or no_result
.
The status
is no_result
if processing is completed without yielding a meaningful
result. The status is failed
if the pipe failed due to errors.
record.field.type
The type of the provided or generated value. Possible values are string
, number
, boolean
, json
, or unkown
.
The type will be unknown
if the field was derived from input data but no input object provided a value and
the field is not an output field of a pipe.
record.field.reason
Is guaranteed to exist if the field status is failed
or no_result
. Is of type null | {code: string; summary: string; message: string}
.
Will contain additional information about pipe failure.
record.field.claimed_by
Each field is assigned to an entity that is responsible for resolving
it. Resolvers can be input data or pipes.
A pipe will “claim” each field it is responsible for. However, just because a pipe claims a field does not mean it will
resolve it.
If your input object already contains a valid value, the field will be claimed by a pipe but resolved by input
.
Use this field to render fields as columns ordered by pipe.
record.field.resolved_by
Is guaranteed to exist if the status of the field is completed
. Is guaranteed to be null
if the status is not
completed
. The resolved_by
field informs if a field was processed by a pipe or copied over from input data.
record.field.meta
Contains metadata
about the field processing. In the case of waterfall enrichments, you can find information about
all the providers that were tried in this field.
record.field.ui
Additional information for rendering the field value.
OpenAPI 3.1
When working with the response object it is helpful to have access to a type-safe representation. This will give you autocomplete in your IDE. Follow this link to learn more about generating API clients.