POST
https://jmpy.me/api/v1
/
qr-ab-tests
/
{testId}
/
complete
curl -X POST https://jmpy.me/api/v1/qr-ab-tests/test_987654321/complete \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{ "winner_variant_id": "var_2" }'
{
  "test": {
    "id": "test_987654321",
    "status": "completed",
    "end_date": "2024-04-01T10:00:00Z",
    "winner_variant_id": "var_2"
  },
  "message": "QR A/B test completed",
  "winner_variant_id": "var_2"
}
Permanently finish a test. You can optionally specify a winning variant; otherwise, the variant with the highest conversion rate will be automatically selected. The primary QR code will be updated to point to the winning destination.

Path Parameters

testId
string
required
The UUID of the A/B test to complete.

Body Parameters

winner_variant_id
string
Optional UUID of the winning variant. If omitted, the winner is auto-detected based on conversions.

Request Examples

curl -X POST https://jmpy.me/api/v1/qr-ab-tests/test_987654321/complete \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{ "winner_variant_id": "var_2" }'
{
  "test": {
    "id": "test_987654321",
    "status": "completed",
    "end_date": "2024-04-01T10:00:00Z",
    "winner_variant_id": "var_2"
  },
  "message": "QR A/B test completed",
  "winner_variant_id": "var_2"
}
Permanently finish a test. You can optionally specify a winning variant; otherwise, the variant with the highest conversion rate will be automatically selected. The primary QR code will be updated to point to the winning destination.

Path Parameters

testId
string
required
The UUID of the A/B test to complete.

Body Parameters

winner_variant_id
string
Optional UUID of the winning variant. If omitted, the winner is auto-detected based on conversions.
curl -X POST https://jmpy.me/api/v1/qr-ab-tests/test_987654321/complete \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{ "winner_variant_id": "var_2" }'
{
  "test": {
    "id": "test_987654321",
    "status": "completed",
    "end_date": "2024-04-01T10:00:00Z",
    "winner_variant_id": "var_2"
  },
  "message": "QR A/B test completed",
  "winner_variant_id": "var_2"
}