diff --git a/openapi.json b/openapi.json index a9df917..d4c1a95 100644 --- a/openapi.json +++ b/openapi.json @@ -368,6 +368,108 @@ } } }, + "/integrations/geo-points-svc/v1/public/balances/{nullifier}/verify/external": { + "post": { + "tags": [ + "Points balance" + ], + "summary": "Verify external passport", + "description": "Verify passport to unlock event claiming and get reward.\nOne passport can't be verified twice.\n\nIn body must be specified anonymous_id and shared_hash\n\nSome events will be automatically claimed in case if balance is active.\n", + "operationId": "verifyExternalPassport", + "parameters": [ + { + "$ref": "#/components/parameters/pathNullifier" + }, + { + "in": "header", + "name": "Signature", + "description": "Signature of the request", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-f0-9]{64}$" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/vnd.api+json": { + "schema": { + "type": "object", + "required": [ + "data" + ], + "properties": { + "data": { + "$ref": "#/components/schemas/VerifyPassport" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/vnd.api+json": { + "schema": { + "type": "object", + "required": [ + "data" + ], + "properties": { + "data": { + "$ref": "#/components/schemas/EventClaimingState" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/invalidParameter" + }, + "401": { + "$ref": "#/components/responses/invalidAuth" + }, + "403": { + "description": "Invalid signature", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/Errors" + } + } + } + }, + "404": { + "description": "Balance not exists", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/Errors" + } + } + } + }, + "409": { + "description": "Passport already verified or anonymous ID exists", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/Errors" + } + } + } + }, + "500": { + "$ref": "#/components/responses/internalError" + } + } + } + }, "/integrations/geo-points-svc/v1/public/balances/{nullifier}/verifypassport": { "post": { "tags": [ @@ -2047,6 +2149,11 @@ "description": "Unique identifier of the passport.", "example": "2bd3a2532096fee10a45a40e444a11b4d00a707f3459376087747de05996fbf5" }, + "shared_hash": { + "type": "string", + "description": "Unique identifier for linking internal and external passports", + "example": "12345678901234567890" + }, "proof": { "type": "object", "format": "types.ZKProof", diff --git a/openapi.yaml b/openapi.yaml index 9c46830..ba23cb0 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -244,6 +244,75 @@ paths: $ref: '#/components/schemas/Errors' '500': $ref: '#/components/responses/internalError' + '/integrations/geo-points-svc/v1/public/balances/{nullifier}/verify/external': + post: + tags: + - Points balance + summary: Verify external passport + description: | + Verify passport to unlock event claiming and get reward. + One passport can't be verified twice. + + In body must be specified anonymous_id and shared_hash + + Some events will be automatically claimed in case if balance is active. + operationId: verifyExternalPassport + parameters: + - $ref: '#/components/parameters/pathNullifier' + - in: header + name: Signature + description: Signature of the request + required: true + schema: + type: string + pattern: '^[a-f0-9]{64}$' + requestBody: + required: true + content: + application/vnd.api+json: + schema: + type: object + required: + - data + properties: + data: + $ref: '#/components/schemas/VerifyPassport' + responses: + '200': + description: Success + content: + application/vnd.api+json: + schema: + type: object + required: + - data + properties: + data: + $ref: '#/components/schemas/EventClaimingState' + '400': + $ref: '#/components/responses/invalidParameter' + '401': + $ref: '#/components/responses/invalidAuth' + '403': + description: Invalid signature + content: + application/vnd.api+json: + schema: + $ref: '#/components/schemas/Errors' + '404': + description: Balance not exists + content: + application/vnd.api+json: + schema: + $ref: '#/components/schemas/Errors' + '409': + description: Passport already verified or anonymous ID exists + content: + application/vnd.api+json: + schema: + $ref: '#/components/schemas/Errors' + '500': + $ref: '#/components/responses/internalError' '/integrations/geo-points-svc/v1/public/balances/{nullifier}/verifypassport': post: tags: @@ -1429,6 +1498,10 @@ components: type: string description: Unique identifier of the passport. example: 2bd3a2532096fee10a45a40e444a11b4d00a707f3459376087747de05996fbf5 + shared_hash: + type: string + description: Unique identifier for linking internal and external passports + example: '12345678901234567890' proof: type: object format: types.ZKProof