Skip to navigation

Create a restaurant

Partner key alone. With a test key, creates a sandbox: it is never live, has no ordering page on {slug}.lettbestilt.no, and a partner can have up to 20. Live partner keys are not available yet.

The response contains a new restaurant key with full access, in plain text once, in restaurantKey.key. Store it right away: every call about this restaurant needs it, and it is never shown again.

Idempotency-Key is required and is scoped per partner for 30 days:

  • Same key, same body: 200 with the same restaurant, restaurantKey: null, replayed: true, a message, and the header Idempotent-Replayed: true. The restaurant key is not shown again. If you lost it (for example because the first response never arrived), create a new key for the restaurant in the partner portal.
  • Same key, different body or environment, or a restaurant that has since been deleted or moved: 409 IDEMPOTENCY_CONFLICT.

A slug that is already taken gives 409 SLUG_TAKEN and does not count towards the limit. At most 10 creations per hour per partner key, and 20 per partner. Replays do not count.

Authentication

AuthorizationBearer

The partner key, sent as Authorization: Bearer lbp_test_…. Created in the partner portal under Partner key. It belongs to the partner, not to a restaurant, and only works against /api/v1/partner. Server to server only: a request with an Origin header is rejected with 403 FORBIDDEN. A test key sees and creates only sandboxes; live partner keys are not available yet. A revoked key, a restaurant key (lbs_…) here, or a suspended or archived partner returns 401 UNAUTHORIZED; an expired key returns 401 KEY_EXPIRED.

Headers

Idempotency-KeystringRequiredformat: "^[A-Za-z0-9_-]+$"16-128 characters

Required. 16–128 URL-safe characters (a-z, A-Z, 0-9, _, -). Use one new key, for example a UUID, per restaurant you want to create.

Request

This endpoint expects an object.
namestringRequired2-80 characters

The restaurant’s name, 2–80 characters.

slugstringRequired2-32 characters

Lowercase letters, digits and hyphens, 2–32 characters. Becomes {slug}.lettbestilt.no and the restaurant’s key in /api/v1. Stored in lowercase.

emailstringRequiredformat: "email"<=160 characters
The restaurant's contact email. For a sandbox, use your own address.
phonestringOptional<=32 characters
Optional phone number.
orgNumberstringOptional<=32 characters
Optional organization number.
pickupEnabledbooleanOptionalDefaults to true

Offer pickup. Defaults to true.

deliveryEnabledbooleanOptionalDefaults to false

Offer delivery. Defaults to false.

Response headers

Idempotent-ReplayedenumOptional
Allowed values:

Response

Replay of the same Idempotency-Key: the same restaurant, restaurantKey: null, replayed: true and a message.

dataobject
A restaurant as the partner key alone sees it. No contact details, payment status or customer data.
restaurantKeyobject or null

The new restaurant key with full access, in plain text once (201). null on a replay (200): the key is never shown again. If you lost it, create a new key for the restaurant in the partner portal.

replayedbooleanOptional

true when the response is a replay of the same Idempotency-Key.

messagestringOptional
On a replay, why the key is missing and where to create a new one.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
409
Conflict Error
422
Unprocessable Entity Error
429
Too Many Requests Error