Skip to main content

Get Lab Coupon (v1)

Method & Path

GET /api/v1/workspace/:workspaceId/labs/coupons/:couponId

Actual backend path: /v1/workspace/:workspaceId/labs/coupons/:couponId

Description

Get a single lab coupon by ID.

Authentication

Required: JWT token in Authorization header

Required Permissions:

  • labs.view

Headers

HeaderTypeRequiredDescription
AuthorizationstringYesBearer token: Bearer <token>

Path Parameters

ParameterTypeRequiredDescription
workspaceIdstringYesWorkspace identifier (MongoDB ObjectId)
couponIdstringYesLab coupon identifier (MongoDB ObjectId)

Response 200 OK

{
"labCoupon": {
"id": "507f1f77bcf86cd799439011",
"workspaceId": "507f1f77bcf86cd799439012",
"couponTitle": "Summer Sale 2025",
"couponCode": "SUMMER25",
"couponType": "percentage",
"couponValue": 15,
"couponStatus": "active",
"createdAt": "2025-01-15T10:00:00.000Z",
"updatedAt": "2025-01-15T10:00:00.000Z",
"deletedAt": null
}
}

Common Errors

401 Unauthorized: Missing or invalid authentication token

403 Forbidden: Insufficient permissions (labs.view required)

404 Not Found: Lab coupon or workspace not found

422 Validation Error: Invalid workspace ID or coupon ID format