openapi: 3.0.0 info: title: "TyrePro-API, Customer and Vehicle" version: "1" servers: - url: "https://musterreifen.com/api" description: "Demo server" - url: "https://onlineservices.demo.rz2.prm-ag.de/O6J20ZebmghzkNgrdD759A/api" description: "Development server" paths: /Customers: get: tags: - "Customers" parameters: - $ref: "#/components/parameters/OffsetParameter" - $ref: "#/components/parameters/LimitParameter" - $ref: "#/components/parameters/IsActiveParameter" - $ref: "#/components/parameters/SearchTermParameter" responses: 200: description: "successful operation" headers: TotalNumberOfEntries: schema: type: integer description: The total number of results of this operation. Please be aware that this number could be wrong if the parameter SearchTerm is used, due to processing the SearchTerm over the acutal result array. content: application/json: schema: type: "array" items: $ref: "#/components/schemas/Customer" 401: $ref: "#/components/responses/SessionOfTyreProUserOrHigherRequired" default: $ref: "#/components/responses/GenericError" security: - SessionScheme: [] post: tags: - "Customers" parameters: - $ref: "#/components/parameters/ResponseResolutionDepthParameter" requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/Customer" responses: 200: description: "successful operation" content: application/json: schema: $ref: "#/components/schemas/Customer" 401: $ref: "#/components/responses/SessionOfTyreProUserOrHigherRequired" default: $ref: "#/components/responses/GenericError" security: - SessionScheme: [] /Customers/{Guid}: get: tags: - "Customers" parameters: - $ref: "#/components/parameters/GuidPathParameter" responses: 200: description: "successful operation" content: application/json: schema: $ref: "#/components/schemas/Customer" 401: $ref: "#/components/responses/SessionOfOnlineUserOrHigherRequired" default: $ref: "#/components/responses/GenericError" security: - SessionScheme: [] patch: tags: - "Customers" parameters: - $ref: "#/components/parameters/GuidPathParameter" - $ref: "#/components/parameters/_HashValueParameter" requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/Customer" responses: 200: description: "successful operation" content: application/json: schema: $ref: "#/components/schemas/Customer" 401: $ref: "#/components/responses/SessionOfOnlineUserOrHigherRequired" default: $ref: "#/components/responses/GenericError" security: - SessionScheme: [] /Customers/{Guid}/DmsFiles: get: tags: - "Customers" - "DmsFiles" parameters: - $ref: "#/components/parameters/OffsetParameter" - $ref: "#/components/parameters/LimitParameter" - $ref: "#/components/parameters/SearchTermParameter" - $ref: "#/components/parameters/GuidPathParameter" - $ref: "#/components/parameters/DmsFilesTypeParameter" - $ref: "#/components/parameters/ResponseResolutionDepthParameter" responses: 200: description: "successful operation" headers: TotalNumberOfEntries: schema: type: integer description: The total number of results of this operation. Please be aware that this number could be wrong if the parameter SearchTerm is used, due to processing the SearchTerm over the acutal result array. content: application/json: schema: type: "array" items: $ref: "#/components/schemas/DmsFile" 401: $ref: "#/components/responses/SessionOfOnlineUserOrHigherRequired" default: $ref: "#/components/responses/GenericError" security: - SessionScheme: [] /Customers/custommethods/FindSimilarAccounts: get: tags: - "Customers" description: "Finds similar accounts. The algorithm uses for example phonetic analysis and more to create the results." parameters: - name: "Name1" in: "query" required: true schema: type: "string" default: null example: "Max Mustermann" - name: "Name2" in: "query" required: false schema: type: "string" default: null - name: "Name3" in: "query" required: false schema: type: "string" default: null - name: "Street" in: "query" required: true schema: type: "string" default: null example: "Musterstraße 123" - name: "Postalcode" in: "query" required: true schema: type: "string" default: null example: "01234" - name: "Town" in: "query" required: true schema: type: "string" default: null example: "Musterhausen" - name: "EMailAddress" in: "query" required: false schema: type: "string" default: null example: "max@mustermann.de" - name: "SalesTaxIdentificationNumber" in: "query" required: false schema: type: "string" default: null responses: 200: description: "successful operation" content: application/json: schema: type: "array" items: type: "object" required: - "WouldBeChoosenAutomatically" - "GuidCustomer" properties: WouldBeChoosenAutomatically: type: "boolean" AutomaticChoiceDescription: type: "string" NameSimilarityInPercent: type: "number" AddressSimilarityInPercent: type: "number" GuidCustomer: type: "string" example: WouldBeChoosenAutomatically: true AutomaticChoiceDescription: "USt.-IdNr. stimmt überein" NameSimilarityInPercent: 100 AddressSimilarityInPercent: 97.4 GuidCustomer: "9acea90b-f0d9-2d95-7814-c53b28d87980" 401: $ref: "#/components/responses/SessionOfTyreProUserOrHigherRequired" default: $ref: "#/components/responses/GenericError" security: - SessionScheme: [] /CustomerVehicles: get: tags: - "CustomerVehicles" parameters: - $ref: "#/components/parameters/OffsetParameter" - $ref: "#/components/parameters/LimitParameter" - $ref: "#/components/parameters/IsActiveParameter" - $ref: "#/components/parameters/SearchTermParameter" - $ref: "#/components/parameters/ResponseResolutionDepthParameter" responses: 200: description: "successful operation" headers: TotalNumberOfEntries: schema: type: integer description: The total number of results of this operation. Please be aware that this number could be wrong if the parameter SearchTerm is used, due to processing the SearchTerm over the acutal result array. content: application/json: schema: type: "array" items: $ref: "#/components/schemas/CustomerVehicle" 401: $ref: "#/components/responses/SessionOfOnlineUserOrHigherRequired" default: $ref: "#/components/responses/GenericError" security: - SessionScheme: [] /CustomerVehicles/{Guid}: get: tags: - "CustomerVehicles" parameters: - $ref: "#/components/parameters/GuidPathParameter" - $ref: "#/components/parameters/ResponseResolutionDepthParameter" responses: 200: description: "successful operation" content: application/json: schema: $ref: "#/components/schemas/CustomerVehicle" 401: $ref: "#/components/responses/SessionOfOnlineUserOrHigherRequired" default: $ref: "#/components/responses/GenericError" security: - SessionScheme: [] patch: tags: - "CustomerVehicles" parameters: - $ref: "#/components/parameters/GuidPathParameter" - $ref: "#/components/parameters/_HashValueParameter" requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/CustomerVehicle" responses: 200: description: "successful operation" content: application/json: schema: $ref: "#/components/schemas/CustomerVehicle" 401: $ref: "#/components/responses/SessionOfOnlineUserOrHigherRequired" default: $ref: "#/components/responses/GenericError" security: - SessionScheme: [] /CustomerVehicles/{Guid}/CustomerStorages: get: tags: - "CustomerVehicles" - "CustomerStorages" parameters: - $ref: "#/components/parameters/OffsetParameter" - $ref: "#/components/parameters/LimitParameter" - $ref: "#/components/parameters/IsActiveParameter" - $ref: "#/components/parameters/SearchTermParameter" - $ref: "#/components/parameters/GuidPathParameter" - $ref: "#/components/parameters/ResponseResolutionDepthParameter" responses: 200: description: "successful operation" headers: TotalNumberOfEntries: schema: type: integer description: The total number of results of this operation. Please be aware that this number could be wrong if the parameter SearchTerm is used, due to processing the SearchTerm over the acutal result array. content: application/json: schema: type: "array" items: $ref: "#/components/schemas/CustomerStorage" 401: $ref: "#/components/responses/SessionOfOnlineUserOrHigherRequired" default: $ref: "#/components/responses/GenericError" security: - SessionScheme: [] /CustomerVehicles/{Guid}/DmsFiles: get: tags: - "CustomerVehicles" - "DmsFiles" parameters: - $ref: "#/components/parameters/OffsetParameter" - $ref: "#/components/parameters/LimitParameter" - $ref: "#/components/parameters/SearchTermParameter" - $ref: "#/components/parameters/GuidPathParameter" - $ref: "#/components/parameters/DmsFilesTypeParameter" - $ref: "#/components/parameters/ResponseResolutionDepthParameter" responses: 200: description: "successful operation" headers: TotalNumberOfEntries: schema: type: integer description: The total number of results of this operation. Please be aware that this number could be wrong if the parameter SearchTerm is used, due to processing the SearchTerm over the acutal result array. content: application/json: schema: type: "array" items: $ref: "#/components/schemas/DmsFile" 401: $ref: "#/components/responses/SessionOfOnlineUserOrHigherRequired" default: $ref: "#/components/responses/GenericError" security: - SessionScheme: [] /CustomerVehicles/{Guid}/SchedulerAppointments: get: tags: - "CustomerVehicles" - "SchedulerAppointments" parameters: - $ref: "#/components/parameters/OffsetParameter" - $ref: "#/components/parameters/LimitParameter" - $ref: "#/components/parameters/IsActiveParameter" - $ref: "#/components/parameters/SearchTermParameter" - $ref: "#/components/parameters/GuidPathParameter" - $ref: "#/components/parameters/ResponseResolutionDepthParameter" responses: 200: description: "successful operation" headers: TotalNumberOfEntries: schema: type: integer description: The total number of results of this operation. Please be aware that this number could be wrong if the parameter SearchTerm is used, due to processing the SearchTerm over the acutal result array. content: application/json: schema: type: "array" items: $ref: "#/components/schemas/SchedulerAppointment" 401: $ref: "#/components/responses/SessionOfOnlineUserOrHigherRequired" default: $ref: "#/components/responses/GenericError" security: - SessionScheme: [] /CustomerVehicles/custommethods/GenerateCsvFile: get: tags: - "CustomerVehicles" description: "Generates a CSV-file with all customer vehicle information and delivers the binary file content." parameters: - $ref: "#/components/parameters/ContentDispositionParameter" responses: 200: description: "successful operation" content: text/csv: schema: type: "string" format: "binary" 401: $ref: "#/components/responses/SessionOfOnlineUserOrHigherRequired" default: $ref: "#/components/responses/GenericError" security: - SessionScheme: [] components: schemas: GenericError: type: "object" required: - "Message" - "Details" properties: Message: type: "string" Details: type: "string" example: Message: "Ihr Anwender wurde nicht gefunden." Details: "Progress.Lang.AppError\n Ihr Anwender wurde nicht gefunden.\nat sourcecode.line 123" _HashValue: type: "string" description: "HashValue of the object which you'll need to process write-operations." example: "f50df554352ac91635f900026860e3371a71999d" Customer: type: "object" required: - "Guid" - "Number" - "IsActive" properties: Guid: type: "string" GuidBranch: type: "string" Number: type: "integer" IsActive: type: "boolean" Address: $ref: "#/components/schemas/PostalAddress" PhoneNumber: type: "string" FaxNumber: type: "string" MobilphoneNumber: type: "string" EMailAddress: type: "string" HomepageAddress: type: "string" SalesTaxIdentificationNumber: type: "string" _HashValue: $ref: "#/components/schemas/_HashValue" example: Guid: "ebb89e89-8d25-809e-7814-c53b686ae164" GuidBranch: "ebb89e89-8d25-809e-7814-c53b686ae164" Number: 123456 IsActive: true Address: null PhoneNumber: "0123456789" FaxNumber: null MobilphoneNumber: null MailAddress: "max@mustermann.de" HomepageAddress: null SalesTaxIdentificationNumber: null CustomerStorage: type: "object" required: - "Guid" - "Number" - "Date" - "IsActive" - "GuidCustomer" - "GuidBranch" - "StorageType" properties: Guid: type: "string" Number: type: "integer" Date: type: "string" format: "date" IsActive: type: "boolean" GuidCustomerVehicle: type: "string" GuidCustomer: type: "string" GuidBranch: type: "string" Comment: type: "string" DriverName: type: "string" ExternalReferenceNumber: type: "string" ShallBeWashed: type: "boolean" ShallBeBalanced: type: "boolean" ShallBeRdksChecked: type: "boolean" RimType: type: "string" enum: - "Carbon" - "AlloyRimOriginal" - "AlloyRimAftermarket" - "SteelRim" - "WithoutRim" - "Unknown" GuidCustomerStorageStatus: type: "string" GuidMaterialGroup: type: "string" StorageType: type: "string" enum: - "Storage" - "Customer" GuidStorage: type: "string" GuidStorageLocation: type: "string" ExternalStorageReferenceNumber: type: "string" _HashValue: $ref: "#/components/schemas/_HashValue" example: Guid: "ebb89e89-8d25-809e-7814-c53b686ae164" Number: 123456 Date: "2021-02-02" IsActive: true GuidCustomerVehicle: "ebb89e89-8d25-809e-7814-c53b686ae164" GuidCustomer: "ebb89e89-8d25-809e-7814-c53b686ae164" GuidBranch: "ebb89e89-8d25-809e-7814-c53b686ae164" Comment: null DriverName: "Max Mustermann Junior" ExternalReferenceNumber: null ShallBeWashed: true ShallBeBalanced: true ShallBeRdksChecked: false RimType: "AlloyRimAftermarket" GuidCustomerStorageStatus: "ebb89e89-8d25-809e-7814-c53b686ae164" GuidMaterialGroup: "ebb89e89-8d25-809e-7814-c53b686ae164" StorageType: "Branch" GuidStorage: "ebb89e89-8d25-809e-7814-c53b686ae164" GuidStorageLocation: "ebb89e89-8d25-809e-7814-c53b686ae164" ExternalStorageReferenceNumber: null CustomerVehicle: type: "object" required: - "Guid" - "GuidCustomer" - "IsActive" - "LicenceTagNumber" properties: Guid: type: "string" GuidCustomer: type: "string" IsActive: type: "boolean" LicenceTagNumber: type: "string" ChassisNumber: type: "string" EgTypeApprovalNumber: type: "string" KbaNumber1: type: "string" KbaNumber2: type: "string" VehicleManufacturer: type: "string" VehicleDesignation: type: "string" VehicleType: type: "string" VehicleModel: type: "string" RegistrationDate: type: "string" format: "date" FuelType: type: "string" DisplacementInCcm: type: "number" PowerInKw: type: "number" MileageInKm: type: "number" TuevDate: type: "string" format: "date" InspectionDate: type: "string" format: "date" UvvDate: type: "string" format: "date" _HashValue: $ref: "#/components/schemas/_HashValue" example: Guid: "ebb89e89-8d25-809e-7814-c53b686ae164" GuidCustomer: "ebb89e89-8d25-809e-7814-c53b686ae164" IsActive: true LicenceTagNumber: "A-BC 1234" ChassisNumber: null KbaNumber1: "8004" KbaNumber2: "AHE" VehicleManufacturer: "Skoda" VehicleDesignation: "Octavia" VehicleType: "Limosine" VehicleModel: "1Z, Facelift" RegistrationDate: "2021-02-02" DmsFile: type: "object" required: - "Guid" - "TableName" - "GuidOfTableName" - "ProgramIdentifier" - "ProgramIdentifierDesignation" - "Type" properties: Guid: type: "string" TableName: type: "string" enum: - "Customer" - "CustomerStorage" - "CustomerVehicle" - "Document" - "SchedulerAppointment" - "DmsFile" GuidOfTableName: type: "string" ProgramIdentifier: type: "string" enum: - "Billing" - "Cub" - "Direct" - "Etirehotel" - "GlMesstechnik" - "GudatSolutions" - "MacsDia" - "OnlineServices" - "Printout" - "PurchaseSource" - "SalesInterchange" - "Somplatzki" - "Zollhof" ProgramIdentifierDesignation: type: "string" Type: type: "string" enum: - "Directory" - "File" Designation: type: "string" GuidDbBlob: type: "string" Description: type: "string" _HashValue: $ref: "#/components/schemas/_HashValue" example: Guid: "ebb89e89-8d25-809e-7814-c53b686ae164" TableName: "DmsFile" GuidOfTableName: "ebb89e89-8d25-809e-7814-c53b686ae164" ProgramIdentifier: "Direct" ProgramIdentifierDesignation: "Manuell hinzugefügte Dateien" Type: "File" GuidDbBlob: "ebb89e89-8d25-809e-7814-c53b686ae164" Designation: null Description: null PostalAddress: type: "object" properties: Salutation: type: "string" Name1: type: "string" Name2: type: "string" Name3: type: "string" Street: type: "string" Postalcode: type: "string" Town: type: "string" Township: type: "string" GuidAddressState: type: "string" example: Salutation: "Herr" Name1: "Max Mustermann" Name2: null Name3: null Street: "Musterstra�e 123" Postalcode: "01234" Town: "Musterhausen" Township: "Musterviertel" GuidAddressState: "ebb89e89-8d25-809e-7814-c53b686ae164" SchedulerAppointment: type: "object" required: - "Guid" - "Designation" - "StartMoment" - "EndMoment" - "WasCreatedByOnlineScheduler" properties: Guid: type: "string" Designation: type: "string" LicenceTagNumber: type: "string" StartMoment: type: "string" format: "date-time" EndMoment: type: "string" format: "date-time" Comment: type: "string" WasCreatedByOnlineScheduler: type: "boolean" OnlineSchedulerText: type: "string" AppointmentMakerEmailAddress: type: "string" GuidBranch: type: "string" GuidOnlineSchedulerBranch: type: "string" GuidCustomerVehicle: type: "string" GuidCustomerStorage: type: "string" GuidDocument: type: "string" _HashValue: $ref: "#/components/schemas/_HashValue" example: Guid: "ebb89e89-8d25-809e-7814-c53b686ae164" Designation: "Max Müller, A-BC 1234" LicenceTagNumber: "A-BC 1234" StartMoment: "2021-02-02T10:36:10.172" EndMoment: "2021-02-02T10:36:10.172" Comment: null WasCreatedByOnlineScheduler: true OnlineSchedulerText: "Service: Ich möchte einen Termin für eine Einlagerung haben." AppointmentMakerEmailAddress: "info@prm-ag.de" GuidBranch: "ebb89e89-8d25-809e-7814-c53b686ae164" GuidOnlineSchedulerBranch: "ebb89e89-8d25-809e-7814-c53b686ae164" GuidCustomerVehicle: "ebb89e89-8d25-809e-7814-c53b686ae164" GuidCustomerStorage: "ebb89e89-8d25-809e-7814-c53b686ae164" securitySchemes: SessionScheme: type: http scheme: bearer parameters: _HashValueParameter: name: "_HashValue" in: "query" description: "If you want to process a write operation you shall provide the hashvalue of the current view of the object you want to write to. If someone else has written something before you'll get a 412 response code." required: true schema: type: "string" default: null example: "f50df554352ac91635f900026860e3371a71999d" ContentDispositionParameter: name: "ContentDisposition" in: "query" description: "How the file is deliverd. Inline is inside the same browser tab i.e.. This parameter takes only effect if parameter BinaryResponse=true." required: false schema: type: "string" enum: - "Inline" - "Attachment" default: "Inline" example: "Inline" DmsFilesTypeParameter: name: "Type" in: "query" description: "Filter by type." required: false schema: type: "string" enum: - "Directory" - "File" example: "File" GuidPathParameter: name: "Guid" in: "path" description: "The primary identifier of the entry (in the database)." required: true schema: type: "string" default: null example: "ebb89e89-8d25-809e-7814-c53b686ae164" IsActiveParameter: name: "IsActive" in: "query" description: "Only active elements shall be returned. If null both will get returned." required: false schema: type: "boolean" default: null example: true LimitParameter: name: "Limit" in: "query" description: "Limits the number of result entries." required: false schema: type: "integer" default: null minimum: 1 maximum: 2147483647 example: 20 OffsetParameter: name: "Offset" in: "query" description: "Skip the first number of entries." required: false schema: type: "integer" default: null minimum: 0 maximum: 2147483647 example: 0 ResponseResolutionDepthParameter: name: "ResponseResolutionDepth" in: "query" description: "If your response object has a field with GuidSomething, this last object will be resolved. Instead of the field GuidSomething you'll get a json object of type Something with it's content. The depth determines how deep this operation shall be. The deeper, the slower your operation will be in general." required: false schema: type: "integer" default: 0 minimum: 0 maximum: 3 example: 1 SearchTermParameter: name: "SearchTerm" in: "query" description: "Searches the entries and it's content." required: false schema: type: "string" default: null example: "mc*onald" responses: SessionOfOnlineUserOrHigherRequired: description: "You need a session of type OnlineUser or TyreProUser." content: application/json: schema: $ref: "#/components/schemas/GenericError" SessionOfTyreProUserOrHigherRequired: description: "You need a session of type TyreProUser." content: application/json: schema: $ref: "#/components/schemas/GenericError" GenericError: description: "Unexpected error like 4XX or 5XX http errors." content: application/json: schema: $ref: "#/components/schemas/GenericError"