Skip to content

add a card

POST
/card/family/library

Add a card to the family library.

  • The endpoint will add a card to the authorised user's family

  • Only free cards or cards included in the Yoto Club Subscription (regardless if the user has a subscription or not) can be added

    • If a card does not apply to this rule, a 400 Bad Request is returned
  • If a card does not exist in the user's family, a record is created and 201 returned with the record in the body

  • If the card already exists in the user's family library, a 200 OK is returned with the record in the body

Authorizations

bearerAuth
TypeHTTP (bearer)

Request Body

application/json
JSON
{
"cardId": "{{cardId}}"
}

Responses

200 OK
application/json
JSON
{
"record": {
"_id": "66144f282b0ae2110f076ed5",
"cardId": "ezObR",
"createdAt": "2024-04-08T20:10:16.053Z",
"familyId": "65b120377258d846de4595d8",
"provenanceId": "66144f282b0ae2110f076ecb",
"reason": "USER_ADD",
"updatedAt": "2024-04-08T20:10:16.053Z"
}
}

Playground

Authorization
Body

Samples