{ "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" }, { "name": "Draft claims", "description": "Operations related to draft provider claims" } ], "paths": { "/api/v1/drafts/{draftClaimId}": { "get": { "tags": [ "Draft claims" ], "summary": "Get a draft claim by ID", "operationId": "getDraftClaim", "parameters": [ { "name": "draftClaimId", "in": "path", "description": "ID of the draft claim to retrieve", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "403": { "description": "Invalid provider user ID" }, "200": { "description": "Draft claim found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DraftClaim" } } } }, "404": { "description": "Draft claim not found" } } }, "put": { "tags": [ "Draft claims" ], "summary": "Update a claim", "operationId": "updateDraftClaim", "parameters": [ { "name": "draftClaimId", "in": "path", "description": "ID of the draft claim to update", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DraftClaimPut" } } }, "required": true }, "responses": { "403": { "description": "Invalid provider user ID" }, "204": { "description": "Draft claim updated successfully" }, "400": { "description": "Invalid request body" }, "404": { "description": "Draft claim not found" } } }, "delete": { "tags": [ "Draft claims" ], "summary": "Delete a draft claim", "operationId": "deleteDraftClaim", "parameters": [ { "name": "draftClaimId", "in": "path", "description": "ID of the draft claim to delete", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "403": { "description": "Invalid provider user ID" }, "204": { "description": "Draft claim deleted successfully" }, "404": { "description": "Draft claim not found" } } }, "patch": { "tags": [ "Draft claims" ], "summary": "Patch a claim", "operationId": "patchDraftClaim", "parameters": [ { "name": "draftClaimId", "in": "path", "description": "ID of the draft claim to patch", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DraftClaimPatch" } } }, "required": true }, "responses": { "403": { "description": "Invalid provider user ID" }, "200": { "description": "Draft claim patched successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DraftClaim" } } } }, "400": { "description": "Invalid request body" }, "404": { "description": "Draft claim not found" } } } }, "/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": "string", "format": "uuid" } } ], "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/drafts": { "get": { "tags": [ "Draft claims" ], "summary": "Get paged draft claims for the authenticated user", "operationId": "getDraftClaims", "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 draft claims linked to a provider user", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DraftClaimPageResponse" } } } } } }, "post": { "tags": [ "Draft claims" ], "summary": "Create a new draft claim", "operationId": "createDraftClaim", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DraftClaimPost" } } }, "required": true }, "responses": { "403": { "description": "Invalid provider user ID" }, "201": { "description": "Draft claim created successfully", "headers": { "Location": { "description": "URI of the created draft claim resource", "style": "simple", "schema": { "type": "string", "example": "/api/v1/drafts/541b1c4b-ec12-434e-a2a9-59daae30ca45" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateDraftClaimResponse" } } } }, "400": { "description": "Invalid request body" } } } }, "/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": "string", "format": "uuid" } }, { "name": "lineItemId", "in": "path", "description": "ID of the line item to update", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "array", "description": "IDs of the evidence to link", "items": { "type": "string", "format": "uuid" } } } }, "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": "string", "format": "uuid" } } ], "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": "string", "format": "uuid" } } ], "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": "string", "format": "uuid" } } ], "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": "string", "format": "uuid" } } ], "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": "string", "format": "uuid" } }, { "name": "lineItemId", "in": "path", "description": "ID of the line item the evidence is linked to", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "evidenceId", "in": "path", "description": "ID of the evidence to unlink", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "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": "string", "format": "uuid" } }, { "name": "evidenceId", "in": "path", "description": "ID of the evidence to delete", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "403": { "description": "Forbidden" }, "204": { "description": "Evidence deleted successfully" }, "404": { "description": "Claim not found" } } } } }, "components": { "schemas": { "DraftClaimPut": { "type": "object", "description": "Updated claim data", "properties": { "payload": { "type": "object", "additionalProperties": {}, "description": "payload" }, "providerUserId": { "type": "string", "format": "uuid", "description": "provider user id" } }, "required": [ "payload", "providerUserId" ] }, "ClaimRequestBody": { "type": "object", "description": "Claim input data", "properties": { "id": { "type": "string", "format": "uuid", "description": "unique ID for the claim" }, "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" } }, "required": [ "client", "ufn" ] }, "DraftClaimPost": { "type": "object", "description": "Draft claim input data", "properties": { "id": { "type": "string", "format": "uuid", "description": "id" }, "payload": { "type": "object", "additionalProperties": {}, "description": "payload" }, "providerUserId": { "type": "string", "format": "uuid", "description": "provider user id" } }, "required": [ "id", "payload", "providerUserId" ] }, "CreateDraftClaimResponse": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" } } }, "CreateClaimResponse": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" } } }, "DraftClaimPatch": { "type": "object", "description": "Updated claim fields", "properties": { "payload": { "type": "object", "additionalProperties": {}, "description": "payload" } } }, "DraftClaim": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "payload": { "type": "object", "additionalProperties": {}, "description": "payload" }, "providerUserId": { "type": "string", "format": "uuid", "description": "ID of the provider user making the submission" } }, "required": [ "id" ] }, "LineItemRequestBody": { "type": "object", "description": "line item data", "properties": { "id": { "type": "string", "format": "uuid", "description": "The unique ID for the line item" }, "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": "string", "format": "uuid" } } }, "ClaimEvidenceRequestBody": { "type": "object", "description": "evidence data", "properties": { "id": { "type": "string", "format": "uuid", "description": "The unique ID for the evidence" }, "fileKey": { "type": "string", "description": "The file key for the evidence" }, "fileSize": { "type": "integer", "format": "int64", "description": "The file size for the evidence" }, "submittedOn": { "type": "string", "format": "date-time", "description": "The date and time the evidence was submitted" } }, "required": [ "fileKey", "fileSize" ] }, "AddClaimEvidenceResponse": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" } } }, "DraftClaimPageResponse": { "type": "object", "description": "Paged list of draft claims", "properties": { "draftClaims": { "type": "array", "description": "Draft claims in this page", "items": { "$ref": "#/components/schemas/DraftClaim" } }, "page": { "type": "integer", "format": "int32", "description": "Current page index" }, "limit": { "type": "integer", "format": "int32", "description": "Maximum number of draft claims per page" }, "total": { "type": "integer", "format": "int64", "description": "Total number of draft claims across all pages" }, "totalPages": { "type": "integer", "format": "int32", "description": "Total number of pages available" } } }, "Claim": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "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" } }, "required": [ "id" ] }, "ClaimEvidence": { "type": "object", "properties": { "fileKey": { "type": "string" }, "fileSize": { "type": "integer", "format": "int64" }, "submittedOn": { "type": "string", "format": "date-time" }, "id": { "type": "string", "format": "uuid" } }, "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": { "type": "string", "format": "uuid" } }, "id": { "type": "string", "format": "uuid" } }, "required": [ "id" ] } } } }