Skip to main content

Documentation Index

Fetch the complete documentation index at: https://api.docs.onlydrams.app/llms.txt

Use this file to discover all available pages before exploring further.

Creates a new history record for a specific item in the user’s collection. This records a status change or action taken on the item.

Endpoint

POST /api/v1/users/:user_id/collection/collectables/:collectable_id/history

Parameters

user_id
string
required
The ID of the user who owns the collectable (must be the authenticated user).
collectable_id
string
required
The ID of the collectable item to create history for.

Request Body

collectable.collectable_status_id
string
required
The ID of the status that the item was changed to.
collectable.notes
string
Optional notes about the status change or action.
collectable.action_on
date
The date when the action occurred (defaults to current date).
curl -X POST https://api.onlydrams.app/api/v1/users/123e4567-e89b-12d3-a456-426614174000/collection/collectables/abc12345-e89b-12d3-a456-426614174001/history \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -d '{
    "collectable": {
      "collectable_status_id": "status2",
      "notes": "Opened for the first time - amazing vanilla notes!",
      "action_on": "2024-01-15"
    }
  }'
{
  "message": "Collection historical record created successfully"
}

Error Responses

{
  "error": "You cannot edit another users collectables"
}
{
  "error": "User not found"
}
{
  "error": "Collectable not found"
}
{
  "error": "Collectable status can't be blank"
}