Skip to the content
RecipeJam
Accounts open once the iOS and Android apps have been tested and approved. Until then, the demo is open to everyone, with no account needed.

API reference

Publications

Designed pages of a recipe or collection: their designs, versions, links, QR codes and embeds.

Paths below are relative to https://recipejam.com/api/v1

GET /publications

List publications

Every publication in the accounts your token can reach, most recently changed first. Brief: no designs, versions or links — ask for one to get those.

Parameters

Field Type Notes
perPage integer · query 1 to 100. Defaults to 25.
page integer · query Which page, from 1.
deleted string · query `only` lists the ones in the bin, which can still be restored. `include` lists both.

Response

200 with a page of publication objects in the pagination envelope.

GET /recipes/{recipe}/publications

List a recipe's publications

The publications of one recipe, brief.

Parameters

Field Type Notes
recipe string · path The recipe id.

Response

200 with a page of publication objects in the pagination envelope.

  • Publications belong to the account that owns the recipe. Somebody it was shared with is refused (403), not shown an empty list.
GET /collections/{collection}/publications

List a collection's publications

The publications of one collection, brief.

Parameters

Field Type Notes
collection string · path The collection id.

Response

200 with a page of publication objects in the pagination envelope.

POST /publications

Create a publication

A new publication of a recipe or collection, with a first draft in the template you choose. Nothing is public until you publish it.

Request body

Field Type Notes
sourceType required string recipe, collection What it presents.
sourceId required string The recipe or collection id. It must belong to an account you are a member of.
name required string max 120 Your own label for it. Readers never see this.
template string classic, editorial, contemporary, bold The template family to start from. Defaults to `classic`.

Example request body

{
    "sourceType": "collection",
    "sourceId": "04857llp3g",
    "name": "Christmas card",
    "template": "classic"
}

Response

201 with a single publication object under a `data` key.

GET /publications/{publication}

Get a publication

Everything: the draft and live designs, every version, every permanent link and QR code, and the embed code.

Parameters

Field Type Notes
publication string · path The publication id.

Response

200 with a single publication object under a `data` key.

PATCH /publications/{publication} PUT

Update a publication

Rename it, change its draft design, or turn embedding on or off. Readers keep seeing the live version until you publish.

Parameters

Field Type Notes
publication string · path The publication id.

Request body

Field Type Notes
name string max 120 Your own label for it.
design object Partial: send only what changes. `template` brings that family's look but keeps your words, photograph and sections; `palette` brings its colours; a colour sent on its own makes the palette `custom`; `colours`, `type`, `images`, `collection`, `recipe` and `text` are merged over the current draft. Values are cleaned exactly as the designer's are — anything not allowed takes the template's value — and the stored design comes back.
embeddable boolean Allow other websites to show it. Off until you turn it on.

Example request body

{
    "design": {
        "template": "editorial",
        "text": {
            "heading": "Weekend Cooking"
        }
    }
}

Response

200 with a single publication object under a `data` key.

  • A photograph chosen in `design.images.hero` must belong to what the publication shows and not be flagged; otherwise it is dropped and the cover is used.
POST /publications/{publication}/publish

Publish the draft

Freezes the draft as the next version and makes it live. Its links, QR codes and (if allowed) embeds show it at once.

Parameters

Field Type Notes
publication string · path The publication id.

Response

200 with a single publication object under a `data` key.

  • With no draft to publish it answers 422. To put an earlier version back, make it live instead.
POST /publications/{publication}/unpublish

Unpublish

Takes it down at once: every link, code and embed shows nothing. The history stays, so it can go back up as it was.

Parameters

Field Type Notes
publication string · path The publication id.

Response

200 with a single publication object under a `data` key.

GET /publications/{publication}/versions

List versions

Every version, newest first: the draft, if there is one, and every published version, with which is live.

Parameters

Field Type Notes
publication string · path The publication id.

Response

200 with a single publicationVersion object under a `data` key.

POST /publications/{publication}/versions/{number}/live

Make a version live

Rolls back to an earlier published version, or puts an unpublished publication back up as it was. Nothing is rewritten; the draft is left alone.

Parameters

Field Type Notes
publication string · path The publication id.
number integer · path The version number, from the version list.

Response

200 with a single publication object under a `data` key.

DELETE /publications/{publication}

Delete a publication

Into the bin. Its page, links, QR codes and embeds stop at once. The recipe or collection is not touched.

Parameters

Field Type Notes
publication string · path The publication id.

Response

204 with an empty body.

POST /publications/{publication}/restore

Restore a publication

Out of the bin, with the same links and QR codes, live again if it was.

Parameters

Field Type Notes
publication string · path The publication id.

Response

200 with a single publication object under a `data` key.

  • 422 if its recipe or collection is gone or in the bin — restore that, and the publication comes back with it.
GET /publications/{publication}/qr-codes.zip

Download every QR code

A collection publication's code and one for every recipe in it, as SVG in its QR design, with a `manifest.csv` of names and addresses.

Parameters

Field Type Notes
publication string · path The publication id.

Response

200 with the file itself, as application/zip. This one is not JSON.

  • Built when you ask and not kept. A recipe publication has a single code: its `links.pageQrCode`.

Try these

The endpoints on this page, sent from your browser with your own token. Nothing is proxied through us.

Kept in this browser only, so it survives a reload. It is never sent to RecipeJam except as the header on the request you ask for.

The same request, as curl

The publication object

Field Type Notes
id string Opaque identifier. Its page address is built from it and never changes.
name string The owner's label for it. Readers never see this.
source object `type` (recipe or collection), `id` and `name` of what it presents.
status string `live`, `unpublished` (it was live), `never published`, or `deleted` (in the bin).
liveVersion integer, or null The version readers see. Null when it is not live.
draftVersion integer, or null The version being worked on, if there is one.
template string The template family of the draft, or of the live version when there is no draft.
embeddable boolean Whether other websites may show it.
url string Its permanent page address.
deletedAt string, or null Non-null while it is in the bin.
createdAt string ISO 8601.
updatedAt string ISO 8601.
design object Only on a single publication. The draft's design (or the live one's, with no draft): `template`, `palette`, `colours`, `type`, `images`, `collection`, `recipe` and `text`.
liveDesign object, or null Only on a single publication. The design readers see now.
versions array of publicationVersion Only on a single publication. Newest first.
links object Only on a single publication. `page` and `pageQrCode`; for a collection, `recipes` (each with its permanent `url`, the `canonicalUrl` it leads to and its `qrCode`) and `qrCodesZip`. Addresses are always given — they never change — but the QR images only while it is live.
qrDesign object Only on a single publication. The design its QR codes are drawn in.
hasOwnQrDesign boolean Only on a single publication. False when the codes follow the owner's default design.
embed object Only on a single publication. `enabled`, and the `script` and `frame` code to paste — null unless embedding is on and it is live.
manage object Only on a single publication. Where it is managed, designed and previewed on the website.

A version

Field Type Notes
number integer 1, 2, 3… in the order they were made.
isDraft boolean The one version still being worked on.
isLive boolean The version readers see.
template string Its template family.
publishedAt string, or null When it was published. Null for the draft.
publishedBy string, or null Who published it.

Support

Get support

Stuck on a connection, an endpoint or an export? Tell us what you tried and what happened, and a person will reply.

If you're writing about one.

It comes to us at hello@recipejam.com, and we reply from there. What we keep.