Attach provenance to an import
Tell the pipeline where this import came from — a cookbook, a website, a creator — before or while it runs, so the resulting recipe is attributed correctly.
Tell the pipeline where this import came from — a cookbook, a website, a creator — before or while it runs, so the resulting recipe is attributed correctly.
Authorization
bearerAuth A Clerk session JWT. Obtain one with a Clerk frontend SDK
(session.getToken()) or, for server-to-server use, with a Clerk
machine token. The token's sub claim is the Flambe user id that scopes
every request.
In: header
Path Parameters
Import identifier.
uuidRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/imports/497f6eca-6276-4993-bfeb-53cbbbba6f08/source" \ -H "Content-Type: application/json" \ -d '{}'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "user_id": "string", "type": "web", "status": "pending", "url": "http://example.com", "file_id": "string", "file_ids": [ "1c0f12fe-c5bf-4fbd-ba1b-466cb232eca5" ], "text_file_id": "f6dba989-8fc3-4ab0-b9d1-49bdefc7e954", "source_url": "http://example.com", "source_section": "string", "recipe_id": "fa7d15d4-7670-4586-a94b-5079ed028135", "batch_id": "4da22c97-b7d5-4e31-8c3a-03870ebc7b20", "error": "string", "progress": { "stage": "extracting", "percent": 0 }, "processing_started_at": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z"}Retry an import POST
Re-enqueue a finished import, reusing the original source. The record is reset to `pending` and `processing_started_at` is re-stamped, which gives the attempt a full retry budget rather than inheriting the elapsed time of the previous one.
Add a meal to a plan POST
Adds a recurring slot. `days_of_week` makes the slot repeat — `[1,3,5]` is Monday, Wednesday and Friday.