diff --git a/openspec/changes/add-event-tickets/tasks.md b/openspec/changes/add-event-tickets/tasks.md
index eae0244..84e817e 100644
--- a/openspec/changes/add-event-tickets/tasks.md
+++ b/openspec/changes/add-event-tickets/tasks.md
@@ -73,7 +73,7 @@ Design: `design.md` (technical contracts) and `docs/superpowers/specs/2026-12-04
## 3. mobile-api and gateway
-- [ ] 3.1 Public ticket endpoints, the QR PNG and gateway paths.
+- [x] 3.1 Public ticket endpoints, the QR PNG and gateway paths.
- Depends on: 2.3
- Tests first:
- **`GET /api/public/tickets/{code}`:**
diff --git a/solvway-api-gateway/src/main/java/com/solvway/gateway/filter/JWTAuthFilter.java b/solvway-api-gateway/src/main/java/com/solvway/gateway/filter/JWTAuthFilter.java
index 45f8f9c..071d108 100644
--- a/solvway-api-gateway/src/main/java/com/solvway/gateway/filter/JWTAuthFilter.java
+++ b/solvway-api-gateway/src/main/java/com/solvway/gateway/filter/JWTAuthFilter.java
@@ -64,6 +64,10 @@ public class JWTAuthFilter implements GlobalFilter, Ordered {
publicPath(HttpMethod.POST, "/counter/ticketOrder/request"),
publicPath(HttpMethod.GET, "/counter/ticketOrder/byToken/[A-Za-z0-9_-]{22}"),
publicPath(HttpMethod.GET, "/counter/ticketType/onSale/\\d{1,19}"),
+ // Tickets (add-event-tickets): a ticket by its code, naming an attendee by the order token, attendee consent. Check-in needs a token.
+ publicPath(HttpMethod.GET, "/counter/ticket/byCode/[A-Za-z0-9_-]{22}"),
+ publicPath(HttpMethod.POST, "/counter/ticket/attendee"),
+ publicPath(HttpMethod.POST, "/counter/ticket/consent"),
// Password hint on public password screens: switched-on rule names and numbers only, no user data
publicPath(HttpMethod.GET, "/passwordRule/adminActive"),
// WhatsApp webhook forward from mobile-api: no user token; the service re-verifies Meta's signature itself
diff --git a/solvway-api-gateway/src/test/java/com/solvway/gateway/filter/JWTAuthFilterTicketCodesPathTest.java b/solvway-api-gateway/src/test/java/com/solvway/gateway/filter/JWTAuthFilterTicketCodesPathTest.java
new file mode 100644
index 0000000..0e54250
--- /dev/null
+++ b/solvway-api-gateway/src/test/java/com/solvway/gateway/filter/JWTAuthFilterTicketCodesPathTest.java
@@ -0,0 +1,81 @@
+package com.solvway.gateway.filter;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.solvway.gateway.model.AuthAppKey;
+import com.solvway.gateway.model.AuthAppKeyMap;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.springframework.cloud.gateway.filter.GatewayFilterChain;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.HttpStatus;
+import org.springframework.mock.http.server.reactive.MockServerHttpRequest;
+import org.springframework.mock.web.server.MockServerWebExchange;
+import org.springframework.test.util.ReflectionTestUtils;
+import reactor.core.publisher.Mono;
+
+import java.net.InetSocketAddress;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+/** add-event-tickets: a ticket by its code, naming an attendee and attendee consent are open; staff check-in stays closed. */
+class JWTAuthFilterTicketCodesPathTest {
+
+ private static final String KEY = "gateway-test-key";
+
+ private JWTAuthFilter filter;
+
+ @BeforeEach
+ void setUp() throws Exception {
+ AuthAppKey key = new ObjectMapper().readValue(
+ "{\"key\":\"" + KEY + "\",\"type\":\"BO\",\"ipList\":[\"0.0.0.0/0\"],\"allowList\":[\"/\"]}",
+ AuthAppKey.class);
+ AuthAppKeyMap map = new AuthAppKeyMap();
+ map.add(KEY, key);
+ filter = new JWTAuthFilter();
+ ReflectionTestUtils.setField(filter, "authAppKeyMap", map);
+ }
+
+ private MockServerWebExchange call(HttpMethod method, String path) {
+ return MockServerWebExchange.from(MockServerHttpRequest.method(method, path)
+ .header("api-key", KEY)
+ .remoteAddress(new InetSocketAddress("127.0.0.1", 40000)));
+ }
+
+ private boolean passes(MockServerWebExchange exchange) {
+ AtomicBoolean called = new AtomicBoolean(false);
+ GatewayFilterChain chain = ex -> {
+ called.set(true);
+ return Mono.empty();
+ };
+ filter.filter(exchange, chain).block();
+ return called.get();
+ }
+
+ @Test
+ void publicTicketCodeCallsNeedNoUserToken() {
+ for (String[] c : new String[][] {
+ {"GET", "/counter/ticket/byCode/abcdefghijklmnopqrstu_"},
+ {"POST", "/counter/ticket/attendee"},
+ {"POST", "/counter/ticket/consent"} }) {
+ assertThat(passes(call(HttpMethod.valueOf(c[0]), c[1]))).as(c[0] + " " + c[1]).isTrue();
+ }
+ }
+
+ @Test
+ void otherTicketShapesAndStaffCallsNeedAUserToken() {
+ for (String[] c : new String[][] {
+ {"GET", "/counter/ticket/byCode/short"},
+ {"GET", "/counter/ticket/byCode/abcdefghijklmnopqrstuvw"},
+ {"GET", "/counter/ticket/byCode/abcdefghijklmnopqrstu_/x"},
+ {"POST", "/counter/ticket/byCode/abcdefghijklmnopqrstu_"},
+ {"GET", "/counter/ticket/attendee"},
+ {"GET", "/counter/ticket/consent"},
+ {"POST", "/counter/ticket/staff"},
+ {"POST", "/counter/ticket/checkin"} }) {
+ MockServerWebExchange exchange = call(HttpMethod.valueOf(c[0]), c[1]);
+ assertThat(passes(exchange)).as(c[0] + " " + c[1]).isFalse();
+ assertThat(exchange.getResponse().getStatusCode()).as(c[0] + " " + c[1]).isEqualTo(HttpStatus.UNAUTHORIZED);
+ }
+ }
+}
diff --git a/solvway-mobile-api/pom.xml b/solvway-mobile-api/pom.xml
index 7cf811f..5804ec3 100644
--- a/solvway-mobile-api/pom.xml
+++ b/solvway-mobile-api/pom.xml
@@ -67,6 +67,12 @@
libphonenumber
8.13.55
+
+
+ com.google.zxing
+ core
+ 3.5.3
+
org.springframework.boot
diff --git a/solvway-mobile-api/src/main/java/com/solvway/mobile/api/constant/api/RestApiCounterServiceConstants.java b/solvway-mobile-api/src/main/java/com/solvway/mobile/api/constant/api/RestApiCounterServiceConstants.java
index 842929a..e419b45 100644
--- a/solvway-mobile-api/src/main/java/com/solvway/mobile/api/constant/api/RestApiCounterServiceConstants.java
+++ b/solvway-mobile-api/src/main/java/com/solvway/mobile/api/constant/api/RestApiCounterServiceConstants.java
@@ -60,6 +60,9 @@ public class RestApiCounterServiceConstants {
public static final String API_REST_COUNTER_TICKET_TYPE_ON_SALE = "/counter/ticketType/onSale/{eventUuid}";
public static final String API_REST_COUNTER_TICKET_ORDER_REQUEST = "/counter/ticketOrder/request";
public static final String API_REST_COUNTER_TICKET_ORDER_BY_TOKEN = "/counter/ticketOrder/byToken/{token}";
+ public static final String API_REST_COUNTER_TICKET_BY_CODE = "/counter/ticket/byCode/{code}";
+ public static final String API_REST_COUNTER_TICKET_ATTENDEE = "/counter/ticket/attendee";
+ public static final String API_REST_COUNTER_TICKET_CONSENT = "/counter/ticket/consent";
public static final String API_REST_COUNTER_EVENT_SALESPERSON_FIND_BY_EVENT_UUID="/counter/eventSalesperson/findByEventUuid/{eventUuid}";
public static final String API_REST_COUNTER_EVENT_SALESPERSON_REPLACE="/counter/eventSalesperson/replace";
public static final String API_REST_COUNTER_INTEREST_FIND_BY_COMPANY="/counter/interest/findByCompany/{companyId}";
diff --git a/solvway-mobile-api/src/main/java/com/solvway/mobile/api/controller/publicapi/PublicPageController.java b/solvway-mobile-api/src/main/java/com/solvway/mobile/api/controller/publicapi/PublicPageController.java
index 6270605..7af213c 100644
--- a/solvway-mobile-api/src/main/java/com/solvway/mobile/api/controller/publicapi/PublicPageController.java
+++ b/solvway-mobile-api/src/main/java/com/solvway/mobile/api/controller/publicapi/PublicPageController.java
@@ -4,6 +4,7 @@ import com.solvway.core.annotation.AppAuth;
import com.solvway.mobile.api.dto.PublicPageFormRequest;
import com.solvway.mobile.api.dto.PublicTicketRequest;
import com.solvway.mobile.api.service.PublicPageService;
+import com.solvway.mobile.api.service.PublicTicketService;
import lombok.RequiredArgsConstructor;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
@@ -19,6 +20,7 @@ import java.util.Map;
@RequiredArgsConstructor
public class PublicPageController {
private final PublicPageService pages;
+ private final PublicTicketService tickets;
@AppAuth(skipValidate = true)
@GetMapping("/api/public/pages/{company}/{slug}")
@@ -51,4 +53,29 @@ public class PublicPageController {
public ResponseEntity image(@PathVariable long id) {
return pages.image(id);
}
+
+ @AppAuth(skipValidate = true)
+ @GetMapping("/api/public/tickets/{code}")
+ public ResponseEntity