API Reference

1. Create Memory

POST https://api.wecompleteapp.com/api/users/user/{userId}/memories

Request Body

{
  "action": "create",
  "title": "Beach Vacation",
  "description": "Our amazing annual family beach trip",
  "date": "2024-07-15",
  "images": [
    "https://example.com/image1.jpg",
    "https://example.com/image2.jpg"
  ]
}

Response

{
  "id": "memory_12345",
  "title": "Beach Vacation",
  "description": "Our amazing annual family beach trip",
  "date": "2024-07-15",
  "images": [
    "https://example.com/image1.jpg",
    "https://example.com/image2.jpg"
  ]
}

2. Get Memory

GET https://api.wecompleteapp.com/api/users/user/{userId}/memories/{memoryId}

Response

{
  "id": "memory_12345",
  "title": "Beach Vacation",
  "description": "Our amazing annual family beach trip",
  "date": "2024-07-15",
  "images": [
    "https://example.com/image1.jpg",
    "https://example.com/image2.jpg"
  ]
}

3. Get All Memories

GET https://api.wecompleteapp.com/api/users/user/{userId}/memories

Response

[
  {
    "id": "memory_12345",
    "title": "Beach Vacation",
    "description": "Our amazing annual family beach trip",
    "date": "2024-07-15",
    "images": [
      "https://example.com/image1.jpg",
      "https://example.com/image2.jpg"
    ]
  },
  {
    "id": "memory_67890",
    "title": "Mountain Trip",
    "description": "Hiking and camping in the mountains",
    "date": "2024-07-18",
    "images": [
      "https://example.com/image3.jpg"
    ]
  }
]

5. Update Memory

PUT https://api.wecompleteapp.com/api/users/user/{userId}/memories/{memoryId}

Request Body

{
  "title": "Updated Beach Vacation",
  "description": "Our amazing annual family beach trip"
}

Response

{
  "id": "memory_12345",
  "title": "Beach Vacation",
  "description": "Our amazing annual family beach trip",
  "date": "2024-07-15",
  "images": [
    "https://example.com/image1.jpg",
    "https://example.com/image2.jpg"
  ]
}

6. Delete Memory

DELETE https://api.wecompleteapp.com/api/users/user/{userId}/memories/{memoryId}

Response

{
  "message": "Memory successfully deleted",
  "deletedId": "memory_12345"
}

7. Get Memories Count

GET https://api.wecompleteapp.com/api/users/user/{userId}/memories/count?date=YYYY-MM-DD

Response

{
  "count": 5,
  "date": "2024-07-15"
}

8. Get Memories by Date Range

GET https://api.wecompleteapp.com/api/users/user/{userId}/memories/date-range?startDate=YYYY-MM-DD&endDate=YYYY-MM-DD

Response

[
  {
    "id": "memory_12345",
    "title": "Beach Vacation",
    "description": "Our amazing annual family beach trip",
    "date": "2024-07-15",
    "images": [
      "https://example.com/image1.jpg",
      "https://example.com/image2.jpg"
    ]
  },
  {
    "id": "memory_67890",
    "title": "Mountain Trip",
    "description": "Hiking and camping in the mountains",
    "date": "2024-07-18",
    "images": [
      "https://example.com/image3.jpg"
    ]
  }
]