Create a Transformation

Create a transformation: a rule that runs on extraction results, such as reformatting names, converting units, or adding a field calculated from other fields. Describe the rule in plain words and we write the Python code, or pass your own code. To change an existing transformation, pass basedOnTransformationId with either a description of the change or the edited code; the change is saved as a new transformation and the original is kept. Optionally pass one sample (standardizationId, or documentId of a CSV, Excel, JSON or XML document) to test the code on. The code is reviewed against the description before it is saved. This starts a job; poll GET /job/{job_id} for the result: when the job completes, outcome is approved (the transformation is saved and transformationId is set) or rejected, with the code, an explanation, the review's verdicts and reasons, and the output on your sample in preview. Costs 3 credits once the request is approved or rejected. Your own code that fails the code checks (returned here as a 400) or the run on your sample is not charged.

Body Params
string
required

what the transformation should do, in plain words; with basedOnTransformationId and no code, the change to make

python source defining transform(data, context); when given, it is reviewed instead of written for you

an existing transformation to change; saved as a new transformation, the original is kept

short name; written for you when omitted, and required with code unless kept from basedOnTransformationId

optional sample standardization to test the code on

optional sample structured document to test the code on

Responses

Language
Credentials
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json