Skip to main content

Update Drop Request

Schema for updating existing drops in the Intraverse Backend API v2.

Description

The Update Drop Request schema defines the structure of requests for updating existing NFT drops. This allows modification of drop configuration, metadata, and settings after creation.

Schema Reference

This schema is referenced in the drop controller as UpdateDropRequestPayload and is defined in the drop domain DTOs.

API Endpoint

This schema is used by the following endpoint:

  • PATCH /v2/drop/:id - Update existing drop

Authentication

This endpoint requires dual authentication:

User Authentication

  • JWT Bearer Token: Authorization: Bearer <jwt_token>
  • Purpose: Identifies the authenticated user
  • Scope: User must have valid authentication and update permissions

Game Authentication

  • Game Key Header: x-game-key: <client_key> or x-game-server-key: <server_key>
  • Purpose: Identifies the game/application making the request
  • Validation: Game key must be valid and active

Example Request Headers

headers: {
"Content-Type": "application/json",
"Authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"x-game-key": "your-game-client-key"
}

Request Format

The update request allows partial updates to existing drops. Only the fields that need to be changed should be included.

Example Request

// Update drop settings
const response = await fetch("https://api.intraverse.io//v2/drop/drop-123", {
method: "PATCH",
headers: {
Authorization: `Bearer ${accessToken}`,
"x-game-key": "your-game-client-key",
"Content-Type": "application/json",
},
body: JSON.stringify({
isActive: false,
endDate: 1641168000000,
description: "Updated description for the drop",
}),
});

const result = await response.json();

if (result.message === "Done") {
console.log("Drop updated successfully");
}

Response Format

The endpoint returns a standard message response:

interface MessageResponse {
message: string;
}

Common Update Fields

Typical fields that can be updated include:

  • isActive: Enable/disable the drop
  • startDate: Change start date
  • endDate: Change end date
  • description: Update description
  • logo: Change logo image
  • collectionImage: Change collection image
  • moreInfoUrl: Update information URL
  • whitelistEnabled: Toggle whitelist
  • isVIP: Toggle VIP status
  • hasDailyCheckIn: Toggle daily check-in requirement

Validation Rules

  • Partial Updates: Only include fields that need to be changed
  • Date Validation: End date must be after start date
  • Permission Check: User must have update permissions for the drop
  • Field Validation: Updated fields must pass validation rules

Next Steps