{ "openapi": "3.1.0", "info": { "title": "OpenAPI definition", "version": "v0" }, "servers": [ { "url": "http://localhost:8090", "description": "Generated server url" } ], "tags": [ { "name": "Claims", "description": "Operations related to provider claims" } ], "paths": { "/api/v1/claims/{id}": { "put": { "tags": [ "Claims" ], "summary": "Update a claim", "operationId": "updateClaim", "parameters": [ { "name": "id", "in": "path", "description": "ID of the claim to update", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ClaimRequestBody" } } }, "required": true }, "responses": { "403": { "description": "Forbidden" }, "204": { "description": "Claim updated successfully" }, "404": { "description": "Claim not found" } } } }, "/api/v1/claims": { "get": { "tags": [ "Claims" ], "summary": "Get paged claims for the authenticated user", "operationId": "getClaims", "parameters": [ { "name": "page", "in": "query", "required": false, "schema": { "type": "integer", "format": "int32", "default": 0 } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "format": "int32", "default": 20 } } ], "responses": { "403": { "description": "Forbidden" }, "200": { "description": "Paged list of claims linked to a provider user", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ClaimPageResponse" } } } } } }, "post": { "tags": [ "Claims" ], "summary": "Create a new claim", "operationId": "createClaim", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ClaimRequestBody" } } }, "required": true }, "responses": { "403": { "description": "Forbidden" }, "201": { "description": "Claim created successfully", "headers": { "Location": { "description": "URI of the created claim resource", "style": "simple", "schema": { "type": "string", "example": "/api/v1/claims/123" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateClaimResponse" } } } }, "400": { "description": "Invalid request body" } } } }, "/api/v1/claims/{claimId}/line-items/{lineItemId}/evidence": { "post": { "tags": [ "Claims" ], "summary": "Add existing evidence to a line item in a claim", "operationId": "addEvidenceToLineItem", "parameters": [ { "name": "claimId", "in": "path", "description": "ID of the claim the line item belongs to", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "lineItemId", "in": "path", "description": "ID of the line item to update", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "array", "description": "IDs of the evidence to link", "items": { "type": "integer", "format": "int64" } } } }, "required": true }, "responses": { "403": { "description": "Forbidden" }, "204": { "description": "Evidence linked to line item successfully" }, "400": { "description": "Invalid request body" } } } }, "/api/v1/claims/{claimId}/line-items": { "patch": { "tags": [ "Claims" ], "summary": "Add a line item to a claim", "operationId": "addLineItemToClaim", "parameters": [ { "name": "claimId", "in": "path", "description": "ID of the claim to update", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LineItemRequestBody" } } }, "required": true }, "responses": { "403": { "description": "Forbidden" }, "201": { "description": "Line item added to claim successfully", "headers": { "Location": { "description": "URI of the created line item resource", "style": "simple", "schema": { "type": "string", "example": "/api/v1/claims/123/line-items/456" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AddLineItemResponse" } } } }, "400": { "description": "Invalid request body" } } } }, "/api/v1/claims/{claimId}/evidence": { "patch": { "tags": [ "Claims" ], "summary": "Add evidence to a claim", "operationId": "addEvidenceToClaim", "parameters": [ { "name": "claimId", "in": "path", "description": "ID of the claim to update", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ClaimEvidenceRequestBody" } } }, "required": true }, "responses": { "403": { "description": "Forbidden" }, "201": { "description": "Evidence added to claim successfully", "headers": { "Location": { "description": "URI of the created evidence resource", "style": "simple", "schema": { "type": "string", "example": "/api/v1/claims/123/evidence/456" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AddClaimEvidenceResponse" } } } }, "400": { "description": "Invalid request body" } } } }, "/api/v1/claims/{claimId}": { "get": { "tags": [ "Claims" ], "summary": "Get a claim by ID", "operationId": "getClaim", "parameters": [ { "name": "claimId", "in": "path", "description": "ID of the claim to retrieve", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "responses": { "403": { "description": "Forbidden" }, "200": { "description": "Claim found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Claim" } } } }, "404": { "description": "Claim not found" } } }, "delete": { "tags": [ "Claims" ], "summary": "Delete a claim", "operationId": "deleteClaim", "parameters": [ { "name": "claimId", "in": "path", "description": "ID of the claim to delete", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "responses": { "403": { "description": "Forbidden" }, "204": { "description": "Claim deleted successfully" }, "404": { "description": "Claim not found" } } } }, "/api/v1/claims/{claimId}/line-items/{lineItemId}/evidence/{evidenceId}": { "delete": { "tags": [ "Claims" ], "summary": "Unlink evidence from a line item in a claim", "operationId": "unlinkEvidenceFromLineItem", "parameters": [ { "name": "claimId", "in": "path", "description": "ID of the claim the line item belongs to", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "lineItemId", "in": "path", "description": "ID of the line item the evidence is linked to", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "evidenceId", "in": "path", "description": "ID of the evidence to unlink", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "responses": { "403": { "description": "Forbidden" }, "204": { "description": "Evidence unlinked successfully" }, "404": { "description": "Claim not found" } } } }, "/api/v1/claims/{claimId}/evidence/{evidenceId}": { "delete": { "tags": [ "Claims" ], "summary": "Delete evidence from a claim", "operationId": "deleteEvidenceFromClaim", "parameters": [ { "name": "claimId", "in": "path", "description": "ID of the claim the evidence has been uploaded to", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "evidenceId", "in": "path", "description": "ID of the evidence to delete", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "responses": { "403": { "description": "Forbidden" }, "204": { "description": "Evidence deleted successfully" }, "404": { "description": "Claim not found" } } } } }, "components": { "schemas": { "ClaimRequestBody": { "type": "object", "description": "Claim input data", "properties": { "ufn": { "type": "string", "description": "universal file number" }, "client": { "type": "string", "description": "client name" }, "category": { "type": "string", "description": "claim category" }, "concluded": { "type": "string", "format": "date", "description": "claim concluded date" }, "feeType": { "type": "string", "description": "fee type" }, "escaped": { "type": "boolean", "description": "escaped status" }, "counselPayment": { "type": "string", "description": "status of counsel payment" }, "claimed": { "type": "number", "description": "amount claimed" }, "submissionId": { "type": "string", "format": "uuid", "description": "id of the submission this claim links to" } }, "required": [ "client", "ufn" ] }, "CreateClaimResponse": { "type": "object", "properties": { "id": { "type": "integer", "format": "int64" } } }, "LineItemRequestBody": { "type": "object", "description": "line item data", "properties": { "title": { "type": "string", "description": "The title of the line item" }, "category": { "type": "string", "description": "The category of the line item" }, "date": { "type": "string", "format": "date", "description": "The date of the line item" } } }, "AddLineItemResponse": { "type": "object", "properties": { "id": { "type": "integer", "format": "int64" } } }, "ClaimEvidenceRequestBody": { "type": "object", "description": "evidence data", "properties": { "fileKey": { "type": "string", "description": "The file key for the evidence" }, "fileSize": { "type": "integer", "format": "int64", "description": "The file size for the evidence" } }, "required": [ "fileKey", "fileSize" ] }, "AddClaimEvidenceResponse": { "type": "object", "properties": { "id": { "type": "integer", "format": "int64" } } }, "Claim": { "type": "object", "properties": { "id": { "type": "integer", "format": "int64" }, "lineItems": { "type": "array", "description": "line items associated with the claim", "items": { "$ref": "#/components/schemas/LineItem" } }, "evidence": { "type": "array", "description": "evidence associated with the claim", "items": { "$ref": "#/components/schemas/ClaimEvidence" } }, "ufn": { "type": "string", "description": "universal file number" }, "providerUserId": { "type": "string", "format": "uuid", "description": "ID of the provider user making the submission" }, "client": { "type": "string", "description": "client name" }, "category": { "type": "string", "description": "claim category" }, "concluded": { "type": "string", "format": "date", "description": "claim concluded date" }, "feeType": { "type": "string", "description": "fee type" }, "escaped": { "type": "boolean", "description": "escaped status" }, "counselPayment": { "type": "string", "description": "status of counsel payment" }, "claimed": { "type": "number", "description": "amount claimed" }, "submissionId": { "type": "string", "format": "uuid", "description": "id of the submission this claim belongs to" } }, "required": [ "id", "submissionId" ] }, "ClaimEvidence": { "type": "object", "properties": { "fileKey": { "type": "string" }, "fileSize": { "type": "integer", "format": "int64" }, "id": { "type": "integer", "format": "int64" } }, "required": [ "id" ] }, "ClaimPageResponse": { "type": "object", "description": "Paged list of claims", "properties": { "claims": { "type": "array", "description": "Claims in this page", "items": { "$ref": "#/components/schemas/Claim" } }, "page": { "type": "integer", "format": "int32", "description": "Current page index" }, "limit": { "type": "integer", "format": "int32", "description": "Maximum number of claims per page" }, "total": { "type": "integer", "format": "int64", "description": "Total number of claims across all pages" }, "totalPages": { "type": "integer", "format": "int32", "description": "Total number of pages available" } } }, "LineItem": { "type": "object", "properties": { "title": { "type": "string" }, "category": { "type": "string" }, "date": { "type": "string", "format": "date" }, "evidenceItems": { "type": "array", "items": { "$ref": "#/components/schemas/ClaimEvidence" } }, "id": { "type": "integer", "format": "int64" } }, "required": [ "id" ] } } } }