Skip to main content
POST

Authorizations

Authorization
string
header
required

Bearer Token necessary to use API

Scopes

public.order:write
Bearer
public.order:write
OAuth2

Order (Write)

Headers

Idempotency-Key
string

A unique key, such as a UUID, that makes it safe to retry this request. The API stores the first successful (2xx) response for a key for 24 hours. A retry with the same key, method, path and body returns the stored response, including its request_id, with the Idempotent-Replayed: true header, and the API doesn't run the request again. A request that reuses a key with a different method, path or body returns 422 with code idempotency_key_reused. Use a new key for each request. The API doesn't store error responses, so you can retry a failed request with the same key. It also doesn't store a response whose body isn't UTF-8 text, such as a PDF. While a request with the same key is in progress, the API returns 409 with code idempotency_conflict. If that request was interrupted, the key is free again within 60 seconds. If the API can't check the key, it doesn't run the request and returns 503 with code idempotency_unavailable. Retry later with the same key. A key can be up to 255 characters long. Keys are case-insensitive, and the API ignores surrounding whitespace. A blank key, or a key longer than 255 characters, returns 400 with code invalid_request. Keys are scoped to the operator, to your application, to the token's scopes, and to the staff member or connected account that authorized the token. For an Access Token, keys are scoped to the token instead of an application. Another application or Access Token, or a token with different scopes, can send the same key without getting your stored response. For details, see Idempotent requests.

Maximum string length: 255

Path Parameters

unit_type_id
string
required

The ID of the unit type

Pattern: ^utype_

Query Parameters

expand
string[]

This endpoint supports expandable responses. For more, see the documentation page.

fields
string[]

Returns only the listed fields, such as id,status,site.name. Identifiers and constant fields such as object are always returned. A field inside an expandable association also needs it in expand, unless the collapsed association returns it, such as site.id. For more, see the documentation page.

Body

application/json

Create an order for a unit type

contact
object
required

Contact the order is for. Give id for an existing contact, or contact details including email to create a new one.

payment_method
enum<string>

The payment method type for the order. It must be one the site offers on the storefront. Defaults to card when the site offers it, otherwise to the site's first storefront payment method.

Available options:
card,
bacs_debit,
sepa_debit,
au_becs_debit,
us_bank_account
starts_at
string

Start date and time (ISO 8601 date-time), or now to start the order immediately after finalization. The date must be in the site's storefront move-in dates, so now works only when the site allows moving in today. A start date of today also starts the order immediately. Defaults to the first move-in date.

email_notifications
object

Configure email notifications for the order.

protection_level
object

Protection level for the order. It must be one the storefront offers for the unit type. Defaults to the unit type's default protection level when the unit type requires protection.

finalize
object

Finalize the order in the same request. The response then has a payment_url. If finalizing fails, the order isn't saved.

metadata
object | null

Set of key-value pairs for storing additional information on the order. Learn more about metadata.

Response

order created and finalized

Single Order

order
object
required

Order

meta
object
required