Skip to main content
Build a quote request for a synthetic order. The Endpoint accepts an order ID and quantity, then starts a Job. The Job uses a price configured in its template and returns the total in minor currency units. The caller receives a Job ID immediately after acceptance and reads the result separately. Use a non-production instance where you can create and activate Components, Job templates and Endpoints. The invoking credential needs ENDPOINT_INVOKE. The Endpoint’s execution account needs permission to start Jobs. Reading Job details through the Platform API requires AUTOMATION_READ or AUTOMATION_ADMIN. The Job template selects its own execution account.

1. Create the worker and Job template

Create a JavaScript Component named Calculate demo quote with a visible element named Quote. Paste the complete element body and activate the Component.
Worker Component · Quote
In Jobs, create a template named Calculate demo quote using that Component. Set Runtime input to the following JSON.
Job template · Runtime input
Keep automatic retry disabled for this example and leave Hide response off so the synthetic result remains visible. Save the active template and copy its ID. The values passed when starting a Job overlay the template defaults, so the Endpoint can supply the order ID and quantity while the template supplies the price.

2. Create the Endpoint Component

Create a second JavaScript Component named Request demo quote with a visible element named Response. Paste this body and activate it.
Endpoint Component · Response
The route guard supplies the request validation. The Component forwards only the two fields the worker needs. It awaits Job acceptance before returning the receipt.

3. Configure and activate the route

Create an inactive Endpoint in Endpoints, select Request demo quote, and set these options. Paste the following schema into the inline request guard. It bounds the order ID, accepts a whole-number quantity and rejects extra body fields.
Endpoint · Inline guard
Check the execution policy and selected Component version, then activate the route.

4. Submit the request

Set REVO_ENDPOINT_URL to the Endpoint runtime base URL and REVO_ENDPOINT_KEY to your invoking credential.
Request a quote
Expect HTTP 202 and a receipt like this. Save the returned jobId.
Accepted receipt
Send the same request with --data '{"quantity":0}' to check the rejection path. It returns 422 before the Endpoint Component runs, so it creates no Job.

5. Read the result

Set JOB_ID to the ID from the receipt, REVO_API_URL to the Platform API base URL, and REVO_JOB_READ_KEY to a credential with Job read access.
Read the exact Job
While the Job is pending or processing, repeat this GET after a short delay. Stop after a bounded observation window and keep the Job ID so you can check later. In the app, find the same ID in Job History. When status is FINISHED, read output.results.Quote. These are the relevant fields from the Job detail response.
Completed Job detail · selected fields
The Job detail route is for authorized operators and integrations. For an application that serves end users, expose a status or result scoped to the caller’s own operation. Keep the Platform API credential server-side.
Last modified on November 9, 2026