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.

Updates an existing history record for a collection item. Only the owner can update their collection history.

Endpoint

PATCH /api/v1/users/:user_id/collection/collectables/:collectable_id/history/:historical_id

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.
historical_id
string
required
The ID of the history record to update.

Request Body

collectable.collectable_status_id
string
The ID of the status that the item was changed to.
collectable.notes
string
Notes about the status change or action.
collectable.action_on
date
The date when the action occurred.
curl -X PATCH https://api.onlydrams.app/api/v1/users/123e4567-e89b-12d3-a456-426614174000/collection/collectables/abc12345-e89b-12d3-a456-426614174001/history/hist12345-e89b-12d3-a456-426614174002 \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -d '{
    "collectable": {
      "notes": "Updated notes - even better after letting it breathe!",
      "action_on": "2024-01-16"
    }
  }'
{
  "message": "Collection historical record updated successfully"
}

Error Responses

{
  "error": "You cannot edit another users collectables"
}
{
  "error": "User not found"
}
{
  "error": "History record not found"
}
{
  "error": "Notes can't be blank"
}