PATCH
https://api.myidvirtual.com
/
customer
/
addscreen
/
{userID}
curl -X PATCH "https://api.vpn.tv/customer/addscreen/user123" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "passId": 54321
  }'
{
  "success": true,
  "customer": {
    "id": "user123",
    "email": "[email protected]",
    "username": "customer_user",
    "screens": 4,
    "previousScreens": 3,
    "passId": 54321,
    "maxConcurrentSessions": 4,
    "updatedAt": "2024-01-20T14:45:00.000Z"
  },
  "message": "Screen added successfully to customer account"
}

Overview

This endpoint allows authorized users to add an additional screen to a customer’s account. Screens represent the number of simultaneous devices or sessions a customer can have active with their VPN service. This is commonly used for subscription upgrades or customer service adjustments.

Authentication

This endpoint requires JWT authentication. Include your bearer token in the Authorization header.

Authorization

Access is controlled by role-based permissions:
  • ADMIN: Full access to modify any customer’s screens
  • MASTER: Full access to modify any customer’s screens
  • RESALE: Can modify screens for customers under their management

Path Parameters

userID
string
required
The unique user ID of the customer who will receive the additional screen

Request Body

passId
number
required
The pass ID associated with the screen addition. This is used for tracking and billing purposes.

Response

success
boolean
Indicates if the screen addition was successful
customer
object
Updated customer object with new screen count
message
string
Success message confirming the screen addition
curl -X PATCH "https://api.vpn.tv/customer/addscreen/user123" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "passId": 54321
  }'
{
  "success": true,
  "customer": {
    "id": "user123",
    "email": "[email protected]",
    "username": "customer_user",
    "screens": 4,
    "previousScreens": 3,
    "passId": 54321,
    "maxConcurrentSessions": 4,
    "updatedAt": "2024-01-20T14:45:00.000Z"
  },
  "message": "Screen added successfully to customer account"
}

Error Handling

Status CodeDescriptionSolution
200SuccessScreen added successfully
400Bad RequestCheck passId format and validity
401UnauthorizedCheck your JWT token validity
403ForbiddenVerify your role permissions
404Not FoundVerify the user ID exists
409ConflictCustomer has reached maximum screen limit
500Internal Server ErrorContact support if persistent

Implementation Notes

Screen Limits

  • Enterprise: Higher limits available for enterprise customers
  • Validation: System validates against customer’s plan limits
  • Override: Administrators can override limits with proper justification

Pass ID Requirements

  • Valid Pass ID: Must correspond to an existing pass in the system
  • Active Pass: Pass must be active and not expired
  • Billing: Pass ID is used for billing and usage tracking
  • Audit Trail: All screen additions are linked to specific pass IDs

Concurrent Sessions

  • Screen count directly affects maximum concurrent VPN sessions
  • Each screen allows one simultaneous connection
  • System enforces connection limits in real-time
  • Excess connections are automatically terminated

Business Rules

  • Screen additions are immediate and effective immediately
  • Billing adjustments are handled automatically
  • Customer notifications are sent for plan upgrades
  • Changes are logged for compliance and auditing

Performance Considerations

  • Screen additions are atomic database operations
  • Customer session limits are cached for fast access
  • Real-time connection enforcement prevents overuse
  • System monitors for abuse patterns

Security Features

  • Role-based access control prevents unauthorized modifications
  • All screen additions are logged with user attribution
  • Pass ID validation prevents fraudulent additions
  • Rate limiting prevents bulk abuse

Best Practices

Before Adding Screens

  1. Verify Customer Plan: Check if customer’s plan supports additional screens
  2. Validate Pass ID: Ensure the pass ID is valid and active
  3. Check Limits: Verify customer hasn’t reached maximum allowed screens
  4. Customer Consent: Ensure customer has requested or authorized the addition

After Adding Screens

  1. Update Billing: Process any required payment adjustments
  2. Notify Customer: Send confirmation of plan upgrade
  3. Monitor Usage: Track if customer utilizes additional screens
  4. Document Changes: Record reason for screen addition

Error Recovery

  • Invalid pass IDs should be checked before submission
  • Maximum screen limits should be validated client-side
  • Failed additions should trigger appropriate user notifications
  • Retry mechanisms should be implemented for network failures