diff --git a/src/main/java/no/nav/veilarboppgave/client/veilarbperson/VeilarbpersonClientImpl.java b/src/main/java/no/nav/veilarboppgave/client/veilarbperson/VeilarbpersonClientImpl.java index d27536a..76b4ab4 100644 --- a/src/main/java/no/nav/veilarboppgave/client/veilarbperson/VeilarbpersonClientImpl.java +++ b/src/main/java/no/nav/veilarboppgave/client/veilarbperson/VeilarbpersonClientImpl.java @@ -41,8 +41,7 @@ public Personalia hentPersonalia(Fnr fnr, String behandlingsnummer) { .url(joinPaths(veilarbpersonUrl, "/api/v3/hent-person")) .header(ACCEPT, APPLICATION_JSON_VALUE) .header(AUTHORIZATION, userTokenSupplier.get()) - .header("behandlingsnummer", behandlingsnummer) - .post(RestUtils.toJsonRequestBody(new PersonRequest(fnr))) + .post(RestUtils.toJsonRequestBody(new PersonRequest(fnr, behandlingsnummer))) .build(); try (okhttp3.Response response = client.newCall(request).execute()) { @@ -61,6 +60,6 @@ private static class GeografiskTilknytningResponse { String geografiskTilknytning; } - private record PersonRequest(Fnr fnr) { + private record PersonRequest(Fnr fnr, String behandlingsnummer) { } }