{"openapi":"3.0.1","info":{"title":"Analytics Rest API","description":"This documentation describes the Analytics API functionality. The Analytics API can be used to fetch data on header and row level. Please note that the API is in early development stage and is subject to changes in the future. Authorization uses a access token that is delivered by Pagero and must be included in HTTP header, e.g. 'Authorization: Bearer [ACCESS TOKEN]' Note that the embedded access token needs to come from a user that has the permission 'analyticsBasic' that comes from the role 'Analytics - Basic'.\nIf you are part of company group you need to specify the company id(s) of the companies that you want to access. At the moment the query param is referred to as 'companyIds' in the documentation but its actually called 'companyId'.But it takes a list of company ids seperated by semi-colons. For e.g. ?companyId=123;456\n\n# Changelog\n## 1.1.2 Beta\n- Added `subType` in response for GET `/{documentType}/received` , GET `/{documentType}/sent`, GET `/{documentType}/lineItems/received` and GET `/{documentType}/lineItems/sent`\n- Deprecated `invoiceType` in response for GET `/{documentType}/received` , GET `/{documentType}/sent`, GET `/{documentType}/lineItems/received` and GET `/{documentType}/lineItems/sent`\n## 1.1.3 Beta\n- Deprecated `timezone` query parameter. Other timestamp query parameters should be supplied without timezones and in UTC.\n\n## 1.1.4 Beta\n- Changed the type of the property `id`, from number to string, in the response for GET `/{documentType}/lineItems/received` and GET `/{documentType}/lineItems/sent`.\n\n## 1.1.5 Beta\n  - Changed the type of the property `exchangeRate`, from number to an`ExchangeRate` object, in the response for GET `/{documentType}/received` , GET `/{documentType}/sent` , GET `/{documentType}/lineItems/received` and GET `/{documentType}/lineItems/sent`.\n\n## 1.1.6 Beta\n-  Changed the type of the property `exchangeRate`, from an`ExchangeRate` object to number, in the response for GET `/{documentType}/received` , GET `/{documentType}/sent` , GET `/{documentType}/lineItems/received` and GET `/{documentType}/lineItems/sent`.\n\n## 1.1.7 Beta\n  - Added `restrictedValues` list according to the `restrictedValueKeys` query param, in the response for GET `/{documentType}/received` and GET `/{documentType}/sent`.\n\n## 1.1.8 Beta\n  - Added `exchange` as an`ExchangeRate` object, in the response for GET `/{documentType}/received` and GET `/{documentType}/sent`. deprecated the `exchangeRate` property in the response for GET `/{documentType}/received` and GET `/{documentType}/sent`.\n\n## 1.1.9 Beta\n- Added `restrictedValues` list according to the `restrictedValueKeys` query param, in the response for GET `/{documentType}/lineItems/received` and GET `/{documentType}/lineItems/sent`.\n\n## 1.1.10 Beta\n- Added support for regional parameter in the server URL. Correctly adjusted the version number from 1.0.X to 1.1.X.\n\n## 1.1.11 Beta\n- Removed faulty excess 'type: string' where it was already defined.\n- Surrounded http response codes in quotes to make them strings.\n- improved formatting of the changelog\n\n## 1.1.12 Beta\n- Added multiple sendMode support in the query parameter.\n\n## 1.1.13 Beta\n- Added taxData related fields in the response for GET `/{documentType}/received` , GET `/{documentType}/sent` , GET `/{documentType}/lineItems/received` and GET `/{documentType}/lineItems/sent`.\n- Added taxPointDate in `total/vatDetails/taxPointDate` in the response for GET `/{documentType}/received` and GET `/{documentType}/sent`.\n- Added taxPointDate in `rows/vatAmount` in the response for GET `/{documentType}/lineItems/received` and GET `/{documentType}/lineItems/sent`.\n- Added deliveryReferenceDate in `rows/delivery` in the response for GET `/{documentType}/lineItems/received` and GET `/{documentType}/lineItems/sent`.\n- Added deliveryReferenceDate in `delivery` object in the response for GET `/{documentType}/received` and GET `/{documentType}/sent`.\n- Deprecated vatAmount in total and added it in `total/vatDetails` in the response for GET `/{documentType}/received` and GET `/{documentType}/sent`.","contact":{"name":"Pagero","email":"support@pagero.com"},"version":"1.1.13_Beta"},"servers":[{"url":"https://api.pageroonline.com/analytics/v1","description":"Production server. Will use `europe1` region by default."},{"url":"https://api.{region}.pageroonline.com/analytics/v1","description":"Regional API URL for production server.","variables":{"region":{"default":"europe1","description":"The geographic region for data residency."}}}],"security":[{"BearerAuth":[]}],"paths":{"/{documentType}/received":{"get":{"tags":["Documents"],"summary":"List received document types","description":"List received document types. By default, the API returns a maximum of `10` records per request. To retrieve more records, use the `limit` query parameter.","parameters":[{"name":"documentType","in":"path","required":true,"schema":{"type":"string","enum":["invoices","orders","order_responses","application_responses","payment_reminders","catalogues","utility_statements","italian_invoice_reports","delivery_forecasts","transport_statuses","transport_instruction_responses","order_agreements","order_changes","order_cancellations","transport_instructions","receipt_advices","document_statuses"]}},{"name":"companyIds","in":"query","description":"Comma separated list of company ids","schema":{"type":"string"}},{"name":"dateType","in":"query","description":"createTime or documentDate","schema":{"type":"string","default":"documentDate"}},{"name":"timeZone","in":"query","deprecated":true,"schema":{"type":"string"}},{"name":"indexedStart","in":"query","description":"A date and time in ISO 8601 format to filter out invoices started before. The invoices get filtered out based on their 'modifiedTime'.","schema":{"type":"string"}},{"name":"indexedEnd","in":"query","description":"A date and time in ISO 8601 format to filter out invoices started before. The invoices get filtered out based on their 'modifiedTime'.","schema":{"type":"string"}},{"name":"startDate","in":"query","description":"Exclude documents created earlier than this date and time. Date and time should be expressed in ISO 8601 format without timezone.","schema":{"type":"string"}},{"name":"endDate","in":"query","description":"Exclude documents created later than this date and time. Date and time should be expressed in ISO 8601 format without timezone.","schema":{"type":"string"}},{"name":"offset","in":"query","description":"How many results to skip, used for paging. There's a max limit on how many items to return in total (offset + limit) which is currently 10000. Narrow your search with startDate and endDate to avoid this max limit","schema":{"minimum":0,"type":"integer","format":"int32","default":0}},{"name":"limit","in":"query","description":"How many results to return, used for paging. There's a max limit on how many items to return in total (offset + limit) which is currently 10000. Narrow your search with startDate and endDate to avoid this max limit","schema":{"maximum":1000,"minimum":1,"type":"integer","format":"int32","default":10}},{"name":"sendMode","in":"query","description":"Send mode. Supports single value or comma-separated values (e.g., \"test,production\").<br> **Production** - Production mode. <br> **Certification** - Certification mode. Documents will be processed by Pagero Online but will not be delivered to the recipients. This can be useful during testing. <br> **Test** - Test mode. Documents will be delivered to the recipients but will be delivered in test mode if the recipients support it. Please note that not all recipients support test mode.","required":false,"schema":{"type":"string","enum":["Production","Certification","Test"],"default":"Production"}},{"name":"sort","in":"query","description":"The property to sort on. The default direction is ascending. Prepend property with '-' to sort in descending order.","required":false,"schema":{"type":"string","enum":["documentdate","-documentdate","createtime","-createtime","documentidentifier","-documentidentifier","distribution","-distribution"],"default":"-createtime"}},{"name":"restrictedValueKeys","in":"query","description":"Comma separated keys.  If this is provided, the response will include a restrictedValues array containing only the values that match the specified keys. If this is not provided, the restrictedValues array in the response will be empty.","schema":{"type":"string"}}],"responses":{"200":{"description":"List of invoices","content":{"application/json":{"schema":{"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/AnalyticsInvoice"}}}}}}}}}},"/{documentType}/sent":{"get":{"tags":["Documents"],"summary":"List sent documents","description":"List sent documents. By default, the API returns a maximum of `10` records per request. To retrieve more records, use the `limit` query parameter.","parameters":[{"name":"documentType","in":"path","required":true,"schema":{"type":"string","enum":["invoices","orders","order_responses","application_responses","payment_reminders","catalogues","utility_statements","italian_invoice_reports","delivery_forecasts","transport_statuses","transport_instruction_responses","order_agreements","order_changes","order_cancellations","transport_instructions","receipt_advices","document_statuses"]}},{"name":"companyIds","in":"query","description":"Comma separated list of company ids","schema":{"type":"string"}},{"name":"dateType","in":"query","description":"createTime or documentDate","schema":{"type":"string","default":"documentDate"}},{"name":"timeZone","in":"query","deprecated":true,"schema":{"type":"string"}},{"name":"indexedStart","in":"query","description":"A date and time in ISO 8601 format to filter out invoices started before. The invoices get filtered out based on their 'modifiedTime'.","schema":{"type":"string"}},{"name":"indexedEnd","in":"query","description":"A date and time in ISO 8601 format to filter out invoices started before. The invoices get filtered out based on their 'modifiedTime'.","schema":{"type":"string"}},{"name":"startDate","in":"query","description":"Exclude documents created earlier than this date and time. Date and time should be expressed in ISO 8601 format without timezone.","schema":{"type":"string"}},{"name":"endDate","in":"query","description":"Exclude documents created later than this date and time. Date and time should be expressed in ISO 8601 format without timezone.","schema":{"type":"string"}},{"name":"offset","in":"query","description":"How many results to skip, used for paging. There's a max limit on how many items to return in total (offset + limit) which is currently 10000. Narrow your search with startDate and endDate to avoid this max limit","schema":{"minimum":0,"type":"integer","format":"int32","default":0}},{"name":"limit","in":"query","description":"How many results to return, used for paging. There's a max limit on how many items to return in total (offset + limit) which is currently 10000. Narrow your search with startDate and endDate to avoid this max limit","schema":{"maximum":1000,"minimum":1,"type":"integer","format":"int32","default":10}},{"name":"sendMode","in":"query","description":"Send mode. Supports single value or comma-separated values (e.g., \"test,production\").<br> **Production** - Production mode. <br> **Certification** - Certification mode. Documents will be processed by Pagero Online but will not be delivered to the recipients. This can be useful during testing. <br> **Test** - Test mode. Documents will be delivered to the recipients but will be delivered in test mode if the recipients support it. Please note that not all recipients support test mode.","required":false,"schema":{"type":"string","enum":["Production","Certification","Test"],"default":"Production"}},{"name":"sort","in":"query","description":"The property to sort on. The default direction is ascending. Prepend property with '-' to sort in descending order.","required":false,"schema":{"type":"string","enum":["documentdate","-documentdate","createtime","-createtime","documentidentifier","-documentidentifier","distribution","-distribution"],"default":"-createtime"}},{"name":"restrictedValueKeys","in":"query","description":"Comma separated keys. If this is provided, the response will include a restrictedValues array containing only the values that match the specified keys. If this is not provided, the restrictedValues array in the response will be empty.","schema":{"type":"string"}}],"responses":{"200":{"description":"List of invoices","content":{"application/json":{"schema":{"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/AnalyticsInvoice"}}}}}}}}}},"/{documentType}/lineItems/received":{"get":{"tags":["Documents"],"summary":"List received documents line-items","description":"List received document line-items. By default, the API returns a maximum of `10` records per request. To retrieve more records, use the `limit` query parameter.","parameters":[{"name":"documentType","in":"path","required":true,"schema":{"type":"string","enum":["invoices","orders","order_responses","application_responses","payment_reminders","catalogues","utility_statements","italian_invoice_reports","delivery_forecasts","transport_statuses","transport_instruction_responses","order_agreements","order_changes","order_cancellations","transport_instructions","receipt_advices","document_statuses"]}},{"name":"companyIds","in":"query","description":"Comma separated list of company ids","schema":{"type":"string"}},{"name":"dateType","in":"query","description":"createTime or documentDate","schema":{"type":"string","default":"documentDate"}},{"name":"timeZone","in":"query","deprecated":true,"schema":{"type":"string"}},{"name":"startDate","in":"query","description":"Exclude documents created earlier than this date and time. Date and time should be expressed in ISO 8601 format without timezone.","schema":{"type":"string"}},{"name":"endDate","in":"query","description":"Exclude documents created later than this date and time. Date and time should be expressed in ISO 8601 format without timezone.","schema":{"type":"string"}},{"name":"indexedStart","in":"query","description":"A date and time in ISO 8601 format to filter out invoices started before. The invoices get filtered out based on their 'modifiedTime'.","schema":{"type":"string"}},{"name":"indexedEnd","in":"query","description":"A date and time in ISO 8601 format to filter out invoices started before. The invoices get filtered out based on their 'modifiedTime'.","schema":{"type":"string"}},{"name":"offset","in":"query","description":"How many results to skip, used for paging. There's a max limit on how many items to return in total (offset + limit) which is currently 10000. Narrow your search with startDate and endDate to avoid this max limit","schema":{"minimum":0,"type":"integer","format":"int32","default":0}},{"name":"limit","in":"query","description":"How many results to return, used for paging. There's a max limit on how many items to return in total (offset + limit) which is currently 10000. Narrow your search with startDate and endDate to avoid this max limit","schema":{"maximum":1000,"minimum":1,"type":"integer","format":"int32","default":10}},{"name":"sendMode","in":"query","description":"Send mode. Supports single value or comma-separated values (e.g., \"test,production\").<br> **Production** - Production mode. <br> **Certification** - Certification mode. Documents will be processed by Pagero Online but will not be delivered to the recipients. This can be useful during testing. <br> **Test** - Test mode. Documents will be delivered to the recipients but will be delivered in test mode if the recipients support it. Please note that not all recipients support test mode.","required":false,"schema":{"type":"string","enum":["Production","Certification","Test"],"default":"Production"}},{"name":"sort","in":"query","description":"The property to sort on. The default direction is ascending. Prepend property with '-' to sort in descending order.","required":false,"schema":{"type":"string","enum":["documentdate","-documentdate","createtime","-createtime","documentidentifier","-documentidentifier","distribution","-distribution"],"default":"-createtime"}},{"name":"restrictedValueKeys","in":"query","description":"Comma separated keys.  If this is provided, the response will include a restrictedValues array containing only the values that match the specified keys. If this is not provided, the restrictedValues array in the response will be empty.","schema":{"type":"string"}}],"responses":{"200":{"description":"List of line items","content":{"application/json":{"schema":{"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/AnalyticsInvoiceLineItem"}}}}}}}}}},"/{documentType}/lineItems/sent":{"get":{"tags":["Documents"],"summary":"List sent documents line-items","description":"List sent documents line-items. By default, the API returns a maximum of `10` records per request. To retrieve more records, use the `limit` query parameter.","parameters":[{"name":"documentType","in":"path","required":true,"schema":{"type":"string","enum":["invoices","orders","order_responses","application_responses","payment_reminders","catalogues","utility_statements","italian_invoice_reports","delivery_forecasts","transport_statuses","transport_instruction_responses","order_agreements","order_changes","order_cancellations","transport_instructions","receipt_advices","document_statuses"]}},{"name":"companyIds","in":"query","description":"Comma separated list of company ids","schema":{"type":"string"}},{"name":"dateType","in":"query","description":"createTime or documentDate","schema":{"type":"string","default":"documentDate"}},{"name":"timeZone","in":"query","deprecated":true,"schema":{"type":"string"}},{"name":"indexedStart","in":"query","description":"A date and time in ISO 8601 format to filter out invoices started before. The invoices get filtered out based on their 'modifiedTime'.","schema":{"type":"string"}},{"name":"indexedEnd","in":"query","description":"A date and time in ISO 8601 format to filter out invoices started before. The invoices get filtered out based on their 'modifiedTime'.","schema":{"type":"string"}},{"name":"startDate","in":"query","description":"Exclude documents created earlier than this date and time. Date and time should be expressed in ISO 8601 format without timezone.","schema":{"type":"string"}},{"name":"endDate","in":"query","description":"Exclude documents created later than this date and time. Date and time should be expressed in ISO 8601 format without timezone.","schema":{"type":"string"}},{"name":"offset","in":"query","description":"How many results to skip, used for paging. There's a max limit on how many items to return in total (offset + limit) which is currently 10000. Narrow your search with startDate and endDate to avoid this max limit","schema":{"minimum":0,"type":"integer","format":"int32","default":0}},{"name":"limit","in":"query","description":"How many results to return, used for paging. There's a max limit on how many items to return in total (offset + limit) which is currently 10000. Narrow your search with startDate and endDate to avoid this max limit","schema":{"maximum":1000,"minimum":1,"type":"integer","format":"int32","default":10}},{"name":"sendMode","in":"query","description":"Send mode. Supports single value or comma-separated values (e.g., \"test,production\").<br> **Production** - Production mode. <br> **Certification** - Certification mode. Documents will be processed by Pagero Online but will not be delivered to the recipients. This can be useful during testing. <br> **Test** - Test mode. Documents will be delivered to the recipients but will be delivered in test mode if the recipients support it. Please note that not all recipients support test mode.","required":false,"schema":{"type":"string","enum":["Production","Certification","Test"],"default":"Production"}},{"name":"sort","in":"query","description":"The property to sort on. The default direction is ascending. Prepend property with '-' to sort in descending order.","required":false,"schema":{"type":"string","enum":["documentdate","-documentdate","createtime","-createtime","documentidentifier","-documentidentifier","distribution","-distribution"],"default":"-createtime"}},{"name":"restrictedValueKeys","in":"query","description":"Comma separated keys.  If this is provided, the response will include a restrictedValues array containing only the values that match the specified keys. If this is not provided, the restrictedValues array in the response will be empty.","schema":{"type":"string"}}],"responses":{"200":{"description":"List of line items","content":{"application/json":{"schema":{"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/AnalyticsInvoiceLineItem"}}}}}}}}}},"/large-exports":{"post":{"tags":["Large Exports"],"summary":"Create an Export","description":"*Note that this endpoint has not been optimized for external partners and therefore this endpoint will most likely be replaced with a 'better' one at some point.*\n\n### Integration with Download-Export API\nAfter starting an export you have to query the download-exports API to see the status of your export and eventually download it.\n\nList all of your exports from download-exports-service (If you have multiple exports then you can filter them by their name given in the request):\n\nGET https://api-dev.pageroonline.com/download-exports/v1/exports?serviceName=documentindexer-export\n\nIf the export is finished (its status is 'Completed') then it can be downloaded with this url:\n\nGET https://api.pageroonline.com/download-exports/v1/exports/{export_id}/payload\n\n*The download export API documentation is a work in progress and will be released in the near future.*\n\n### fieldsToOutput\nThis param is a bit tricky as different fields are available depending on the documentDirection, documentType and if you are exporting line-items or not. If you provide an empty list then an export will be created with the default fields. However if you want to customize which fields you want then you need to provide a comma separated list with all the fields that you want to export.\n\n#### Default Header-Level Fields (Available for all document types)\n* sellerParty.name\n* buyerParty.name\n* document_identifier\n* document_date\n* owner_customer_id\n* internal_interchange_id\n* clearance_id\n\n### Invoice Specific Header Fields (Default)\n* payment_due_date\n\n#### Invoice and Order Specific Header Fields (Default)\n* payment_currency\n* orders.buyer_order_number\n* agreementReference.buyer_id\n* total.net_amount\n* total.total_amount\n* totalVatAmount.value\n\n#### Application Response Header Fields (Default)\n* type_value\n* di.description\n* documentReference.date\n* documentReference.description\n* documentReference.id\n\n#### Direction-Specific Metadata Fields\n* metadata.distribution_outgoing_category (Sent documents only)\n* metadata.distribution_incoming_category (Received documents only)\n\n#### Party ID Mapping Fields\n**For Sent Invoices, Received Orders, and Sent Application Responses:**\n* buyerPartyIdMapping.erp\n* buyerPartyIdMapping.gs1\n* buyerPartyIdMapping.iban\n* buyerPartyIdMapping.incoming_eid\n* buyerPartyIdMapping.org_no\n* buyerPartyIdMapping.ovt\n* buyerPartyIdMapping.vat\n\n**For Received Invoices, Sent Orders, and Received Application Responses:**\n* sellerPartyIdMapping.erp\n* sellerPartyIdMapping.gs1\n* sellerPartyIdMapping.iban\n* sellerPartyIdMapping.incoming_eid\n* sellerPartyIdMapping.org_no\n* sellerPartyIdMapping.ovt\n* sellerPartyIdMapping.vat\n\n#### Advanced Analytics Header Fields (All Document Types)\n* type_text\n\n#### Advanced Analytics Header Fields (Invoices & Orders)\n* agreementReference.agreement_reference_id\n* total.total_prepaid_amount\n* totalVatAmount.rate\n* totalVatAmount.tax_name_type\n* totalVatAmount.vat_currency_amount\n* totalVatAmount.vat_exemption\n* totalVatAmount.vat_type\n* totalPrepaidAmount.prepaid_amount\n* totalPrepaidAmount.total_tax_value\n* di.project_id\n* di.create_time\n* di.receiver_references\n\n#### Advanced Analytics Row-Level Fields (Line Items)\n**For Invoice & Order Line Items:**\n* row.article_seller_id\n* row.article_standard_id\n* row.article_name\n* row.quantity\n* row.article_unit\n* row.net_amount\n* row.total_amount\n* row.unit_price\n* rowVatAmount.rate\n* rowVatAmount.value\n* rowVatAmount.tax_name_type\n* rowVatAmount.vat_currency_amount\n* rowVatAmount.vat_exemption\n* rowVatAmount.vat_type\n\n**For Application Response Line Items:**\n* row.code\n* row.text_value\n\nYou are exporting **received** documents if you the **documentDirection** is ***Sales*** and the **ExportDocumentType** is ***Order***. \n\nYou are also exporting **received** documents if you the **documentDirection** is ***Purchases*** and the **ExportDocumentType** are ***Invoice*** and  ***ApplicationResponse***. \n\n**Note:** Advanced Analytics fields require the Advanced Analytics feature to be enabled for your account. ","parameters":[{"name":"startDate","in":"query","description":"Exclude documents created earlier than this date and time. Date and time should be expressed in ISO 8601 format without timezone.","schema":{"type":"string"}},{"name":"endDate","in":"query","description":"Exclude documents created later than this date and time. Date and time should be expressed in ISO 8601 format without timezone.","schema":{"type":"string"}},{"name":"timeZone","in":"query","deprecated":true,"description":"Example 'Europe/Stockholm'","schema":{"type":"string"}},{"name":"dateType","in":"query","description":"Either 'documentDate' or 'createTime'.","schema":{"type":"string"}},{"name":"includeVat","in":"query","description":"Boolean","schema":{"type":"boolean"}},{"name":"sendMode","in":"query","description":"Send mode. Supports single value or comma-separated values (e.g., \"test,production\").<br> **Production** - Production mode. <br> **Certification** - Certification mode. Documents will be processed by Pagero Online but will not be delivered to the recipients. This can be useful during testing. <br> **Test** - Test mode. Documents will be delivered to the recipients but will be delivered in test mode if the recipients support it. Please note that not all recipients support test mode.","required":false,"schema":{"type":"string","enum":["Production","Certification","Test"],"default":"Production"}}],"requestBody":{"required":true,"description":"Export request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportRequest"}}}},"responses":{"201":{"description":"Export Job created"},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"500":{"description":"Internal Error"}}}}},"components":{"schemas":{"DocumentParty":{"type":"object","properties":{"name":{"type":"string"},"ids":{"type":"array","items":{"type":"string"}},"address":{"$ref":"#/components/schemas/Address"}}},"Address":{"type":"object","properties":{"street":{"type":"string"},"street2":{"type":"string"},"postBox":{"type":"string"},"postCode":{"type":"string"},"town":{"type":"string"},"district":{"type":"string"},"province":{"type":"string"},"region":{"type":"string"},"country":{"type":"string"},"countryCode":{"type":"string"}}},"AnalyticsTax":{"type":"object","properties":{"rate":{"type":"number","description":"Tax rate of the tax, expressed as a percentage.","format":"double"},"netAmount":{"type":"number","description":"Net amount to which the tax percent (rate) is applied to calculate the tax amount.","format":"double"},"value":{"type":"number","description":"Amount of this tax.","format":"double"}}},"TaxData":{"type":"object","properties":{"vatType":{"type":"string"},"vatCode":{"type":"string"},"rate":{"type":"number","format":"double"},"value":{"type":"number","format":"double"},"netAmount":{"type":"number","format":"double"},"vatCurrencyAmount":{"type":"number","format":"double"},"vatCurrencyNetAmount":{"type":"number","format":"double"},"vatCurrencyTotalAmount":{"type":"number","format":"double"},"vatExemption":{"type":"string"},"vatExemptionCode":{"type":"string"},"taxSubTypeName":{"type":"string"}}},"AnalyticsPayment":{"type":"object","properties":{"dueDate":{"type":"string","description":"Date as 'YYYY-MM-DD' on which Invoice is due."},"currency":{"type":"string","description":"Code signifying the default currency for this document as specified in ISO 4217"},"taxCurrency":{"type":"string","description":"Code signifying the currency used for tax amounts in the Invoice."}}},"AnalyticsInvoice":{"type":"object","properties":{"documentUUID":{"type":"string","description":"Unique identifier for this invoice. Assigned by Pagero. Sender and receiver will have distinctUUIDs for the same document."},"documentIdentifier":{"type":"string","description":"Identifier for this document, assigned by the sender."},"documentDate":{"type":"string","description":"The date, assigned by the sender, on which this document was issued as YYYY-MM-DD."},"createTime":{"type":"string","description":"Creation time of the document in the system, expressed in ISO 8601 format (yyyy-mm-ddThh:mm:ss.fffZ)."},"taxData":{"type":"array","items":{"$ref":"#/components/schemas/TaxData"}},"invoiceType":{"type":"string","deprecated":true,"description":"Code signifying the type of the Invoice e.g. Debit, Credit, Interest Note.","enum":["Autogiro","CommissionNote","Corrective","Credit","Debit","DebitNote","Interest","MeteredServices","NegativeInvoice","Prepayment","Proforma"]},"subType":{"type":"string","description":"Code signifying the sub type of the document."},"payment":{"$ref":"#/components/schemas/AnalyticsPayment"},"buyerParty":{"$ref":"#/components/schemas/DocumentParty"},"sellerParty":{"$ref":"#/components/schemas/DocumentParty"},"senderInternalTradingPartnerId":{"type":"string"},"receiverInternalTradingPartnerId":{"type":"string"},"total":{"$ref":"#/components/schemas/AnalyticsTotal"},"distribution":{"type":"string","description":"Distribution which is associated with this invoice.","enum":["electronic","email","print","scan"]},"documentReferences":{"type":"array","description":"Reference to previous invoices, e.g. for debit or credit. This reference is provided by the document issuer and does usually not reflect any identifier that is assigned by Pagero. Ideally the sender chooses to reference `documentIdentifier` values.","items":{"type":"string"}},"exchangeRate":{"type":"number","format":"double","description":"Exchange rate","deprecated":true},"exchange":{"$ref":"#/components/schemas/ExchangeRate"},"restrictedValues":{"type":"array","items":{"$ref":"#/components/schemas/RestrictedValue"}},"delivery":{"$ref":"#/components/schemas/Delivery"}}},"VatDetails":{"type":"object","properties":{"vatAmount":{"type":"number","description":"total vat amount of the invoice.","format":"double"},"taxPointDate":{"type":"string","format":"date","description":"date expressed in ISO 8601 format (yyyy-mm-dd)"}}},"AnalyticsTotal":{"type":"object","properties":{"totalAmount":{"type":"number","description":"Total amount, including discounts, charges and taxes.","format":"double"},"netAmount":{"type":"number","description":"Total net amount (including discounts and any charges). No taxes included.","format":"double"},"vatAmount":{"type":"number","description":"total vat amount of the invoice.","format":"double","deprecated":true},"netExcludingDiscountsAndCharges":{"type":"number","description":"Total net amount (excluding discounts or any charges). No taxes included.","format":"double"},"vatDetails":{"$ref":"#/components/schemas/VatDetails"}}},"Delivery":{"type":"object","properties":{"deliveryReferenceDate":{"type":"string","format":"date","description":"date expressed in ISO 8601 format (yyyy-mm-dd)"}}},"RestrictedValue":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}}},"ExchangeRate":{"type":"object","properties":{"rate":{"type":"number","format":"double"},"date":{"type":"string","description":"Exchange rate date expressed in ISO 8601 format (yyyy-mm-dd)","format":"date"},"sourceCurrencyCode":{"type":"string"},"targetCurrencyCode":{"type":"string"}}},"LineItemVatAmount":{"type":"object","properties":{"value":{"type":"number","description":"Vat value","format":"double"},"rate":{"type":"number","description":"Vat rate","format":"double"},"taxPointDate":{"type":"string","format":"date","description":"date expressed in ISO 8601 format (yyyy-mm-dd)"}}},"LineItemParty":{"type":"object","properties":{"name":{"type":"string","description":"Name for this party."},"ids":{"type":"array","description":"All ids for this party.","items":{"type":"string"}}}},"AnalyticsArticle":{"type":"object","properties":{"name":{"type":"string","description":"Optional name to describe the article"},"sellerId":{"type":"string","description":"Article id as defined by the seller"},"buyerId":{"type":"string","description":"Article id as defined by the buyer"},"standardId":{"type":"string","description":"Article standard id. This could be an EAN or any other standardized way to identify articles or services"},"unit":{"type":"string","description":"Unit to measure when describing the base quantity of the article."}}},"Row":{"type":"object","properties":{"article":{"$ref":"#/components/schemas/AnalyticsArticle","description":"Optional name to describe the article"},"quantity":{"type":"number","description":"Quantity","format":"double"},"unitPrice":{"type":"number","description":"Unit price","format":"double"},"netAmount":{"type":"number","description":"Net amount","format":"double"},"vatAmount":{"$ref":"#/components/schemas/LineItemVatAmount"},"totalAmount":{"type":"number","description":"Total line amount","format":"double"},"id":{"type":"string","description":"Line Id"},"taxData":{"type":"array","items":{"$ref":"#/components/schemas/TaxData"}},"exchangeRate":{"type":"number","format":"double","description":"Exchange rate","deprecated":true},"exchange":{"$ref":"#/components/schemas/ExchangeRate"},"delivery":{"$ref":"#/components/schemas/Delivery"},"restrictedValues":{"type":"array","items":{"$ref":"#/components/schemas/RestrictedValue"}}}},"AnalyticsInvoiceLineItem":{"type":"object","properties":{"documentUUID":{"type":"string","description":"Unique identifier for the invoice the row is contained. Assigned by Pagero. Sender and receiver will have distinct UUIDs for the same document."},"documentIdentifier":{"type":"string","description":"Identifier for this document, assigned by the sender."},"documentDate":{"type":"string","description":"Date, assigned by the sender, on which this document was issued as YYYY-MM-DD."},"createTime":{"type":"string","description":"Creation time of the document in the system, expressed in ISO 8601 format (yyyy-mm-ddThh:mm:ss.fffZ)."},"invoiceType":{"type":"string","deprecated":true,"description":"Code signifying the type of the Invoice e.g. Debit, Credit, Interest Note.","enum":["Autogiro","CommissionNote","Corrective","Credit","Debit","DebitNote","Interest","MeteredServices","NegativeInvoice","Prepayment","Proforma"]},"subType":{"type":"string","description":"Code signifying the sub type of the document."},"payment":{"$ref":"#/components/schemas/AnalyticsPayment"},"buyerParty":{"$ref":"#/components/schemas/LineItemParty"},"sellerParty":{"$ref":"#/components/schemas/LineItemParty"},"senderInternalTradingPartnerId":{"type":"string"},"receiverInternalTradingPartnerId":{"type":"string"},"rows":{"type":"array","items":{"$ref":"#/components/schemas/Row"}}}},"ExportRequest":{"type":"object","required":["documentDirection","exportEntries","exportFormat","documentType","companyIds"],"properties":{"exportName":{"type":"string","description":"Name of the Export.","example":"analytics-export"},"documentDirection":{"type":"string","description":"Direction of the documents to export","enum":["sales","purchases"],"example":"sales"},"exportEntries":{"type":"string","description":"Type of entries to export","enum":["documents","line-items"],"example":"documents"},"exportFormat":{"type":"string","description":"Format of the exported file","enum":["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","text/csv"],"example":"text/csv"},"documentType":{"type":"string","description":"Type of documents to export","enum":["invoice","order","application_response"],"example":"invoice"},"fieldsToOutput":{"type":"array","description":"List of fields to include in the export. If empty, default fields will be exported.","items":{"type":"string"},"example":["documentIdentifier","documentDate","total.totalAmount"]},"companyIds":{"type":"array","description":"List of company IDs to export data for","items":{"type":"string"},"example":["123","42d5aab0-072c-49b9-a152-8a27e83acca9"]}}}},"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}}}}