{ "info": { "title": "OpenAPI Endpoints", "version": "v1.0" }, "paths": { "/invoices": { "get": { "tags": [ "OpenApiInvoices" ], "responses": { "200": { "content": { "Application/Json": { "schema": { "$ref": "#/components/schemas/OpenApiInvoicesResponse" } } }, "description": "Success" }, "400": { "content": { "Application/Json": { "schema": { "$ref": "#/components/schemas/ResultEntity" } } }, "description": "Bad Request" }, "500": { "content": { "Application/Json": { "schema": { "$ref": "#/components/schemas/ErrorDetailsEntity" } } }, "description": "Server Error" } }, "parameters": [ { "in": "query", "name": "AuthorityIds", "schema": { "type": "array", "items": { "type": "string" } }, "description": "Only search invoices with matching authorityIds - Multiple authorities can be added via authorityIds=A123,authorityIds=A345,..." }, { "in": "query", "name": "StartDateTime", "schema": { "type": "string" }, "description": "Start date time for search" }, { "in": "query", "name": "EndDateTime", "schema": { "type": "string" }, "description": "End date time for search" }, { "in": "query", "name": "PageSize", "schema": { "type": "integer", "format": "int32" }, "description": "Max results to return - If set must be between 1 and 1000" }, { "in": "query", "name": "Page", "schema": { "type": "integer", "format": "int32" }, "description": "Page Number" }, { "in": "query", "name": "ParentIds", "schema": { "type": "array", "items": { "type": "string" } }, "description": "Only search invoices with matching parentIds" }, { "in": "header", "name": "x-correlation-id", "schema": { "type": "string", "format": "uuid" }, "description": "Correlation Id" } ] } } }, "openapi": "3.0.1", "security": [ { "Bearer": [] } ], "components": { "schemas": { "ResultEntity": { "type": "object", "properties": { "message": { "type": "string", "nullable": true }, "success": { "type": "boolean" }, "errorDetails": { "$ref": "#/components/schemas/ErrorDetailsEntity" }, "correlationId": { "type": "string", "format": "uuid" } }, "additionalProperties": false }, "ErrorDetailsEntity": { "type": "object", "properties": { "errorCode": { "type": "integer", "format": "int32" }, "errorMessage": { "type": "string", "nullable": true } }, "additionalProperties": false }, "OpenApiInvoiceResponse": { "type": "object", "properties": { "customer": { "type": "string", "nullable": true, "description": "Customer. Name of customer" }, "parentId": { "type": "string", "nullable": true, "description": "Parent id. Id of parent associated with the invoice" }, "invoiceId": { "type": "string", "nullable": true, "description": "Invoice id" }, "parentName": { "type": "string", "nullable": true, "description": "Parent name. Name of parent associated with the invoice" }, "authorityId": { "type": "string", "nullable": true, "readOnly": true, "description": ". Id of authority associated with the invoice" }, "invoiceDate": { "type": "string", "nullable": true, "description": "Invoice date" }, "invoiceType": { "type": "string", "nullable": true }, "accountLevel": { "type": "string", "nullable": true, "description": "Account level. Value is either CU or PC" }, "invoiceCycle": { "type": "integer", "format": "int32", "description": "Invoice cycle" }, "espCustomerNo": { "type": "integer", "format": "int64", "nullable": true, "description": "ESP customer number" }, "invoiceNumber": { "type": "string", "nullable": true, "description": "Invoice number" }, "invoiceToDate": { "type": "string", "nullable": true, "description": "Invoice to date" }, "issuerCountry": { "type": "string", "nullable": true, "description": "Issuer country - Iso code for issuer country" }, "paymentMethod": { "type": "string", "nullable": true, "description": "Payment method - This is a code with very little meaning e.g. 1 = DIRECT DEBIT 2 = BANK GIRO - Lookup is based on source system name and payment method. There are 171 code defined" }, "supplyCountry": { "type": "string", "nullable": true, "description": "Supply country - Iso code for supply country" }, "invoiceDueDate": { "type": "string", "nullable": true, "description": "Invoice due date" }, "invoiceFromDate": { "type": "string", "nullable": true, "description": "Invoice from date" }, "invoiceNetValue": { "type": "number", "format": "double", "description": "Invoice net value" }, "invoiceVatValue": { "type": "number", "format": "double", "description": "Invoice vat value" }, "productItemCount": { "type": "integer", "format": "int32", "description": "Product item count" }, "invoiceTotalValue": { "type": "number", "format": "double", "description": "Invoice total value" }, "issuerCountryName": { "type": "string", "nullable": true, "description": "Issuer country name" }, "recordCreatedDate": { "type": "string", "nullable": true, "description": "Record created date - Date time the inovoice was last updated" }, "invoiceRebateValue": { "type": "number", "format": "double", "description": "Invoice rebate value" }, "recordModifiedDate": { "type": "string", "nullable": true, "description": "Record modified date - Date time the inovoice was created" }, "summaryStatementId": { "type": "string", "nullable": true, "description": "Summary statement id" }, "invoiceCurrencyCode": { "type": "string", "nullable": true, "description": "Invoice currency code" }, "summaryStatementDate": { "type": "string", "nullable": true, "description": "Summary statement date" }, "paymentMethodDescription": { "type": "string", "nullable": true, "description": "Payment method description - Description for the payment method" } }, "additionalProperties": false }, "OpenApiInvoicesResponse": { "type": "object", "properties": { "invoices": { "type": "array", "items": { "$ref": "#/components/schemas/OpenApiInvoiceResponse" }, "nullable": true }, "numberOfRecords": { "type": "integer", "format": "int32" }, "moreInvoicesAvailable": { "type": "boolean" } }, "additionalProperties": false } }, "securitySchemes": { "Bearer": { "in": "header", "name": "Authorization", "type": "apiKey", "description": "JWT Authorization header using the Bearer scheme (Example: 'Bearer 12345abcdef')" } } } }