{ "openapi": "3.0.1", "info": { "title": "Api", "version": "1.0" }, "paths": { "/api/batches/upload": { "post": { "tags": [ "Batch" ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateBatchDto" } }, "text/json": { "schema": { "$ref": "#/components/schemas/CreateBatchDto" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/CreateBatchDto" } } } }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/BatchDto" } }, "application/json": { "schema": { "$ref": "#/components/schemas/BatchDto" } }, "text/json": { "schema": { "$ref": "#/components/schemas/BatchDto" } } } } } } }, "/api/Registration/process": { "post": { "tags": [ "Registration" ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateRegistrationsDto" } }, "text/json": { "schema": { "$ref": "#/components/schemas/CreateRegistrationsDto" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/CreateRegistrationsDto" } } } }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/BatchDto" } }, "application/json": { "schema": { "$ref": "#/components/schemas/BatchDto" } }, "text/json": { "schema": { "$ref": "#/components/schemas/BatchDto" } } } } } } } }, "components": { "schemas": { "BatchDto": { "type": "object", "properties": { "batchId": { "type": "integer", "format": "int32" }, "clientId": { "type": "integer", "format": "int32" }, "fileName": { "type": "string", "nullable": true }, "fileChecksum": { "type": "string", "nullable": true }, "status": { "type": "string", "nullable": true }, "submittedAt": { "type": "string", "format": "date-time" }, "completedAt": { "type": "string", "format": "date-time", "nullable": true }, "totalRecords": { "type": "integer", "format": "int32" }, "validRecords": { "type": "integer", "format": "int32" }, "invalidRecords": { "type": "integer", "format": "int32" }, "addedRecords": { "type": "integer", "format": "int32" }, "updatedRecords": { "type": "integer", "format": "int32" } }, "additionalProperties": false }, "CreateBatchDto": { "type": "object", "properties": { "clientId": { "type": "integer", "format": "int32" }, "fileName": { "type": "string", "nullable": true }, "fileChecksum": { "type": "string", "nullable": true } }, "additionalProperties": false }, "CreateRegistrationsDto": { "type": "object", "properties": { "batchId": { "type": "integer", "format": "int32" }, "fileChecksum": { "type": "string", "nullable": true }, "rows": { "type": "array", "items": { "$ref": "#/components/schemas/CsvRowDto" }, "nullable": true } }, "additionalProperties": false }, "CsvRowDto": { "type": "object", "properties": { "firstName": { "type": "string", "nullable": true }, "middleNames": { "type": "string", "nullable": true }, "lastName": { "type": "string", "nullable": true }, "vin": { "type": "string", "nullable": true }, "startDate": { "type": "string", "nullable": true }, "duration": { "type": "string", "nullable": true }, "acn": { "type": "string", "nullable": true }, "organizationName": { "type": "string", "nullable": true }, "errors": { "type": "array", "items": { "type": "string" }, "nullable": true }, "isValid": { "type": "boolean" } }, "additionalProperties": false } } } }