diff --git a/openapi.json b/openapi.json index d2b2939..59daf7e 100644 --- a/openapi.json +++ b/openapi.json @@ -18,7 +18,7 @@ "Points balance" ], "summary": "Create points balance", - "description": "Create an empty balance for authorized user who makes the request. Rank is included.\nThis operation might be time-consuming, because `open` events should be added for\nthe new account synchronously (to display them right after the request).\n", + "description": "Create an empty balance for authorized user who makes the request. Rank is included\nin response.\n\nThis operation might be time-consuming, because `open` events should be added for\nthe new account synchronously (to display them right after the request).\n\nIf balance already exists, but it is disabled (it was not referred by another user,\nbut has fulfilled some event), you should use this endpoint as well.\n", "operationId": "createPointsBalance", "requestBody": { "content": { @@ -120,6 +120,16 @@ "400": { "$ref": "#/components/responses/invalidParameter" }, + "409": { + "description": "Balance already exists and it is not disabled", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/Errors" + } + } + } + }, "500": { "$ref": "#/components/responses/internalError" } diff --git a/openapi.yaml b/openapi.yaml index 6447e7c..f63eeda 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -13,9 +13,14 @@ paths: - Points balance summary: Create points balance description: | - Create an empty balance for authorized user who makes the request. Rank is included. + Create an empty balance for authorized user who makes the request. Rank is included + in response. + This operation might be time-consuming, because `open` events should be added for the new account synchronously (to display them right after the request). + + If balance already exists, but it is disabled (it was not referred by another user, + but has fulfilled some event), you should use this endpoint as well. operationId: createPointsBalance requestBody: content: @@ -77,6 +82,12 @@ paths: $ref: '#/components/schemas/Balance' '400': $ref: '#/components/responses/invalidParameter' + '409': + description: Balance already exists and it is not disabled + content: + application/vnd.api+json: + schema: + $ref: '#/components/schemas/Errors' '500': $ref: '#/components/responses/internalError' '/integrations/rarime-points-svc/v1/public/balances/{did}':