Gifts API

📋 Table of Contents

Overview

The Gifts API provides comprehensive gift management services for the OASIS ecosystem. It handles gift creation, sending, receiving, tracking, and analytics with support for multiple gift types, real-time updates, and advanced security features.

Gift Management

Get All Gifts

GET /api/gifts
Authorization: Bearer YOUR_TOKEN

Query Parameters:

  • limit (int, optional): Number of results (default: 50)

  • offset (int, optional): Number to skip (default: 0)

  • type (string, optional): Filter by type (Sent, Received, Pending, Expired)

  • status (string, optional): Filter by status (Active, Inactive, Redeemed, Expired)

  • category (string, optional): Filter by category (Digital, Physical, Experience, Monetary)

  • sortBy (string, optional): Sort field (name, createdAt, value, expiresAt)

  • sortOrder (string, optional): Sort order (asc/desc, default: desc)

Response:

Get Gift by ID

Parameters:

  • giftId (string): Gift UUID

Response:

Create Gift

Request Body:

Response:

Update Gift

Parameters:

  • giftId (string): Gift UUID

Request Body:

Delete Gift

Parameters:

  • giftId (string): Gift UUID

Gift Operations

Send Gift

Parameters:

  • giftId (string): Gift UUID

Response:

Receive Gift

Parameters:

  • giftId (string): Gift UUID

Response:

Redeem Gift

Parameters:

  • giftId (string): Gift UUID

Response:

Get Gift Tracking

Parameters:

  • giftId (string): Gift UUID

Response:

Get Gift Content

Parameters:

  • giftId (string): Gift UUID

Response:

Gift Analytics

Get Gift Statistics

Query Parameters:

  • timeframe (string, optional): Timeframe (hour, day, week, month)

  • type (string, optional): Filter by gift type

Response:

Get Gift Performance

Response:

Get Gift Health

Response:

Gift Security

Get Gift Security

Parameters:

  • giftId (string): Gift UUID

Response:

Update Gift Security

Parameters:

  • giftId (string): Gift UUID

Request Body:

Error Responses

Gift Not Found

Gift Expired

Gift Already Redeemed

Invalid Recipient

Permission Denied


← Previous: Competition API | Next: Karma API

Last updated