Skip to main content
POST
Move a guest's cards to the person who just signed in

Authorizations

X-Pincast-Key
string
header
required

Your app's key, sent on every call from your server only. It reads pck_, your app id, an underscore, then a secret of 20 or more letters, digits, underscores or hyphens. Never put it in a web page, an app bundle or a query string. Placecard stores only its sha256.

Your app can hold two live keys at once, so a key is replaced with no outage: the new key works at once, and the old one keeps working until its expiry (seven days after the new key is made, unless you ask for less). A revoked key is refused from the next call.

X-Placecard-Key, the older name of this header, is taken too, at either address. Send one of the two; if both come and they differ, the call answers 400 key_conflict.

Headers

Idempotency-Key
string

Optional, on the three writes. A string your app makes for one request, a UUID for example, and sends again unchanged with each retry of that request. Placecard keeps the first 200 answer to it for 24 hours, for your app only. A retry with the same key and the same request (method, path and body; the order of keys in the body does not matter) answers that answer again, marked Idempotent-Replayed: true, and runs nothing. The same key with a different request answers 422. A refused call keeps nothing, so its retry runs again. 1 to 255 visible ASCII characters, with no spaces.

Pattern: ^[\x21-\x7E]{1,255}$

Path Parameters

set
string
required

Your set's id, chosen by your app. Lowercase letters, digits, underscores and hyphens, starting with a letter or digit, 64 characters at most.

Pattern: ^[a-z0-9][a-z0-9_-]{0,63}$

Body

application/json
from
string
required

This device's guest token, as your app read it.

Required string length: 1 - 255
to
string
required

The Logto id of the person who just signed in, once your app has sent their sign-in token with POST /people. Never the same as from.

Required string length: 1 - 255

Response

The claim is done. moved counts cards that moved; merged counts cards the person already held; claimed is the two added.

app
string
required
set
string
required

Lowercase letters, digits, underscores and hyphens, starting with a letter or digit, 64 characters at most.

Pattern: ^[a-z0-9][a-z0-9_-]{0,63}$
claimed
integer
required
Required range: x >= 0
moved
integer
required
Required range: x >= 0
merged
integer
required
Required range: x >= 0