{ "openapi": "3.0.1", "info": { "title": "Basware APIs for Purchase-to-Pay and Master Data import", "description": "The Basware APIs documented here are for Purchase-to-Pay use cases and for importing Master Data to Basware services. This document describes data schemas and available methods. Basware APIs work using REST API calls initiated by customer. Please visit the [P2P API pages](https://developer.basware.com/api/p2p) on Basware API developer site for full API documentation.\n\n**Data formats**\n\nBasware APIs use JSON data format with UTF-8 character encoding. **Descriptions of data fields are under the API methods, on tab 'Schema'.** The API has a rich set of fields, many of which are optional. Simplified example requests are available as a downloadable Postman collection on the [preconfigured API calls](https://developer.basware.com/api/p2p/templates) section on Basware API developer site.\n\n**Authentication**\n\nAPI clients authenticate using [OAUTH2 or Basic HTTP authentication](https://developer.basware.com/api/p2p/manual#Authentication). All communication is secured by using the HTTPS protocol (HTTP over TLS, TLS version 1.2 or later). You must make all API requests over HTTPS. API requests made without authentication are not accepted. API clients need to take into account that Basware domain certificates are renewed regularly. For details see, the [authentication and access rights](https://developer.basware.com/api/p2p/manual#Authentication) section on the Basware API developer site.\n\n**Record identifiers**\n\nAll records have an external identifier (externalCode or invoiceId). This needs to be provided when posting new records, updating existing records or getting a single record by ID through Basware API.\n\nExternalCode identifiers need to be unique within an interface and record codes (such as accountCode) need to be unique within a company. This applies per API account (tenant) - different API accounts can have same externalCodes and record codes. \n\n**Push notifications**\n\nBasware API is able to send webhook based [push notifications](https://developer.basware.com/api/p2p/manual#PushNotifications) from accountingDocuments, exportedPurchaseOrders, exportedPurchaseRequisitions, exportedContracts, exportedContractSpends and requestStatus APIs. For details, see the [push notifications](https://developer.basware.com/api/p2p/manual#PushNotifications) section on Basware API developer site.\n\n**API Versioning**\n\nEvery time there is a backwards-incompatible change to the API, a new major version will be released. This major version is part of the URL path. The current major version is v1.\n\nUnless informed by our technical support department that we are discontinuing support for a particular API version, you do not need to switch API versions. We will let you know at least 12 months in advance if an old API version is to be deprecated.\n\nMajor change is a new version of the API that requires changes from the API consumer before the new version can be taken into use. This change would for example be a change to existing fields or adding new mandatory fields. \n\nMinor change is a new version of the API that is backward compatible and does not require changes from the API consumer. Minor change would consist of for example adding a new non-mandatory field. Please make sure your API client accepts new non-mandatory fields.\n\n**API Client requirements**\n\nAPI clients need to accept new JSON fields as well as absence of null fields from the response JSONs.\n\nConsecutive API calls are needed for processing large amounts of records. The record limit varies by endpoint. It is 100 for AccountingDocuments, MatchingOrderLines and PurchaseRequisitions, 200 for vendors, 500 for most other APIs. Size of each incoming request is also limited to 6mb. Please distribute the payload over multiple requests to stay below the respective limits.\n\nPrograms using Basware API need to handle redirects either at the application layer or the HTTP layer since certain APIs allow larger payloads by redirecting the response.\n\n***\n_File version: 26.06.05.402._", "version": "v1" }, "servers": [ { "url": "" } ], "paths": { "/v1/accountingDocuments": { "get": { "tags": [ "AccountingDocuments" ], "summary": "Returns invoices approved for transfer to accounting.", "description": "Notes: \r\n1) This API supports sending webhook based [push notifications](https://developer.basware.com/api/p2p/manual#PushNotifications) when new data is available to be exported. \r\n2) This GET operation returns a HTTP redirect, which the API client needs to follow. \r\nPlease see section \"[Usage scenario 3: Prebook and transfer invoice to Accounting](https://developer.basware.com/api/p2p/manual#usage3)\" of Basware Purchase-to-Pay API manual for details on implementing invoice transfer process with Basware API.", "parameters": [ { "name": "ProcessingStatus", "in": "query", "description": "Document status filter. Returns items by accounting document status.\r\n \n To get new invoices waiting for transfer, use filter 'WaitingForTransfer'. See [diagram on developer site](https://developer.basware.com/api/p2p/manual#ProcessingStatusDiagram) for details on available status transitions.\r\n \n⚠️ Important: Enrichment-related statuses (e.g. 'WaitingForEnrichmentTransfer', 'EnrichmentTransferInProgress', 'EnrichmentTransferred', 'EnrichmentTransferFailed') are only applicable when 'p2pProcessingMode=InvoiceEnrichment' is used.\r\n \nIf these statuses are used without setting 'p2pProcessingMode=InvoiceEnrichment', no results will be returned.\n", "schema": { "enum": [ "WaitingForPrebook", "PrebookInProgress", "Prebooked", "PrebookFailed", "WaitingForTransfer", "TransferInProgress", "Transferred", "TransferFailed", "WaitingForPrebookCancelation", "PrebookCancelationInProgress", "PrebookCanceled", "PrebookCancelFailed", "WaitingToBeRemoved", "Removed", "RemoveFailed", "WaitingToBeReturned", "Returned", "ReturnFailed", "WaitingToBeCompleted", "CompletionInProgress", "Completed", "CompletionFailed", "Paid", "New", "WaitingForEnrichmentTransfer", "EnrichmentTransferInProgress", "EnrichmentTransferred", "EnrichmentTransferFailed", "InDocumentFilter", "DocumentFilterReleased" ], "type": "string" } }, { "name": "pageSize", "in": "query", "description": "A limit for the number of items to be returned for one request. Limit can range between 1 and 100 items. For invoices with large numbers of coding rows, number of invoices returned will be less in order to limit response message size.", "schema": { "type": "integer", "format": "int32", "default": 100 } }, { "name": "companyCode", "in": "query", "description": "Company filter. Returns items for specific company.", "schema": { "type": "string", "default": "" } }, { "name": "lastUpdated", "in": "query", "description": "Date filter. Returns items that have been updated after specified date.", "schema": { "type": "string", "format": "date-time" } }, { "name": "p2pProcessingMode", "in": "query", "description": "Defines the P2P flow type for which invoices are being returned. 'Standard' refers to the standard P2P flow where transferred invoices are already approved for payment. 'InvoiceEnrichment' refers to using P2P to only validate and enrich invoice contents - in this case the approval for payment is expected to be done in another system. Default: Standard. Both types of documents are not returned in the same request.\r\n \n⚠️ Note: To retrieve documents in enrichment-related ProcessingStatus values, this parameter must be set to 'InvoiceEnrichment'.\n", "schema": { "enum": [ "Standard", "InvoiceEnrichment" ], "type": "string", "default": "Standard" } }, { "name": "x-amz-meta-continuationtoken", "in": "header", "description": "Used to get next page of results when item count indicated by 'pageSize' is exceeded. A token is returned in header (not body) parameter 'X-amz-meta-continuationToken' of the response whenever there are more records to fetch. Post the received value here in a new HEADER parameter on the next GET request to receive the next page of results. When getting the next page of results, you must include the same query parameters that were used when getting the first page.", "schema": { "type": "string" }, "example": "e799fdb7-222c-4e0f-af2f-881f4beae654" } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/AccountingDocumentResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/AccountingDocumentResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/AccountingDocumentResponse" } } } }, "302": { "description": "Redirect" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found. Request was successful and no records were found." }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } }, "delete": { "tags": [ "AccountingDocuments" ], "summary": "Deletes data from Basware API. For manual one-time operations.", "description": "For manual one-time operations only, such as a manual clean-up to remove test data generated during API integration development. Only removes records from API layer. \r\nDeletion in target systems needs to be done separately using the data deletion mechanisms available in each of the target system in addition to deleting the data in Basware API.", "requestBody": { "description": "Contains the body of the request.\r\n Either externalCode or lastUpdated -field is required. If both values are provided, externalCode will have the priority.", "content": { "application/json-patch+json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } }, "application/json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } } } }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } } } }, "202": { "description": "RequestAccepted", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } } } }, "400": { "description": "BadRequest", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "401": { "description": "Unauthorized" }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } } }, "/v1/accountingDocuments/{invoiceId}": { "get": { "tags": [ "AccountingDocuments" ], "summary": "Returns single approved invoice by invoiceId -identifier.", "description": "Note: This GET operation returns a HTTP redirect, which the API client needs to follow. \r\n* 'Authorization' header must not be included in the redirected request (the second request after receiving a redirect). \r\n* 'Host' header needs to be included.\r\n\r\nPlease see section \"[Usage scenario 3: Prebook and transfer invoice to Accounting](https://developer.basware.com/api/p2p/manual#usage3)\" of Basware Purchase-to-Pay API manual for details on implementing invoice transfer process with Basware API.", "parameters": [ { "name": "invoiceId", "in": "path", "description": "The Invoice Id of the entity to be fetched", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/AccountingDocumentResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/AccountingDocumentResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/AccountingDocumentResponse" } } } }, "302": { "description": "Redirect" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found. Request was successful and no records were found." }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } } }, "/v1/accountingDocuments/{invoiceId}/acknowledge": { "post": { "tags": [ "AccountingDocuments" ], "summary": "Acknowledged invoices are no longer offered for next GET operation. Done right after GET, before transferResponse.", "description": "Notes: \r\n1) Updates 'processingStatus' -field on the invoice to allow filtering out the invoice on the next GET operation. \r\n2) For an invoice which is already acknowledged (processingStatus: 'TransferInProgress' or 'PrebookInProgress'), API will return 405 'Method not allowed' if acknowledge is attempted again on the invoice.\r\n \r\nPlease see section \"[Usage scenario 3: Prebook and transfer invoice to Accounting](https://developer.basware.com/api/p2p/manual#usage3)\" of Basware Purchase-to-Pay API manual for details on implementing invoice transfer process with Basware API.", "parameters": [ { "name": "invoiceId", "in": "path", "description": "Invoice Id of the accountingDocument to be acknowledged.", "required": true, "schema": { "type": "string" } }, { "name": "Content-Type", "in": "header", "description": "Specifies the media type of the resource. Value application/json is supported.", "schema": { "type": "string" }, "example": "application/json" } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "type": "string" } }, "application/json": { "schema": { "type": "string" } }, "text/json": { "schema": { "type": "string" } } } }, "400": { "description": "Bad Request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found. Record to acknowledge not found." }, "405": { "description": "Method Not allowed. This generally happens when trying to acknowledge an accountingDocument that is already acknowledged." }, "500": { "description": "Unexpected error" } } } }, "/v1/accountingDocuments/{invoiceId}/enrichmentResponses": { "post": { "tags": [ "AccountingDocuments" ], "summary": "Marks invoice transfer P2P as accepted / rejected by receiving system. Used with invoices having 'p2pProcessingMode' = 'InvoiceEnrichment' which are not approved for payment.", "description": "Notes: \r\n1) Enrichment responses for already enrichment transferred invoices are not allowed.\r\n2) Please do not send acknowledge and enrichmentResponse for at the same time for the same invoice. If acknowledge is used, please wait for acknowledge to complete before sending the enrichmentResponse.\r\n3) Only latest 100 responses will be saved per invoice.\r\n\r\nPlease see section \"[Usage scenario 3: Prebook and transfer invoice to Accounting](https://developer.basware.com/api/p2p/manual#usage3)\" of Basware Purchase-to-Pay API manual for details on implementing invoice transfer process with Basware API.", "parameters": [ { "name": "invoiceId", "in": "path", "description": "Invoice Id of the accountingDocument to be updated", "required": true, "schema": { "type": "string" } }, { "name": "Content-Type", "in": "header", "description": "Specifies the media type of the resource. Value application/json is supported.", "schema": { "type": "string" }, "example": "application/json" } ], "requestBody": { "description": "Transfer response to be added to accountingDocument", "content": { "application/json-patch+json": { "schema": { "$ref": "#/components/schemas/EnrichmentResponseEntity" } }, "application/json": { "schema": { "$ref": "#/components/schemas/EnrichmentResponseEntity" } }, "text/json": { "schema": { "$ref": "#/components/schemas/EnrichmentResponseEntity" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/EnrichmentResponseEntity" } } } }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/EnrichmentResponseEntity" } }, "application/json": { "schema": { "$ref": "#/components/schemas/EnrichmentResponseEntity" } }, "text/json": { "schema": { "$ref": "#/components/schemas/EnrichmentResponseEntity" } } } }, "400": { "description": "Bad request", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found. Record to update not found." }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } } }, "/v1/accountingDocuments/{invoiceId}/prebookResponses": { "post": { "tags": [ "AccountingDocuments" ], "summary": "Marks invoice prebooking as accepted / rejected by receiving system.", "description": "Notes: \r\n1. Prebook responses for already prebooked invoices (where processingStatus = 'Prebooked') are not allowed.\r\n2. Saving voucher numbers and payment block -information to the invoice in P2P requires a succesful prebook response from ERP ('success' = 'true'). The responseMessage gets saved also when success = false.\r\n3. Please do not send acknowledge and prebookResponse at the same time for the same invoice. If acknowledge is used, please wait for acknowledge to complete before sending the transferResponse.\r\n4. Prebook failed -invoices (success = false) are processed manually in P2P.\r\n5. Only latest 100 responses will be saved per invoice.\r\n\r\nPlease see section \"[Usage scenario 3: Prebook and transfer invoice to Accounting](https://developer.basware.com/api/p2p/manual#usage3)\" of Basware Purchase-to-Pay API manual for details on implementing invoice transfer process with Basware API.", "parameters": [ { "name": "invoiceId", "in": "path", "description": "Invoice Id of the accountingDocument to be updated", "required": true, "schema": { "type": "string" } }, { "name": "Content-Type", "in": "header", "description": "Specifies the media type of the resource. Value application/json is supported.", "schema": { "type": "string" }, "example": "application/json" } ], "requestBody": { "description": "Prebook responses to be added to accountingDocument", "content": { "application/json-patch+json": { "schema": { "$ref": "#/components/schemas/PrebookResponseEntity" } }, "application/json": { "schema": { "$ref": "#/components/schemas/PrebookResponseEntity" } }, "text/json": { "schema": { "$ref": "#/components/schemas/PrebookResponseEntity" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/PrebookResponseEntity" } } } }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/PrebookResponseEntity" } }, "application/json": { "schema": { "$ref": "#/components/schemas/PrebookResponseEntity" } }, "text/json": { "schema": { "$ref": "#/components/schemas/PrebookResponseEntity" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Not Found. Record to update not found." }, "409": { "description": "Conflict", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "400": { "description": "Bad request" } } } }, "/v1/accountingDocuments/{invoiceId}/transferResponses": { "post": { "tags": [ "AccountingDocuments" ], "summary": "Marks invoice transfer as accepted / rejected by receiving system. Used with invoices having 'p2pProcessingMode' = 'Standard' which are approved for payment.", "description": "Notes: \r\n1) Transfer responses for already transferred invoices (where processingStatus = 'Transferred') are not allowed. \r\n2) Saving voucher numbers and payment block -information to the invoice in P2P requires a succesful transfer to ERP ('success' = 'true'). The responseMessage gets saved also when success = false. \r\n3) Please do not send acknowledge and transferResponse for at the same time for the same invoice. If acknowledge is used, please wait for acknowledge to complete before sending the transferResponse. \r\n4) Only latest 100 responses will be saved per invoice.\r\n\r\nPlease see section \"[Usage scenario 3: Prebook and transfer invoice to Accounting](https://developer.basware.com/api/p2p/manual#usage3)\" of Basware Purchase-to-Pay API manual for details on implementing invoice transfer process with Basware API.", "parameters": [ { "name": "invoiceId", "in": "path", "description": "Invoice Id of the accountingDocument to be updated", "required": true, "schema": { "type": "string" } }, { "name": "Content-Type", "in": "header", "description": "Specifies the media type of the resource. Value application/json is supported.", "schema": { "type": "string" }, "example": "application/json" } ], "requestBody": { "description": "Transfer response to be added to accountingDocument", "content": { "application/json-patch+json": { "schema": { "$ref": "#/components/schemas/TransferResponseEntity" } }, "application/json": { "schema": { "$ref": "#/components/schemas/TransferResponseEntity" } }, "text/json": { "schema": { "$ref": "#/components/schemas/TransferResponseEntity" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/TransferResponseEntity" } } } }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/TransferResponseEntity" } }, "application/json": { "schema": { "$ref": "#/components/schemas/TransferResponseEntity" } }, "text/json": { "schema": { "$ref": "#/components/schemas/TransferResponseEntity" } } } }, "400": { "description": "Bad request", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found. Record to update not found." }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } } }, "/v1/accountingDocuments/{invoiceId}/paymentResponses": { "post": { "tags": [ "AccountingDocuments" ], "summary": "Updates invoice payment information, including payment date.", "description": "Notes: \r\n1) Payment response can be sent multiple times for the same invoice (for example when updating partial payments). When sending multiple payment responses to the same invoice, externalCode needs to be different on each of the paymentResponse updates. \r\n2) Please post a payment response only when data related to it on the invoice has changed (do not post same contents repeatedly).\r\n3) Fields not included on the payment response will be cleared (e.g. paymentMethod). \r\n4) Current date is defaulted as payment date if payment date is empty. \r\n5) Only latest 100 responses will be saved per invoice.\r\n\r\nPlease see section \"[Usage scenario 3: Prebook and transfer invoice to Accounting](https://developer.basware.com/api/p2p/manual#usage3)\" of Basware Purchase-to-Pay API manual for details on implementing invoice transfer process with Basware API.", "parameters": [ { "name": "invoiceId", "in": "path", "description": "Invoice Id of the accountingDocument to be updated", "required": true, "schema": { "type": "string" } }, { "name": "Content-Type", "in": "header", "description": "Specifies the media type of the resource. Value application/json is supported.", "schema": { "type": "string" }, "example": "application/json" } ], "requestBody": { "description": "Payment response to be added to accountingDocument", "content": { "application/json-patch+json": { "schema": { "$ref": "#/components/schemas/PaymentResponseEntity" } }, "application/json": { "schema": { "$ref": "#/components/schemas/PaymentResponseEntity" } }, "text/json": { "schema": { "$ref": "#/components/schemas/PaymentResponseEntity" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/PaymentResponseEntity" } } } }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/PaymentResponseEntity" } }, "application/json": { "schema": { "$ref": "#/components/schemas/PaymentResponseEntity" } }, "text/json": { "schema": { "$ref": "#/components/schemas/PaymentResponseEntity" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found. Record to update not found." }, "409": { "description": "Conflict", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "400": { "description": "Bad request" } } } }, "/v1/accountingDocuments/status": { "get": { "tags": [ "AccountingDocuments" ], "summary": "Returns high level invoice status by search criteria such as company code, invoice number and invoice date.", "description": "This API receives search criteria such as company code, invoice number, invoice date and gross sum and returns the status, i.e. ‘In Approval Process’, ‘Ready For Payment’, ‘Paid’ or ‘Rejected’. This API can return data also for invoices transferred to ERP outside of Basware API using a webservice or file based integration (Anyerp transferred invoices). \r\n\r\nFollowing high-level statuses are returned. \r\n* InApprovalProcess - Invoice has been received in Basware P2P and is being processed. This includes all invoice statuses before succesful transfer to ERP.\r\n* ReadyForPayment - Invoice is approved for payment and has been transferred to ERP system.\r\n* Paid - Invoice has been paid.\r\n* Rejected - Invoice has been rejected.\r\n\r\nNotes:\r\n1) The API returns only status information and the invoiceId(s). If more information regarding the returned invoice(s) is required, doing a GET accountingDocuments/{invoiceId} query will return the full invoice details.\r\n2) To enable this feature for your organization, please contact your Basware consultant or Basware Support. Before the API is enabled, it will return no results. \r\n\r\nPlease see section \"[Usage scenario 7: Retrieve invoice status](https://developer.basware.com/api/p2p/manual#usage8)\" of Basware Purchase-to-Pay API manual for details on retrieving invoice status through Basware API.", "parameters": [ { "name": "companyCode", "in": "query", "description": "Company filter. Returns invoices for specified company.", "required": true, "schema": { "type": "string" } }, { "name": "invoiceNumber", "in": "query", "description": "Invoice number filter. Returns invoices having specified invoice number.", "required": true, "schema": { "type": "string" } }, { "name": "invoiceDate", "in": "query", "description": "Invoice date filter. Returns invoices having specified invoice date.", "required": true, "schema": { "type": "string", "format": "date-time" } }, { "name": "grossSum", "in": "query", "description": "Gross sum filter. Returns invoices having specified gross sum.", "schema": { "type": "number", "format": "double" } }, { "name": "pageSize", "in": "query", "description": "Page size filter. A limit for the number of items to be returned for one request. Limit can range between 1 and 500 items.", "schema": { "type": "integer", "format": "int32", "default": 500 } } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AccountingDocumentsStatusResponseEntity" } } }, "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AccountingDocumentsStatusResponseEntity" } } }, "text/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AccountingDocumentsStatusResponseEntity" } } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found. Request was successful and no records were found." }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } } }, "/v1/accountingDocuments/{invoiceId}/attachments/{attachmentExternalCode}": { "get": { "tags": [ "AccountingDocuments" ], "summary": "Returns invoice attachment(s) by attachmentExternalCode identifier.", "description": "This API returns invoice attachments(s) by invoiceId and attachmentExternalCode identifiers. The attachmentExternalCode identifiers are available on the attachments block in main accountingDocuments API. \r\n\r\nNotes: \r\n 1) The API response redirects to a pre-signed URL. Make sure your API client will follow the '302' redirect to the returned new URL. The pre-signed URL will be valid for 15min.\r\n 2) This API is enabled manually through CMN_TENANT_SETTINGS parameter 'OpenApi.SendInvoiceAttachments' in P2P.", "parameters": [ { "name": "invoiceId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "attachmentExternalCode", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK" }, "302": { "description": "Found" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found. No attachment found by given attachmentExternalCode." }, "500": { "description": "Internal Server Error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } } }, "/v1/accounts": { "get": { "tags": [ "Accounts" ], "summary": "Returns accounts posted to Basware API.", "description": "", "parameters": [ { "name": "pageSize", "in": "query", "description": "A limit for the number of items to be returned for one request. Li\r\n items.", "schema": { "type": "integer", "format": "int32", "default": 500 } }, { "name": "companyCode", "in": "query", "description": "Company filter. Returns items for specific company.", "schema": { "type": "string", "default": "" } }, { "name": "lastUpdated", "in": "query", "description": "Date Filter. Returns items that have been updated after specified date.", "schema": { "type": "string", "format": "date-time" } }, { "name": "x-amz-meta-continuationtoken", "in": "header", "description": "Used to get next page of results when item count indicated by 'pageSize' is exceeded. A token is returned in header (not body) parameter 'X-amz-meta-continuationToken' of the response whenever there are more records to fetch. Post the received value here in a new HEADER parameter on the next GET request to receive the next page of results. When getting the next page of results, you must include the same query parameters that were used when getting the first page.", "schema": { "type": "string" }, "example": "221441a1-6c9a-42e2-a83d-0dae76effbf5" } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/AccountResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/AccountResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/AccountResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found. Request was successful and no records were found." }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } }, "post": { "tags": [ "Accounts" ], "summary": "Creates new account(s), fully overwrites previous record if exists.", "parameters": [ { "name": "Content-Type", "in": "header", "description": "Specifies the media type of the resource. Value application/json is supported.", "schema": { "type": "string" }, "example": "application/json" } ], "requestBody": { "content": { "application/json-patch+json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AccountEntity" } } }, "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AccountEntity" } } }, "text/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AccountEntity" } } }, "application/*+json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AccountEntity" } } } } }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AccountEntity" } } }, "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AccountEntity" } } }, "text/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AccountEntity" } } } } }, "400": { "description": "Bad request", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "401": { "description": "Unauthorized" }, "409": { "description": "Conflict", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } }, "delete": { "tags": [ "Accounts" ], "summary": "Deletes data from Basware API. For manual one-time operations.", "description": "For manual one-time operations only, such as a manual clean-up to remove test data generated during API integration development. Only removes records from API layer. \r\nDeletion in target systems needs to be done separately using the data deletion mechanisms available in each of the target system in addition to deleting the data in Basware API.", "requestBody": { "description": "Contains the body of the request.\r\n Either externalCode or lastUpdated -field is required. If both values are provided, externalCode will have the priority.", "content": { "application/json-patch+json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } }, "application/json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } } } }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } } } }, "202": { "description": "RequestAccepted", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } } } }, "400": { "description": "BadRequest", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "401": { "description": "Unauthorized" }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } } }, "/v1/accounts/{externalCode}": { "get": { "tags": [ "Accounts" ], "summary": "Returns single account record by externalCode -identifier.", "description": "", "parameters": [ { "name": "externalCode", "in": "path", "description": "The ExternalCode of the entity to be fetched", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/AccountEntity" } }, "application/json": { "schema": { "$ref": "#/components/schemas/AccountEntity" } }, "text/json": { "schema": { "$ref": "#/components/schemas/AccountEntity" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found. Request was successful and no records were found." }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } }, "patch": { "tags": [ "Accounts" ], "summary": "Updates fields on specified account. Preserves existing values in fields, which were not updated.", "description": "Note: Basware API considers 'null' value in field(s) equivalent to the field(s) not being sent. For this reason patch method does not support setting field values to 'null'.", "parameters": [ { "name": "externalCode", "in": "path", "description": "The ExternalCode of the account to be updated", "required": true, "schema": { "type": "string" } } ], "requestBody": { "description": "Entity to be updated", "content": { "application/json-patch+json": { "schema": { "$ref": "#/components/schemas/AccountEntity" } }, "application/json": { "schema": { "$ref": "#/components/schemas/AccountEntity" } }, "text/json": { "schema": { "$ref": "#/components/schemas/AccountEntity" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/AccountEntity" } } } }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/AccountEntity" } }, "application/json": { "schema": { "$ref": "#/components/schemas/AccountEntity" } }, "text/json": { "schema": { "$ref": "#/components/schemas/AccountEntity" } } } }, "400": { "description": "Bad request", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found. Record to update not found." }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } } }, "/v1/advancedPermissions": { "get": { "tags": [ "AdvancedPermissions" ], "summary": "Returns advanced user rights -records posted to Basware API.", "description": "", "parameters": [ { "name": "pageSize", "in": "query", "description": "A limit for the number of items to be returned for one request. Li\r\n items.", "schema": { "type": "integer", "format": "int32", "default": 500 } }, { "name": "companyCode", "in": "query", "description": "Company filter. Returns items for specific company.", "schema": { "type": "string", "default": "" } }, { "name": "lastUpdated", "in": "query", "description": "Date Filter. Returns items that have been updated after specified date.", "schema": { "type": "string", "format": "date-time" } }, { "name": "x-amz-meta-continuationtoken", "in": "header", "description": "Used to get next page of results when item count indicated by 'pageSize' is exceeded. A token is returned in header (not body) parameter 'X-amz-meta-continuationToken' of the response whenever there are more records to fetch. Post the received value here in a new HEADER parameter on the next GET request to receive the next page of results. When getting the next page of results, you must include the same query parameters that were used when getting the first page.", "schema": { "type": "string" }, "example": "2701ea15-a2c9-43b1-a48b-3a840c78b668" } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/AdvancedPermissionResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/AdvancedPermissionResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/AdvancedPermissionResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found. Request was successful and no records were found." }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } }, "post": { "tags": [ "AdvancedPermissions" ], "summary": "Creates new advanced user rights -record(s), fully overwrites previous record if exists.", "parameters": [ { "name": "Content-Type", "in": "header", "description": "Specifies the media type of the resource. Value application/json is supported.", "schema": { "type": "string" }, "example": "application/json" } ], "requestBody": { "content": { "application/json-patch+json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AdvancedPermissionEntity" } } }, "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AdvancedPermissionEntity" } } }, "text/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AdvancedPermissionEntity" } } }, "application/*+json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AdvancedPermissionEntity" } } } } }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AdvancedPermissionEntity" } } }, "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AdvancedPermissionEntity" } } }, "text/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AdvancedPermissionEntity" } } } } }, "400": { "description": "Bad request", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "401": { "description": "Unauthorized" }, "409": { "description": "Conflict", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } }, "delete": { "tags": [ "AdvancedPermissions" ], "summary": "Deletes data from Basware API. For manual one-time operations.", "description": "For manual one-time operations only, such as a manual clean-up to remove test data generated during API integration development. Only removes records from API layer. \r\nDeletion in target systems needs to be done separately using the data deletion mechanisms available in each of the target system in addition to deleting the data in Basware API.", "requestBody": { "description": "Contains the body of the request.\r\n Either externalCode or lastUpdated -field is required. If both values are provided, externalCode will have the priority.", "content": { "application/json-patch+json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } }, "application/json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } } } }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } } } }, "202": { "description": "RequestAccepted", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } } } }, "400": { "description": "BadRequest", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "401": { "description": "Unauthorized" }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } } }, "/v1/advancedPermissions/{externalCode}": { "get": { "tags": [ "AdvancedPermissions" ], "summary": "Returns single advanced user rights -record by externalCode -identifier.", "description": "", "parameters": [ { "name": "externalCode", "in": "path", "description": "The ExternalCode of the entity to be fetched", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/AdvancedPermissionEntity" } }, "application/json": { "schema": { "$ref": "#/components/schemas/AdvancedPermissionEntity" } }, "text/json": { "schema": { "$ref": "#/components/schemas/AdvancedPermissionEntity" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found. Request was successful and no records were found." }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } }, "patch": { "tags": [ "AdvancedPermissions" ], "summary": "Updates fields on specified advanced user rights -record. Preserves existing values in fields, which were not updated.", "description": "Note: Basware API considers 'null' value in field(s) equivalent to the field(s) not being sent. For this reason patch method does not support setting field values to 'null'.", "parameters": [ { "name": "externalCode", "in": "path", "description": "The ExternalCode of the AdvancedPermission to be updated", "required": true, "schema": { "type": "string" } } ], "requestBody": { "description": "Entity to be updated", "content": { "application/json-patch+json": { "schema": { "$ref": "#/components/schemas/AdvancedPermissionEntity" } }, "application/json": { "schema": { "$ref": "#/components/schemas/AdvancedPermissionEntity" } }, "text/json": { "schema": { "$ref": "#/components/schemas/AdvancedPermissionEntity" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/AdvancedPermissionEntity" } } } }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/AdvancedPermissionEntity" } }, "application/json": { "schema": { "$ref": "#/components/schemas/AdvancedPermissionEntity" } }, "text/json": { "schema": { "$ref": "#/components/schemas/AdvancedPermissionEntity" } } } }, "400": { "description": "Bad request", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found. Record to update not found." }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } } }, "/v1/advancedValidations": { "get": { "tags": [ "AdvancedValidations" ], "summary": "Returns coding row validation rules posted to Basware API.", "description": "", "parameters": [ { "name": "pageSize", "in": "query", "description": "A limit for the number of items to be returned for one request. Limit can range between 1 and 500 items.", "schema": { "type": "integer", "format": "int32", "default": 500 } }, { "name": "companyCode", "in": "query", "description": "Company filter. Returns items for specific company.", "schema": { "type": "string", "default": "" } }, { "name": "lastUpdated", "in": "query", "description": "Date Filter. Returns items that have been updated after specified date.", "schema": { "type": "string", "format": "date-time" } }, { "name": "x-amz-meta-continuationtoken", "in": "header", "description": "Used to get next page of results when item count indicated by 'pageSize' is exceeded. A token is returned in header (not body) parameter 'X-amz-meta-continuationToken' of the response whenever there are more records to fetch. Post the received value here in a new HEADER parameter on the next GET request to receive the next page of results. When getting the next page of results, you must include the same query parameters that were used when getting the first page.", "schema": { "type": "string" }, "example": "359557b5-7f8b-4ec1-a65c-ec8a362640ea" } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/AdvancedValidationResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/AdvancedValidationResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/AdvancedValidationResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found. Request was successful and no records were found." }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } }, "post": { "tags": [ "AdvancedValidations" ], "summary": "Creates new coding row validation rule(s), fully overwrites previous record if exists.", "parameters": [ { "name": "Content-Type", "in": "header", "description": "Specifies the media type of the resource. Value application/json is supported.", "schema": { "type": "string" }, "example": "application/json" } ], "requestBody": { "content": { "application/json-patch+json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AdvancedValidationEntity" } } }, "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AdvancedValidationEntity" } } }, "text/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AdvancedValidationEntity" } } }, "application/*+json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AdvancedValidationEntity" } } } } }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AdvancedValidationEntity" } } }, "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AdvancedValidationEntity" } } }, "text/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AdvancedValidationEntity" } } } } }, "400": { "description": "Bad request", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "401": { "description": "Unauthorized" }, "409": { "description": "Conflict", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } }, "delete": { "tags": [ "AdvancedValidations" ], "summary": "Deletes data from Basware API. For manual one-time operations.", "description": "For manual one-time operations only, such as a manual clean-up to remove test data generated during API integration development. Only removes records from API layer. \r\nDeletion in target systems needs to be done separately using the data deletion mechanisms available in each of the target system in addition to deleting the data in Basware API.", "requestBody": { "description": "Contains the body of the request.\r\n Either externalCode or lastUpdated -field is required. If both values are provided, externalCode will have the priority.", "content": { "application/json-patch+json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } }, "application/json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } } } }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } } } }, "202": { "description": "RequestAccepted", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } } } }, "400": { "description": "BadRequest", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "401": { "description": "Unauthorized" }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } } }, "/v1/advancedValidations/{externalCode}": { "get": { "tags": [ "AdvancedValidations" ], "summary": "Returns single coding row validation rules by externalCode -identifier.", "description": "", "parameters": [ { "name": "externalCode", "in": "path", "description": "The ExternalCode of the entity to be fetched", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/AdvancedValidationEntity" } }, "application/json": { "schema": { "$ref": "#/components/schemas/AdvancedValidationEntity" } }, "text/json": { "schema": { "$ref": "#/components/schemas/AdvancedValidationEntity" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found. Request was successful and no records were found." }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } }, "patch": { "tags": [ "AdvancedValidations" ], "summary": "Updates fields on spefified coding row validation rule. Preserves existing values in fields, which were not updated.", "parameters": [ { "name": "externalCode", "in": "path", "description": "The ExternalCode of the advancedValidation to be updated", "required": true, "schema": { "type": "string" } } ], "requestBody": { "description": "Entity to be updated", "content": { "application/json-patch+json": { "schema": { "$ref": "#/components/schemas/AdvancedValidationEntity" } }, "application/json": { "schema": { "$ref": "#/components/schemas/AdvancedValidationEntity" } }, "text/json": { "schema": { "$ref": "#/components/schemas/AdvancedValidationEntity" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/AdvancedValidationEntity" } } } }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/AdvancedValidationEntity" } }, "application/json": { "schema": { "$ref": "#/components/schemas/AdvancedValidationEntity" } }, "text/json": { "schema": { "$ref": "#/components/schemas/AdvancedValidationEntity" } } } }, "400": { "description": "Bad request", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found. Record to update not found." }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } } }, "/v1/applicationGroups": { "post": { "tags": [ "ApplicationGroups" ], "summary": "Creates new Application groups, fully overwrites previous record if exists.", "description": "Application groups give access to a specific set of applications for users imported through 'users' API. Each user needs to be assigned to one or more application group(s) by specifying 'applicationGroupCode' values in users API. \r\nNotes: \r\n1. User 'loginType' (set on users API) needs to be '4' (user authentication through Basware Access) when the user is imported to any system besides (or in addition to) P2P.\r\n2. POSTing to applicationGroups API returns a link to 'redistribute users' task status. This is because changes to applicationGroups will trigger changes to users assigned to those groups. When there are many users, the changes to users may take a while to complete. Accessing the link requires providing API credentials.\r\n\r\nPlease see section \"[Usage scenario 4: Import users](https://developer.basware.com/api/p2p/manual#usage3)\" of Basware Purchase-to-Pay API manual for details on managing users with Basware API. Check out also the [example JSONs using a minimal feasible set of fields](https://developer.basware.com/api/p2p/templates) from the developer site.", "parameters": [ { "name": "Content-Type", "in": "header", "description": "Specifies the media type of the resource. Value application/json is supported.", "schema": { "type": "string" }, "example": "application/json" } ], "requestBody": { "content": { "application/json-patch+json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ApplicationGroupEntity" } } }, "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ApplicationGroupEntity" } } }, "text/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ApplicationGroupEntity" } } }, "application/*+json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ApplicationGroupEntity" } } } } }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ApplicationGroupEntity" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ApplicationGroupEntity" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ApplicationGroupEntity" } } } }, "400": { "description": "Bad request", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "401": { "description": "Unauthorized" }, "409": { "description": "Conflict", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } }, "get": { "tags": [ "ApplicationGroups" ], "summary": "Returns application groups.", "description": "Application groups give access to a specific set of applications for users imported through 'users' API. Each user needs to be assigned to one or more application group(s) by specifying 'applicationGroupCode' values in users API.", "parameters": [ { "name": "pageSize", "in": "query", "description": "A limit for the number of items to be returned for one request. Limit can range between 1 and 100 items.", "schema": { "type": "integer", "format": "int32", "default": 100 } }, { "name": "lastUpdated", "in": "query", "description": "Date filter. Returns items that have been updated after specified date.", "schema": { "type": "string", "format": "date-time" } }, { "name": "x-amz-meta-continuationtoken", "in": "header", "description": "Used to get next page of results when item count indicated by 'pageSize' is exceeded. A token is returned in header (not body) parameter 'X-amz-meta-continuationToken' of the response whenever there are more records to fetch. Post the received value here in a new HEADER parameter on the next GET request to receive the next page of results. When getting the next page of results, you must include the same query parameters that were used when getting the first page.", "schema": { "type": "string" }, "example": "2913fb86-1258-4372-8e2c-d149ad982c6a" } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ApplicationGroupsResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ApplicationGroupsResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ApplicationGroupsResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Not Found" }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } } }, "/v1/applicationGroups/{applicationGroupCode}": { "get": { "tags": [ "ApplicationGroups" ], "summary": "Returns single Application Group by application group code - identifier.", "description": "Application groups give access to a specific set of applications for users imported through 'users' API. Each user needs to be assigned to one or more application group(s) by specifying 'applicationGroupCode' values in users API.", "parameters": [ { "name": "applicationGroupCode", "in": "path", "description": "The external code of the entity to be fetched", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ApplicationGroupsResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ApplicationGroupsResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ApplicationGroupsResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found. Request was successful and no records were found." }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } } }, "/v1/companies": { "get": { "tags": [ "Companies (deprecated)" ], "summary": "Returns companies posted to Basware API.", "description": "", "parameters": [ { "name": "pageSize", "in": "query", "description": "A limit for the number of items to be returned for one request. Limit can range between 1 and 500 items.", "schema": { "type": "integer", "format": "int32", "default": 500 } }, { "name": "lastUpdated", "in": "query", "description": "Date Filter. Returns items that have been updated after specified date.", "schema": { "type": "string", "format": "date-time" } }, { "name": "x-amz-meta-continuationtoken", "in": "header", "description": "Used to get next page of results when item count indicated by 'pageSize' is exceeded. A token is returned in header (not body) parameter 'X-amz-meta-continuationToken' of the response whenever there are more records to fetch. Post the received value here in a new HEADER parameter on the next GET request to receive the next page of results. When getting the next page of results, you must include the same query parameters that were used when getting the first page.", "schema": { "type": "string" }, "example": "181e100d-88ea-4e60-a183-06eacc69334d" } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/CompanyResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/CompanyResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/CompanyResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found. Request was successful and no records were found." }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } }, "post": { "tags": [ "Companies (deprecated)" ], "summary": "Creates new companies, fully overwrites previous record if exists.", "description": "Note: Only consuming target system at the moment is Open Network Portal (incl. Vendor manager). Companies cannot be imported to P2P through this API. \r\n\r\nPlease see section \"[Usage scenario 6: Import companies](https://developer.basware.com/api/p2p/manual#usage6)\" of Basware Purchase-to-Pay API manual for details on implementing this API.", "parameters": [ { "name": "Content-Type", "in": "header", "description": "Specifies the media type of the resource. Value application/json is supported.", "schema": { "type": "string" }, "example": "application/json" } ], "requestBody": { "content": { "application/json-patch+json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CompanyEntity" } } }, "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CompanyEntity" } } }, "text/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CompanyEntity" } } }, "application/*+json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CompanyEntity" } } } } }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CompanyEntity" } } }, "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CompanyEntity" } } }, "text/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CompanyEntity" } } } } }, "400": { "description": "Bad request", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "401": { "description": "Unauthorized" }, "409": { "description": "Conflict", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } } }, "/v1/companies/{companyCode}": { "get": { "tags": [ "Companies (deprecated)" ], "summary": "Returns single company record by companyCode - identifier.", "description": "", "parameters": [ { "name": "companyCode", "in": "path", "description": "The companyCode of the entity to be fetched", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/CompanyEntity" } }, "application/json": { "schema": { "$ref": "#/components/schemas/CompanyEntity" } }, "text/json": { "schema": { "$ref": "#/components/schemas/CompanyEntity" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found. Request was successful and no records were found." }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } } }, "/v1/contracts": { "get": { "tags": [ "Contracts" ], "summary": "Returns contract entities", "description": "", "parameters": [ { "name": "pageSize", "in": "query", "description": "A limit for the number of items to be returned for one request. Limit can range between 1 and 500 items.", "schema": { "type": "integer", "format": "int32", "default": 500 } }, { "name": "companyCode", "in": "query", "description": "Company filter. Returns items for specific company.", "schema": { "type": "string", "default": "" } }, { "name": "lastUpdated", "in": "query", "description": "Date Filter. Returns items that have been updated after specified date.", "schema": { "type": "string", "format": "date-time" } }, { "name": "x-amz-meta-continuationtoken", "in": "header", "description": "Used to get next page of results when item count indicated by 'pageSize' is exceeded. A token is returned in header (not body) parameter 'X-amz-meta-continuationToken' of the response whenever there are more records to fetch. Post the received value here in a new HEADER parameter on the next GET request to receive the next page of results. When getting the next page of results, you must include the same query parameters that were used when getting the first page.", "schema": { "type": "string" }, "example": "20577767-3fd9-4dda-9667-a7d7ee00ac95" } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ContractResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ContractResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ContractResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found. Request was successful and no records were found." }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } }, "post": { "tags": [ "Contracts" ], "summary": "Creates new contract entity, overwrites previous if exists.", "description": "Notes: \r\n1. The supplier and company code used need to exist in P2P. \r\n2. P2P needs to know the exchange rate from contract currency to company currency (if there are different).", "parameters": [ { "name": "Content-Type", "in": "header", "description": "Specifies the media type of the resource. Value application/json is supported.", "schema": { "type": "string" }, "example": "application/json" } ], "requestBody": { "content": { "application/json-patch+json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ContractEntity" } } }, "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ContractEntity" } } }, "text/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ContractEntity" } } }, "application/*+json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ContractEntity" } } } } }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ContractEntity" } } }, "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ContractEntity" } } }, "text/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ContractEntity" } } } } }, "400": { "description": "Bad request", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "401": { "description": "Unauthorized" }, "409": { "description": "Conflict", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } }, "delete": { "tags": [ "Contracts" ], "summary": "Deletes data from Basware API. For manual one-time operations.", "description": "For manual one-time operations only, such as a manual clean-up to remove test data generated during API integration development. Only removes records from API layer. \r\nDeletion in target systems needs to be done separately using the data deletion mechanisms available in each of the target system in addition to deleting the data in Basware API.", "requestBody": { "description": "Contains the body of the request.\r\n Either externalCode or lastUpdated -field is required. If both values are provided, externalCode will have the priority.", "content": { "application/json-patch+json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } }, "application/json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } } } }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } } } }, "202": { "description": "RequestAccepted", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } } } }, "400": { "description": "BadRequest", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "401": { "description": "Unauthorized" }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } } }, "/v1/contracts/{externalCode}": { "get": { "tags": [ "Contracts" ], "summary": "Returns single contract entity by ID", "description": "", "parameters": [ { "name": "externalCode", "in": "path", "description": "The ExternalCode of the contract to be fetched", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ContractEntity" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ContractEntity" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ContractEntity" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found. Request was successful and no records were found." }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } }, "patch": { "tags": [ "Contracts" ], "summary": "Updates contract entity. To do a partial update consumer needs to provide changed properties.", "description": "Note: Contract currency can no longer be changed if spend has been collected for the contract.", "parameters": [ { "name": "externalCode", "in": "path", "description": "The ExternalCode of the contract to be updated", "required": true, "schema": { "type": "string" } } ], "requestBody": { "description": "Entity to be updated", "content": { "application/json-patch+json": { "schema": { "$ref": "#/components/schemas/ContractEntity" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ContractEntity" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ContractEntity" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/ContractEntity" } } } }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ContractEntity" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ContractEntity" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ContractEntity" } } } }, "400": { "description": "Bad request", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found. Record to update not found." }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } } }, "/v1/costCenters": { "get": { "tags": [ "CostCenters" ], "summary": "Returns cost centers posted to Basware API.", "description": "", "parameters": [ { "name": "pageSize", "in": "query", "description": "A limit for the number of items to be returned for one request. Limit can range between 1 and 500 items.", "schema": { "type": "integer", "format": "int32", "default": 500 } }, { "name": "companyCode", "in": "query", "description": "Company filter. Returns items for specific company.", "schema": { "type": "string", "default": "" } }, { "name": "lastUpdated", "in": "query", "description": "Date Filter. Returns items that have been updated after specified date.", "schema": { "type": "string", "format": "date-time" } }, { "name": "x-amz-meta-continuationtoken", "in": "header", "description": "Used to get next page of results when item count indicated by 'pageSize' is exceeded. A token is returned in header (not body) parameter 'X-amz-meta-continuationToken' of the response whenever there are more records to fetch. Post the received value here in a new HEADER parameter on the next GET request to receive the next page of results. When getting the next page of results, you must include the same query parameters that were used when getting the first page.", "schema": { "type": "string" }, "example": "15a915c6-569a-48d7-be45-97f807d322cb" } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/CostCenterResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/CostCenterResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/CostCenterResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found. Request was successful and no records were found." }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } }, "post": { "tags": [ "CostCenters" ], "summary": "Creates new cost center(s), fully overwrites previous record if exists.", "parameters": [ { "name": "Content-Type", "in": "header", "description": "Specifies the media type of the resource. Value application/json is supported.", "schema": { "type": "string" }, "example": "application/json" } ], "requestBody": { "content": { "application/json-patch+json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CostCenterEntity" } } }, "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CostCenterEntity" } } }, "text/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CostCenterEntity" } } }, "application/*+json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CostCenterEntity" } } } } }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CostCenterEntity" } } }, "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CostCenterEntity" } } }, "text/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CostCenterEntity" } } } } }, "400": { "description": "Bad request", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "401": { "description": "Unauthorized" }, "409": { "description": "Conflict", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } }, "delete": { "tags": [ "CostCenters" ], "summary": "Deletes data from Basware API. For manual one-time operations.", "description": "For manual one-time operations only, such as a manual clean-up to remove test data generated during API integration development. Only removes records from API layer. \r\nDeletion in target systems needs to be done separately using the data deletion mechanisms available in each of the target system in addition to deleting the data in Basware API.", "requestBody": { "description": "Contains the body of the request.\r\n Either externalCode or lastUpdated -field is required. If both values are provided, externalCode will have the priority.", "content": { "application/json-patch+json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } }, "application/json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } } } }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } } } }, "202": { "description": "RequestAccepted", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } } } }, "400": { "description": "BadRequest", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "401": { "description": "Unauthorized" }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } } }, "/v1/costCenters/{externalCode}": { "get": { "tags": [ "CostCenters" ], "summary": "Returns single cost center -record by externalCode -identifier.", "description": "", "parameters": [ { "name": "externalCode", "in": "path", "description": "The ExternalCode of the entity to be fetched", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/CostCenterEntity" } }, "application/json": { "schema": { "$ref": "#/components/schemas/CostCenterEntity" } }, "text/json": { "schema": { "$ref": "#/components/schemas/CostCenterEntity" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found. Request was successful and no records were found." }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } }, "patch": { "tags": [ "CostCenters" ], "summary": "Updates fields on speficied cost center. Preserves existing values in fields, which were not updated.", "parameters": [ { "name": "externalCode", "in": "path", "description": "The ExternalCode of the CostCenter to be updated", "required": true, "schema": { "type": "string" } } ], "requestBody": { "description": "Entity to be updated", "content": { "application/json-patch+json": { "schema": { "$ref": "#/components/schemas/CostCenterEntity" } }, "application/json": { "schema": { "$ref": "#/components/schemas/CostCenterEntity" } }, "text/json": { "schema": { "$ref": "#/components/schemas/CostCenterEntity" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/CostCenterEntity" } } } }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/CostCenterEntity" } }, "application/json": { "schema": { "$ref": "#/components/schemas/CostCenterEntity" } }, "text/json": { "schema": { "$ref": "#/components/schemas/CostCenterEntity" } } } }, "400": { "description": "Bad request", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found. Record to update not found." }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } } }, "/v1/errorFeedbacks": { "get": { "tags": [ "ErrorFeedbacks" ], "summary": "Returns error messages from receiving end-system(s), based on error time stamp.", "description": "The 'errorFeedbacks' API has been replaced by 'requestStatus' API and is likely to be deprecated at a later time. There will be a 12 months notice period before eventual deprecation. Currently both APIs are functioning side by side and are returning same errors. \r\n\r\nIf errors occur after Basware API has validated the data schema, these will be returned from target systems asynchronously in this interface. Please see section \"[Usage scenario 5: Error handling and monitoring](https://developer.basware.com/api/p2p/manual#usage5)\" in Basware Purchase-to-Pay API manual for details on implementing error handling with Basware API.", "parameters": [ { "name": "targetSystem", "in": "query", "description": "Basware application module which has posted error (\"P2P\", \"Vendor Manager\", \"Purchase Manager\", etc.)", "schema": { "type": "string" } }, { "name": "entityType", "in": "query", "description": "The EntityType of the entities to be fetched.", "schema": { "enum": [ "Account", "Contract", "CostCenter", "TaxCode", "ExchangeRate", "PaymentTerm", "User", "Project", "MatchingOrder", "MatchingOrderLine", "GenericList", "AdvancedPermission", "TransferResponse", "PaymentResponse", "PrebookResponse", "Vendor", "AdvancedValidation", "PurchaseRequisition", "PurchaseOrder", "PurchaseGoodsReceipt", "Organization", "EnrichmentTransferResponse", "UserGroup", "UserGroupAssociatedUser", "UserGroupPermission" ], "type": "string" } }, { "name": "pageSize", "in": "query", "description": "A limit for the number of items to be returned for one request. Limit can range between 1 and 500 items.", "schema": { "type": "integer", "format": "int32", "default": 500 } }, { "name": "lastUpdated", "in": "query", "description": "Date Filter. Returns items that have been updated after specified date.", "schema": { "type": "string", "format": "date-time" } }, { "name": "x-amz-meta-continuationtoken", "in": "header", "description": "Used to get next page of results when item count indicated by 'pageSize' is exceeded. A token is returned in header (not body) parameter 'X-amz-meta-continuationToken' of the response whenever there are more records to fetch. Post the received value here in a new HEADER parameter on the next GET request to receive the next page of results. When getting the next page of results, you must include the same query parameters that were used when getting the first page.", "schema": { "type": "string" }, "example": "ac70cf44-8179-4f90-b2b4-97d6b4b896ef" } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ErrorFeedbackResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ErrorFeedbackResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ErrorFeedbackResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found. Request was successful and no records were found." }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } }, "delete": { "tags": [ "ErrorFeedbacks" ], "summary": "Deletes data from Basware API. For manual one-time operations.", "description": "For manual one-time operations only, such as a manual clean-up to remove test data generated during API integration development. Only removes records from API layer. \r\nDeletion in target systems needs to be done separately using the data deletion mechanisms available in each of the target system in addition to deleting the data in Basware API.", "parameters": [ { "name": "entityType", "in": "query", "description": "Name of entity for which records to be deleted from errorFeedback table.", "schema": { "enum": [ "Account", "Contract", "CostCenter", "TaxCode", "ExchangeRate", "PaymentTerm", "User", "Project", "MatchingOrder", "MatchingOrderLine", "GenericList", "AdvancedPermission", "TransferResponse", "PaymentResponse", "PrebookResponse", "Vendor", "AdvancedValidation", "PurchaseRequisition", "PurchaseOrder", "PurchaseGoodsReceipt", "Organization", "EnrichmentTransferResponse", "UserGroup", "UserGroupAssociatedUser", "UserGroupPermission" ], "type": "string" } } ], "requestBody": { "description": "Contains the body of the request.\r\n Either externalCode or lastUpdated -field is required. If both values are provided, externalCode will have the priority.", "content": { "application/json-patch+json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } }, "application/json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } } } }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } } } }, "202": { "description": "RequestAccepted", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } } } }, "400": { "description": "BadRequest", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "401": { "description": "Unauthorized" }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } } }, "/v1/errorFeedbacks/{requestId}": { "get": { "tags": [ "ErrorFeedbacks" ], "summary": "Returns error messages from receiving end-system(s), based on webservice request id.", "description": "The 'errorFeedbacks' API has been replaced by 'requestStatus' API and is likely to be deprecated at a later time. There will be a 12 months notice period before eventual deprecation. Currently both APIs are functioning side by side and are returning same errors. \r\n\r\nIf errors occur after Basware API has validated the data schema, these will be returned from target systems asynchronously in this interface. Please see section \"[Usage scenario 5: Error handling and monitoring](https://developer.basware.com/api/p2p/manual#usage5)\" in Basware Purchase-to-Pay API manual for details on implementing error handling with Basware API.", "parameters": [ { "name": "requestId", "in": "path", "description": "The RequestId of the entity to be fetched", "required": true, "schema": { "type": "string" } }, { "name": "pageSize", "in": "query", "description": "A limit for the number of items to be returned for one request. Limit can range between 1 and 500 items.", "schema": { "type": "integer", "format": "int32", "default": 500 } } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ErrorFeedbackResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ErrorFeedbackResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ErrorFeedbackResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found. Request was successful and no records were found." }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } } }, "/v1/errorFeedbacks/{entityType}/{errorEntityExternalCode}": { "get": { "tags": [ "ErrorFeedbacks" ], "summary": "Returns error messages from receiving end-system(s), based on interface and exernalCode -identifier of record.", "description": "The 'errorFeedbacks' API has been replaced by 'requestStatus' API and is likely to be deprecated at a later time. There will be a 12 months notice period before eventual deprecation. Currently both APIs are functioning side by side and are returning same errors. \r\n\r\nIf errors occur after Basware API has validated the data schema, these will be returned from target systems asynchronously in this interface. Please see section \"[Usage scenario 5: Error handling and monitoring](https://developer.basware.com/api/p2p/manual#usage5)\" in Basware Purchase-to-Pay API manual for details on implementing error handling with Basware API.", "parameters": [ { "name": "entityType", "in": "path", "description": "The entityType of the entities to be fetched", "required": true, "schema": { "enum": [ "Account", "Contract", "CostCenter", "TaxCode", "ExchangeRate", "PaymentTerm", "User", "Project", "MatchingOrder", "MatchingOrderLine", "GenericList", "AdvancedPermission", "TransferResponse", "PaymentResponse", "PrebookResponse", "Vendor", "AdvancedValidation", "PurchaseRequisition", "PurchaseOrder", "PurchaseGoodsReceipt", "Organization", "EnrichmentTransferResponse", "UserGroup", "UserGroupAssociatedUser", "UserGroupPermission" ], "type": "string" } }, { "name": "errorEntityExternalCode", "in": "path", "description": "The ExternalCode of the entities to be fetched", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ErrorFeedbackResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ErrorFeedbackResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ErrorFeedbackResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found. Request was successful and no records were found." }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } } }, "/v1/exchangeRates": { "get": { "tags": [ "ExchangeRates" ], "summary": "Returns exchange rates posted to Basware API.", "description": "", "parameters": [ { "name": "pageSize", "in": "query", "description": "A limit for the number of items to be returned for one request. Limit can range between 1 and 500 items.", "schema": { "type": "integer", "format": "int32", "default": 500 } }, { "name": "companyCode", "in": "query", "description": "Company filter. Returns items for specific company.", "schema": { "type": "string", "default": "" } }, { "name": "lastUpdated", "in": "query", "description": "Date Filter. Returns items that have been updated after specified date.", "schema": { "type": "string", "format": "date-time" } }, { "name": "x-amz-meta-continuationtoken", "in": "header", "description": "Used to get next page of results when item count indicated by 'pageSize' is exceeded. A token is returned in header (not body) parameter 'X-amz-meta-continuationToken' of the response whenever there are more records to fetch. Post the received value here in a new HEADER parameter on the next GET request to receive the next page of results. When getting the next page of results, you must include the same query parameters that were used when getting the first page.", "schema": { "type": "string" }, "example": "f408eee3-70fb-4213-91af-7715d9319746" } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ExchangeRateResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ExchangeRateResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ExchangeRateResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found. Request was successful and no records were found." }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } }, "post": { "tags": [ "ExchangeRates" ], "summary": "Creates new exchange rate(s), fully overwrites previous record if exists.", "description": "Notes:\r\n1) Please provide exchange rates to 1) the currency used by entire organization as well as 2) to currencies used by individual companies. \r\n2) Exchange rates are inherited in P2P from top level organizations down if company-specific rates are not provided. \r\n3) Multiplying 'from' currency amount by rate needs to give amount in 'to' -currency.", "parameters": [ { "name": "Content-Type", "in": "header", "description": "Specifies the media type of the resource. Value application/json is supported.", "schema": { "type": "string" }, "example": "application/json" } ], "requestBody": { "content": { "application/json-patch+json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ExchangeRateEntity" } } }, "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ExchangeRateEntity" } } }, "text/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ExchangeRateEntity" } } }, "application/*+json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ExchangeRateEntity" } } } } }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ExchangeRateEntity" } } }, "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ExchangeRateEntity" } } }, "text/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ExchangeRateEntity" } } } } }, "400": { "description": "Bad request", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "401": { "description": "Unauthorized" }, "409": { "description": "Conflict", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } }, "delete": { "tags": [ "ExchangeRates" ], "summary": "Deletes data from Basware API. For manual one-time operations.", "description": "For manual one-time operations only, such as a manual clean-up to remove test data generated during API integration development. Only removes records from API layer. \r\nDeletion in target systems needs to be done separately using the data deletion mechanisms available in each of the target system in addition to deleting the data in Basware API.", "requestBody": { "description": "Contains the body of the request.\r\n Either externalCode or lastUpdated -field is required. If both values are provided, externalCode will have the priority.", "content": { "application/json-patch+json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } }, "application/json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } } } }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } } } }, "202": { "description": "RequestAccepted", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } } } }, "400": { "description": "BadRequest", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "401": { "description": "Unauthorized" }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } } }, "/v1/exchangeRates/{externalCode}": { "get": { "tags": [ "ExchangeRates" ], "summary": "Returns single exchange rate -record by externalCode -identifier.", "description": "", "parameters": [ { "name": "externalCode", "in": "path", "description": "The ExternalCode of the entity to be fetched", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ExchangeRateEntity" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ExchangeRateEntity" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ExchangeRateEntity" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found. Request was successful and no records were found." }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } }, "patch": { "tags": [ "ExchangeRates" ], "summary": "Updates fields on specified exchange rate. Preserves existing values in non-updated fields.", "description": "Note: Basware API considers 'null' value in field(s) equivalent to the field(s) not being sent. For this reason patch method does not support setting field values to 'null'.", "parameters": [ { "name": "externalCode", "in": "path", "description": "The ExternalCode of the exchangeRate to be updated", "required": true, "schema": { "type": "string" } } ], "requestBody": { "description": "Entity to be updated", "content": { "application/json-patch+json": { "schema": { "$ref": "#/components/schemas/ExchangeRateEntity" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ExchangeRateEntity" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ExchangeRateEntity" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/ExchangeRateEntity" } } } }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ExchangeRateEntity" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ExchangeRateEntity" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ExchangeRateEntity" } } } }, "400": { "description": "Bad request", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found. Record to update not found." }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } } }, "/v1/exportedContracts": { "get": { "tags": [ "ExportedContracts" ], "summary": "Returns contracts (along with spend totals) exported from Basware P2P.", "description": "Notes: \r\n1) Whether contract spends are collected is controlled by the fields 'invoiceSpend', 'orderSpend' and 'spendPlanSpend'. Spend is not collected when these fields are set to 'false'.\r\n2) This API supports sending webhook based [push notifications](https://developer.basware.com/api/p2p/manual#PushNotifications) when new data is available to be exported. \r\n3) This API exports contracts imported through Basware API. Contracts imported through anyerp are not exported. \r\n\r\nPlease see section \"[Usage scenario 4: Import and export procurement data](https://developer.basware.com/api/p2p/manual#usage4)\" for details on implementing this API. Check out also the [example JSONs using a minimal feasible set of fields](https://developer.basware.com/api/p2p/templates) from the developer site.", "parameters": [ { "name": "processingStatus", "in": "query", "description": "Document status filter. Returns records by document status. Use 'WaitingForExport' to retrieve unacknowledged records.", "schema": { "enum": [ "WaitingForExport", "Exported" ], "type": "string" } }, { "name": "pageSize", "in": "query", "description": "A limit for the number of items to be returned for one request. Limit can range between 1 and 500 items.", "schema": { "type": "integer", "format": "int32", "default": 200 } }, { "name": "companyCode", "in": "query", "description": "Company filter. Returns items for specific company.", "schema": { "type": "string", "default": "" } }, { "name": "lastUpdated", "in": "query", "description": "Date Filter. Returns items that have been updated after specified date.", "schema": { "type": "string", "format": "date-time" } }, { "name": "x-amz-meta-continuationtoken", "in": "header", "description": "Used to get next page of results when item count indicated by 'pageSize' is exceeded. A token is returned in header (not body) parameter 'X-amz-meta-continuationToken' of the response whenever there are more records to fetch. Post the received value here in a new HEADER parameter on the next GET request to receive the next page of results. When getting the next page of results, you must include the same query parameters that were used when getting the first page.", "schema": { "type": "string" }, "example": "6724c88a-3a53-4a08-a3a8-c2a05c5e42f8" } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ExportedContractsResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ExportedContractsResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ExportedContractsResponse" } } } }, "401": { "description": "Unauthorized", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "404": { "description": "Not Found", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } }, "delete": { "tags": [ "ExportedContracts" ], "summary": "Deletes data from Basware API. For manual one-time operations.", "description": "For manual one-time operations only, such as a manual clean-up to remove test data generated during API integration development. Only removes records from API layer. \r\nDeletion in target systems needs to be done separately using the data deletion mechanisms available in each of the target system in addition to deleting the data in Basware API.", "requestBody": { "description": "Contains the body of the request.\r\n Either externalCode or lastUpdated -field is required. If both values are provided, externalCode will have the priority.", "content": { "application/json-patch+json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } }, "application/json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } } } }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } } } }, "202": { "description": "RequestAccepted", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } } } }, "400": { "description": "BadRequest", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "401": { "description": "Unauthorized", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } } }, "/v1/exportedContracts/{externalCode}": { "get": { "tags": [ "ExportedContracts" ], "summary": "Returns contracts (along with spend totals) exported from Basware P2P by externalCode.", "description": "Notes: \r\n1) Whether contract spends are collected is controlled by the fields 'invoiceSpend', 'orderSpend' and 'spendPlanSpend'. Spend is not collected when these fields are set to 'false'.\r\n2) This API exports contracts imported through Basware API. Contracts imported through anyerp are not exported. \r\n\r\nPlease see section \"[Usage scenario 4: Import and export procurement data](https://developer.basware.com/api/p2p/manual#usage4)\" for details on implementing this API. Check out also the [example JSONs using a minimal feasible set of fields](https://developer.basware.com/api/p2p/templates) from the developer site.", "parameters": [ { "name": "externalCode", "in": "path", "description": "The ExternalCode of the contract to be fetched.", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ExportedContractsResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ExportedContractsResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ExportedContractsResponse" } } } }, "401": { "description": "Unauthorized", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "404": { "description": "Not found", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } } }, "/v1/exportedContracts/acknowledge": { "post": { "tags": [ "ExportedContracts" ], "summary": "Acknowledged contract spends are no longer returned on the next GET operation.", "description": "Notes: \r\n1) Updates 'processingStatus' -field on the document to allow filtering out already acknowledged documents on the next GET operation. \r\n2) For a document which is already acknowledged (processingStatus: 'Exported'), API will return 405 'Method not allowed' if acknowledge is attempted again on the document.", "parameters": [ { "name": "Content-Type", "in": "header", "description": "Specifies the media type of the resource. Value application/json is supported.", "schema": { "type": "string" }, "example": "application/json" } ], "requestBody": { "content": { "application/json-patch+json": { "schema": { "$ref": "#/components/schemas/AcknowledgeRequest" } }, "application/json": { "schema": { "$ref": "#/components/schemas/AcknowledgeRequest" } }, "text/json": { "schema": { "$ref": "#/components/schemas/AcknowledgeRequest" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/AcknowledgeRequest" } } } }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "type": "string" } }, "application/json": { "schema": { "type": "string" } }, "text/json": { "schema": { "type": "string" } } } }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" }, "405": { "description": "Method not allowed. This generally happens when trying to acknowledge an exportedContract that is already acknowledged." }, "500": { "description": "Unexpected error" } } } }, "/v1/exportedContractSpends": { "get": { "tags": [ "ExportedContractSpends" ], "summary": "Returns contract spends exported from Basware P2P.", "description": "Notes: \r\n1) Whether contract spends are collected is controlled by the fields 'invoiceSpend', 'orderSpend' and 'spendPlanSpend'. Spend is not collected when these fields are set to 'false'.\r\n2) This API supports sending webhook based [push notifications](https://developer.basware.com/api/p2p/manual#PushNotifications) when new data is available to be exported. \r\n3) This API exports spends for contracts imported through Basware API. Spend is not exported for contracts imported through anyerp.\r\n\r\nPlease see section \"[Usage scenario 4: Import and export procurement data](https://developer.basware.com/api/p2p/manual#usage4)\" for details on implementing this API. Check out also the [example JSONs using a minimal feasible set of fields](https://developer.basware.com/api/p2p/templates) from the developer site.", "parameters": [ { "name": "processingStatus", "in": "query", "description": "Document status filter. Returns records by document status. Use 'WaitingForExport' to retrieve unacknowledged records.", "schema": { "enum": [ "WaitingForExport", "Exported" ], "type": "string" } }, { "name": "documentType", "in": "query", "description": "Document type filter. Returns items for specific document type.", "schema": { "enum": [ "AccountingDocument", "PurchaseOrder", "SpendPlan" ], "type": "string" } }, { "name": "pageSize", "in": "query", "description": "A limit for the number of items to be returned for one request. Limit can range between 1 and 500 items.", "schema": { "type": "integer", "format": "int32", "default": 500 } }, { "name": "contractExternalCode", "in": "query", "description": "Contract code filter. Returns items for specific contract.", "schema": { "type": "string", "default": "" } }, { "name": "lastUpdated", "in": "query", "description": "Date Filter. Returns items that have been updated after specified date.", "schema": { "type": "string", "format": "date-time" } }, { "name": "x-amz-meta-continuationtoken", "in": "header", "description": "Used to get next page of results when item count indicated by 'pageSize' is exceeded. A token is returned in header (not body) parameter 'X-amz-meta-continuationToken' of the response whenever there are more records to fetch. Post the received value here in a new HEADER parameter on the next GET request to receive the next page of results. When getting the next page of results, you must include the same query parameters that were used when getting the first page.", "schema": { "type": "string" }, "example": "4e1c0aa1-5478-4396-a6c1-4fd816030924" } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ExportedContractSpendsResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ExportedContractSpendsResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ExportedContractSpendsResponse" } } } }, "401": { "description": "Unauthorized", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "404": { "description": "Not Found", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } }, "delete": { "tags": [ "ExportedContractSpends" ], "summary": "Deletes data from Basware API. For manual one-time operations.", "description": "For manual one-time operations only, such as a manual clean-up to remove test data generated during API integration development. Only removes records from API layer. \r\nDeletion in target systems needs to be done separately using the data deletion mechanisms available in each of the target system in addition to deleting the data in Basware API.", "requestBody": { "description": "Contains the body of the request.\r\n Either externalCode or lastUpdated -field is required. If both values are provided, externalCode will have the priority.", "content": { "application/json-patch+json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } }, "application/json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } } } }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } } } }, "202": { "description": "RequestAccepted", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } } } }, "400": { "description": "BadRequest", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "401": { "description": "Unauthorized", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } } }, "/v1/exportedContractSpends/{externalCode}": { "get": { "tags": [ "ExportedContractSpends" ], "summary": "Returns contract spend details exported from Basware P2P by externalCode.", "description": "Notes: \r\n1) Whether contract spends are collected is controlled by the fields 'invoiceSpend', 'orderSpend' and 'spendPlanSpend'. Spend is not collected when these fields are set to 'false'.\r\n2) This API exports spends for contracts imported through Basware API. Spend is not exported for contracts imported through anyerp. \r\n\r\nPlease see section \"[Usage scenario 4: Import and export procurement data](https://developer.basware.com/api/p2p/manual#usage4)\" for details on implementing this API. Check out also the [example JSONs using a minimal feasible set of fields](https://developer.basware.com/api/p2p/templates) from the developer site.", "parameters": [ { "name": "externalCode", "in": "path", "description": "The ExternalCode of the ContractSpend to be fetched.", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ExportedContractSpendsResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ExportedContractSpendsResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ExportedContractSpendsResponse" } } } }, "401": { "description": "Unauthorized", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "404": { "description": "Not found", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } } }, "/v1/exportedContractSpends/acknowledge": { "post": { "tags": [ "ExportedContractSpends" ], "summary": "Acknowledged contract spends are no longer returned on the next GET operation.", "description": "Notes: \r\n1) Updates 'processingStatus' -field on the document to allow filtering out already acknowledged documents on the next GET operation. \r\n2) For a document which is already acknowledged (processingStatus: 'Exported'), API will return 405 'Method not allowed' if acknowledge is attempted again on the document.\r\n\r\nPlease see section \"[Usage scenario 4: Import and export procurement data](https://developer.basware.com/api/p2p/manual#usage4)\" for details on implementing this API. Check out also the [example JSONs using a minimal feasible set of fields](https://developer.basware.com/api/p2p/templates) from the developer site.", "parameters": [ { "name": "Content-Type", "in": "header", "description": "Specifies the media type of the resource. Value application/json is supported.", "schema": { "type": "string" }, "example": "application/json" } ], "requestBody": { "content": { "application/json-patch+json": { "schema": { "$ref": "#/components/schemas/ContractSpendAcknowledgeRequest" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ContractSpendAcknowledgeRequest" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ContractSpendAcknowledgeRequest" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/ContractSpendAcknowledgeRequest" } } } }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "type": "string" } }, "application/json": { "schema": { "type": "string" } }, "text/json": { "schema": { "type": "string" } } } }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" }, "405": { "description": "Method not allowed. This generally happens when trying to acknowledge an exportedContractSpend that is already acknowledged." }, "500": { "description": "Unexpected error" } } } }, "/v1/exportedPurchaseOrders": { "get": { "tags": [ "ExportedPurchaseOrders" ], "summary": "Returns purchase orders exported from Basware P2P.", "description": "Notes: \r\n1) This API supports sending webhook based [push notifications](https://developer.basware.com/api/p2p/manual#PushNotifications) when new data is available to be exported. \r\n2) This GET operation returns a HTTP redirect, which the API client needs to follow. \r\n * 'Authorization' header must not be included in the redirected request (the second request after receiving a redirect). \r\n * 'Host' header needs to be included.\r\n\r\nPlease see section \"[Usage scenario 4: Import and export procurement data](https://developer.basware.com/api/p2p/manual#usage4)\" for details on implementing this API.", "parameters": [ { "name": "orderStatus", "in": "query", "description": "Document status filter. Returns items by order document status.", "schema": { "enum": [ "WaitingForExport", "Exported" ], "type": "string" } }, { "name": "pageSize", "in": "query", "description": "A limit for the number of items to be returned for one request. Limit can range between 1 and 100 items.", "schema": { "type": "integer", "format": "int32", "default": 100 } }, { "name": "companyCode", "in": "query", "description": "Company filter. Returns items for specific company.", "schema": { "type": "string", "default": "" } }, { "name": "lastUpdated", "in": "query", "description": "Date filter. Returns items that have been updated after specified date.", "schema": { "type": "string", "format": "date-time" } }, { "name": "x-amz-meta-continuationtoken", "in": "header", "description": "Used to get next page of results when item count indicated by 'pageSize' is exceeded. A token is returned in header (not body) parameter 'X-amz-meta-continuationToken' of the response whenever there are more records to fetch. Post the received value here in a new HEADER parameter on the next GET request to receive the next page of results. When getting the next page of results, you must include the same query parameters that were used when getting the first page.", "schema": { "type": "string" }, "example": "f0054d6b-f6d9-42ec-8391-7f94738dad4d" } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ExportedPurchaseOrdersResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ExportedPurchaseOrdersResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ExportedPurchaseOrdersResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Not Found" }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } }, "delete": { "tags": [ "ExportedPurchaseOrders" ], "summary": "Deletes data from Basware API. For manual one-time operations.", "description": "For manual one-time operations only, such as a manual clean-up to remove test data generated during API integration development. Only removes records from API layer. \r\nDeletion in target systems needs to be done separately using the data deletion mechanisms available in each of the target system in addition to deleting the data in Basware API.", "requestBody": { "description": "Contains the body of the request.\r\n Either externalCode or lastUpdated -field is required. If both values are provided, externalCode will have the priority.", "content": { "application/json-patch+json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } }, "application/json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } } } }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } } } }, "202": { "description": "RequestAccepted", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } } } }, "400": { "description": "BadRequest", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "401": { "description": "Unauthorized" }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } } }, "/v1/exportedPurchaseOrders/{externalCode}": { "get": { "tags": [ "ExportedPurchaseOrders" ], "summary": "Returns single exported order by externalCode - identifier.", "description": "Note: This GET operation returns a HTTP redirect, which the API client needs to follow. \r\n* 'Authorization' header must not be included in the redirected request (the second request after receiving a redirect). \r\n* 'Host' header needs to be included.\r\n\r\nPlease see section \"[Usage scenario 4: Import and export procurement data](https://developer.basware.com/api/p2p/manual#usage4)\" for details on implementing this API.", "parameters": [ { "name": "externalCode", "in": "path", "description": "ExternalCode of the order to be retrieved.", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ExportedPurchaseOrdersResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ExportedPurchaseOrdersResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ExportedPurchaseOrdersResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found. Request was successful and no records were found." }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } } }, "/v1/exportedPurchaseOrders/{externalCode}/acknowledge": { "post": { "tags": [ "ExportedPurchaseOrders" ], "summary": "Acknowledged orders are no longer returned for next GET operation.", "description": "Notes:\r\n1. Updates 'processingStatus' -field on the document to allow filtering out the document on the next GET operation\r\n2. For a document which is already acknowledged (processingStatus: 'Exported'), API will return 405 'Method not allowed' if acknowledge is attempted again on the document.\r\n\r\nPlease see section \"[Usage scenario 4: Import and export procurement data](https://developer.basware.com/api/p2p/manual#usage4)\" for details on implementing this API.", "parameters": [ { "name": "externalCode", "in": "path", "description": "ExternalCode of the order to be acknowledged. Note: For an order which is already acknowledged, API will return 405 'Method not allowed'.", "required": true, "schema": { "type": "string" } }, { "name": "Content-Type", "in": "header", "description": "Specifies the media type of the resource. Value application/json is supported.", "schema": { "type": "string" }, "example": "application/json" } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "type": "string" } }, "application/json": { "schema": { "type": "string" } }, "text/json": { "schema": { "type": "string" } } } }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found. Record to acknowledge not found." }, "405": { "description": "Method not allowed. This generally happens when trying to acknowledge an exportedPurchaseOrder that is already acknowledged." }, "500": { "description": "Unexpected error" } } } }, "/v1/exportedPurchaseRequisitions": { "get": { "tags": [ "ExportedPurchaseRequisitions" ], "summary": "Returns purchase requisitions exported fom Basware P2P.", "description": "Notes:\r\n1) A purchase requisition is exported from P2P when the requisition is approved, rejected or canceled. Requisitions are not exported while they are in approval process. \r\n2) This API supports sending webhook based [push notifications](https://developer.basware.com/api/p2p/manual#PushNotifications) when new data is available to be exported. \r\n3) This GET operation returns a HTTP redirect, which the API client needs to follow. \r\n * 'Authorization' header must not be included in the redirected request (the second request after receiving a redirect). \r\n * 'Host' header needs to be included.\r\n\r\nPlease see section \"[Usage scenario 4: Import and export procurement data](https://developer.basware.com/api/p2p/manual#usage4)\" for details on implementing this API.", "parameters": [ { "name": "status", "in": "query", "description": "Document status filter. Returns items by order document status.", "schema": { "enum": [ "WaitingForExport", "Exported" ], "type": "string" } }, { "name": "pageSize", "in": "query", "description": "A limit for the number of items to be returned for one request. Limit can range between 1 and 100 items.", "schema": { "type": "integer", "format": "int32", "default": 100 } }, { "name": "companyCode", "in": "query", "description": "Company filter. Returns items for specific company.", "schema": { "type": "string", "default": "" } }, { "name": "lastUpdated", "in": "query", "description": "Date filter. Returns items that have been updated after specified date.", "schema": { "type": "string", "format": "date-time" } }, { "name": "x-amz-meta-continuationtoken", "in": "header", "description": "Used to get next page of results when item count indicated by 'pageSize' is exceeded. A token is returned in header (not body) parameter 'X-amz-meta-continuationToken' of the response whenever there are more records to fetch. Post the received value here in a new HEADER parameter on the next GET request to receive the next page of results. When getting the next page of results, you must include the same query parameters that were used when getting the first page.", "schema": { "type": "string" }, "example": "1093edb3-7620-4986-b46b-985c3f9addd4" } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ExportedPurchaseRequisitionsResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ExportedPurchaseRequisitionsResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ExportedPurchaseRequisitionsResponse" } } } }, "401": { "description": "Unauthorized", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "404": { "description": "Not Found", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } }, "delete": { "tags": [ "ExportedPurchaseRequisitions" ], "summary": "Deletes data from Basware API. For manual one-time operations.", "description": "For manual one-time operations only, such as a manual clean-up to remove test data generated during API integration development. Only removes records from API layer. \r\nDeletion in target systems needs to be done separately using the data deletion mechanisms available in each of the target system in addition to deleting the data in Basware API.", "requestBody": { "description": "Contains the body of the request.\r\n Either externalCode or lastUpdated -field is required. If both values are provided, externalCode will have the priority.", "content": { "application/json-patch+json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } }, "application/json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } } } }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } } } }, "202": { "description": "RequestAccepted", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } } } }, "400": { "description": "BadRequest", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "401": { "description": "Unauthorized", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } } }, "/v1/exportedPurchaseRequisitions/{externalCode}": { "get": { "tags": [ "ExportedPurchaseRequisitions" ], "summary": "Returns a single purchase requisition by external code - identifier.", "description": "Note: This GET operation returns a HTTP redirect, which the API client needs to follow. \r\n* 'Authorization' header must not be included in the redirected request (the second request after receiving a redirect). \r\n* 'Host' header needs to be included.\r\n\r\nPlease see section \"[Usage scenario 4: Import and export procurement data](https://developer.basware.com/api/p2p/manual#usage4)\" for details on implementing this API.", "parameters": [ { "name": "externalCode", "in": "path", "description": "ExternalCode of the requisition to be retrieved.", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ExportedPurchaseRequisitionsResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ExportedPurchaseRequisitionsResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ExportedPurchaseRequisitionsResponse" } } } }, "401": { "description": "Unauthorized", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "404": { "description": "Not found", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } } }, "/v1/exportedPurchaseRequisitions/{externalCode}/acknowledge": { "post": { "tags": [ "ExportedPurchaseRequisitions" ], "summary": "Acknowledged requisitions are no longer returned for next GET operation.", "description": "Notes:\r\n1. Updates 'processingStatus' -field on the document to allow filtering out the document on the next GET operation\r\n2. For a document which is already acknowledged (processingStatus: 'Exported'), API will return 405 'Method not allowed' if acknowledge is attempted again on the document.\r\n\r\nPlease see section \"[Usage scenario 4: Import and export procurement data](https://developer.basware.com/api/p2p/manual#usage4)\" for details on implementing this API.", "parameters": [ { "name": "externalCode", "in": "path", "description": "External Code of the purchase requisition to be acknowledged. Note: For a purchase requisition which is already acknowledged, API will return 405 'Method not allowed'.", "required": true, "schema": { "type": "string" } }, { "name": "Content-Type", "in": "header", "description": "Specifies the media type of the resource. Value application/json is supported.", "schema": { "type": "string" }, "example": "application/json" } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "type": "string" } }, "application/json": { "schema": { "type": "string" } }, "text/json": { "schema": { "type": "string" } } } }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" }, "405": { "description": "Method not allowed. This generally happens when trying to acknowledge an exportedPurchaseRequisition that is already acknowledged." }, "500": { "description": "Unexpected error" } } } }, "/v1/lists/{listKey}": { "get": { "tags": [ "GenericLists" ], "summary": "Returns list items posted to Basware API for specified list.", "parameters": [ { "name": "listKey", "in": "path", "description": "ListKey defines the target table in Alusta. e.g. List with listKey 'ACC_LIST_5' will be mapped to EXT_ACC_LIST_5.", "required": true, "schema": { "enum": [ "ACC_LIST_1", "ACC_LIST_2", "ACC_LIST_3", "ACC_LIST_4", "ACC_LIST_5", "ACC_LIST_6", "ACC_LIST_7", "ACC_LIST_8", "ACC_LIST_9", "ACC_LIST_10", "ACC_LIST_11", "ACC_LIST_12", "ACC_LIST_13", "ACC_LIST_14", "ACC_LIST_15", "ACC_LIST_16", "ACC_LIST_17", "ACC_LIST_18", "ACC_LIST_19", "ACC_LIST_20", "ACC_LIST_21", "ACC_LIST_22", "ACC_LIST_23", "ACC_LIST_24", "ACC_LIST_25", "ACC_LIST_26", "ACC_LIST_27", "ACC_LIST_28", "ACC_LIST_29", "ACC_LIST_30", "ACC_LIST_31", "ACC_LIST_32", "ACC_LIST_33", "ACC_LIST_34", "ACC_LIST_35", "CUST_RESOLVER_1", "CUST_RESOLVER_2", "CUST_RESOLVER_3", "CUST_RESOLVER_4", "CUST_RESOLVER_5", "INV_LIST_1", "INV_LIST_2", "INV_LIST_3", "INV_LIST_4", "INV_LIST_5", "INV_LIST_6", "INV_LIST_7", "INV_LIST_8", "INV_LIST_9", "INV_LIST_10", "INV_LIST_11", "INV_LIST_12", "INV_LIST_13", "INV_LIST_14", "INV_LIST_15", "INV_LIST_16", "INV_LIST_17", "INV_LIST_18", "INV_LIST_19", "INV_LIST_20" ], "type": "string" } }, { "name": "pageSize", "in": "query", "description": "A limit for the number of items to be returned for one request. Limit can range between 1 and 500 items.", "schema": { "type": "integer", "format": "int32", "default": 500 } }, { "name": "companyCode", "in": "query", "description": "Company filter. Returns items for specific company.", "schema": { "type": "string", "default": "" } }, { "name": "lastUpdated", "in": "query", "description": "Date Filter. Returns items that have been updated after specified date.", "schema": { "type": "string", "format": "date-time" } }, { "name": "x-amz-meta-continuationtoken", "in": "header", "description": "Used to get next page of results when item count indicated by 'pageSize' is exceeded. A token is returned in header (not body) parameter 'X-amz-meta-continuationToken' of the response whenever there are more records to fetch. Post the received value here in a new HEADER parameter on the next GET request to receive the next page of results. When getting the next page of results, you must include the same query parameters that were used when getting the first page.", "schema": { "type": "string" }, "example": "0d0f6d24-758e-4889-95ec-321f4036e146" } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/GenericListResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/GenericListResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/GenericListResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found. Request was successful and no records were found." }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } }, "post": { "tags": [ "GenericLists" ], "summary": "Creates new list item(s), fully overwrites previous record if exists.", "description": "In Basware P2P, the following lists are available. Please note the list-specific differences in available columns and column lengths. \r\n1) ACC_LIST_1 - ACC_LIST_10: Text1 - Text5 (250 chars), Num1 - Num3\r\n2) ACC_LIST_11 - ACC_LIST_20: Text1 - Text5 (50 chars), Num1 - Num3\r\n3) ACC_LIST_21 - ACC_LIST_30: Text1 - Text10 (250 chars), Num1 - Num5, Date1 - Date5\r\n4) ACC_LIST_31 - ACC_LIST_35: Text1 - Text25 (250 chars), Num1 - Num10, Date1 - Date10\r\n5) INV_LIST_1 - INV_LIST_10: Text1 - Text5 (250 chars)\r\n6) INV_LIST_11 - INV_LIST_20: Text1 - Text10 (250 chars), Num1 - Num5, Date1 - Date5\r\n7) CUST_RESOLVER_1 - CUST_RESOLVER_5: Text1 - Text15 (250 chars), Num1 - Num15, Date1 - Date15", "parameters": [ { "name": "listKey", "in": "path", "description": "ListKey defines the target table in Alusta. e.g. List with listKey 'ACC_LIST_5' will be mapped to EXT_ACC_LIST_5.", "required": true, "schema": { "enum": [ "ACC_LIST_1", "ACC_LIST_2", "ACC_LIST_3", "ACC_LIST_4", "ACC_LIST_5", "ACC_LIST_6", "ACC_LIST_7", "ACC_LIST_8", "ACC_LIST_9", "ACC_LIST_10", "ACC_LIST_11", "ACC_LIST_12", "ACC_LIST_13", "ACC_LIST_14", "ACC_LIST_15", "ACC_LIST_16", "ACC_LIST_17", "ACC_LIST_18", "ACC_LIST_19", "ACC_LIST_20", "ACC_LIST_21", "ACC_LIST_22", "ACC_LIST_23", "ACC_LIST_24", "ACC_LIST_25", "ACC_LIST_26", "ACC_LIST_27", "ACC_LIST_28", "ACC_LIST_29", "ACC_LIST_30", "ACC_LIST_31", "ACC_LIST_32", "ACC_LIST_33", "ACC_LIST_34", "ACC_LIST_35", "CUST_RESOLVER_1", "CUST_RESOLVER_2", "CUST_RESOLVER_3", "CUST_RESOLVER_4", "CUST_RESOLVER_5", "INV_LIST_1", "INV_LIST_2", "INV_LIST_3", "INV_LIST_4", "INV_LIST_5", "INV_LIST_6", "INV_LIST_7", "INV_LIST_8", "INV_LIST_9", "INV_LIST_10", "INV_LIST_11", "INV_LIST_12", "INV_LIST_13", "INV_LIST_14", "INV_LIST_15", "INV_LIST_16", "INV_LIST_17", "INV_LIST_18", "INV_LIST_19", "INV_LIST_20" ], "type": "string" } }, { "name": "Content-Type", "in": "header", "description": "Specifies the media type of the resource. Value application/json is supported.", "schema": { "type": "string" }, "example": "application/json" } ], "requestBody": { "description": "Entity to be updated", "content": { "application/json-patch+json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/GenericListEntity" } } }, "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/GenericListEntity" } } }, "text/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/GenericListEntity" } } }, "application/*+json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/GenericListEntity" } } } } }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/GenericListEntity" } } }, "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/GenericListEntity" } } }, "text/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/GenericListEntity" } } } } }, "400": { "description": "Bad request", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "401": { "description": "Unauthorized" }, "409": { "description": "Conflict", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } }, "delete": { "tags": [ "GenericLists" ], "summary": "Deletes data from Basware API. For manual one-time operations.", "description": "For manual one-time operations only, such as a manual clean-up to remove test data generated during API integration development. Only removes records from API layer. \r\nDeletion in target systems needs to be done separately using the data deletion mechanisms available in each of the target system in addition to deleting the data in Basware API.", "parameters": [ { "name": "listKey", "in": "path", "description": "Contains list item name to be deleted.", "required": true, "schema": { "enum": [ "ACC_LIST_1", "ACC_LIST_2", "ACC_LIST_3", "ACC_LIST_4", "ACC_LIST_5", "ACC_LIST_6", "ACC_LIST_7", "ACC_LIST_8", "ACC_LIST_9", "ACC_LIST_10", "ACC_LIST_11", "ACC_LIST_12", "ACC_LIST_13", "ACC_LIST_14", "ACC_LIST_15", "ACC_LIST_16", "ACC_LIST_17", "ACC_LIST_18", "ACC_LIST_19", "ACC_LIST_20", "ACC_LIST_21", "ACC_LIST_22", "ACC_LIST_23", "ACC_LIST_24", "ACC_LIST_25", "ACC_LIST_26", "ACC_LIST_27", "ACC_LIST_28", "ACC_LIST_29", "ACC_LIST_30", "ACC_LIST_31", "ACC_LIST_32", "ACC_LIST_33", "ACC_LIST_34", "ACC_LIST_35", "CUST_RESOLVER_1", "CUST_RESOLVER_2", "CUST_RESOLVER_3", "CUST_RESOLVER_4", "CUST_RESOLVER_5", "INV_LIST_1", "INV_LIST_2", "INV_LIST_3", "INV_LIST_4", "INV_LIST_5", "INV_LIST_6", "INV_LIST_7", "INV_LIST_8", "INV_LIST_9", "INV_LIST_10", "INV_LIST_11", "INV_LIST_12", "INV_LIST_13", "INV_LIST_14", "INV_LIST_15", "INV_LIST_16", "INV_LIST_17", "INV_LIST_18", "INV_LIST_19", "INV_LIST_20" ], "type": "string" } } ], "requestBody": { "description": "Contains the body of the request.\r\n Either externalCode or lastUpdated -field is required. If both values are provided, externalCode will have the priority.", "content": { "application/json-patch+json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } }, "application/json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } } } }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } } } }, "202": { "description": "RequestAccepted", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } } } }, "400": { "description": "BadRequest", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "401": { "description": "Unauthorized" }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } } }, "/v1/lists/{listKey}/{externalCode}": { "get": { "tags": [ "GenericLists" ], "summary": "Returns single list item, based on specified list and externalCode -identifier of the record.", "description": "", "parameters": [ { "name": "listKey", "in": "path", "description": "ListKey defines the target table in Alusta. e.g. List with listKey 'ACC_LIST_5' will be mapped to EXT_ACC_LIST_5.", "required": true, "schema": { "enum": [ "ACC_LIST_1", "ACC_LIST_2", "ACC_LIST_3", "ACC_LIST_4", "ACC_LIST_5", "ACC_LIST_6", "ACC_LIST_7", "ACC_LIST_8", "ACC_LIST_9", "ACC_LIST_10", "ACC_LIST_11", "ACC_LIST_12", "ACC_LIST_13", "ACC_LIST_14", "ACC_LIST_15", "ACC_LIST_16", "ACC_LIST_17", "ACC_LIST_18", "ACC_LIST_19", "ACC_LIST_20", "ACC_LIST_21", "ACC_LIST_22", "ACC_LIST_23", "ACC_LIST_24", "ACC_LIST_25", "ACC_LIST_26", "ACC_LIST_27", "ACC_LIST_28", "ACC_LIST_29", "ACC_LIST_30", "ACC_LIST_31", "ACC_LIST_32", "ACC_LIST_33", "ACC_LIST_34", "ACC_LIST_35", "CUST_RESOLVER_1", "CUST_RESOLVER_2", "CUST_RESOLVER_3", "CUST_RESOLVER_4", "CUST_RESOLVER_5", "INV_LIST_1", "INV_LIST_2", "INV_LIST_3", "INV_LIST_4", "INV_LIST_5", "INV_LIST_6", "INV_LIST_7", "INV_LIST_8", "INV_LIST_9", "INV_LIST_10", "INV_LIST_11", "INV_LIST_12", "INV_LIST_13", "INV_LIST_14", "INV_LIST_15", "INV_LIST_16", "INV_LIST_17", "INV_LIST_18", "INV_LIST_19", "INV_LIST_20" ], "type": "string" } }, { "name": "externalCode", "in": "path", "description": "The ExternalCode of the list item", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/GenericListEntity" } }, "application/json": { "schema": { "$ref": "#/components/schemas/GenericListEntity" } }, "text/json": { "schema": { "$ref": "#/components/schemas/GenericListEntity" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found. Request was successful and no records were found." }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } }, "patch": { "tags": [ "GenericLists" ], "summary": "Updates fields on specified list item. Preserves existing values in omitted fields.", "description": "In Basware P2P, the following lists are available. Please note the list-specific differences in available columns and column lengths. \r\n1) ACC_LIST_1 - ACC_LIST_10: Text1 - Text5 (250 chars), Num1 - Num3\r\n2) ACC_LIST_11 - ACC_LIST_20: Text1 - Text5 (50 chars), Num1 - Num3\r\n3) ACC_LIST_21 - ACC_LIST_30: Text1 - Text10 (250 chars), Num1 - Num5, Date1 - Date5\r\n4) ACC_LIST_31 - ACC_LIST_35: Text1 - Text25 (250 chars), Num1 - Num10, Date1 - Date10\r\n5) INV_LIST_1 - INV_LIST_10: Text1 - Text5 (250 chars)\r\n6) INV_LIST_11 - INV_LIST_20: Text1 - Text10 (250 chars), Num1 - Num5, Date1 - Date5\r\n7) CUST_RESOLVER_1 - CUST_RESOLVER_5: Text1 - Text15 (250 chars), Num1 - Num15, Date1 - Date15\r\n\r\nNote: Basware API considers 'null' value in field(s) equivalent to the field(s) not being sent. For this reason patch method does not support setting field values to 'null'.", "parameters": [ { "name": "listKey", "in": "path", "description": "ListKey defines the target table in Alusta. e.g. List with listKey 'ACC_LIST_5' will be mapped to EXT_ACC_LIST_5.", "required": true, "schema": { "enum": [ "ACC_LIST_1", "ACC_LIST_2", "ACC_LIST_3", "ACC_LIST_4", "ACC_LIST_5", "ACC_LIST_6", "ACC_LIST_7", "ACC_LIST_8", "ACC_LIST_9", "ACC_LIST_10", "ACC_LIST_11", "ACC_LIST_12", "ACC_LIST_13", "ACC_LIST_14", "ACC_LIST_15", "ACC_LIST_16", "ACC_LIST_17", "ACC_LIST_18", "ACC_LIST_19", "ACC_LIST_20", "ACC_LIST_21", "ACC_LIST_22", "ACC_LIST_23", "ACC_LIST_24", "ACC_LIST_25", "ACC_LIST_26", "ACC_LIST_27", "ACC_LIST_28", "ACC_LIST_29", "ACC_LIST_30", "ACC_LIST_31", "ACC_LIST_32", "ACC_LIST_33", "ACC_LIST_34", "ACC_LIST_35", "CUST_RESOLVER_1", "CUST_RESOLVER_2", "CUST_RESOLVER_3", "CUST_RESOLVER_4", "CUST_RESOLVER_5", "INV_LIST_1", "INV_LIST_2", "INV_LIST_3", "INV_LIST_4", "INV_LIST_5", "INV_LIST_6", "INV_LIST_7", "INV_LIST_8", "INV_LIST_9", "INV_LIST_10", "INV_LIST_11", "INV_LIST_12", "INV_LIST_13", "INV_LIST_14", "INV_LIST_15", "INV_LIST_16", "INV_LIST_17", "INV_LIST_18", "INV_LIST_19", "INV_LIST_20" ], "type": "string" } }, { "name": "externalCode", "in": "path", "description": "The ExternalCode of the genericList to be updated", "required": true, "schema": { "type": "string" } } ], "requestBody": { "description": "Entity to be updated", "content": { "application/json-patch+json": { "schema": { "$ref": "#/components/schemas/GenericListEntity" } }, "application/json": { "schema": { "$ref": "#/components/schemas/GenericListEntity" } }, "text/json": { "schema": { "$ref": "#/components/schemas/GenericListEntity" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/GenericListEntity" } } } }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/GenericListEntity" } }, "application/json": { "schema": { "$ref": "#/components/schemas/GenericListEntity" } }, "text/json": { "schema": { "$ref": "#/components/schemas/GenericListEntity" } } } }, "400": { "description": "Bad request", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found. Record to update not found." }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } } }, "/v1/matchingOrderLines": { "get": { "tags": [ "MatchingOrderLines" ], "summary": "Returns matching order lines posted to Basware API.", "description": "", "parameters": [ { "name": "orderExternalCode", "in": "query", "description": "The externalCode of the order.", "required": true, "schema": { "type": "string" } }, { "name": "pageSize", "in": "query", "description": "A limit for the number of items to be returned for one request. Limit can range between 1 and 100 items.", "schema": { "type": "integer", "format": "int32", "default": 100 } }, { "name": "lastUpdated", "in": "query", "description": "Date Filter. Returns items that have been updated after specified date.", "schema": { "type": "string", "format": "date-time" } }, { "name": "x-amz-meta-continuationtoken", "in": "header", "description": "Used to get next page of results when item count indicated by 'pageSize' is exceeded. A token is returned in header (not body) parameter 'X-amz-meta-continuationToken' of the response whenever there are more records to fetch. Post the received value here in a new HEADER parameter on the next GET request to receive the next page of results. When getting the next page of results, you must include the same query parameters that were used when getting the first page.", "schema": { "type": "string" }, "example": "194943db-da52-4167-a464-d348bb1ced18" } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/OrderLineResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/OrderLineResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/OrderLineResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found. Request was successful and no records were found." }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } }, "post": { "tags": [ "MatchingOrderLines" ], "summary": "Creates new matching order line(s), fully overwrites previous record if exists.", "description": "Notes:\r\n1) Please make sure you have POSTed the order header through matchingOrders API before posting lines to the same order to matchingOrderLines API. It is enough to POST the order header only once (unless updates are neede to the order header). \r\n2) Up to 100 order lines can be posted in one request. Order lines for an order containing more than 100 lines need to be posted in several requets.\r\n3) A single POST operation is saved to P2P in a single transaction. Multiple POST operations will be saved each in their own transactions.\r\n4) Invoiced quantities and sums need to be imported before matching has been performed against the order in P2P. \r\n5) Field 'isDeleted' needs to have a value other than null when bestfit matching is used on the order in P2P. \r\n\r\nPlease see section \"[Usage scenario 2: Import external purchase orders for Order Matching](https://developer.basware.com/api/p2p/manual#usage2)\" for details on implementing this API. Check out also the [example JSONs using a minimal feasible set of fields](https://developer.basware.com/api/p2p/templates) from the developer site.", "parameters": [ { "name": "Content-Type", "in": "header", "description": "Specifies the media type of the resource. Value application/json is supported.", "schema": { "type": "string" }, "example": "application/json" } ], "requestBody": { "content": { "application/json-patch+json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/OrderLineEntity" } } }, "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/OrderLineEntity" } } }, "text/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/OrderLineEntity" } } }, "application/*+json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/OrderLineEntity" } } } } }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/OrderLineEntity" } } }, "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/OrderLineEntity" } } }, "text/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/OrderLineEntity" } } } } }, "400": { "description": "Bad request", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "401": { "description": "Unauthorized" }, "409": { "description": "Conflict", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } }, "delete": { "tags": [ "MatchingOrderLines" ], "summary": "Deletes data from Basware API. For manual one-time operations.", "description": "For manual one-time operations only, such as a manual clean-up to remove test data generated during API integration development. Only removes records from API layer. \r\nDeletion in target systems needs to be done separately using the data deletion mechanisms available in each of the target system in addition to deleting the data in Basware API.", "requestBody": { "description": "Contains the body of the request.\r\n Either externalCode or lastUpdated -field is required. If both values are provided, externalCode will have the priority.", "content": { "application/json-patch+json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } }, "application/json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } } } }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } } } }, "202": { "description": "RequestAccepted", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } } } }, "400": { "description": "BadRequest", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "401": { "description": "Unauthorized" }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } } }, "/v1/matchingOrderLines/{externalCode}": { "get": { "tags": [ "MatchingOrderLines" ], "summary": "Returns single matching order line by externalCode -identifier.", "description": "", "parameters": [ { "name": "externalCode", "in": "path", "description": "ExternalCode of the entity to be fetched", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/OrderLineEntity" } }, "application/json": { "schema": { "$ref": "#/components/schemas/OrderLineEntity" } }, "text/json": { "schema": { "$ref": "#/components/schemas/OrderLineEntity" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found. Request was successful and no records were found." }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } }, "patch": { "tags": [ "MatchingOrderLines" ], "summary": "Updates fields on specified matching order line. Can be used for adding new goods receipts to the order line. Preserves existing values in fields, which were not updated.", "description": "Notes: \r\n1) Concurrent PATCH operations to the same matchingOrderline can fail with error HTTP 503 due to concurrency issues. In such a case the failed request should be retried after a few seconds delay. \r\n2) Basware API considers 'null' value in field(s) equivalent to the field(s) not being sent. For this reason patch method does not support setting field values to 'null'.\r\n\r\nPlease see section \"[Usage scenario 2: Import external purchase orders for Order Matching](https://developer.basware.com/api/p2p/manual#usage2)\" for details on implementing this API. Check out also the [example JSONs using a minimal feasible set of fields](https://developer.basware.com/api/p2p/templates) from the developer site.", "parameters": [ { "name": "externalCode", "in": "path", "description": "The ExternalCode of the orderLine to be updated", "required": true, "schema": { "type": "string" } } ], "requestBody": { "description": "Entity to be updated", "content": { "application/json-patch+json": { "schema": { "$ref": "#/components/schemas/OrderLineEntity" } }, "application/json": { "schema": { "$ref": "#/components/schemas/OrderLineEntity" } }, "text/json": { "schema": { "$ref": "#/components/schemas/OrderLineEntity" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/OrderLineEntity" } } } }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/OrderLineEntity" } }, "application/json": { "schema": { "$ref": "#/components/schemas/OrderLineEntity" } }, "text/json": { "schema": { "$ref": "#/components/schemas/OrderLineEntity" } } } }, "400": { "description": "Bad request", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found. Record to update not found." }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "503": { "description": "Service unavailable" } } } }, "/v1/matchingOrders": { "get": { "tags": [ "MatchingOrders" ], "summary": "Returns matching order headers posted to Basware API.", "description": "", "parameters": [ { "name": "pageSize", "in": "query", "description": "A limit for the number of items to be returned for one request. Limit can range between 1 and 500 items.", "schema": { "type": "integer", "format": "int32", "default": 500 } }, { "name": "companyCode", "in": "query", "description": "Company filter. Returns items for specific company.", "schema": { "type": "string", "default": "" } }, { "name": "orderStatus", "in": "query", "description": "Order status filter. Returns items for specific status.", "schema": { "type": "string", "default": "" } }, { "name": "lastUpdated", "in": "query", "description": "Date Filter. Returns items that have been updated after specified date.", "schema": { "type": "string", "format": "date-time" } }, { "name": "x-amz-meta-continuationtoken", "in": "header", "description": "Used to get next page of results when item count indicated by 'pageSize' is exceeded. A token is returned in header (not body) parameter 'X-amz-meta-continuationToken' of the response whenever there are more records to fetch. Post the received value here in a new HEADER parameter on the next GET request to receive the next page of results. When getting the next page of results, you must include the same query parameters that were used when getting the first page.", "schema": { "type": "string" }, "example": "a4cb3d5f-441a-469d-9234-36f631bc5249" } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/OrderResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/OrderResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/OrderResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found. Request was successful and no records were found." }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } }, "post": { "tags": [ "MatchingOrders" ], "summary": "Creates new order header(s), overwrites previous record if exists.", "description": "Notes: \r\n1) Please make sure you have POSTed the order header to matchingOrders API before posting lines to the same order through matchingOrderLines API. It is enough to POST the order header only once (unless updates are needed to the order header). The order becomes available in P2P after order lines lines have been added.\r\n2) Vendor(s) used by the order need to be in P2P before importing the order. \r\n3) The following fields uniquely identify an order in P2P: Order number, source system, company code and organization element code.\r\n\r\nPlease see section \"[Usage scenario 2: Import external purchase orders for Order Matching](https://developer.basware.com/api/p2p/manual#usage2)\" for details on implementing this API. Check out also the [example JSONs using a minimal feasible set of fields](https://developer.basware.com/api/p2p/templates) from the developer site.", "parameters": [ { "name": "Content-Type", "in": "header", "description": "Specifies the media type of the resource. Value application/json is supported.", "schema": { "type": "string" }, "example": "application/json" } ], "requestBody": { "content": { "application/json-patch+json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/OrderEntity" } } }, "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/OrderEntity" } } }, "text/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/OrderEntity" } } }, "application/*+json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/OrderEntity" } } } } }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/OrderEntity" } } }, "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/OrderEntity" } } }, "text/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/OrderEntity" } } } } }, "400": { "description": "Bad request", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "401": { "description": "Unauthorized" }, "409": { "description": "Conflict", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } }, "delete": { "tags": [ "MatchingOrders" ], "summary": "Deletes data from Basware API. For manual one-time operations.", "description": "For manual one-time operations only, such as a manual clean-up to remove test data generated during API integration development. Only removes records from API layer. \r\nDeletion in target systems needs to be done separately using the data deletion mechanisms available in each of the target system in addition to deleting the data in Basware API.", "requestBody": { "description": "Contains the body of the request.\r\n Either externalCode or lastUpdated -field is required. If both values are provided, externalCode will have the priority.", "content": { "application/json-patch+json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } }, "application/json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } } } }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } } } }, "202": { "description": "RequestAccepted", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } } } }, "400": { "description": "BadRequest", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "401": { "description": "Unauthorized" }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } } }, "/v1/matchingOrders/{externalCode}": { "get": { "tags": [ "MatchingOrders" ], "summary": "Returns single matching order header by externalCode -identifier.", "description": "", "parameters": [ { "name": "externalCode", "in": "path", "description": "The ExternalCode of the entity to be fetched", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/OrderEntity" } }, "application/json": { "schema": { "$ref": "#/components/schemas/OrderEntity" } }, "text/json": { "schema": { "$ref": "#/components/schemas/OrderEntity" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found. Request was successful and no records were found." }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } }, "patch": { "tags": [ "MatchingOrders" ], "summary": "Updates fields on specified order header. Preserves existing values in fields, which were not updated.", "description": "Note: Basware API considers 'null' value in field(s) equivalent to the field(s) not being sent. For this reason patch method does not support setting field values to 'null'.\r\nPlease see section \"[Usage scenario 2: Import external purchase orders for Order Matching](https://developer.basware.com/api/p2p/manual#usage2)\" for details on implementing this API. Check out also the [example JSONs using a minimal feasible set of fields](https://developer.basware.com/api/p2p/templates) from the developer site.", "parameters": [ { "name": "externalCode", "in": "path", "description": "The ExternalCode of the order to be updated", "required": true, "schema": { "type": "string" } } ], "requestBody": { "description": "Entity to be updated", "content": { "application/json-patch+json": { "schema": { "$ref": "#/components/schemas/OrderEntity" } }, "application/json": { "schema": { "$ref": "#/components/schemas/OrderEntity" } }, "text/json": { "schema": { "$ref": "#/components/schemas/OrderEntity" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/OrderEntity" } } } }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/OrderEntity" } }, "application/json": { "schema": { "$ref": "#/components/schemas/OrderEntity" } }, "text/json": { "schema": { "$ref": "#/components/schemas/OrderEntity" } } } }, "400": { "description": "Bad request", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found. Record to update not found." }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } } }, "/v1/organizations": { "post": { "tags": [ "Organizations" ], "summary": "Creates new organization element(s), fully overwrites previous record if exists. Available for pilot customers.", "description": "Notes: \r\n 1. Organization element type 'Company' requires fields 'homeCurrency' and 'countryCode' to have values. \r\n 2. Organization element type 'Group' does not support adding organization identifiers.", "parameters": [ { "name": "Content-Type", "in": "header", "description": "Specifies the media type of the resource. Value application/json is supported.", "schema": { "type": "string" }, "example": "application/json" } ], "requestBody": { "description": "", "content": { "application/json-patch+json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/OrganizationEntity" } } }, "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/OrganizationEntity" } } }, "text/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/OrganizationEntity" } } }, "application/*+json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/OrganizationEntity" } } } } }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/OrganizationEntity" } } }, "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/OrganizationEntity" } } }, "text/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/OrganizationEntity" } } } } }, "400": { "description": "Bad request", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "403": { "description": "Forbidden", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } }, "get": { "tags": [ "Organizations" ], "summary": "Returns existing organization elements.", "parameters": [ { "name": "level", "in": "query", "description": "Sets how many levels of the organization to include. If no parentExternalCode is given, it starts from the top and goes down to the specified level.", "schema": { "type": "string" } }, { "name": "parentExternalCode", "in": "query", "description": "Returns child organizations linked to the specified parentExternalCode. When level is also provided, it includes all child organizations up to the given level.", "schema": { "type": "string" } }, { "name": "pageSize", "in": "query", "description": "A limit for the number of items to be returned for one request. Limit can range between 1 and 300 items.", "schema": { "type": "integer", "format": "int32", "default": 300 } }, { "name": "lastUpdated", "in": "query", "description": "Date Filter. Returns items that have been updated after specified date. The lastUpdated filter is ignored when used together with level or parentExternalCode. Use it alone for the filter to apply.", "schema": { "type": "string", "format": "date-time" } } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/OrganizationEntity" } } }, "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/OrganizationEntity" } } }, "text/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/OrganizationEntity" } } } } }, "400": { "description": "Bad request", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "403": { "description": "Forbidden", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } }, "delete": { "tags": [ "Organizations" ], "summary": "Can be used for removing existing organization elements in draft state (published = false).", "description": "Notes: \r\n 1. Only unpublished, draft state organization elements can be removed (those having 'published' = 'false').\r\n 2. Removing an organization element will also remove it's child organization elements.", "requestBody": { "description": "", "content": { "application/json-patch+json": { "schema": { "$ref": "#/components/schemas/DeleteOrganisationRequest" } }, "application/json": { "schema": { "$ref": "#/components/schemas/DeleteOrganisationRequest" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DeleteOrganisationRequest" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/DeleteOrganisationRequest" } } } }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/DeleteOrganisationResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/DeleteOrganisationResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DeleteOrganisationResponse" } } } }, "202": { "description": "RequestAccepted", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/DeleteOrganisationResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/DeleteOrganisationResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DeleteOrganisationResponse" } } } }, "400": { "description": "BadRequest", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "401": { "description": "Unauthorized" }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } } }, "/v1/organizations/{externalCode}": { "get": { "tags": [ "Organizations" ], "summary": "Returns a single organization element by externalCode -identifier.", "parameters": [ { "name": "externalCode", "in": "path", "description": "", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/OrganizationEntity" } }, "application/json": { "schema": { "$ref": "#/components/schemas/OrganizationEntity" } }, "text/json": { "schema": { "$ref": "#/components/schemas/OrganizationEntity" } } } } } } }, "/v1/paymentTerms": { "get": { "tags": [ "PaymentTerms" ], "summary": "Returns payment terms posted to Basware API.", "description": "", "parameters": [ { "name": "pageSize", "in": "query", "description": "A limit for the number of items to be returned for one request. Limit can range between 1 and 500 items.", "schema": { "type": "integer", "format": "int32", "default": 500 } }, { "name": "companyCode", "in": "query", "description": "Company filter. Returns items for specific company.", "schema": { "type": "string", "default": "" } }, { "name": "lastUpdated", "in": "query", "description": "Date Filter. Returns items that have been updated after specified date.", "schema": { "type": "string", "format": "date-time" } }, { "name": "x-amz-meta-continuationtoken", "in": "header", "description": "Used to get next page of results when item count indicated by 'pageSize' is exceeded. A token is returned in header (not body) parameter 'X-amz-meta-continuationToken' of the response whenever there are more records to fetch. Post the received value here in a new HEADER parameter on the next GET request to receive the next page of results. When getting the next page of results, you must include the same query parameters that were used when getting the first page.", "schema": { "type": "string" }, "example": "9797a921-ca15-4b40-84e0-11fe94125b47" } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/PaymentTermResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/PaymentTermResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/PaymentTermResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found. Request was successful and no records were found." }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } }, "post": { "tags": [ "PaymentTerms" ], "summary": "Creates new paymentTerm entity, fully overwrites previous record if exists.", "description": "Note: Please post payment term(s) before posting vendor(s) using the payment term(s). Payment term(s) should be in P2P before posting the vendor(s).", "parameters": [ { "name": "Content-Type", "in": "header", "description": "Specifies the media type of the resource. Value application/json is supported.", "schema": { "type": "string" }, "example": "application/json" } ], "requestBody": { "content": { "application/json-patch+json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PaymentTermEntity" } } }, "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PaymentTermEntity" } } }, "text/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PaymentTermEntity" } } }, "application/*+json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PaymentTermEntity" } } } } }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PaymentTermEntity" } } }, "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PaymentTermEntity" } } }, "text/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PaymentTermEntity" } } } } }, "400": { "description": "Bad request", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "401": { "description": "Unauthorized" }, "409": { "description": "Conflict", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } }, "delete": { "tags": [ "PaymentTerms" ], "summary": "Deletes data from Basware API. For manual one-time operations.", "description": "For manual one-time operations only, such as a manual clean-up to remove test data generated during API integration development. Only removes records from API layer. \r\nDeletion in target systems needs to be done separately using the data deletion mechanisms available in each of the target system in addition to deleting the data in Basware API.", "requestBody": { "description": "Contains the body of the request.\r\n Either externalCode or lastUpdated -field is required. If both values are provided, externalCode will have the priority.", "content": { "application/json-patch+json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } }, "application/json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } } } }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } } } }, "202": { "description": "RequestAccepted", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } } } }, "400": { "description": "BadRequest", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "401": { "description": "Unauthorized" }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } } }, "/v1/paymentTerms/{externalCode}": { "get": { "tags": [ "PaymentTerms" ], "summary": "Returns single payment term by externalCode -identifier.", "description": "", "parameters": [ { "name": "externalCode", "in": "path", "description": "The ExternalCode of the entity to be fetched", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/PaymentTermEntity" } }, "application/json": { "schema": { "$ref": "#/components/schemas/PaymentTermEntity" } }, "text/json": { "schema": { "$ref": "#/components/schemas/PaymentTermEntity" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found. Request was successful and no records were found." }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } }, "patch": { "tags": [ "PaymentTerms" ], "summary": "Updates on specified payment term. Preserves existing values in fields, which were not updated.", "parameters": [ { "name": "externalCode", "in": "path", "description": "The ExternalCode of the payment term to be updated. To do a partial update consumer needs to provide changed properties.", "required": true, "schema": { "type": "string" } } ], "requestBody": { "description": "Entity to be updated", "content": { "application/json-patch+json": { "schema": { "$ref": "#/components/schemas/PaymentTermEntity" } }, "application/json": { "schema": { "$ref": "#/components/schemas/PaymentTermEntity" } }, "text/json": { "schema": { "$ref": "#/components/schemas/PaymentTermEntity" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/PaymentTermEntity" } } } }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/PaymentTermEntity" } }, "application/json": { "schema": { "$ref": "#/components/schemas/PaymentTermEntity" } }, "text/json": { "schema": { "$ref": "#/components/schemas/PaymentTermEntity" } } } }, "400": { "description": "Bad request", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found. Record to update not found." }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } } }, "/v1/projects": { "get": { "tags": [ "Projects v1 (deprecated)" ], "summary": "Returns projects posted to Basware API.", "description": "", "parameters": [ { "name": "pageSize", "in": "query", "description": "A limit for the number of items to be returned for one request. Limit can range between 1 and 500 items.", "schema": { "type": "integer", "format": "int32", "default": 500 } }, { "name": "companyCode", "in": "query", "description": "Company filter. Returns items for specific company.", "schema": { "type": "string", "default": "" } }, { "name": "lastUpdated", "in": "query", "description": "Date Filter. Returns items that have been updated after specified date.", "schema": { "type": "string", "format": "date-time" } }, { "name": "x-amz-meta-continuationtoken", "in": "header", "description": "Used to get next page of results when item count indicated by 'pageSize' is exceeded. A token is returned in header (not body) parameter 'X-amz-meta-continuationToken' of the response whenever there are more records to fetch. Post the received value here in a new HEADER parameter on the next GET request to receive the next page of results. When getting the next page of results, you must include the same query parameters that were used when getting the first page.", "schema": { "type": "string" }, "example": "e115bcee-a1d1-4be3-98b5-ddf4756c0eee" } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ProjectResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ProjectResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ProjectResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found. Request was successful and no records were found." }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } }, "post": { "tags": [ "Projects v1 (deprecated)" ], "summary": "Creates new projects, fully overwrites previous record if exists.", "description": "Notes: \r\n1. This /v1/projects API is deprecated and should no longer be used in new implementations. Existing implementations will keep functioning until further notice. Basware will give at least 12 month notice before decommissioning this API.\r\n2. Data from /v1/projects API is imported to P2P target table ADM_PROJECTS.", "parameters": [ { "name": "Content-Type", "in": "header", "description": "Specifies the media type of the resource. Value application/json is supported.", "schema": { "type": "string" }, "example": "application/json" } ], "requestBody": { "content": { "application/json-patch+json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ProjectEntity" } } }, "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ProjectEntity" } } }, "text/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ProjectEntity" } } }, "application/*+json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ProjectEntity" } } } } }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ProjectEntity" } } }, "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ProjectEntity" } } }, "text/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ProjectEntity" } } } } }, "400": { "description": "Bad request", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "401": { "description": "Unauthorized" }, "409": { "description": "Conflict", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } }, "delete": { "tags": [ "Projects v1 (deprecated)" ], "summary": "Deletes data from Basware API. For manual one-time operations.", "description": "For manual one-time operations only, such as a manual clean-up to remove test data generated during API integration development. Only removes records from API layer. \r\nDeletion in target systems needs to be done separately using the data deletion mechanisms available in each of the target system in addition to deleting the data in Basware API.", "requestBody": { "description": "Contains the body of the request.\r\n Either externalCode or lastUpdated -field is required. If both values are provided, externalCode will have the priority.", "content": { "application/json-patch+json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } }, "application/json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } } } }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } } } }, "202": { "description": "RequestAccepted", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } } } }, "400": { "description": "BadRequest", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "401": { "description": "Unauthorized" }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } } }, "/v1/projects/{externalCode}": { "get": { "tags": [ "Projects v1 (deprecated)" ], "summary": "Returns single project by externalCode -identifier.", "description": "", "parameters": [ { "name": "externalCode", "in": "path", "description": "The ExternalCode of the entity to be fetched", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ProjectEntity" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ProjectEntity" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ProjectEntity" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found. Request was successful and no records were found." }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } }, "patch": { "tags": [ "Projects v1 (deprecated)" ], "summary": "Updates project. Existing data is preserved in omitted records.", "parameters": [ { "name": "externalCode", "in": "path", "description": "The ExternalCode of the project to be updated", "required": true, "schema": { "type": "string" } } ], "requestBody": { "description": "Entity to be updated", "content": { "application/json-patch+json": { "schema": { "$ref": "#/components/schemas/ProjectEntity" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ProjectEntity" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ProjectEntity" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/ProjectEntity" } } } }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ProjectEntity" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ProjectEntity" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ProjectEntity" } } } }, "400": { "description": "Bad request", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found. Record to update not found." }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } } }, "/v2/projects": { "get": { "tags": [ "Projects v2" ], "summary": "Returns projects posted to Basware API.", "description": "", "parameters": [ { "name": "pageSize", "in": "query", "description": "A limit for the number of items to be returned for one request. Limit can range between 1 and 500 items.", "schema": { "type": "integer", "format": "int32", "default": 500 } }, { "name": "companyCode", "in": "query", "description": "Company filter. Returns items for specific company.", "schema": { "type": "string", "default": "" } }, { "name": "lastUpdated", "in": "query", "description": "Date Filter. Returns items that have been updated after specified date.", "schema": { "type": "string", "format": "date-time" } }, { "name": "x-amz-meta-continuationtoken", "in": "header", "description": "Used to get next page of results when item count indicated by 'pageSize' is exceeded. A token is returned in header (not body) parameter 'X-amz-meta-continuationToken' of the response whenever there are more records to fetch. Post the received value here in a new HEADER parameter on the next GET request to receive the next page of results. When getting the next page of results, you must include the same query parameters that were used when getting the first page.", "schema": { "type": "string" }, "example": "d2ddbdd0-387c-455e-aa51-687b6f517004" } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ProjectResponseV2" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ProjectResponseV2" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ProjectResponseV2" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found. Request was successful and no records were found." }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } }, "post": { "tags": [ "Projects v2" ], "summary": "Creates new projects, fully overwrites previous record if exists.", "description": "Notes: \r\n1. This /v2/projects API replaces the deprecated /v1/projects API and should be used in new implementations. \r\n2. Data from /v2/projects API is imported to P2P target table GDM_CUSTOMER_PROJECTS.", "parameters": [ { "name": "Content-Type", "in": "header", "description": "Specifies the media type of the resource. Value application/json is supported.", "schema": { "type": "string" }, "example": "application/json" } ], "requestBody": { "content": { "application/json-patch+json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ProjectEntityV2" } } }, "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ProjectEntityV2" } } }, "text/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ProjectEntityV2" } } }, "application/*+json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ProjectEntityV2" } } } } }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ProjectEntityV2" } } }, "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ProjectEntityV2" } } }, "text/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ProjectEntityV2" } } } } }, "400": { "description": "Bad request", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "401": { "description": "Unauthorized" }, "409": { "description": "Conflict", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } }, "delete": { "tags": [ "Projects v2" ], "summary": "Deletes data from Basware API. For manual one-time operations.", "description": "For manual one-time operations only, such as a manual clean-up to remove test data generated during API integration development. Only removes records from API layer. \r\nDeletion in target systems needs to be done separately using the data deletion mechanisms available in each of the target system in addition to deleting the data in Basware API.", "requestBody": { "description": "Contains the body of the request.\r\n Either externalCode or lastUpdated -field is required. If both values are provided, externalCode will have the priority.", "content": { "application/json-patch+json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } }, "application/json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } } } }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } } } }, "202": { "description": "RequestAccepted", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } } } }, "400": { "description": "BadRequest", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "401": { "description": "Unauthorized" }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } } }, "/v2/projects/{externalCode}": { "get": { "tags": [ "Projects v2" ], "summary": "Returns single project by externalCode -identifier.", "description": "", "parameters": [ { "name": "externalCode", "in": "path", "description": "The ExternalCode of the entity to be fetched", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ProjectEntity" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ProjectEntity" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ProjectEntity" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found. Request was successful and no records were found." }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } }, "patch": { "tags": [ "Projects v2" ], "summary": "Updates project. Existing data is preserved in omitted records.", "parameters": [ { "name": "externalCode", "in": "path", "description": "The ExternalCode of the project to be updated", "required": true, "schema": { "type": "string" } } ], "requestBody": { "description": "Entity to be updated", "content": { "application/json-patch+json": { "schema": { "$ref": "#/components/schemas/ProjectEntityV2" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ProjectEntityV2" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ProjectEntityV2" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/ProjectEntityV2" } } } }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ProjectEntityV2" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ProjectEntityV2" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ProjectEntityV2" } } } }, "400": { "description": "Bad request", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found. Record to update not found." }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } } }, "/v1/purchaseGoodsReceipts": { "get": { "tags": [ "PurchaseGoodsReceipts" ], "summary": "Returns purchase goods receipts.", "description": "", "parameters": [ { "name": "processingStatus", "in": "query", "description": "Document status filter. Returns items by purchase goods receipt status.", "schema": { "enum": [ "ImportInProgress", "Imported", "ImportFailed" ], "type": "string" } }, { "name": "pageSize", "in": "query", "description": "A limit for the number of items to be returned for one request. Limit can range between 1 and 100 items.", "schema": { "type": "integer", "format": "int32", "default": 100 } }, { "name": "lastUpdated", "in": "query", "description": "Date filter. Returns items that have been updated after specified date.", "schema": { "type": "string", "format": "date-time" } }, { "name": "x-amz-meta-continuationtoken", "in": "header", "description": "Used to get next page of results when item count indicated by 'pageSize' is exceeded. A token is returned in header (not body) parameter 'X-amz-meta-continuationToken' of the response whenever there are more records to fetch. Post the received value here in a new HEADER parameter on the next GET request to receive the next page of results. When getting the next page of results, you must include the same query parameters that were used when getting the first page.", "schema": { "type": "string" }, "example": "78b71d6b-b219-494d-860e-8f1aa8945d8c" } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/PurchaseGoodsReceiptResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/PurchaseGoodsReceiptResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/PurchaseGoodsReceiptResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Not Found" }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } }, "post": { "tags": [ "PurchaseGoodsReceipts" ], "summary": "Creates new purchase goods receipts, fully overwrites previous record if exists.", "description": "Specifies a single goods receipt or reverse goods receipt document concerning one purchase order. Goods receipt document can contain single receiving for some or all PO lines. So you can receive all order lines, some order lines or some order lines partly. Reversing has reference to GR document and line to reverse with negative quanties. For receiving or reversing to succeed all lines need to exist in order having sufficient quantity to receive. They cannot be closed, cancelled or matched. Several goods receipt documents can be sent for the same purchase order in one JSON. Suggested practice is to group lines received at one time in one location for the PO into a single goods receipt document.\r\nNotes:\r\n1. All the lines received on single goods receipt document must be ordered to the same delivery location as stated in order. Each delivery location requires a separate goods receipt document.\r\n2. A single goods receipt document is processed fully when imported to P2P. There is no partial processing: All lines are either accepted or the complete goods receipt document is rejected.\r\n3. P2P supports reversing GR documents. When sending a GR reversal, all lines on the GR document must be reversal lines. Normal goods receipt lines and reversal lines cannot be mixed on the same goods reeipt document. \r\n\r\nPlease see section \"[Usage scenario 4: Import and export procurement data](https://developer.basware.com/api/p2p/manual#usage4)\" for details on implementing this API. Check out also the [example JSONs using a minimal feasible set of fields](https://developer.basware.com/api/p2p/templates) from the developer site.", "parameters": [ { "name": "Content-Type", "in": "header", "description": "Specifies the media type of the resource. Value application/json is supported.", "schema": { "type": "string" }, "example": "application/json" } ], "requestBody": { "content": { "application/json-patch+json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PurchaseGoodsReceiptEntity" } } }, "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PurchaseGoodsReceiptEntity" } } }, "text/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PurchaseGoodsReceiptEntity" } } }, "application/*+json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PurchaseGoodsReceiptEntity" } } } } }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/PurchaseGoodsReceiptEntity" } }, "application/json": { "schema": { "$ref": "#/components/schemas/PurchaseGoodsReceiptEntity" } }, "text/json": { "schema": { "$ref": "#/components/schemas/PurchaseGoodsReceiptEntity" } } } }, "400": { "description": "Bad request", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "401": { "description": "Unauthorized" }, "409": { "description": "Conflict", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } }, "delete": { "tags": [ "PurchaseGoodsReceipts" ], "summary": "Deletes data from Basware API. For manual one-time operations.", "description": "For manual one-time operations only, such as a manual clean-up to remove test data generated during API integration development. Only removes records from API layer. \r\nDeletion in target systems needs to be done separately using the data deletion mechanisms available in each of the target system in addition to deleting the data in Basware API.", "requestBody": { "description": "Contains the body of the request.\r\n Either externalCode or lastUpdated -field is required. If both values are provided, externalCode will have the priority.", "content": { "application/json-patch+json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } }, "application/json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } } } }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } } } }, "202": { "description": "RequestAccepted", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } } } }, "400": { "description": "BadRequest", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "401": { "description": "Unauthorized" }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } } }, "/v1/purchaseGoodsReceipts/{externalCode}": { "get": { "tags": [ "PurchaseGoodsReceipts" ], "summary": "Returns single purchase goods receipts by orderId - identifier.", "parameters": [ { "name": "externalCode", "in": "path", "description": "The external code of the entity to be fetched", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/PurchaseGoodsReceiptResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/PurchaseGoodsReceiptResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/PurchaseGoodsReceiptResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found. Request was successful and no records were found." }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } } }, "/v1/purchaseOrders": { "get": { "tags": [ "PurchaseOrders" ], "summary": "Returns imported purchase orders.", "description": "Note: This GET operation returns a HTTP redirect, which the API client needs to follow. \r\n* 'Authorization' header must not be included in the redirected request (the second request after receiving a redirect). \r\n* 'Host' header needs to be included.", "parameters": [ { "name": "processingStatus", "in": "query", "description": "Document status filter. Returns items by purchase order status.", "schema": { "enum": [ "Uncompleted", "ReadyForImport", "ImportInProgress", "Imported", "ImportFailed" ], "type": "string" } }, { "name": "pageSize", "in": "query", "description": "A limit for the number of items to be returned for one request. Limit can range between 1 and 100 items.", "schema": { "type": "integer", "format": "int32", "default": 100 } }, { "name": "lastUpdated", "in": "query", "description": "Date filter. Returns items that have been updated after specified date.", "schema": { "type": "string", "format": "date-time" } }, { "name": "x-amz-meta-continuationtoken", "in": "header", "description": "Used to get next page of results when item count indicated by 'pageSize' is exceeded. A token is returned in header (not body) parameter 'X-amz-meta-continuationToken' of the response whenever there are more records to fetch. Post the received value here in a new HEADER parameter on the next GET request to receive the next page of results. When getting the next page of results, you must include the same query parameters that were used when getting the first page.", "schema": { "type": "string" }, "example": "ac0108a2-5ade-4b78-8d57-1e4d5999cb83" } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/PurchaseOrdersResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/PurchaseOrdersResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/PurchaseOrdersResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Not Found" }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } }, "post": { "tags": [ "PurchaseOrders" ], "summary": "Creates new purchase order(s), fully overwrites previous record if exists. P2P Purchase does not allow updates to purchase orders after import.", "description": "Notes: \r\n1. Any referenced vendors, users, payment terms, purchasing categories, quantity units, etc. need to exist in P2P when the purchase order is posted.\r\n2. Orders are technically handled as auto-approved requisitions resulting in a corresponding order being created. If you don't find the order in P2P UI, try looking for it as a requisition. It might have invalid data (see above) or the requisition approval process may be configured in a way to block automatic order creation.\r\n3. Field 'processingStatus' requires a value from API user in POST and PATCH request. If you need to import an order with more than 200 lines, this can be done by setting 'processingStatus' to 'Uncompleted' when POSTing the purchaseOrder and then adding additional lines to it using the PATCH method. ProcessingStaus: 'Uncompleted' prevents the order from being set to P2P so that more lines can be added. When all lines have been added, set 'processingStaus' = 'ReadyForImport' using PATCH method and the order will be imported to P2P. \r\n\r\nPlease see section \"[Usage scenario 4: Import and export procurement data](https://developer.basware.com/api/p2p/manual#usage4)\" for details on implementing this API. Check out also the [example JSONs using a minimal feasible set of fields](https://developer.basware.com/api/p2p/templates) from the developer site.", "parameters": [ { "name": "Content-Type", "in": "header", "description": "Specifies the media type of the resource. Value application/json is supported.", "schema": { "type": "string" }, "example": "application/json" } ], "requestBody": { "content": { "application/json-patch+json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PurchaseOrderEntity" } } }, "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PurchaseOrderEntity" } } }, "text/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PurchaseOrderEntity" } } }, "application/*+json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PurchaseOrderEntity" } } } } }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/PurchaseOrderEntity" } }, "application/json": { "schema": { "$ref": "#/components/schemas/PurchaseOrderEntity" } }, "text/json": { "schema": { "$ref": "#/components/schemas/PurchaseOrderEntity" } } } }, "400": { "description": "Bad request", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "401": { "description": "Unauthorized" }, "409": { "description": "Conflict", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } }, "delete": { "tags": [ "PurchaseOrders" ], "summary": "Deletes data from Basware API. For manual one-time operations.", "description": "For manual one-time operations only, such as a manual clean-up to remove test data generated during API integration development. Only removes records from API layer. \r\nDeletion in target systems needs to be done separately using the data deletion mechanisms available in each of the target system in addition to deleting the data in Basware API.", "requestBody": { "description": "Contains the body of the request.\r\n Either externalCode or lastUpdated -field is required. If both values are provided, externalCode will have the priority.", "content": { "application/json-patch+json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } }, "application/json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } } } }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } } } }, "202": { "description": "RequestAccepted", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } } } }, "400": { "description": "BadRequest", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "401": { "description": "Unauthorized" }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } } }, "/v1/purchaseOrders/{externalCode}": { "get": { "tags": [ "PurchaseOrders" ], "summary": "Returns single imported purchase order by orderId - identifier.", "description": "Note: This GET operation returns a HTTP redirect, which the API client needs to follow. \r\n* 'Authorization' header must not be included in the redirected request (the second request after receiving a redirect). \r\n* 'Host' header needs to be included.", "parameters": [ { "name": "externalCode", "in": "path", "description": "The externalCode of the purchaseOrder to be fetched", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/PurchaseOrdersResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/PurchaseOrdersResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/PurchaseOrdersResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found. Request was successful and no records were found." }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } }, "patch": { "tags": [ "PurchaseOrders" ], "summary": "Updates fields on specified order line. Can be used for adding new goods receipts to existing order lines when order is in 'Uncompleted' state. Preserves existing values in fields, which were not updated.", "description": "Notes: \r\n1) Field 'processingStatus' requires a value from API user in POST and PATCH request. If you need to import an order with more than 200 lines, this can be done by setting 'processingStatus' to 'Uncompleted' when POSTing the purchaseOrder and then adding additional lines to it using the PATCH method. ProcessingStaus: 'Uncompleted' prevents the order from being set to P2P so that more lines can be added. When all lines have been added, set 'processingStaus' = 'ReadyForImport' using PATCH method and the order will be imported to P2P. \r\n2) Basware API considers 'null' value in field(s) equivalent to the field(s) not being sent. For this reason patch method does not support setting field values to 'null'. \r\n\r\nPlease see section \"[Usage scenario 4: Import and export procurement data](https://developer.basware.com/api/p2p/manual#usage4)\" for details on implementing this API. Check out also the [example JSONs using a minimal feasible set of fields](https://developer.basware.com/api/p2p/templates) from the developer site.", "parameters": [ { "name": "externalCode", "in": "path", "description": "The externalCode of the imported purchase order to be updated", "required": true, "schema": { "type": "string" } } ], "requestBody": { "description": "Entity to be updated", "content": { "application/json-patch+json": { "schema": { "$ref": "#/components/schemas/PurchaseOrderEntity" } }, "application/json": { "schema": { "$ref": "#/components/schemas/PurchaseOrderEntity" } }, "text/json": { "schema": { "$ref": "#/components/schemas/PurchaseOrderEntity" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/PurchaseOrderEntity" } } } }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/OrderLineEntity" } }, "application/json": { "schema": { "$ref": "#/components/schemas/OrderLineEntity" } }, "text/json": { "schema": { "$ref": "#/components/schemas/OrderLineEntity" } } } }, "400": { "description": "Bad request", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found. Record to update not found." }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "503": { "description": "Service Unavailable", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } } }, "/v1/purchaseRequisitions": { "get": { "tags": [ "PurchaseRequisitions" ], "summary": "Returns purchase requisitions posted to Basware API.", "description": "Note: Updating data for existing requisitions is not supported. Posting updates will result in errors in errorFeedbacks -interface and data will not be updated in Alusta Purchase. The data will still be accepted and updated in Basware API. Because of this updates to existing purchase requisition records will result in inconsistent data between GET operations to Basware API and Alusta Purchase.", "parameters": [ { "name": "pageSize", "in": "query", "description": "A limit for the number of items to be returned for one request. Limit can range between 1 and 100 items.", "schema": { "type": "integer", "format": "int32", "default": 100 } }, { "name": "companyCode", "in": "query", "description": "Company filter. Returns items for specific company.", "schema": { "type": "string", "default": "" } }, { "name": "lastUpdated", "in": "query", "description": "Date Filter. Returns items that have been updated after specified date.", "schema": { "type": "string", "format": "date-time" } }, { "name": "x-amz-meta-continuationtoken", "in": "header", "description": "Used to get next page of results when item count indicated by 'pageSize' is exceeded. A token is returned in header (not body) parameter 'X-amz-meta-continuationToken' of the response whenever there are more records to fetch. Post the received value here in a new HEADER parameter on the next GET request to receive the next page of results. When getting the next page of results, you must include the same query parameters that were used when getting the first page.", "schema": { "type": "string" }, "example": "1c121d65-110b-4027-b306-e7525d4e716f" } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/PurchaseRequisitionResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/PurchaseRequisitionResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/PurchaseRequisitionResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found. Request was successful and no records were found." }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } }, "post": { "tags": [ "PurchaseRequisitions" ], "summary": "Creates new purchase requisition(s). P2P Purchase does not allow updates to purchase requisitions after import.", "description": " Notes: \r\n 1. Any referenced vendors, users, etc. need to exist in P2P when the purchase requisition is imported. \r\n 2. Updating data for existing requisitions is not supported. Posting updates will result in errors in errorFeedbacks -interface and data will not be updated in Alusta Purchase. The data will still be accepted and updated in Basware API. Because of this updates to existing purchase requisition records will result in inconsistent data between GET operations to Basware API and Alusta Purchase.\r\n \r\nPlease see section \"[Usage scenario 4: Import and export procurement data](https://developer.basware.com/api/p2p/manual#usage4)\" for details on implementing this API. Check out also the [example JSONs using a minimal feasible set of fields](https://developer.basware.com/api/p2p/templates) from the developer site.", "parameters": [ { "name": "Content-Type", "in": "header", "description": "Specifies the media type of the resource. Value application/json is supported.", "schema": { "type": "string" }, "example": "application/json" } ], "requestBody": { "content": { "application/json-patch+json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PurchaseRequisitionEntity" } } }, "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PurchaseRequisitionEntity" } } }, "text/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PurchaseRequisitionEntity" } } }, "application/*+json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PurchaseRequisitionEntity" } } } } }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PurchaseRequisitionEntity" } } }, "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PurchaseRequisitionEntity" } } }, "text/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PurchaseRequisitionEntity" } } } } }, "400": { "description": "Bad request", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "401": { "description": "Unauthorized" }, "409": { "description": "Conflict", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } }, "delete": { "tags": [ "PurchaseRequisitions" ], "summary": "Deletes data from Basware API. For manual one-time operations.", "description": "For manual one-time operations only, such as a manual clean-up to remove test data generated during API integration development. Only removes records from API layer. \r\nDeletion in target systems needs to be done separately using the data deletion mechanisms available in each of the target system in addition to deleting the data in Basware API.", "requestBody": { "description": "Contains the body of the request.\r\n Either externalCode or lastUpdated -field is required. If both values are provided, externalCode will have the priority.", "content": { "application/json-patch+json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } }, "application/json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } } } }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } } } }, "202": { "description": "RequestAccepted", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } } } }, "400": { "description": "BadRequest", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "401": { "description": "Unauthorized" }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } } }, "/v1/purchaseRequisitions/{externalCode}": { "get": { "tags": [ "PurchaseRequisitions" ], "summary": "Returns single purchase requisition by externalCode -identifier.", "description": "Note: Updating data for existing requisitions is not supported. Posting updates will result in errors in errorFeedbacks -interface and data will not be updated in Alusta Purchase. The data will still be accepted and updated in Basware API. Because of this updates to existing purchase requisition records will result in inconsistent data between GET operations to Basware API and Alusta Purchase.", "parameters": [ { "name": "externalCode", "in": "path", "description": "ExternalCode of the entity to be fetched", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/PurchaseRequisitionEntity" } }, "application/json": { "schema": { "$ref": "#/components/schemas/PurchaseRequisitionEntity" } }, "text/json": { "schema": { "$ref": "#/components/schemas/PurchaseRequisitionEntity" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found. Request was successful and no records were found." }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } } }, "/v1/requestStatus/{requestId}": { "get": { "tags": [ "RequestStatus" ], "summary": "Returns request status responses from receiving end-system(s), based on request id.", "description": "Note: RequestStatus functionality is not yet available for 'users' API for 'Basware network' target system, which uses application codes 'SupplierPortal' and 'SupplierManagement'). \r\n\r\nPlease see section \"[Usage scenario 5: Error handling and monitoring](https://developer.basware.com/api/p2p/manual#usage5)\" in Basware Purchase-to-Pay API manual for details on implementing error handling with Basware API.", "parameters": [ { "name": "requestId", "in": "path", "description": "The request id used to post in the data. This is returned in request header parameter 'x-amzn-RequestId', in response of the original request.", "required": true, "schema": { "type": "string" } }, { "name": "system", "in": "query", "description": "Allows limiting the responses to requests routed to a particular target system.", "schema": { "type": "string" } }, { "name": "ignoreSuccessfulItems", "in": "query", "description": "Allows filtering out succesful records within the response. Can be used to show only records with errors and records in progress.", "schema": { "type": "boolean" } } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/RequestStatusResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/RequestStatusResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/RequestStatusResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } } }, "/v1/requestStatus": { "get": { "tags": [ "RequestStatus" ], "summary": "Returns request status responses from receiving end-system(s), based on status and time stamp.", "description": "Notes:\r\n1) This API supports sending webhook based [push notifications](https://developer.basware.com/api/p2p/manual#PushNotifications) when new data is available to be exported. \r\n2) RequestStatus functionality is not yet available for 'users' API for 'Basware network' target system, which uses application codes 'SupplierPortal' and 'SupplierManagement'). \r\n\r\nPlease see section \"[Usage scenario 5: Error handling and monitoring](https://developer.basware.com/api/p2p/manual#usage5)\" in Basware Purchase-to-Pay API manual for details on implementing error handling with Basware API.", "parameters": [ { "name": "status", "in": "query", "description": "Allows filtering requests by status. Defaults to status ‘Error’ if search is not narrowed-down by entityType or system.", "schema": { "enum": [ "InProgress", "Success", "Error", "AcknowledgedSuccess", "AcknowledgedError" ], "type": "string" } }, { "name": "entityType", "in": "query", "description": "Allows filtering requests by EntityType.", "schema": { "enum": [ "Account", "Contract", "CostCenter", "TaxCode", "ExchangeRate", "PaymentTerm", "User", "Project", "MatchingOrder", "MatchingOrderLine", "GenericList", "AdvancedPermission", "TransferResponse", "PaymentResponse", "PrebookResponse", "Vendor", "AdvancedValidation", "PurchaseRequisition", "PurchaseOrder", "PurchaseGoodsReceipt", "Organization", "EnrichmentTransferResponse", "UserGroup", "UserGroupAssociatedUser", "UserGroupPermission" ], "type": "string" } }, { "name": "ignoreSuccessfullItems", "in": "query", "description": "Allows filtering out succesful records within the response. Can be used to show only records with errors and records in progress.", "schema": { "type": "boolean" } }, { "name": "system", "in": "query", "description": "Allows limiting the responses to requests routed to a particular target system.", "schema": { "type": "string" } }, { "name": "pageSize", "in": "query", "description": "A limit for the number of items to be returned for one request. Limit can range between 1 and 500 items.", "schema": { "type": "integer", "format": "int32", "default": 500 } }, { "name": "lastUpdated", "in": "query", "description": "Date Filter. Returns items that have been updated after specified date.", "schema": { "type": "string", "format": "date-time" } }, { "name": "x-amz-meta-continuationtoken", "in": "header", "description": "Used to get next page of results when item count indicated by 'pageSize' is exceeded. A token is returned in header (not body) parameter 'X-amz-meta-continuationToken' of the response whenever there are more records to fetch. Post the received value here in a new HEADER parameter on the next GET request to receive the next page of results. When getting the next page of results, you must include the same query parameters that were used when getting the first page.", "schema": { "type": "string" }, "example": "273705a0-c35a-4fda-8f98-450705ac5e96" } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/RequestStatusResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/RequestStatusResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/RequestStatusResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } } }, "/v1/requestStatus/acknowledge": { "post": { "tags": [ "RequestStatus" ], "summary": "Acknowledged request status responses are no longer offered for next GET operation.", "description": "Acknowledging will status from 'Success' or 'Error' to indicate the request has already been acknowledged. Please see section \"[Usage scenario 5: Error handling and monitoring](https://developer.basware.com/api/p2p/manual#usage5)\" in Basware Purchase-to-Pay API manual for details on implementing error handling with Basware API.", "parameters": [ { "name": "Content-Type", "in": "header", "description": "Specifies the media type of the resource. Value application/json is supported.", "schema": { "type": "string" }, "example": "application/json" } ], "requestBody": { "content": { "application/json-patch+json": { "schema": { "$ref": "#/components/schemas/ProcessingStatusGetBatchRequest" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ProcessingStatusGetBatchRequest" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ProcessingStatusGetBatchRequest" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/ProcessingStatusGetBatchRequest" } } } }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "type": "string" } }, "application/json": { "schema": { "type": "string" } }, "text/json": { "schema": { "type": "string" } } } }, "400": { "description": "Bad request", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found. Record to acknowledge not found." }, "405": { "description": "Method Not allowed. This generally happens when trying to acknowledge an request status response that is already acknowledged.", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } } }, "/v1/taxCodes": { "get": { "tags": [ "TaxCodes" ], "summary": "Returns tax codes posted to Basware API.", "description": "", "parameters": [ { "name": "pageSize", "in": "query", "description": "A limit for the number of items to be returned for one request. Limit can range between 1 and 500 items.", "schema": { "type": "integer", "format": "int32", "default": 500 } }, { "name": "companyCode", "in": "query", "description": "Company filter. Returns items for specific company.", "schema": { "type": "string", "default": "" } }, { "name": "lastUpdated", "in": "query", "description": "Date Filter. Returns items that have been updated after specified date.", "schema": { "type": "string", "format": "date-time" } }, { "name": "x-amz-meta-continuationtoken", "in": "header", "description": "Used to get next page of results when item count indicated by 'pageSize' is exceeded. A token is returned in header (not body) parameter 'X-amz-meta-continuationToken' of the response whenever there are more records to fetch. Post the received value here in a new HEADER parameter on the next GET request to receive the next page of results. When getting the next page of results, you must include the same query parameters that were used when getting the first page.", "schema": { "type": "string" }, "example": "349f0630-6f63-448c-82dd-3961ae642201" } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/TaxCodeResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/TaxCodeResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/TaxCodeResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found. Request was successful and no records were found." }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } }, "post": { "tags": [ "TaxCodes" ], "summary": "Creates new tax code(s), fully overwrites previous record if exists.", "parameters": [ { "name": "Content-Type", "in": "header", "description": "Specifies the media type of the resource. Value application/json is supported.", "schema": { "type": "string" }, "example": "application/json" } ], "requestBody": { "content": { "application/json-patch+json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/TaxCodeEntity" } } }, "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/TaxCodeEntity" } } }, "text/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/TaxCodeEntity" } } }, "application/*+json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/TaxCodeEntity" } } } } }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/TaxCodeEntity" } } }, "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/TaxCodeEntity" } } }, "text/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/TaxCodeEntity" } } } } }, "400": { "description": "Bad request", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "401": { "description": "Unauthorized" }, "409": { "description": "Conflict", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } }, "delete": { "tags": [ "TaxCodes" ], "summary": "Deletes data from Basware API. For manual one-time operations.", "description": "For manual one-time operations only, such as a manual clean-up to remove test data generated during API integration development. Only removes records from API layer. \r\nDeletion in target systems needs to be done separately using the data deletion mechanisms available in each of the target system in addition to deleting the data in Basware API.", "requestBody": { "description": "Contains the body of the request.\r\n Either externalCode or lastUpdated -field is required. If both values are provided, externalCode will have the priority.", "content": { "application/json-patch+json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } }, "application/json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } } } }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } } } }, "202": { "description": "RequestAccepted", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } } } }, "400": { "description": "BadRequest", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "401": { "description": "Unauthorized" }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } } }, "/v1/taxCodes/{externalCode}": { "get": { "tags": [ "TaxCodes" ], "summary": "Returns single tax code by externalCode identifier.", "description": "", "parameters": [ { "name": "externalCode", "in": "path", "description": "The ExternalCode of the entity to be fetched", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/TaxCodeEntity" } }, "application/json": { "schema": { "$ref": "#/components/schemas/TaxCodeEntity" } }, "text/json": { "schema": { "$ref": "#/components/schemas/TaxCodeEntity" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found. Request was successful and no records were found." }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } }, "patch": { "tags": [ "TaxCodes" ], "summary": "Updates on specified taxCode. Preserves existing values in fields, which were not updated.", "parameters": [ { "name": "externalCode", "in": "path", "description": "The ExternalCode of the taxCodes to be updated", "required": true, "schema": { "type": "string" } } ], "requestBody": { "description": "Entity to be updated", "content": { "application/json-patch+json": { "schema": { "$ref": "#/components/schemas/TaxCodeEntity" } }, "application/json": { "schema": { "$ref": "#/components/schemas/TaxCodeEntity" } }, "text/json": { "schema": { "$ref": "#/components/schemas/TaxCodeEntity" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/TaxCodeEntity" } } } }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/TaxCodeEntity" } }, "application/json": { "schema": { "$ref": "#/components/schemas/TaxCodeEntity" } }, "text/json": { "schema": { "$ref": "#/components/schemas/TaxCodeEntity" } } } }, "400": { "description": "Bad request", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found. Record to update not found." }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } } }, "/v1/users": { "get": { "tags": [ "Users" ], "summary": "Returns users posted to Basware API.", "description": "", "parameters": [ { "name": "pageSize", "in": "query", "description": "A limit for the number of items to be returned for one request. Limit can range between 1 and 500 items.", "schema": { "type": "integer", "format": "int32", "default": 500 } }, { "name": "companyCode", "in": "query", "description": "Company filter. Returns items for specific company.", "schema": { "type": "string", "default": "" } }, { "name": "lastUpdated", "in": "query", "description": "Date Filter. Returns items that have been updated after specified date.", "schema": { "type": "string", "format": "date-time" } }, { "name": "x-amz-meta-continuationtoken", "in": "header", "description": "Used to get next page of results when item count indicated by 'pageSize' is exceeded. A token is returned in header (not body) parameter 'X-amz-meta-continuationToken' of the response whenever there are more records to fetch. Post the received value here in a new HEADER parameter on the next GET request to receive the next page of results. When getting the next page of results, you must include the same query parameters that were used when getting the first page.", "schema": { "type": "string" }, "example": "436d78dd-3579-4346-9115-0d3ad9933703" } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/UserResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/UserResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/UserResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found. Request was successful and no records were found." }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } }, "post": { "tags": [ "Users" ], "summary": "Creates new user(s), fully overwrites previous record if exists.", "description": "Basware applications accessible to a user are controlled through 'users' and 'applicationGroups' APIs. Applications in a group are defined through 'applicationGroups' API. Application groups are assigned to users through the 'applicationGroups' -block in users API.\r\n\r\nNotes: \r\n1. You need to have at least one applicationGroup for posting users to Basware API. The applicationGroups are available in applicationGroups API. \r\n2. Application groups are assigned to users through the 'applicationGroups' -block in users API. \r\n3. It is possible to assign users to default application group(s). Users with no applicationGroups are automatically assigned to application groups where 'default' = true. When using this approach, you will need to have an applicationGroup with default = true. \r\n4. The company to which a user is imported needs to be set up as an administrative site in P2P. \r\n5. When the user is imported to any system besides (or in addition to) P2P, user 'loginType' needs to be 4 (user authentication through Basware Access) or accessEnabledLogin needs to be 'true'.\r\n6. When loginType = 4 (Basware Access) or accessEnabledLogin = true, the email is used as user’s login account and must be unique within a tenant.\r\n7. User groups are overwritten in P2P only when P2P admin parameter to overwrite existing user groups them is enabled. (Note: user groups are different from application groups)\r\n8. User recipient identifiers in P2P are overridden with values received through API. When no values are specified in API, the corresponding fields are emptied in P2P. \r\n9. User's externalCode is used as unique identifier in P2P and in Basware Access. Change to external code means a new user. The externalCode is ignored by Network Portal, which uses loginAccount as unique identifier.\r\n10. Fields containing data on existing user records cannot be cleared in P2P through users API. It is only possible to send new values and not possible to set fields already having values to null. This API works differently than rest of the APIs in that regard. \r\n\r\nPlease see section \"[Usage scenario 7 Import users](https://developer.basware.com/api/p2p/manual#usage7)\" of Basware Purchase-to-Pay API manual for details on managing users with Basware API. Check out also the [example JSONs using a minimal feasible set of fields](https://developer.basware.com/api/p2p/templates) from the developer site.", "parameters": [ { "name": "Content-Type", "in": "header", "description": "Specifies the media type of the resource. Value application/json is supported.", "schema": { "type": "string" }, "example": "application/json" } ], "requestBody": { "content": { "application/json-patch+json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/UserEntity" } } }, "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/UserEntity" } } }, "text/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/UserEntity" } } }, "application/*+json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/UserEntity" } } } } }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/UserEntity" } } }, "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/UserEntity" } } }, "text/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/UserEntity" } } } } }, "400": { "description": "Bad request", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "401": { "description": "Unauthorized" }, "409": { "description": "Conflict", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } }, "delete": { "tags": [ "Users" ], "summary": "Deletes data from Basware API. For manual one-time operations.", "description": "For manual one-time operations only, such as a manual clean-up to remove test data generated during API integration development. Only removes records from API layer. \r\nDeletion in target systems needs to be done separately using the data deletion mechanisms available in each of the target system in addition to deleting the data in Basware API.", "requestBody": { "description": "Contains the body of the request.\r\n Either externalCode or lastUpdated -field is required. If both values are provided, externalCode will have the priority.", "content": { "application/json-patch+json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } }, "application/json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } } } }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } } } }, "202": { "description": "RequestAccepted", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } } } }, "400": { "description": "BadRequest", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "401": { "description": "Unauthorized" }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } } }, "/v1/users/{externalCode}": { "get": { "tags": [ "Users" ], "summary": "Returns single user by externalCode -identifier.", "description": "", "parameters": [ { "name": "externalCode", "in": "path", "description": "The ExternalCode of the entity to be fetched", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/UserEntity" } }, "application/json": { "schema": { "$ref": "#/components/schemas/UserEntity" } }, "text/json": { "schema": { "$ref": "#/components/schemas/UserEntity" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found. Request was successful and no records were found." }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } }, "patch": { "tags": [ "Users" ], "summary": "Updates fields on specified user. Preserves existing values in fields, which were not updated.", "description": "Basware applications accessible to a user are controlled through 'users' and 'applicationGroups' APIs. Applications in a group are defined through 'applicationGroups' API. Application groups are assigned to users through the 'applicationGroups' -block in users API.\r\n\r\nNotes: \r\n1. You need to have at least one applicationGroup for posting users to Basware API. The applicationGroups are available in applicationGroups API. \r\n2. Application groups are assigned to users through the 'applicationGroups' -block in users API. \r\n3. It is possible to assign users to default application group(s). Users with no applicationGroups are automatically assigned to application groups where 'default' = true. When using this approach, you will need to have an applicationGroup with default = true. \r\n4. The company to which a user is imported needs to be set up as an administrative site in P2P. \r\n5. When the user is imported to any system besides (or in addition to) P2P, user 'loginType' needs to be 4 (user authentication through Basware Access) or accessEnabledLogin needs to be 'true'.\r\n6. When loginType = 4 (Basware Access) or accessEnabledLogin = true, the email is used as user’s login account and must be unique within a tenant.\r\n7. User groups are overwritten in P2P only when P2P admin parameter to overwrite existing user groups them is enabled. (Note: user groups are different from application groups)\r\n8. User recipient identifiers in P2P are overridden with values received through API. When no values are specified in API, the corresponding fields are emptied in P2P. \r\n9. User's externalCode is used as unique identifier in P2P and in Basware Access. Change to external code means a new user. The externalCode is ignored by Network Portal, which uses loginAccount as unique identifier.\r\n10. Basware API considers 'null' value in field(s) equivalent to the field(s) not being sent. For this reason patch method does not support setting field values to 'null'.\r\n\r\nPlease see section \"[Usage scenario 4: Import users](https://developer.basware.com/api/p2p/manual#usage3)\" of Basware Purchase-to-Pay API manual for details on managing users with Basware API. Check out also the [example JSONs using a minimal feasible set of fields](https://developer.basware.com/api/p2p/templates) from the developer site.", "parameters": [ { "name": "externalCode", "in": "path", "description": "The ExternalCode of the User to be updated", "required": true, "schema": { "type": "string" } } ], "requestBody": { "description": "Entity to be updated", "content": { "application/json-patch+json": { "schema": { "$ref": "#/components/schemas/UserEntity" } }, "application/json": { "schema": { "$ref": "#/components/schemas/UserEntity" } }, "text/json": { "schema": { "$ref": "#/components/schemas/UserEntity" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/UserEntity" } } } }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/UserEntity" } }, "application/json": { "schema": { "$ref": "#/components/schemas/UserEntity" } }, "text/json": { "schema": { "$ref": "#/components/schemas/UserEntity" } } } }, "400": { "description": "Bad request", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found. Record to update not found." }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } } }, "/v1/vendors": { "get": { "tags": [ "Vendors" ], "summary": "Returns vendors posted to Basware API.", "description": "", "parameters": [ { "name": "pageSize", "in": "query", "description": "A limit for the number of items to be returned for one request. Limit can range between 1 and 500 items.", "schema": { "type": "integer", "format": "int32", "default": 100 } }, { "name": "companyCode", "in": "query", "description": "Company filter. Returns items for specific company.", "schema": { "type": "string", "default": "" } }, { "name": "lastUpdated", "in": "query", "description": "Date Filter. Returns items that have been updated after specified date.", "schema": { "type": "string", "format": "date-time" } }, { "name": "x-amz-meta-continuationtoken", "in": "header", "description": "Used to get next page of results when item count indicated by 'pageSize' is exceeded. A token is returned in header (not body) parameter 'X-amz-meta-continuationToken' of the response whenever there are more records to fetch. Post the received value here in a new HEADER parameter on the next GET request to receive the next page of results. When getting the next page of results, you must include the same query parameters that were used when getting the first page.", "schema": { "type": "string" }, "example": "3fb86dcb-654a-4bc3-866b-b82f9435f4cf" } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/VendorResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/VendorResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/VendorResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found. Request was successful and no records were found." }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } }, "post": { "tags": [ "Vendors" ], "summary": "Creates new vendor(s), overwrites previous record if exists.", "description": "Notes: \r\n1) Payment terms used by the vendor(s) need to exist in P2P. Payment terms can be imported through paymentTerms API or maintained manually in P2P. \r\n2) Currencies used by the vendor(s) need to be active in P2P. Active currencies are maintained manually in P2P. \r\n3) Vendors used with P2P Purchase need to have 'orderingFormat' value different from 'none'. 'OrderingFormat' field can be specified through vendors API (in orderingDetails -block), or it can be manually maintained in P2P. \r\n4) Posting vendors to Bsaware Portal requires company structure to be imported to portal. The company structure can also be backfilled to portal from P2P. \r\n5) Up to 200 vendor records can be sent in one POST vendors request.\r\n\r\nCheck out the [example JSONs using a minimal feasible set of fields](https://developer.basware.com/api/p2p/templates) from the developer site.", "parameters": [ { "name": "Content-Type", "in": "header", "description": "Specifies the media type of the resource. Value application/json is supported.", "schema": { "type": "string" }, "example": "application/json" } ], "requestBody": { "content": { "application/json-patch+json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/VendorEntity" } } }, "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/VendorEntity" } } }, "text/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/VendorEntity" } } }, "application/*+json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/VendorEntity" } } } } }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/VendorEntity" } } }, "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/VendorEntity" } } }, "text/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/VendorEntity" } } } } }, "400": { "description": "Bad request", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "401": { "description": "Unauthorized" }, "409": { "description": "Conflict", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } }, "delete": { "tags": [ "Vendors" ], "summary": "Deletes data from Basware API. For manual one-time operations.", "description": "For manual one-time operations only, such as a manual clean-up to remove test data generated during API integration development. Only removes records from API layer. \r\nDeletion in target systems needs to be done separately using the data deletion mechanisms available in each of the target system in addition to deleting the data in Basware API.", "requestBody": { "description": "Contains the body of the request.\r\n Either externalCode or lastUpdated -field is required. If both values are provided, externalCode will have the priority.", "content": { "application/json-patch+json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } }, "application/json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/DeleteRequest" } } } }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } } } }, "202": { "description": "RequestAccepted", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DeleteResponse" } } } }, "400": { "description": "BadRequest", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "401": { "description": "Unauthorized" }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } } }, "/v1/vendors/{externalCode}": { "get": { "tags": [ "Vendors" ], "summary": "Returns single vendor by externalCode -identifier.", "description": "", "parameters": [ { "name": "externalCode", "in": "path", "description": "The ExternalCode of the entity to be fetched", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/VendorEntity" } }, "application/json": { "schema": { "$ref": "#/components/schemas/VendorEntity" } }, "text/json": { "schema": { "$ref": "#/components/schemas/VendorEntity" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found. Request was successful and no records were found." }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } }, "patch": { "tags": [ "Vendors" ], "summary": "Updates fields on specified vendor. Preserves existing values in fields, which were not updated.", "description": "Notes: \r\n1) Basware API considers 'null' value in field(s) equivalent to the field(s) not being sent. For this reason patch method does not support setting field values to 'null'.\r\n2) This PATCH operation is not suitable for updating existing contents of vendor sub-entities, such as for updating existing contact or address details. Please use the POST operation for this instead.", "parameters": [ { "name": "externalCode", "in": "path", "description": "The ExternalCode of the vendor to be updated", "required": true, "schema": { "type": "string" } } ], "requestBody": { "description": "Entity to be updated", "content": { "application/json-patch+json": { "schema": { "$ref": "#/components/schemas/VendorEntity" } }, "application/json": { "schema": { "$ref": "#/components/schemas/VendorEntity" } }, "text/json": { "schema": { "$ref": "#/components/schemas/VendorEntity" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/VendorEntity" } } } }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/VendorEntity" } }, "application/json": { "schema": { "$ref": "#/components/schemas/VendorEntity" } }, "text/json": { "schema": { "$ref": "#/components/schemas/VendorEntity" } } } }, "400": { "description": "Bad request", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found. Record to update not found." }, "500": { "description": "Unexpected error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ResponseEntityList" } } } } } } } }, "components": { "schemas": { "AccountCompanyEntity": { "required": [ "active", "companyCode", "inherit" ], "type": "object", "properties": { "companyCode": { "maxLength": 32, "minLength": 1, "type": "string", "description": "Defines a company code that the account is mapped to", "example": "BW01" }, "inherit": { "type": "boolean", "description": "The value specifies whether the property is inherited to lower organizations.", "example": false }, "active": { "type": "boolean", "description": "This flag will enable the data to be visible on UI, provided if the value is true, not visible in case of value is false. It will be also used for soft delete.", "example": true } }, "additionalProperties": false }, "AccountEntity": { "required": [ "accountCode", "accountNames", "companies", "externalCode" ], "type": "object", "properties": { "accountCode": { "maxLength": 25, "minLength": 1, "type": "string", "description": "Defines a code for the account (used for invoice coding).", "example": "10012" }, "accountNames": { "type": "array", "items": { "$ref": "#/components/schemas/LanguageTranslationEntity" }, "description": "Defines name(s) for the account (used for invoice coding). Please always include 'en-US' language tag for Basware global support, as well as any local-language tag being used. If both translations are not available, please use the same string with both language tags." }, "taxCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Tax code.", "nullable": true, "example": "T25" }, "text1": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Text1-5 can be used for additional, customer-specific, text fields.", "nullable": true, "example": "" }, "text2": { "maxLength": 250, "minLength": 0, "type": "string", "description": "", "nullable": true, "example": "" }, "text3": { "maxLength": 250, "minLength": 0, "type": "string", "description": "", "nullable": true, "example": "" }, "text4": { "maxLength": 250, "minLength": 0, "type": "string", "description": "", "nullable": true, "example": "" }, "text5": { "maxLength": 250, "minLength": 0, "type": "string", "description": "", "nullable": true, "example": "" }, "companies": { "type": "array", "items": { "$ref": "#/components/schemas/AccountCompanyEntity" }, "description": "List of company units to associate account to P2P organization hierarchy" }, "externalCode": { "maxLength": 36, "minLength": 1, "type": "string", "description": "External identifier that is used as a key in API.", "example": "4847-31231212-212121-1212" }, "lastUpdated": { "type": "string", "description": "Timestamp when the record was last sent to API. Set automatically.", "format": "date-time" } }, "additionalProperties": false }, "AccountResponse": { "required": [ "accounts" ], "type": "object", "properties": { "accounts": { "type": "array", "items": { "$ref": "#/components/schemas/AccountEntity" } } }, "additionalProperties": false }, "AccountingDocumentEntity": { "required": [ "companyCode", "currencyCode", "invoiceId", "paymentBlock", "processingStatus", "supplierCode" ], "type": "object", "properties": { "invoiceId": { "maxLength": 36, "minLength": 1, "type": "string", "description": "Unique identifier for an invoice generated by Basware P2P. Must be returned in when sending acknowledgement, transferResponse or paymentResponse to the invoice.", "example": "138e7d94997847aebe7432e521b3dac9" }, "bumid": { "maxLength": 36, "minLength": 0, "type": "string", "description": "Unique identifier for a business document generated by BT, used between Basware P2P and other Basware systems.", "nullable": true, "example": "c6d7067f-eb67-4289-89ec-819446078a3a" }, "p2pProcessingMode": { "enum": [ "Standard", "InvoiceEnrichment" ], "type": "string", "description": "Specifies the P2P processing mode for the invoice. Standard = Ivoice has been processed in Basware P2P and is approved for payment. InvoiceEnrichment = Invoice data contents have been enriched for processing, invoice approval is to be handled separately in receiving system.", "example": "Standard" }, "invoiceNumber": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Invoice number (from supplier).", "nullable": true, "example": "80000330200233" }, "voucherNumber1": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Voucher Number 1 (for accounting). Voucher numbers can be generated by Basware or returned from customer ERP.", "nullable": true, "example": "114785224" }, "voucherNumber2": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Voucher Number 2 (for accounting). Voucher numbers can be generated by Basware or returned from customer ERP.", "nullable": true, "example": "774785220" }, "voucherDate": { "type": "string", "description": "Voucher date can be used to determine the target accounting period for invoice in receiving (ERP) system.", "format": "date-time", "nullable": true }, "processingStatus": { "enum": [ "WaitingForPrebook", "PrebookInProgress", "Prebooked", "PrebookFailed", "WaitingForTransfer", "TransferInProgress", "Transferred", "TransferFailed", "WaitingForPrebookCancelation", "PrebookCancelationInProgress", "PrebookCanceled", "PrebookCancelFailed", "WaitingToBeRemoved", "Removed", "RemoveFailed", "WaitingToBeReturned", "Returned", "ReturnFailed", "WaitingToBeCompleted", "CompletionInProgress", "Completed", "CompletionFailed", "Paid", "New", "WaitingForEnrichmentTransfer", "EnrichmentTransferInProgress", "EnrichmentTransferred", "EnrichmentTransferFailed", "InDocumentFilter", "DocumentFilterReleased" ], "type": "string", "description": "Processing status of the invoice in Basware API." }, "originService": { "type": "integer", "description": "Describes how the invoice got created (as e-invoice, scanned from paper, extracted from pdf, etc)", "format": "int32" }, "companyCode": { "maxLength": 32, "minLength": 1, "type": "string", "description": "Company code.", "example": "BW00" }, "companyName": { "maxLength": 250, "minLength": 2, "type": "string", "description": "Company name.", "nullable": true, "example": "Basware Helsinki" }, "organizationCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Organization element in the higher level of the organization than companyCode. This organization element collects the spend from the lower organization units.", "nullable": true, "example": "BWFIN" }, "organizationName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Organization element name.", "nullable": true, "example": "Basware Finland" }, "supplierCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "A party that supplied goods or services referred in the invoice.", "example": "430022" }, "supplierName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Supplier name.", "nullable": true, "example": "Easy Office Supplies Inc." }, "currencyCode": { "maxLength": 3, "minLength": 2, "type": "string", "description": "Invoice currency.", "example": "EUR" }, "netSum": { "type": "number", "description": "Invoice net sum (invoice total without tax), in invoice currecy.", "format": "double", "nullable": true, "example": 1000 }, "grossSum": { "type": "number", "description": "Invoice gross sum (invoice total with tax), in invoice currecy.", "format": "double", "nullable": true, "example": 1160 }, "taxCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Tax code.", "nullable": true, "example": "T16" }, "taxPercent1": { "maximum": 1000000000, "minimum": -1000000000, "type": "number", "description": "Tax percentage.", "format": "double", "nullable": true, "example": 16 }, "taxPercent2": { "type": "number", "description": "Second tax percentage (for example for partially deductible VAT).", "format": "double", "nullable": true, "example": 0 }, "taxSum1": { "type": "number", "description": "Invoice tax sum to be paid, in invoice currency.", "format": "double", "nullable": true, "example": 160 }, "taxSum2": { "type": "number", "description": "Invoice tax sum that is excluded from the tax sum to be paid, in invoice currency.", "format": "double", "nullable": true, "example": 0 }, "invoiceDate": { "type": "string", "description": "Invoice date (from supplier).", "format": "date-time", "nullable": true }, "baseLineDate": { "type": "string", "format": "date-time", "nullable": true }, "dueDate": { "type": "string", "description": "Due date. The last payment date before penalties.", "format": "date-time", "nullable": true }, "cashDate": { "type": "string", "description": "Cash cate. The last payment date with discount.", "format": "date-time", "nullable": true }, "cashPercent": { "maximum": 100, "minimum": 0, "type": "number", "description": "Percentage out of invoice total that can be excluded if the invoice is paid before the cashDate.", "format": "double", "nullable": true, "example": 2 }, "cashSum": { "type": "number", "description": "Cash discount amount in invoice currency.", "format": "double", "nullable": true, "example": 23.2 }, "referencePerson": { "maxLength": 255, "minLength": 0, "type": "string", "description": "Person that has been referenced in the invoice.", "nullable": true, "example": "Jane Buyer" }, "contractNumber": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Contract number.", "nullable": true, "example": "AX94055432" }, "description": { "maxLength": 250, "minLength": 0, "type": "string", "description": "A short description of an invoice.", "nullable": true, "example": "More information about the invoice." }, "invoiceTypeCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Invoice type code.", "nullable": true, "example": "RE" }, "invoiceTypeName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Invoice type name.", "nullable": true, "example": "Purchase order based invoice" }, "paymentMethod": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Payment method.", "nullable": true, "example": "BankTransfer" }, "paymentBlock": { "type": "boolean", "description": "Identifies if the payment of this invoice should be denied by the ERP system and additonal steps like approval must take place before the invoice can be paid. Normally this parameter has value False when Basware P2P sends invoice for transfer.", "example": false }, "paymentTermCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Payment term code.", "nullable": true, "example": "7D2-NT30" }, "paymentTermName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Payment term name.", "nullable": true, "example": "7 days -2%, 30 days Net" }, "paymentTermExternalCode": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Payment term external code.", "nullable": true, "example": "7D2-NT30" }, "paymentPlanReference": { "maxLength": 255, "minLength": 0, "type": "string", "description": "Payment plan reference.", "nullable": true, "example": "737-12321" }, "paymentRevelsalDocument": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Payment reversal document.", "nullable": true, "example": "245576456" }, "codingDate": { "type": "string", "description": "Coding date.", "format": "date-time", "nullable": true }, "prebooked": { "type": "boolean", "description": "Identifies if the cost is already prebooked in ERP system. Some systems require prebooking the cost before invoice can be sent for payment.", "nullable": true, "example": false }, "referenceNumber": { "maxLength": 50, "minLength": 0, "type": "string", "description": "Payment reference number.", "nullable": true, "example": "16422-3210654-1872000-1110" }, "supplierBankIBAN": { "maxLength": 50, "minLength": 0, "type": "string", "description": "Supplier bank account (IBAN).", "nullable": true, "example": "IT60X0542811101000000123456" }, "supplierBankBBAN": { "maxLength": 50, "minLength": 0, "type": "string", "description": "Supplier bank account.", "nullable": true, "example": "539007547034" }, "supplierBankBIC": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Supplier bank SWIFT/BIC code.", "nullable": true, "example": "CTBAAU2W" }, "supplierBankName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Supplier bank name.", "nullable": true, "example": "Bankers United" }, "accountingPeriod": { "maxLength": 50, "minLength": 0, "type": "string", "description": "Code for target accounting period (if specified by Basware P2P).", "nullable": true, "example": "2021-01" }, "accountingGroup": { "maxLength": 50, "minLength": 0, "type": "string", "description": "Name for target accounting period (if specified by Basware P2P).", "nullable": true, "example": "January 2021" }, "removalReason": { "enum": [ "NotDefined", "Duplicate", "MissingData", "MissingPO", "Statement", "NonInvoice", "ProcessingTimeExpired", "InvoiceMatched", "ZeroValue", "Confidential", "Reprocessed", "IncorrectVAT", "ErrorInBankDetails", "CreditorUnknown", "IncorrectRecipient", "IncorrectValidator", "InvoiceNotCompliantWithOrder", "SupportingDocumentationMissing", "NotCompliantWithDelivery", "ContractEnded", "IncorrectInvoiceAmount", "SupplierUnknown", "InvoiceProcessedElsewhere", "PaymentNotReceivedOrCanceled", "ReasonOtherThanIncorrectValidator", "OtherContactYourBuyer", "Other" ], "type": "string", "description": "Specifies reason code why the invoice was removed. \r\nNote: Whether the invoice has been removed can only be checked from the invoice status field. ProcessingStatus: \"Removed\" means the invoice has been removed." }, "removalReasonComment": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Free text comment related to removing invoice.", "nullable": true }, "disputeInfo": { "$ref": "#/components/schemas/DisputeInfo" }, "clearingReferenceId": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Government issued invoice identifier which provides evidence of successful tax clearance for the invoice. Used on invoices in countries requiring tax clearance.", "nullable": true, "example": "2222222222-20231018-077835639C85-1E" }, "clearingCountry": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Country of clearance. Specifies the issuing authority whose tax clearing platform is used.", "nullable": true, "example": "PL" }, "clearingDate": { "type": "string", "description": "Date of clearance in government tax clearing platform.", "format": "date-time", "nullable": true }, "paymentMessage": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Payment message.", "nullable": true, "example": "" }, "text1": { "maxLength": 250, "minLength": 0, "type": "string", "description": "text1-60 can be used for additional, customer-specific, invoice header text fields.", "nullable": true, "example": "" }, "text2": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text3": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text4": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text5": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text6": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text7": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text8": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text9": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text10": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text11": { "maxLength": 100, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text12": { "maxLength": 100, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text13": { "maxLength": 100, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text14": { "maxLength": 100, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text15": { "maxLength": 100, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text16": { "maxLength": 100, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text17": { "maxLength": 100, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text18": { "maxLength": 100, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text19": { "maxLength": 100, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text20": { "maxLength": 100, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text21": { "maxLength": 100, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text22": { "maxLength": 100, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text23": { "maxLength": 100, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text24": { "maxLength": 100, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text25": { "maxLength": 100, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text26": { "maxLength": 100, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text27": { "maxLength": 100, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text28": { "maxLength": 100, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text29": { "maxLength": 100, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text30": { "maxLength": 100, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text31": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text32": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text33": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text34": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text35": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text36": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text37": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text38": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text39": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text40": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text41": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text42": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text43": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text44": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text45": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text46": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text47": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text48": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text49": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text50": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text51": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text52": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text53": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text54": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text55": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text56": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text57": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text58": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text59": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text60": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "numeric1": { "type": "number", "description": "numeric1-30 can be used for additional, customer-specific, invoice header numeric fields.", "format": "double", "nullable": true }, "numeric2": { "type": "number", "format": "double", "nullable": true }, "numeric3": { "type": "number", "format": "double", "nullable": true }, "numeric4": { "type": "number", "format": "double", "nullable": true }, "numeric5": { "type": "number", "format": "double", "nullable": true }, "numeric6": { "type": "number", "format": "double", "nullable": true }, "numeric7": { "type": "number", "format": "double", "nullable": true }, "numeric8": { "type": "number", "format": "double", "nullable": true }, "numeric9": { "type": "number", "format": "double", "nullable": true }, "numeric10": { "type": "number", "format": "double", "nullable": true }, "numeric11": { "type": "number", "format": "double", "nullable": true }, "numeric12": { "type": "number", "format": "double", "nullable": true }, "numeric13": { "type": "number", "format": "double", "nullable": true }, "numeric14": { "type": "number", "format": "double", "nullable": true }, "numeric15": { "type": "number", "format": "double", "nullable": true }, "numeric16": { "type": "number", "format": "double", "nullable": true }, "numeric17": { "type": "number", "format": "double", "nullable": true }, "numeric18": { "type": "number", "format": "double", "nullable": true }, "numeric19": { "type": "number", "format": "double", "nullable": true }, "numeric20": { "type": "number", "format": "double", "nullable": true }, "numeric21": { "type": "number", "format": "double", "nullable": true }, "numeric22": { "type": "number", "format": "double", "nullable": true }, "numeric23": { "type": "number", "format": "double", "nullable": true }, "numeric24": { "type": "number", "format": "double", "nullable": true }, "numeric25": { "type": "number", "format": "double", "nullable": true }, "numeric26": { "type": "number", "format": "double", "nullable": true }, "numeric27": { "type": "number", "format": "double", "nullable": true }, "numeric28": { "type": "number", "format": "double", "nullable": true }, "numeric29": { "type": "number", "format": "double", "nullable": true }, "numeric30": { "type": "number", "format": "double", "nullable": true }, "date1": { "type": "string", "description": "date1-10 can be used for additional, customer-specific, invoice header date fields.", "format": "date-time", "nullable": true }, "date2": { "type": "string", "format": "date-time", "nullable": true }, "date3": { "type": "string", "format": "date-time", "nullable": true }, "date4": { "type": "string", "format": "date-time", "nullable": true }, "date5": { "type": "string", "format": "date-time", "nullable": true }, "date6": { "type": "string", "format": "date-time", "nullable": true }, "date7": { "type": "string", "format": "date-time", "nullable": true }, "date8": { "type": "string", "format": "date-time", "nullable": true }, "date9": { "type": "string", "format": "date-time", "nullable": true }, "date10": { "type": "string", "format": "date-time", "nullable": true }, "invoiceImageURL": { "maxLength": 250, "minLength": 0, "type": "string", "description": "URL Link to invoice image.", "nullable": true }, "invoiceImageToken": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Invoice image token (invoice-specific part of image link).", "nullable": true }, "orderNumbers": { "type": "array", "items": { "type": "string" }, "description": "A list of order numbers associated with invoice", "nullable": true }, "lastUpdated": { "type": "string", "description": "Timestamp when the invoice record was last updated (from Basware P2P or from customer end).", "format": "date-time" }, "codingRows": { "type": "array", "items": { "$ref": "#/components/schemas/StandardCodingEntity" }, "description": "Coding rows specify information about posting the invoice to accounting - accounts, cost centers, tax codes, etc. \r\nTypically a small portion of available fields is used within each customer implementation.", "nullable": true }, "invoiceLines": { "type": "array", "items": { "$ref": "#/components/schemas/InvoiceLine" }, "description": "Invoice Lines. By default invoice lines are not sent from P2P. To Enable / disable sending the invoice lines, use the OpenAPI.TransferInvoiceLinesEnabled CMN_TENANT_SETTINGS parameter in P2P.", "nullable": true }, "attachments": { "type": "array", "items": { "$ref": "#/components/schemas/Attachment" }, "description": "Attachments related to the invoice. Attachments become available on invoices after transfer to accounting.", "nullable": true, "readOnly": true }, "transferParameters": { "type": "array", "items": { "$ref": "#/components/schemas/TransferParameterEntity" }, "description": "Contains transfer parameters entered by user to pop-up window uring transfer, such as voucher date for a batch of invoices. \r\nThese can be specified in IA_TRANSFER_PARAMETER -table in P2P. Also contains InvoiceBatchId (transfer batch id).", "nullable": true }, "enrichmentResponses": { "type": "array", "items": { "$ref": "#/components/schemas/EnrichmentResponseEntity" }, "description": "Lists enrichment responses posted to Basware API for the invoice. Enrichment responses are used with invoices having p2pProcessingMode = 'InvoiceEnrichment'. For there invoices, P2P is used to validate and enrich invoice contents while the approval for payment is done in another system.", "nullable": true }, "prebookResponses": { "type": "array", "items": { "$ref": "#/components/schemas/PrebookResponseEntity" }, "description": "Lists prebook responses posted to Basware API for the invoice.", "nullable": true }, "transferResponses": { "type": "array", "items": { "$ref": "#/components/schemas/TransferResponseEntity" }, "description": "Lists tranfer responses posted to Basware API for the invoice.", "nullable": true }, "paymentResponses": { "type": "array", "items": { "$ref": "#/components/schemas/PaymentResponseEntity" }, "description": "Lists payment responses posted to Basware API for the invoice.", "nullable": true }, "removeResponses": { "type": "array", "items": { "$ref": "#/components/schemas/RemoveResponseEntity" }, "description": "Not in use. Reserved for listing remove responses to prebooked invoices.", "nullable": true }, "cashSumCompany": { "type": "number", "description": "Cash discount amount in company home currency.", "format": "double", "nullable": true, "example": 23.2 }, "cashSumOrganization": { "type": "number", "description": "Cash discount amount in organization home currency.", "format": "double", "nullable": true, "example": 23.2 }, "exchangeRateBaseDate": { "type": "string", "description": "Exchange rate(s) valid on this date are used on the invoice.", "format": "date-time", "nullable": true }, "exchangeRateCompany": { "type": "number", "description": "Exchange rate between invoice currency and company home currency.", "format": "double", "nullable": true, "example": 1 }, "exchangeRateOrganization": { "type": "number", "description": "Exchange rate between invoice currency and organization home currency", "format": "double", "nullable": true, "example": 1 }, "taxSum1Company": { "type": "number", "description": "Invoice tax sum 1, in company home currency.", "format": "double", "nullable": true, "example": 160 }, "taxSum1Organization": { "type": "number", "description": "Invoice tax sum 1, in organization home currency.", "format": "double", "nullable": true, "example": 160 }, "taxSum2Company": { "type": "number", "description": "Invoice tax sum 2, in company home currency.", "format": "double", "nullable": true, "example": 0 }, "taxSum2Organization": { "type": "number", "description": "Invoice tax sum 2, in organization home currency.", "format": "double", "nullable": true, "example": 0 }, "currencyCodeCompany": { "maxLength": 3, "minLength": 0, "type": "string", "description": "Currency code of company home currency.", "nullable": true, "example": "EUR" }, "currencyCodeOrganization": { "maxLength": 3, "minLength": 2, "type": "string", "description": "Currency code of organization home currency.", "nullable": true, "example": "EUR" }, "organizationElementCode": { "maxLength": 25, "minLength": 1, "type": "string", "description": "Organization element code.", "nullable": true, "example": "BWOO" }, "organizationElementName": { "maxLength": 250, "minLength": 1, "type": "string", "description": "Organization element name.", "nullable": true, "example": "Basware Helsinki" }, "grossSumCompany": { "type": "number", "description": "Invoice gross sum (invoice total with tax), in company home currency.", "format": "double", "nullable": true, "example": 1160 }, "grossSumOrganization": { "type": "number", "description": "Invoice gross sum (invoice total with tax), in organization home currency.", "format": "double", "nullable": true, "example": 1160 }, "netSumCompany": { "type": "number", "description": "Invoice net sum (invoice total without tax), in company home currency.", "format": "double", "nullable": true, "example": 1000 }, "netSumOrganization": { "type": "number", "description": "Invoice net sum (invoice total without tax), in organization home currency.", "format": "double", "nullable": true, "example": 1000 }, "parentInvoiceBumId": { "maxLength": 36, "minLength": 0, "type": "string", "description": "Basware Unique Message Identifier (bumid) for the original invoice to where this document links to. Used in special cases, such as chargeback. Normally field is empty.", "nullable": true, "example": "fad3v47f-eb174bsa9-162c-eafg79a6783w" }, "supplierSourceSystemId": { "maxLength": 36, "minLength": 0, "type": "string", "description": "It is used to identify the source ERP in cases where supplier data is imported from multiple data sources. In these cases, you can identify a supplier using the SupplierSourceSystemId and the supplierCode.", "nullable": true, "example": "ERP1" }, "removedBeforeTransfer": { "type": "boolean", "nullable": true } }, "additionalProperties": false }, "AccountingDocumentInternalEntity": { "required": [ "companyCode", "createToSupplierPortal", "documentType", "invoiceId", "isChargebackDocument", "processingStatus" ], "type": "object", "properties": { "invoiceId": { "maxLength": 36, "minLength": 1, "type": "string", "description": "Unique identifier for an invoice generated by Basware P2P. Must be returned in when sending acknowledgement, transferResponse or paymentResponse to the invoice.", "example": "138e7d94997847aebe7432e521b3dac9" }, "bumid": { "maxLength": 36, "minLength": 0, "type": "string", "description": "Unique identifier for a business document generated by BT, used between Basware P2P and other Basware systems.", "nullable": true, "example": "c6d7067f-eb67-4289-89ec-819446078a3a" }, "invoiceNumber": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Invoice number (from supplier).", "nullable": true, "example": "80000330200233" }, "voucherNumber1": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Voucher Number 1 (for accounting). Voucher numbers can be generated by Basware or returned from customer ERP.", "nullable": true, "example": "114785224" }, "voucherNumber2": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Voucher Number 2 (for accounting). Voucher numbers can be generated by Basware or returned from customer ERP.", "nullable": true, "example": "774785220" }, "voucherDate": { "type": "string", "description": "Voucher date can be used to determine the target accounting period for invoice in receiving (ERP) system.", "format": "date-time", "nullable": true }, "processingStatus": { "enum": [ "WaitingForPrebook", "PrebookInProgress", "Prebooked", "PrebookFailed", "WaitingForTransfer", "TransferInProgress", "Transferred", "TransferFailed", "WaitingForPrebookCancelation", "PrebookCancelationInProgress", "PrebookCanceled", "PrebookCancelFailed", "WaitingToBeRemoved", "Removed", "RemoveFailed", "WaitingToBeReturned", "Returned", "ReturnFailed", "WaitingToBeCompleted", "CompletionInProgress", "Completed", "CompletionFailed", "Paid", "New", "WaitingForEnrichmentTransfer", "EnrichmentTransferInProgress", "EnrichmentTransferred", "EnrichmentTransferFailed", "InDocumentFilter", "DocumentFilterReleased" ], "type": "string", "description": "Processing status of the invoice in Basware API." }, "originService": { "type": "integer", "description": "Describes how the invoice got created (as e-invoice, scanned from paper, extracted from pdf, etc)", "format": "int32" }, "companyCode": { "maxLength": 32, "minLength": 1, "type": "string", "description": "Company code.", "example": "BW00" }, "companyName": { "maxLength": 250, "minLength": 2, "type": "string", "description": "Company name.", "nullable": true, "example": "Basware Helsinki" }, "organizationCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Organization element in the higher level of the organization than companyCode. This organization element collects the spend from the lower organization units.", "nullable": true, "example": "BWFIN" }, "organizationName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Organization element name.", "nullable": true, "example": "Basware Finland" }, "supplierCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "A party that supplied goods or services referred in the invoice.", "nullable": true, "example": "430022" }, "supplierName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Supplier name.", "nullable": true, "example": "Easy Office Supplies Inc." }, "currencyCode": { "maxLength": 3, "minLength": 2, "type": "string", "description": "Invoice currency.", "nullable": true, "example": "USD" }, "netSum": { "type": "number", "description": "Invoice net sum (invoice total without tax), in invoice currecy.", "format": "double", "nullable": true, "example": 1000 }, "grossSum": { "type": "number", "description": "Invoice gross sum (invoice total with tax), in invoice currecy.", "format": "double", "nullable": true, "example": 1160 }, "taxCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Tax code.", "nullable": true, "example": "T16" }, "taxPercent1": { "maximum": 1000000000, "minimum": -1000000000, "type": "number", "description": "Tax percentage.", "format": "double", "nullable": true, "example": 16 }, "taxPercent2": { "type": "number", "description": "Second tax percentage (for example for partially deductible VAT).", "format": "double", "nullable": true, "example": 0 }, "taxSum1": { "type": "number", "description": "Invoice tax sum to be paid, in invoice currency.", "format": "double", "nullable": true, "example": 160 }, "taxSum2": { "type": "number", "description": "Invoice tax sum that is excluded from the tax sum to be paid, in invoice currency.", "format": "double", "nullable": true, "example": 0 }, "invoiceDate": { "type": "string", "description": "Invoice date (from supplier).", "format": "date-time", "nullable": true }, "baseLineDate": { "type": "string", "format": "date-time", "nullable": true }, "dueDate": { "type": "string", "description": "Due date. The last payment date before penalties.", "format": "date-time", "nullable": true }, "cashDate": { "type": "string", "description": "Cash cate. The last payment date with discount.", "format": "date-time", "nullable": true }, "cashPercent": { "maximum": 100, "minimum": 0, "type": "number", "description": "Percentage out of invoice total that can be excluded if the invoice is paid before the cashDate.", "format": "double", "nullable": true, "example": 10 }, "cashSum": { "type": "number", "description": "Total with tax to be paid before cashDate", "format": "double", "nullable": true, "example": 1044 }, "referencePerson": { "maxLength": 255, "minLength": 0, "type": "string", "description": "Person that has been referenced in the invoice.", "nullable": true, "example": "Jane Buyer" }, "contractNumber": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Contract number.", "nullable": true, "example": "AX94055432" }, "description": { "maxLength": 250, "minLength": 0, "type": "string", "description": "A short description of an invoice.", "nullable": true, "example": "More information about the invoice." }, "invoiceTypeCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Invoice type code.", "nullable": true, "example": "RE" }, "invoiceTypeName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Invoice type name.", "nullable": true, "example": "Purchase order based invoice" }, "paymentMethod": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Payment method.", "nullable": true, "example": "v4354fkdX3445H5143" }, "paymentBlock": { "type": "boolean", "description": "Identifies if the payment of this invoice should be denied by the ERP system and additonal steps like approval must take place before the invoice can be paid. Normally this parameter has value False when Basware P2P sends invoice for transfer.", "nullable": true }, "paymentTermCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Payment term code.", "nullable": true, "example": "D30" }, "paymentTermName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Payment term name.", "nullable": true, "example": "Due in 30 days" }, "paymentTermExternalCode": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Payment term external code.", "nullable": true, "example": "4847-31231212-212121-1212" }, "paymentPlanReference": { "maxLength": 255, "minLength": 0, "type": "string", "description": "Payment plan reference.", "nullable": true, "example": "v4354fkdX3445H5143" }, "paymentRevelsalDocument": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "v4354fkdX3445H5143" }, "codingDate": { "type": "string", "format": "date-time", "nullable": true }, "prebooked": { "type": "boolean", "description": "Identifies if the cost is already prebooked in ERP system. Some systems require prebooking the cost before invoice can be sent for payment.", "nullable": true }, "referenceNumber": { "maxLength": 50, "minLength": 0, "type": "string", "nullable": true, "example": "RD-001289" }, "supplierBankIBAN": { "maxLength": 50, "minLength": 0, "type": "string", "description": "Supplier bank account (IBAN).", "nullable": true, "example": "IT60X0542811101000000123456" }, "supplierBankBBAN": { "maxLength": 50, "minLength": 0, "type": "string", "description": "Supplier bank account.", "nullable": true, "example": "539007547034" }, "supplierBankBIC": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Supplier bank SWIFT/BIC code.", "nullable": true, "example": "CTBAAU2W" }, "supplierBankName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Supplier bank name.", "nullable": true, "example": "Bankers United" }, "accountingPeriod": { "maxLength": 50, "minLength": 0, "type": "string", "description": "Code for target accounting period (if specified by Basware P2P).", "nullable": true }, "accountingGroup": { "maxLength": 50, "minLength": 0, "type": "string", "description": "Name for target accounting period (if specified by Basware P2P).", "nullable": true }, "removalReason": { "enum": [ "NotDefined", "Duplicate", "MissingData", "MissingPO", "Statement", "NonInvoice", "ProcessingTimeExpired", "InvoiceMatched", "ZeroValue", "Confidential", "Reprocessed", "IncorrectVAT", "ErrorInBankDetails", "CreditorUnknown", "IncorrectRecipient", "IncorrectValidator", "InvoiceNotCompliantWithOrder", "SupportingDocumentationMissing", "NotCompliantWithDelivery", "ContractEnded", "IncorrectInvoiceAmount", "SupplierUnknown", "InvoiceProcessedElsewhere", "PaymentNotReceivedOrCanceled", "ReasonOtherThanIncorrectValidator", "OtherContactYourBuyer", "Other" ], "type": "string", "description": "Specifies reason code why the invoice was removed. \r\nNote: Whether the invoice has been removed can only be checked from the invoice status field. ProcessingStatus: \"Removed\" means the invoice has been removed." }, "removalReasonComment": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Free text comment related to removing invoice.", "nullable": true }, "clearingReferenceId": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Government issued invoice identifier which provides evidence of successful tax clearance for the invoice. Used on invoices in countries requiring tax clearance.", "nullable": true }, "clearingCountry": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Country of clearance. Specified the issuing authority whose tax clearing platform is used.", "nullable": true }, "clearingDate": { "type": "string", "description": "Date of clearance in government tax clearing platform.", "format": "date-time", "nullable": true }, "paymentMessage": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Payment message.", "nullable": true }, "text1": { "maxLength": 250, "minLength": 0, "type": "string", "description": "text1-60 are used for additional, customer-specific, invoice header text fields.", "nullable": true }, "text2": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true }, "text3": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true }, "text4": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true }, "text5": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true }, "text6": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true }, "text7": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true }, "text8": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true }, "text9": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true }, "text10": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true }, "text11": { "maxLength": 100, "minLength": 0, "type": "string", "nullable": true }, "text12": { "maxLength": 100, "minLength": 0, "type": "string", "nullable": true }, "text13": { "maxLength": 100, "minLength": 0, "type": "string", "nullable": true }, "text14": { "maxLength": 100, "minLength": 0, "type": "string", "nullable": true }, "text15": { "maxLength": 100, "minLength": 0, "type": "string", "nullable": true }, "text16": { "maxLength": 100, "minLength": 0, "type": "string", "nullable": true }, "text17": { "maxLength": 100, "minLength": 0, "type": "string", "nullable": true }, "text18": { "maxLength": 100, "minLength": 0, "type": "string", "nullable": true }, "text19": { "maxLength": 100, "minLength": 0, "type": "string", "nullable": true }, "text20": { "maxLength": 100, "minLength": 0, "type": "string", "nullable": true }, "text21": { "maxLength": 100, "minLength": 0, "type": "string", "nullable": true }, "text22": { "maxLength": 100, "minLength": 0, "type": "string", "nullable": true }, "text23": { "maxLength": 100, "minLength": 0, "type": "string", "nullable": true }, "text24": { "maxLength": 100, "minLength": 0, "type": "string", "nullable": true }, "text25": { "maxLength": 100, "minLength": 0, "type": "string", "nullable": true }, "text26": { "maxLength": 100, "minLength": 0, "type": "string", "nullable": true }, "text27": { "maxLength": 100, "minLength": 0, "type": "string", "nullable": true }, "text28": { "maxLength": 100, "minLength": 0, "type": "string", "nullable": true }, "text29": { "maxLength": 100, "minLength": 0, "type": "string", "nullable": true }, "text30": { "maxLength": 100, "minLength": 0, "type": "string", "nullable": true }, "text31": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true }, "text32": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true }, "text33": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true }, "text34": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true }, "text35": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true }, "text36": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true }, "text37": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true }, "text38": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true }, "text39": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true }, "text40": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true }, "text41": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true }, "text42": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true }, "text43": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true }, "text44": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true }, "text45": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true }, "text46": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true }, "text47": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true }, "text48": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true }, "text49": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true }, "text50": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true }, "text51": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true }, "text52": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true }, "text53": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true }, "text54": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true }, "text55": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true }, "text56": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true }, "text57": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true }, "text58": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true }, "text59": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true }, "text60": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true }, "numeric1": { "type": "number", "description": "numeric1-30 are used for additional, customer-specific, invoice header numeric fields.", "format": "double", "nullable": true }, "numeric2": { "type": "number", "format": "double", "nullable": true }, "numeric3": { "type": "number", "format": "double", "nullable": true }, "numeric4": { "type": "number", "format": "double", "nullable": true }, "numeric5": { "type": "number", "format": "double", "nullable": true }, "numeric6": { "type": "number", "format": "double", "nullable": true }, "numeric7": { "type": "number", "format": "double", "nullable": true }, "numeric8": { "type": "number", "format": "double", "nullable": true }, "numeric9": { "type": "number", "format": "double", "nullable": true }, "numeric10": { "type": "number", "format": "double", "nullable": true }, "numeric11": { "type": "number", "format": "double", "nullable": true }, "numeric12": { "type": "number", "format": "double", "nullable": true }, "numeric13": { "type": "number", "format": "double", "nullable": true }, "numeric14": { "type": "number", "format": "double", "nullable": true }, "numeric15": { "type": "number", "format": "double", "nullable": true }, "numeric16": { "type": "number", "format": "double", "nullable": true }, "numeric17": { "type": "number", "format": "double", "nullable": true }, "numeric18": { "type": "number", "format": "double", "nullable": true }, "numeric19": { "type": "number", "format": "double", "nullable": true }, "numeric20": { "type": "number", "format": "double", "nullable": true }, "numeric21": { "type": "number", "format": "double", "nullable": true }, "numeric22": { "type": "number", "format": "double", "nullable": true }, "numeric23": { "type": "number", "format": "double", "nullable": true }, "numeric24": { "type": "number", "format": "double", "nullable": true }, "numeric25": { "type": "number", "format": "double", "nullable": true }, "numeric26": { "type": "number", "format": "double", "nullable": true }, "numeric27": { "type": "number", "format": "double", "nullable": true }, "numeric28": { "type": "number", "format": "double", "nullable": true }, "numeric29": { "type": "number", "format": "double", "nullable": true }, "numeric30": { "type": "number", "format": "double", "nullable": true }, "date1": { "type": "string", "description": "date1-10 are used for additional, customer-specific, invoice header date fields.", "format": "date-time", "nullable": true }, "date2": { "type": "string", "format": "date-time", "nullable": true }, "date3": { "type": "string", "format": "date-time", "nullable": true }, "date4": { "type": "string", "format": "date-time", "nullable": true }, "date5": { "type": "string", "format": "date-time", "nullable": true }, "date6": { "type": "string", "format": "date-time", "nullable": true }, "date7": { "type": "string", "format": "date-time", "nullable": true }, "date8": { "type": "string", "format": "date-time", "nullable": true }, "date9": { "type": "string", "format": "date-time", "nullable": true }, "date10": { "type": "string", "format": "date-time", "nullable": true }, "invoiceImageURL": { "maxLength": 250, "minLength": 0, "type": "string", "description": "URL Link to invoice image.", "nullable": true }, "invoiceImageToken": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Invoice image token (invoice-specific part of image link).", "nullable": true }, "orderNumbers": { "type": "array", "items": { "type": "string" }, "description": "A list of order numbers associated with invoice", "nullable": true }, "lastUpdated": { "type": "string", "description": "Timestamp when the invoice record was last updated (from Basware P2P or from customer end).", "format": "date-time" }, "codingRows": { "type": "array", "items": { "$ref": "#/components/schemas/StandardCodingEntity" }, "description": "Coding rows specify information about posting the invoice to accounting - accounts, cost centers, tax codes, etc. \r\nTypically a small portion of available fields is used within each customer implementation.", "nullable": true }, "transferParameters": { "type": "array", "items": { "$ref": "#/components/schemas/TransferParameterEntity" }, "description": "Contains transfer parameters entered by user to pop-up window uring transfer, such as voucher date for a batch of invoices. \r\nThese can be specified in IA_TRANSFER_PARAMETER -table in P2P. Also contains InvoiceBatchId (transfer batch id).", "nullable": true }, "enrichmentResponses": { "type": "array", "items": { "$ref": "#/components/schemas/EnrichmentResponseEntity" }, "description": "Lists enrichment responses posted to Basware API for the invoice. Enrichment responses are used with invoices having p2pProcessingMode = 'InvoiceEnrichment'. For there invoices, P2P is used to validate and enrich invoice contents while the approval for payment is done in another system.", "nullable": true }, "transferResponses": { "type": "array", "items": { "$ref": "#/components/schemas/TransferResponseEntity" }, "description": "Lists tranfer responses posted to Basware API for the invoice.", "nullable": true }, "removeResponses": { "type": "array", "items": { "$ref": "#/components/schemas/RemoveResponseEntity" }, "description": "Not in use. Reserved for listing remove responses to prebooked invoices.", "nullable": true }, "prebookResponses": { "type": "array", "items": { "$ref": "#/components/schemas/PrebookResponseEntity" }, "description": "Not in use. Reserved for listing invoice prebooking responses.", "nullable": true }, "paymentResponses": { "type": "array", "items": { "$ref": "#/components/schemas/PaymentResponseEntity" }, "description": "Lists payment responses posted to Basware API for the invoice.", "nullable": true }, "cashSumCompany": { "type": "number", "description": "Invoice cash sum, in company home currency.", "format": "double", "nullable": true }, "cashSumOrganization": { "type": "number", "description": "Invoice cash sum, in organization home currency.", "format": "double", "nullable": true }, "exchangeRateBaseDate": { "type": "string", "description": "Exchange rate(s) valid on this date are used on the invoice.", "format": "date-time", "nullable": true }, "exchangeRateCompany": { "type": "number", "description": "Exchange rate between invoice currency and company home currency.", "format": "double", "nullable": true }, "exchangeRateOrganization": { "type": "number", "description": "Exchange rate between invoice currency and organization home currency", "format": "double", "nullable": true }, "taxSum1Company": { "type": "number", "description": "Invoice tax sum 1, in company home currency.", "format": "double", "nullable": true }, "taxSum1Organization": { "type": "number", "description": "Invoice tax sum 1, in organization home currency.", "format": "double", "nullable": true }, "taxSum2Company": { "type": "number", "description": "Invoice tax sum 2, in company home currency.", "format": "double", "nullable": true }, "taxSum2Organization": { "type": "number", "description": "Invoice tax sum 2, in organization home currency.", "format": "double", "nullable": true }, "currencyCodeCompany": { "maxLength": 3, "minLength": 0, "type": "string", "description": "Currency code of company home currency.", "nullable": true }, "currencyCodeOrganization": { "maxLength": 3, "minLength": 2, "type": "string", "description": "Currency code of organization home currency.", "nullable": true }, "organizationElementCode": { "maxLength": 25, "minLength": 1, "type": "string", "description": "Organization element code.", "nullable": true }, "organizationElementName": { "maxLength": 250, "minLength": 1, "type": "string", "description": "Organization element name.", "nullable": true }, "grossSumCompany": { "type": "number", "description": "Invoice gross sum (invoice total with tax), in company home currency.", "format": "double", "nullable": true }, "grossSumOrganization": { "type": "number", "description": "Invoice gross sum (invoice total with tax), in organization home currency.", "format": "double", "nullable": true }, "netSumCompany": { "type": "number", "description": "Invoice net sum (invoice total without tax), in company home currency.", "format": "double", "nullable": true }, "netSumOrganization": { "type": "number", "description": "Invoice net sum (invoice total without tax), in organization home currency.", "format": "double", "nullable": true }, "parentInvoiceBumId": { "maxLength": 36, "minLength": 0, "type": "string", "description": "Basware Unique Message Identifier (bumid) for the original invoice to where this document links to.", "nullable": true }, "supplierSourceSystemId": { "maxLength": 36, "minLength": 0, "type": "string", "description": "It is used to identify the source ERP in cases where supplier data is imported from multiple data sources. In these cases, you can identify a supplier using the SupplierSourceSystemId and the supplierCode.", "nullable": true }, "disputeInfo": { "$ref": "#/components/schemas/DisputeInfo" }, "createToSupplierPortal": { "type": "boolean", "description": "If True, ONP will create the document if it does not exists. If False, ONP does not create document. If document exists in ONP it will always update the content of document.", "example": false }, "isChargebackDocument": { "type": "boolean", "description": "Specifies whether invoice is a chargeback document for another invoice. When true, the parent invoice is linked by field 'parentBumId'.", "example": false }, "documentType": { "enum": [ "CreditNote", "Invoice" ], "type": "string", "example": "Invoice" }, "transferInvoiceLinesEnabled": { "type": "boolean" }, "invoiceLines": { "type": "array", "items": { "$ref": "#/components/schemas/InvoiceLine" }, "description": "Invoice Lines. By default invoice lines are not sent from P2P. To Enable / disable sending the invoice lines, use the TransferInvoiceLinesEnabled CMN_TENANT_SETTINGS parameter in P2P.", "nullable": true }, "attachments": { "type": "array", "items": { "$ref": "#/components/schemas/InternalAttachment" }, "nullable": true, "readOnly": true }, "p2pProcessingMode": { "enum": [ "Standard", "InvoiceEnrichment" ], "type": "string" }, "transferredToERP": { "type": "boolean" }, "removedBeforeTransfer": { "type": "boolean", "nullable": true } }, "additionalProperties": false }, "AccountingDocumentInternalResponse": { "required": [ "accountingDocuments" ], "type": "object", "properties": { "accountingDocuments": { "type": "array", "items": { "$ref": "#/components/schemas/AccountingDocumentInternalEntity" } } }, "additionalProperties": false }, "AccountingDocumentResponse": { "required": [ "accountingDocuments" ], "type": "object", "properties": { "accountingDocuments": { "type": "array", "items": { "$ref": "#/components/schemas/AccountingDocumentEntity" } } }, "additionalProperties": false }, "AccountingDocumentStatusUpdate": { "required": [ "processingStatus" ], "type": "object", "properties": { "processingStatus": { "enum": [ "WaitingForPrebook", "PrebookInProgress", "Prebooked", "PrebookFailed", "WaitingForTransfer", "TransferInProgress", "Transferred", "TransferFailed", "WaitingForPrebookCancelation", "PrebookCancelationInProgress", "PrebookCanceled", "PrebookCancelFailed", "WaitingToBeRemoved", "RemoveInProgress", "Removed", "RemoveFailed", "WaitingToBeReturned", "ReturnInProgress", "Returned", "ReturnFailed", "WaitingToBeCompleted", "CompletionInProgress", "Completed", "CompletionFailed", "Paid", "New", "WaitingForEnrichmentTransfer", "EnrichmentTransferInProgress", "EnrichmentTransferred", "EnrichmentTransferFailed", "InDocumentFilter", "DocumentFilterReleased", "InternalStatusChange" ], "type": "string", "description": "Invoice status to update" } }, "additionalProperties": false }, "AccountingDocumentsStatusResponseEntity": { "type": "object", "properties": { "invoiceId": { "type": "string", "description": "Basware internal identifier for the invoice. Can be used to query invoice details from accountingDocuments API.", "nullable": true, "example": "fbc082a265a4469cb230d84a252f18fc" }, "status": { "enum": [ "InApprovalProcess", "ReadyForPayment", "Paid", "Rejected" ], "type": "string", "description": "High level status of the invoice.\r\n* InApprovalProcess - Invoice has been received in Basware P2P and is being processed. This includes all invoice statuses before succesful transfer to ERP.\r\n* ReadyForPayment - Invoice is approved for payment and has been transferred to ERP system.\r\n* Paid - Invoice has been paid.\r\n* Rejected - Invoice has been rejected.", "example": "InApprovalProcess" }, "processingStatus": { "enum": [ "WaitingForPrebook", "PrebookInProgress", "Prebooked", "PrebookFailed", "WaitingForTransfer", "TransferInProgress", "Transferred", "TransferFailed", "WaitingForPrebookCancelation", "PrebookCancelationInProgress", "PrebookCanceled", "PrebookCancelFailed", "WaitingToBeRemoved", "Removed", "RemoveFailed", "WaitingToBeReturned", "Returned", "ReturnFailed", "WaitingToBeCompleted", "CompletionInProgress", "Completed", "CompletionFailed", "Paid", "New", "WaitingForEnrichmentTransfer", "EnrichmentTransferInProgress", "EnrichmentTransferred", "EnrichmentTransferFailed", "InDocumentFilter", "DocumentFilterReleased" ], "type": "string", "description": "API processing status of the invoice (from accountingDocuments API).", "example": "New" }, "disputeInfo": { "$ref": "#/components/schemas/DisputeInfo" }, "lastUpdated": { "type": "string", "description": "Timestamp when the invoice record was last updated (from Basware P2P or from customer end).", "format": "date-time" } }, "additionalProperties": false, "description": "" }, "AcknowledgeRequest": { "type": "object", "properties": { "lastUpdated": { "type": "string", "description": "Records with lastUpdated -timestamp after the specified value are acknowledged. '0001-01-01' can be used as input value to acknowledge all records.", "format": "date-time", "nullable": true, "example": "2022-01-01" }, "externalCodes": { "type": "array", "items": { "type": "string" }, "description": "List of requestIds to acknowledge. Several requests can be acknowledged in one operation.", "nullable": true } }, "additionalProperties": false }, "AdvancedPermissionCompanyEntity": { "required": [ "active", "companyCode" ], "type": "object", "properties": { "companyCode": { "maxLength": 32, "minLength": 1, "type": "string", "description": "Defines a company code that is attached to the advanced user right.", "example": "BW01" }, "active": { "type": "boolean", "description": "This flag will enable the data to be visible on UI, provided if the value is true, not visible in case of value is false. It will be also used for soft delete." } }, "additionalProperties": false }, "AdvancedPermissionEntity": { "required": [ "companies", "externalCode", "limit", "loginAccount", "priorityIndex" ], "type": "object", "properties": { "loginAccount": { "maxLength": 100, "minLength": 1, "type": "string", "description": "Specifies the user's login name", "example": "jyrki@basware.com" }, "rowApproveIterationCount": { "maximum": 2147483647, "minimum": 0, "type": "integer", "description": "This field is used to define if the user is shown in a picker in row approval.", "format": "int32", "nullable": true, "example": 0 }, "permissionCode1": { "maxLength": 1000, "minLength": 0, "type": "string", "description": "Allows user to approve coding lines based on dimension values (cost center, account, etc) when row approval and advanced permissions are in use. Dimensions are mapped to permission codes in P2P. The value of each individual field can be one of the following: 1) \"*\" (asterisk, meaning \"all\"), 2) list of comma separated values such as: \"123, 23, 45, A18\", 3) single range of values such as: \"10-100\". If a combination of these is required, multiple records can be posted for the same user. The field can also be left empty.", "nullable": true, "example": "6210" }, "permissionCode2": { "maxLength": 1000, "minLength": 0, "type": "string", "description": "Allows user to approve coding lines based on dimension values (cost center, account, etc) when row approval and advanced permissions are in use. Dimensions are mapped to permission codes in P2P. The value of each individual field can be one of the following: 1) \"*\" (asterisk, meaning \"all\"), 2) list of comma separated values such as: \"123, 23, 45, A18\", 3) single range of values such as: \"10-100\". If a combination of these is required, multiple records can be posted for the same user. The field can also be left empty.", "nullable": true, "example": "6210,6211" }, "permissionCode3": { "maxLength": 1000, "minLength": 0, "type": "string", "description": "Allows user to approve coding lines based on dimension values (cost center, account, etc) when row approval and advanced permissions are in use. Dimensions are mapped to permission codes in P2P. The value of each individual field can be one of the following: 1) \"*\" (asterisk, meaning \"all\"), 2) list of comma separated values such as: \"123, 23, 45, A18\", 3) single range of values such as: \"10-100\". If a combination of these is required, multiple records can be posted for the same user. The field can also be left empty.", "nullable": true, "example": "6209-6230" }, "permissionCode4": { "maxLength": 1000, "minLength": 0, "type": "string", "description": "Allows user to approve coding lines based on dimension values (cost center, account, etc) when row approval and advanced permissions are in use. Dimensions are mapped to permission codes in P2P. The value of each individual field can be one of the following: 1) \"*\" (asterisk, meaning \"all\"), 2) list of comma separated values such as: \"123, 23, 45, A18\", 3) single range of values such as: \"10-100\". If a combination of these is required, multiple records can be posted for the same user. The field can also be left empty.", "nullable": true, "example": "*" }, "permissionCode5": { "maxLength": 1000, "minLength": 0, "type": "string", "description": "Allows user to approve coding lines based on dimension values (cost center, account, etc) when row approval and advanced permissions are in use. Dimensions are mapped to permission codes in P2P. The value of each individual field can be one of the following: 1) \"*\" (asterisk, meaning \"all\"), 2) list of comma separated values such as: \"123, 23, 45, A18\", 3) single range of values such as: \"10-100\". If a combination of these is required, multiple records can be posted for the same user. The field can also be left empty.", "nullable": true, "example": "" }, "permissionCode6": { "maxLength": 1000, "minLength": 0, "type": "string", "description": "Allows user to approve coding lines based on dimension values (cost center, account, etc) when row approval and advanced permissions are in use. Dimensions are mapped to permission codes in P2P. The value of each individual field can be one of the following: 1) \"*\" (asterisk, meaning \"all\"), 2) list of comma separated values such as: \"123, 23, 45, A18\", 3) single range of values such as: \"10-100\". If a combination of these is required, multiple records can be posted for the same user. The field can also be left empty.", "nullable": true, "example": "" }, "permissionCode7": { "maxLength": 1000, "minLength": 0, "type": "string", "description": "Allows user to approve coding lines based on dimension values (cost center, account, etc) when row approval and advanced permissions are in use. Dimensions are mapped to permission codes in P2P. The value of each individual field can be one of the following: 1) \"*\" (asterisk, meaning \"all\"), 2) list of comma separated values such as: \"123, 23, 45, A18\", 3) single range of values such as: \"10-100\". If a combination of these is required, multiple records can be posted for the same user. The field can also be left empty.", "nullable": true, "example": "" }, "limit": { "maximum": 1000000000, "minimum": 0, "type": "number", "description": "Defines the user's coding line approval limit.", "format": "double", "example": 0 }, "priorityIndex": { "maximum": 2147483647, "minimum": 0, "type": "integer", "description": "If there is more than one approver in the user picker, the priority index defines the order of the approvers in the picker.", "format": "int32", "example": 0 }, "module": { "maxLength": 28, "minLength": 0, "type": "string", "description": "This field defines the P2P module. Available values: \"IA\" (Invoice Automation), \"Purchase\" (P2P Purchase), \"Both\" (both Invoice Administration and Purchase).", "nullable": true, "example": "Purchase" }, "excludedValue": { "maxLength": 1000, "minLength": 0, "type": "string", "description": "This column is used to exclude a user from a process for coding rows requiring approval. When a user is excluded, the user will not receive an invoice for approval. The value can be anything, for example numeric (123, 23,45 - comma separated values), alphanumeric, special characters except single quote ('). The field can also be left empty. This field is based on tenant settings.", "nullable": true, "example": "ExcludedValue1" }, "companies": { "type": "array", "items": { "$ref": "#/components/schemas/AdvancedPermissionCompanyEntity" }, "description": "List of company units to associate advanced permission to P2P organization hierarchy." }, "externalCode": { "maxLength": 36, "minLength": 1, "type": "string", "description": "External identifier that is used as a key in API.", "example": "4847-31231212-212121-1212" }, "lastUpdated": { "type": "string", "description": "Timestamp when the record was last sent to API. Set automatically.", "format": "date-time" } }, "additionalProperties": false }, "AdvancedPermissionResponse": { "type": "object", "properties": { "advancedPermissions": { "type": "array", "items": { "$ref": "#/components/schemas/AdvancedPermissionEntity" }, "nullable": true } }, "additionalProperties": false }, "AdvancedValidationCompanyEntity": { "required": [ "active", "companyCode" ], "type": "object", "properties": { "companyCode": { "maxLength": 32, "minLength": 1, "type": "string", "description": "Company code identifier. Corresponds to company code used in P2P. Used as key in this array.", "example": "BW01" }, "active": { "type": "boolean", "description": "Active / Not active setting", "example": true } }, "additionalProperties": false }, "AdvancedValidationEntity": { "required": [ "dimension1", "externalCode", "interface", "keyValue" ], "type": "object", "properties": { "interface": { "maxLength": 40, "minLength": 1, "type": "string", "description": "Specifies validation rule type to use. Needs to match with validation rule types configured in P2P. Rule type configuration determines: \r\n-Key value type (e.g. account code, cost center code, etc) against which the validations are applied\r\n-What coding row fields are used for dimension1-7.", "example": "AdvancedValidation" }, "keyValue": { "maxLength": 40, "minLength": 1, "type": "string", "description": "Specifies key value for validation rule, e.g. value of account code, value of cost center code, etc. When this key value is used on coding row, below validations are applied.", "example": "10012" }, "dimension1": { "maxLength": 40, "minLength": 0, "type": "string", "description": "Dimension1-7: Specifies if coding field value needs to be within range. \r\n1 = Must be within range, field is mandatory (empty coding field not allowed)\r\n2 = Field not allowed (must be empty)\r\n3 = Must be within range, field is optional (empty coding field allowed)\r\nNote: Ranges can be used only if the accounting dimension has a numeric value. If a value is not numeric, a warning is shown. Leading zeros are allowed for numeric values.", "example": "1" }, "dimension1From": { "maxLength": 40, "minLength": 0, "type": "string", "description": "Dimension1-7From: Specifies starting value for the range.", "nullable": true, "example": "10000" }, "dimension1To": { "maxLength": 40, "minLength": 0, "type": "string", "description": "Dimension1-7To: Specifies ending value for the range.", "nullable": true, "example": "20000" }, "dimension2": { "maxLength": 40, "minLength": 0, "type": "string", "nullable": true, "example": "2" }, "dimension2From": { "maxLength": 40, "minLength": 0, "type": "string", "nullable": true, "example": "18200" }, "dimension2To": { "maxLength": 40, "minLength": 0, "type": "string", "nullable": true, "example": "18300" }, "dimension3": { "maxLength": 40, "minLength": 0, "type": "string", "nullable": true, "example": "3" }, "dimension3From": { "maxLength": 40, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimension3To": { "maxLength": 40, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimension4": { "maxLength": 40, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimension4From": { "maxLength": 40, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimension4To": { "maxLength": 40, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimension5": { "maxLength": 40, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimension5From": { "maxLength": 40, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimension5To": { "maxLength": 40, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimension6": { "maxLength": 40, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimension6From": { "maxLength": 40, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimension6To": { "maxLength": 40, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimension7": { "maxLength": 40, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimension7From": { "maxLength": 40, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimension7To": { "maxLength": 40, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "companies": { "type": "array", "items": { "$ref": "#/components/schemas/AdvancedValidationCompanyEntity" }, "description": "List of company units to associate account to P2P organization hierarchy", "nullable": true }, "externalCode": { "maxLength": 36, "minLength": 1, "type": "string", "description": "External identifier that is used as a key in API.", "example": "4847-31231212-212121-1212" }, "lastUpdated": { "type": "string", "description": "Timestamp when the record was last sent to API. Set automatically.", "format": "date-time" } }, "additionalProperties": false }, "AdvancedValidationResponse": { "required": [ "advancedValidations" ], "type": "object", "properties": { "advancedValidations": { "type": "array", "items": { "$ref": "#/components/schemas/AdvancedValidationEntity" } } }, "additionalProperties": false }, "ApplicationGroupEntity": { "required": [ "applicationGroupCode", "applications", "description" ], "type": "object", "properties": { "applicationGroupCode": { "maxLength": 100, "minLength": 1, "type": "string", "description": "Identifier for the application group. Best practice: Use descriptive names, such as 'Auditors', 'Reviewers', etc.", "example": "Reviewers" }, "description": { "maxLength": 250, "minLength": 1, "type": "string", "description": "Freetext description for the applicationGroup.", "example": "Basic users - access to P2P." }, "active": { "type": "boolean", "description": "Determines whether the applicationGroup is active or not. Groups where active = 'false' do not give access to any applications.", "example": true }, "default": { "type": "boolean", "description": "Used for specifying default application groups. Application groups where default = 'true' will be assigned automatically to all users who have no application group assigned through users API.", "example": true }, "lastUpdated": { "type": "string", "description": "Timestamp when the record was last sent to API (set automatically by Basware API).", "format": "date-time", "example": "2020-10-24T00:00:00" }, "applications": { "type": "array", "items": { "$ref": "#/components/schemas/Applications" } } }, "additionalProperties": false }, "ApplicationGroupsResponse": { "required": [ "applicationGroups" ], "type": "object", "properties": { "applicationGroups": { "type": "array", "items": { "$ref": "#/components/schemas/ApplicationGroupEntity" } } }, "additionalProperties": false }, "ApplicationPrivilege": { "type": "object", "properties": { "permissionCode": { "type": "string", "nullable": true }, "dimensionValues": { "type": "array", "items": { "$ref": "#/components/schemas/DimensionValue" }, "nullable": true } }, "additionalProperties": false }, "Applications": { "required": [ "code" ], "type": "object", "properties": { "code": { "enum": [ "PurchaseToPay", "Reporting", "SupplierPortal", "SupplierManagement", "CloudscanWithSelfValidation", "CloudscanWithBaswareValidation", "BaswareAdmin", "StrategicSourcing", "SmartPDFSelfValidation", "SmartPDFAdmin", "BaswareAdminOrgMgmt", "APAssuranceAdmin", "APAssuranceUser", "StatementMatchingUser", "StatementMatchingAdmin" ], "type": "string", "description": " Specifies code for the application. \r\n 1. PurchaseToPay = Basware Purchase-to-Pay (P2P)\r\n 2. Reporting = Basware Reporting\r\n 3. SupplierPortal = Access to Basware network, user can see only own company's suppliers. \r\n 4. SupplierManagement = Access to Basware network, user can see suppliers from any company within tenant. \r\n 5. CloudscanWithSelfValidation = CloudScan with Self-Validation\r\n 6. CloudscanWithBaswareValidation = CloudScan with Basware Validation\r\n 7. BaswareAdmin = Basware Admin (excl. organization management)\r\n 8. StrategicSourcing = Strategic Sourcing\r\n 9. SmartPDFSelfValidation = SmartPfd with self validation\r\n10. SmartPDFAdmin = SmartPdf Administration\r\n11. BaswareAdminOrgMgmt = Basware Admin - organization management (in piloting)\r\n12. APAssuranceUser = AP Assurance, user access\r\n13. APAssuranceAdmin = AP Assurance, administrator access\r\n14. StatementMatchingUser = Statement Matching, user access\r\n15. StatementMatchingAdmin = Statement Matching, administrator access\r\n \r\n Note: For accessing applications 2, 5, 6, 7, 9, 10 above, either loginType '4' (Basware Access login) or accessEnabledLogin = “True” is required on the user posted through users API.", "example": "PurchaseToPay" } }, "additionalProperties": false }, "Attachment": { "type": "object", "properties": { "externalCode": { "type": "string", "description": "Attachment external code. Used to retrieve the actual attachment file through the accountingDocuments/{invoiceId}/{attachmentExternalCode} endpoint.", "nullable": true, "example": "fafv67fe21747s791f2eeafgc9ab78ae" }, "category": { "type": "string", "description": "Attachment category. Available values: ORIGINALIMAGE, ATTACHMENT, EXPORTEDEMAIL.", "nullable": true, "example": "ATTACHMENT" }, "filename": { "type": "string", "description": "Attachment file name.", "nullable": true, "example": "Image.jpg" }, "isConfidential": { "type": "boolean", "description": "Indicates whether the attachment is confidential. true = confidential, false = not confidential.", "example": false }, "creationTime": { "type": "string", "description": "Creation time of the attachment in P2P.", "format": "date-time", "example": "2024-03-19T09:28:19.093Z" } }, "additionalProperties": false }, "BaswareSystem": { "type": "object", "properties": { "system": { "type": "string", "description": "Target system from which the response originates (P2P, network, etc).", "nullable": true, "example": "P2P" }, "module": { "type": "string", "nullable": true, "example": "IA" }, "systemStatus": { "enum": [ "InProgress", "Success", "Error", "AcknowledgedSuccess", "AcknowledgedError" ], "type": "string", "description": "Status of processing the request in the target system (aggregated from statuses of individual records). \r\n* InProgress: Request is still being processed. \r\n* Success: Request succesfully processed (no errors/warnings). \r\n* Error: There was one or more errors processing the request. \r\n* AcknowledgedSuccess: Request with 'Success' status after 'acknowledge' API operation. \r\n* AcknowledgedError: Request with 'Error' status after 'acknowledge' API operation.", "example": "Error" }, "lastUpdated": { "type": "string", "format": "date-time" }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/ProcessedItem" }, "description": "Contains status for each invividual record posted in the original request.", "nullable": true } }, "additionalProperties": false }, "CompanyAddressEntity": { "required": [ "addressType", "externalCode", "name" ], "type": "object", "properties": { "externalCode": { "maxLength": 36, "minLength": 1, "type": "string", "description": "External code for company address.", "example": "d6437eef-0d71-4cb0-8a6e-7f114831479d" }, "name": { "maxLength": 200, "minLength": 1, "type": "string", "description": "Specifies the address' name for the company.", "example": "Remittance address" }, "description": { "maxLength": 200, "minLength": 0, "type": "string", "nullable": true, "example": "This is used as Remit To address" }, "addressType": { "enum": [ "AdditionalAddress", "VisitingAddress", "RemittanceAddress", "DeliveryAddress", "PostalAddress", "RegistrationAddress", "InvoicingAddress" ], "type": "string", "description": "Specifies type of the address. Types supported by P2P: DeliveryAddress, InvoicingAddress, PostalAddress.", "example": "DeliveryAddress" }, "addressLine1": { "maxLength": 200, "minLength": 0, "type": "string", "description": "Company address as free text, line 1.", "nullable": true, "example": "1800 Main Street" }, "addressLine2": { "maxLength": 200, "minLength": 0, "type": "string", "description": "Company address as free text, line 2.", "nullable": true }, "addressLine3": { "maxLength": 200, "minLength": 0, "type": "string", "description": "Company address as free text, line 3.", "nullable": true }, "cityName": { "maxLength": 50, "minLength": 0, "type": "string", "description": "City name.", "nullable": true, "example": "Dallas" }, "postalZone": { "maxLength": 50, "minLength": 0, "type": "string", "description": "Postal zone.", "nullable": true, "example": "75201" }, "poBox": { "maxLength": 50, "minLength": 0, "type": "string", "description": "PO box.", "nullable": true, "example": "724" }, "streetName": { "maxLength": 50, "minLength": 0, "type": "string", "description": "Street name.", "nullable": true, "example": "Burlington Avenue" }, "locality": { "maxLength": 50, "minLength": 0, "type": "string", "description": "Attribute to postalAddress. This field is required in UK if a similar road name exists within a post town area.", "nullable": true, "example": "Burlington" }, "countrySubEntity": { "maxLength": 50, "minLength": 0, "type": "string", "description": "Country sub entity.", "nullable": true, "example": "TX" }, "countrySubEntityDescription": { "maxLength": 50, "minLength": 0, "type": "string", "description": "Country sub entity description.", "nullable": true, "example": "Texas" }, "countryId": { "maxLength": 2, "minLength": 2, "type": "string", "description": "Defines the country ID for the company.", "nullable": true, "example": "US" }, "default": { "type": "boolean", "description": "Is this the default address (true / false).", "nullable": true } }, "additionalProperties": false }, "CompanyContactEntity": { "required": [ "name", "role" ], "type": "object", "properties": { "name": { "maxLength": 200, "minLength": 1, "type": "string", "description": "Name of the contact. Used as a key in list of contacts.", "example": "DeliveryContact1" }, "description": { "maxLength": 200, "minLength": 0, "type": "string", "nullable": true, "example": "Use this as a primary contact" }, "telephone": { "maxLength": 50, "minLength": 0, "type": "string", "description": "Specifies the contact's telephone number.", "nullable": true, "example": "555-3342-454" }, "telefax": { "maxLength": 50, "minLength": 0, "type": "string", "description": "Specifies the contact's fax number.", "nullable": true, "example": "555-3342-45412" }, "email": { "maxLength": 200, "minLength": 0, "type": "string", "description": "Specifies the contact's email address.", "nullable": true, "example": "mrsmith@business.org" }, "website": { "maxLength": 200, "minLength": 0, "type": "string", "description": "Specifies the contact's web site address.", "nullable": true, "example": "www.mrSmith.com" }, "role": { "enum": [ "AdditionalContact", "PrimaryContact", "SecondaryContact" ], "type": "string", "description": "Role of contact." } }, "additionalProperties": false }, "CompanyEntity": { "required": [ "active", "companyCode", "name" ], "type": "object", "properties": { "companyCode": { "maxLength": 32, "minLength": 1, "type": "string", "description": "Unique code to identify the company. Also used as an 'externalCode' for the company.", "example": "200" }, "sourceSystem": { "maxLength": 32, "minLength": 1, "type": "string", "description": "Informative name of the source system, e.g. ERP instance.", "nullable": true, "example": "SAP_1" }, "name": { "maxLength": 100, "minLength": 1, "type": "string", "description": "Company name.", "example": "Acme corporation" }, "description": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Company description.", "nullable": true, "example": "" }, "lastUpdated": { "type": "string", "description": "Timestamp when the record was last sent to API. Set automatically.", "format": "date-time" }, "bucompid": { "maxLength": 36, "minLength": 1, "type": "string", "description": "Basware internal ID for the company. Generated by Basware API.", "nullable": true, "example": "c61f8a6f-140f-423b-b9fd-3ae32345febb" }, "identifiers": { "type": "array", "items": { "$ref": "#/components/schemas/CompanyIdentifierEntity" }, "description": "Company identifiers. See \"[Usage scenario 6: Import companies](https://developer.basware.com/api/p2p/manual#usage6) on Basware API developer site for explanation of available values.", "nullable": true }, "addresses": { "type": "array", "items": { "$ref": "#/components/schemas/CompanyAddressEntity" }, "description": "Company addresses.", "nullable": true }, "contacts": { "type": "array", "items": { "$ref": "#/components/schemas/CompanyContactEntity" }, "description": "Company contacts.", "nullable": true }, "userDefaultLanguage": { "maxLength": 25, "minLength": 0, "type": "string", "description": "The default language code for users for this company. \r\nUse following format: [language 2-chars in UPPERCASE]-[country 2-chars in lowercase].", "nullable": true, "example": "en-US" }, "homeCurrency": { "maxLength": 3, "minLength": 3, "type": "string", "description": "Company home currency.", "nullable": true, "example": "EUR" }, "active": { "type": "boolean", "description": "Determines is company active or inactive. It is also used for soft delete.", "example": true }, "publishToBusinessDirectory": { "type": "boolean", "description": "When 'true, the company data entity will be published to Business Directory in Basware Portal.", "nullable": true, "example": true } }, "additionalProperties": false }, "CompanyIdentifierEntity": { "required": [ "id", "schemeId" ], "type": "object", "properties": { "id": { "maxLength": 36, "minLength": 1, "type": "string", "description": "Company identifier value.", "example": "GB190101452" }, "schemeId": { "maxLength": 36, "minLength": 1, "type": "string", "description": "Company identifier type. Defines type of ‘Id’ -field. Available values:\r\nDUNS, EMAIL-RFC2822, GLN, IBAN, ISO6523-ACTORID-UPIS, UNKNOWN, EU:VAT, AT:ORGNR, AU:ABN, AU:ACN, AU:TFN, BE:KBO, CA:BN, CA:GST, CA:VAT, CH:ORGNR, CH:VAT, CN:BRN, CZ:ORGNR, DE:ORGNR, DK:CVR, EE:ORGNR, ES:CIF, ES:NIF, FI:Y-TUNNUS, FR:SIRENE, FR:SIRET, GB:UTR, IE:ORGNR, IN:GSTIN, IT:FISCALE, IT:IPA, LI:VAT, MX:VAT, MY:GST, NL:KVK, NO:ORGNR, NO:VAT, PL:KRS, PL:REGON, PT:NIF, SE:ORGNR, SK:ORGNR, GB:ORGNR, UstidNr, US:TIN", "example": "EU:VAT" } }, "additionalProperties": false }, "CompanyResponse": { "required": [ "companies" ], "type": "object", "properties": { "companies": { "type": "array", "items": { "$ref": "#/components/schemas/CompanyEntity" } } }, "additionalProperties": false }, "ConsumerLogEventUserView": { "type": "object", "properties": { "requestId": { "type": "string", "description": "The request id used to post in the data. This is returned in request header parameter 'x-amzn-RequestId', in response of the original request.", "nullable": true, "example": "06ca6901-f728-489b-a827-704f5048858c" }, "entityType": { "enum": [ "Account", "Contract", "CostCenter", "TaxCode", "ExchangeRate", "PaymentTerm", "User", "Project", "MatchingOrder", "MatchingOrderLine", "GenericList", "AdvancedPermission", "TransferResponse", "PaymentResponse", "PrebookResponse", "Vendor", "AdvancedValidation", "PurchaseRequisition", "PurchaseOrder", "PurchaseGoodsReceipt", "Organization", "EnrichmentTransferResponse", "UserGroup", "UserGroupAssociatedUser", "UserGroupPermission" ], "type": "string", "description": "Entity type (API interface) of processed data.", "example": "Account" }, "entityVersion": { "type": "string", "description": "Version of entity type (API interface).", "nullable": true, "example": "AccountV1" }, "requestStatus": { "enum": [ "InProgress", "Success", "Error", "AcknowledgedSuccess", "AcknowledgedError" ], "type": "string", "description": "Status of processing the request (aggregated from statuses of each target system).\r\n* InProgress: Request is still being processed. \r\n* Success: Request succesfully processed (no errors/warnings). \r\n* Error: There was one or more errors processing the request. \r\n* AcknowledgedSuccess: Request with 'Success' status after 'acknowledge' API operation. \r\n* AcknowledgedError: Request with 'Error' status after 'acknowledge' API operation.", "example": "Error" }, "changedBy": { "type": "string", "description": "Username / name of the user who made change request", "nullable": true, "example": "John Doe" }, "operationType": { "type": "string", "description": "Type of API operation.", "nullable": true, "example": "POST" }, "genericListKey": { "type": "string", "description": "Generic List key against which changes have been made.", "nullable": true, "example": "ACC_LIST_1" }, "lastUpdated": { "type": "string", "format": "date-time" }, "systems": { "type": "array", "items": { "$ref": "#/components/schemas/BaswareSystem" }, "description": "Target system from which the response originates (P2P, network, etc).", "nullable": true } }, "additionalProperties": false }, "ContractEntity": { "required": [ "active", "companyCode", "currencyCode", "externalCode", "owner", "referenceCode", "suppliers", "title", "total", "validFrom", "validTo" ], "type": "object", "properties": { "referenceCode": { "maxLength": 255, "minLength": 1, "type": "string", "description": "FreeText reference shown in contracts view (Contract Number). Same company and vendor -combination(s) must not use same reference code (contract number) multiple times.", "example": "12197627" }, "companyCode": { "maxLength": 32, "minLength": 1, "type": "string", "description": "Buyer Company Code. This company needs to exist in P2P before importing the contract.", "example": "200" }, "title": { "maxLength": 250, "minLength": 1, "type": "string", "description": "A short name generally used to identify the contract in reporting.", "example": "Car leasing" }, "description": { "maxLength": 2000, "minLength": 0, "type": "string", "description": "General information on contract.", "nullable": true, "example": "This contract is for car leasing for Acme Motor leasing inc." }, "type": { "maxLength": 100, "minLength": 1, "type": "string", "description": "Determined by the contract management system. Types are displayed only for informational purposes.", "nullable": true, "example": "Leasing" }, "validFrom": { "type": "string", "description": "The date on which the contract legally came in to force.", "format": "date-time", "example": "2021-01-01" }, "validTo": { "type": "string", "description": "The date on which the contract will naturally end if not active decisions are made to extend or terminate early.", "format": "date-time", "example": "2025-01-01" }, "total": { "maximum": 9999999999999, "minimum": 0, "type": "number", "description": "Total expected expenditure under this contract between the Start and End Dates specified above.", "format": "double", "example": 10000 }, "amountType": { "enum": [ "Net", "Gross" ], "type": "string", "description": "Net or Gross. Default value: Net.", "nullable": true, "example": "net" }, "currencyCode": { "maxLength": 3, "minLength": 2, "type": "string", "description": "Currency used in the contract. Note: 1) P2P needs to have an exhange rate configured from contract curency currency of the company used on contract (if they are different). 2) Contract currency cannot be changed if spend has been collected for the contract.", "example": "EUR" }, "paymentTermCode": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Payment term for this contract.", "nullable": true, "example": "NET30" }, "owner": { "maxLength": 100, "minLength": 1, "type": "string", "description": "The person owning the contract.", "example": "Liz Black" }, "contactPerson": { "maxLength": 100, "minLength": 0, "type": "string", "description": "The person to contact on contract matters.", "nullable": true, "example": "Liz Black" }, "active": { "type": "boolean", "description": "States if the contract can be used or not.", "example": true }, "suppliers": { "type": "array", "items": { "$ref": "#/components/schemas/ContractSuppliers" }, "description": "Supplier(s) for contract." }, "externalLinks": { "type": "array", "items": { "$ref": "#/components/schemas/ContractExternalLinks" }, "description": "ExternalLinks for contract.", "nullable": true }, "orderSpend": { "type": "boolean", "description": "States if spend of orders using this contract is collected for spend reporting.", "nullable": true, "example": true }, "spendPlanSpend": { "type": "boolean", "description": "Field reserved for future use (to state if spend of spend plans using this contract is collected for spend reporting).", "nullable": true, "example": false }, "invoiceSpend": { "type": "boolean", "description": "Field reserved for future use (to state if spend of invoices linked to this contract is collected for spend reporting).", "nullable": true, "example": false }, "externalCode": { "maxLength": 36, "minLength": 1, "type": "string", "description": "External identifier that is used as a key in API.", "example": "4847-31231212-212121-1212" }, "lastUpdated": { "type": "string", "description": "Timestamp when the record was last sent to API. Set automatically.", "format": "date-time" } }, "additionalProperties": false, "description": "" }, "ContractExternalLinks": { "required": [ "externalLinkName" ], "type": "object", "properties": { "externalLinkName": { "maxLength": 512, "minLength": 1, "type": "string", "description": "Name shown in UI for external link", "example": "Acme motor leasing" }, "externalLinkURL": { "maxLength": 2000, "minLength": 1, "type": "string", "description": "URL used when selecting external link", "nullable": true, "example": "https://www.acmemotorsinc.com" } }, "additionalProperties": false, "description": "Contract external links" }, "ContractResponse": { "required": [ "contracts" ], "type": "object", "properties": { "contracts": { "type": "array", "items": { "$ref": "#/components/schemas/ContractEntity" } } }, "additionalProperties": false }, "ContractSpendAcknowledgeRequest": { "type": "object", "properties": { "lastUpdated": { "type": "string", "description": "Records with lastUpdated -timestamp after the specified value are acknowledged. '0001-01-01' can be used as input value to acknowledge all records.", "format": "date-time", "nullable": true, "example": "2022-01-01" }, "externalCodes": { "type": "array", "items": { "type": "string" }, "description": "List of requestIds to acknowledge. Several requests can be acknowledged in one operation.", "nullable": true } }, "additionalProperties": false }, "ContractSuppliers": { "required": [ "supplierCode" ], "type": "object", "properties": { "supplierCode": { "maxLength": 25, "minLength": 1, "type": "string", "description": "Code of the supplier on the contract. This supplier needs to exist in P2P and be available on the selected company.", "example": "32789" }, "supplierName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Name of the supplier on the contract. Informative field, P2P will take supplier name from it's supplier registry.", "nullable": true, "example": "Acme Motor Leasing inc." } }, "additionalProperties": false }, "CostCenterCompanyEntity": { "required": [ "active", "companyCode" ], "type": "object", "properties": { "companyCode": { "maxLength": 32, "minLength": 1, "type": "string", "description": "Defines a company code that the cost center is mapped to", "example": "BW00" }, "active": { "type": "boolean", "description": "This flag will enable the data to be visible on UI, provided if the value is true, not visible in case of value is false. It will be also used for soft delete." } }, "additionalProperties": false }, "CostCenterEntity": { "required": [ "companies", "costCenterCode", "costCenterNames", "externalCode" ], "type": "object", "properties": { "costCenterCode": { "maxLength": 25, "minLength": 1, "type": "string", "description": "Cost center code (used for invoice coding).", "example": "35680" }, "costCenterNames": { "type": "array", "items": { "$ref": "#/components/schemas/LanguageTranslationEntity" }, "description": "Cost center name(s) (used for invoice coding). Please always include 'en-US' language tag for Basware global support, as well as any local-language tag being used. If both translations are not available, please use the same string with both language tags." }, "text1": { "maxLength": 250, "minLength": 0, "type": "string", "description": "text1-10 can be used for customer-specific text fields.", "nullable": true, "example": "" }, "text2": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text3": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text4": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text5": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text6": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text7": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text8": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text9": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text10": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "date1": { "type": "string", "description": "Date1-5 can be used for customer-specific date fields.", "format": "date-time", "nullable": true }, "date2": { "type": "string", "format": "date-time", "nullable": true }, "date3": { "type": "string", "format": "date-time", "nullable": true }, "date4": { "type": "string", "format": "date-time", "nullable": true }, "date5": { "type": "string", "format": "date-time", "nullable": true }, "int1": { "type": "integer", "description": "Int 1-5 can be used for customer-specific numeric fields.", "format": "int32", "nullable": true }, "int2": { "type": "integer", "format": "int32", "nullable": true }, "int3": { "type": "integer", "format": "int32", "nullable": true }, "int4": { "type": "integer", "format": "int32", "nullable": true }, "int5": { "type": "integer", "format": "int32", "nullable": true }, "companies": { "type": "array", "items": { "$ref": "#/components/schemas/CostCenterCompanyEntity" }, "description": "List of company units to associate costcenter to P2P organization hierarchy" }, "externalCode": { "maxLength": 36, "minLength": 1, "type": "string", "description": "External identifier that is used as a key in API.", "example": "4847-31231212-212121-1212" }, "lastUpdated": { "type": "string", "description": "Timestamp when the record was last sent to API. Set automatically.", "format": "date-time" } }, "additionalProperties": false }, "CostCenterResponse": { "required": [ "costCenters" ], "type": "object", "properties": { "costCenters": { "type": "array", "items": { "$ref": "#/components/schemas/CostCenterEntity" } } }, "additionalProperties": false }, "Creator": { "type": "object", "properties": { "personCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Person code.", "nullable": true, "example": "32232" }, "userName": { "maxLength": 227, "minLength": 0, "type": "string", "description": "User name.", "nullable": true, "example": "Timothy Smith" }, "loginAccount": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Login account.", "nullable": true, "example": "company\\\\timsmith" }, "emailAddress": { "maxLength": 320, "minLength": 0, "pattern": "^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*)@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])$", "type": "string", "description": "Email address.", "nullable": true, "example": "timothy.smith@company.com" }, "externalCode": { "maxLength": 50, "minLength": 0, "type": "string", "description": "External code.", "nullable": true, "example": "douikj327sa8d07213879" } }, "additionalProperties": false, "description": "Specifies who has created the order / requisition." }, "DeleteOrganisationRequest": { "type": "object", "properties": { "externalCode": { "type": "string", "nullable": true } }, "additionalProperties": false }, "DeleteOrganisationResponse": { "type": "object", "properties": { "taskStatus": { "enum": [ "Success", "Failed" ], "type": "string" }, "deletedRecordCount": { "type": "integer", "format": "int32", "nullable": true }, "deletedRecordExternalCodes": { "type": "array", "items": { "type": "string" }, "nullable": true }, "message": { "type": "string", "nullable": true } }, "additionalProperties": false }, "DeleteRequest": { "type": "object", "properties": { "lastUpdated": { "type": "string", "description": "To delete records updated after specific time, use lastUpdated -field. This will delete all items that have been updated after the specified date. In response, user will get the taskStatus api link where the task status can be checked. Note: '0001-01-01' can be used to delete all records.", "format": "date-time", "nullable": true }, "externalCode": { "maxLength": 36, "minLength": 0, "type": "string", "description": "Single item can be deleted using externalCode and final status is returned immediately.", "nullable": true } }, "additionalProperties": false }, "DeleteResponse": { "type": "object", "properties": { "statusApiLink": { "type": "string", "nullable": true }, "taskName": { "type": "string", "nullable": true }, "taskStatus": { "type": "string", "nullable": true } }, "additionalProperties": false }, "DeleteUsersRequest": { "type": "object", "properties": { "externalCodes": { "type": "array", "items": { "type": "string" }, "nullable": true }, "changedBy": { "type": "string", "nullable": true } }, "additionalProperties": false }, "DeliveryAddress": { "required": [ "name" ], "type": "object", "properties": { "name": { "maxLength": 250, "minLength": 1, "type": "string", "description": "Specifies the address’ name for the goods delivery.", "example": "Maple street office" }, "pObox": { "maxLength": 250, "minLength": 0, "type": "string", "description": "PO box", "nullable": true, "example": "" }, "streetName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Street name.", "nullable": true, "example": "Maple street" }, "additionalStreetName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Additional street name.", "nullable": true, "example": "" }, "blockName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Block name.", "nullable": true, "example": "" }, "buildingName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Building name.", "nullable": true, "example": "" }, "buildingNumber": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Building number.", "nullable": true, "example": "68" }, "department": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Department.", "nullable": true, "example": "" }, "floor": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Floor.", "nullable": true, "example": "" }, "room": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Room.", "nullable": true, "example": "" }, "postalZone": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Postal zone.", "nullable": true, "example": "02600" }, "city": { "maxLength": 250, "minLength": 0, "type": "string", "description": "City.", "nullable": true, "example": "Toronto" }, "region": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Region.", "nullable": true, "example": "" }, "district": { "maxLength": 250, "minLength": 0, "type": "string", "description": "District.", "nullable": true, "example": "" }, "countryCode": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Country code.", "nullable": true, "example": "CA" }, "countryName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Country name.", "nullable": true, "example": "Canada" }, "description": { "maxLength": 1000, "minLength": 0, "type": "string", "description": "Description.", "nullable": true, "example": "" }, "globalLocationNumber": { "maxLength": 13, "minLength": 0, "type": "string", "description": "Global location number.", "nullable": true, "example": "" }, "countrySubEntity": { "maxLength": 50, "minLength": 0, "type": "string", "nullable": true, "example": "TX" }, "countrySubEntityDescription": { "maxLength": 50, "minLength": 0, "type": "string", "nullable": true, "example": "Texas" }, "addressId": { "maxLength": 2000, "minLength": 0, "type": "string", "description": "Identifier for the address.", "nullable": true, "example": "1000467" }, "addressSchemeId": { "maxLength": 2000, "minLength": 0, "type": "string", "description": "Can be used to specify a code that represents the agency or organization responsible for the addressID numbering.", "nullable": true, "example": "BuyerAccountId" } }, "additionalProperties": false, "description": "Specifies delivery address for the purchase requisition. If no address specified, uses the default delivery address of organization (configured in P2P).\r\nDelivery address on header level applies to entire purchase reuisition. If addresses are also provided on requisition lines, these will apply only to the corresponding lines." }, "DimensionValue": { "type": "object", "properties": { "organizationExternalCode": { "type": "string", "nullable": true }, "limit": { "type": "number", "format": "double", "nullable": true } }, "additionalProperties": false }, "DisputeInfo": { "type": "object", "properties": { "isDisputed": { "type": "boolean", "description": "Specifies whether the invoice is disputed. True = disputed, False = not disputed.", "example": true }, "disputeReason": { "type": "string", "description": "Specifies reason for the dispute. Available reasons are selected from a list. The list is defined by customer in P2P.", "nullable": true, "example": "DamagedGoods" }, "disputeDate": { "type": "string", "description": "Specifies when the invoice was disputed.", "format": "date-time", "nullable": true } }, "additionalProperties": false, "description": "" }, "ETLTransferResponseEntity": { "required": [ "externalCode", "invoiceId", "paymentBlock", "responseMessage", "success" ], "type": "object", "properties": { "invoiceId": { "maxLength": 36, "minLength": 1, "type": "string" }, "externalCode": { "maxLength": 36, "minLength": 2, "type": "string" }, "success": { "type": "boolean", "description": "Was the invoice succesfully transfered to ERP system (true / false)." }, "responseMessage": { "maxLength": 250, "minLength": 1, "type": "string", "description": "Error message from ERP, if transfer was not succesful. The message is stored on P2P invoice action log." }, "sourceSystem": { "maxLength": 32, "minLength": 0, "type": "string", "description": "Indicates the system that is returning transfer response.", "nullable": true }, "voucherNumber1": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Voucher number 1 can be returned here from the ERP system.", "nullable": true }, "voucherNumber2": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Voucher number 2 can be returned here from the ERP system.", "nullable": true }, "transferDate": { "type": "string", "description": "DateTime when receiving ERP system has sent the transfer response.", "format": "date-time", "nullable": true }, "paymentBlock": { "type": "boolean" } }, "additionalProperties": false }, "EnrichmentResponseEntity": { "required": [ "externalCode", "responseMessage", "success" ], "type": "object", "properties": { "externalCode": { "maxLength": 36, "minLength": 1, "type": "string", "description": "External identifier that is used as a key in API. External code of the enrichmentResponse needs to be unique within an accountingDocument -record. Always create a new externalCode when sending response, there is no overwriting/editing of previous response. This will enable the visibility that all responses are tracked in API. ExternalCode in response messages plays no role in P2P (other than it is used in communication between P2P and the API layer).", "example": "f24fff19120445de9c23651434129991" }, "success": { "type": "boolean", "description": "Specifies if the invoice was succesfully transfered to ERP system (true = invoice successfully transferred, false = transfer failed).", "example": true }, "responseMessage": { "maxLength": 250, "minLength": 1, "type": "string", "description": "Informative message for P2P user regarding the transfer. If transfer failed, please indicate reason for transfer failure in this message. This message is shown in invoice action log.", "example": "Enriched invoice contents transferred for payment approval in ERP ." }, "sourceSystem": { "maxLength": 32, "minLength": 0, "type": "string", "description": "Indicates the system that is returning prebook response.", "nullable": true, "example": "ERP1" }, "transferDate": { "type": "string", "description": "Transfer date. Saved onto the invoice in P2P. Note: Field needs to be made visible in P2P UI to see sent value.", "format": "date-time", "nullable": true } }, "additionalProperties": false, "description": "enrichment response entity" }, "ErrorEntity": { "type": "object", "properties": { "externalCode": { "type": "string", "description": "External code of record on which error occurred (when available).", "nullable": true, "example": "4847-31231212-212121-1212" }, "type": { "enum": [ "BUSINESS", "VALIDATION", "TECHNICAL", "SECURITY" ], "type": "string", "description": "Error type.", "example": "" }, "code": { "enum": [ "EXTERNAL_CODE_MISMATCH", "SCHEMA_VALIDATION_ERROR", "CONFLICT_IN_POST", "DATA_ORIGIN_VALIDATION_ERROR", "ACCESS_TOKEN_VALIDATION_ERROR", "CREDENTIAL_VALIDATION_ERROR", "PARAMETER_VALIDATION_ERROR", "UNEXPECTED_ERROR", "METHOD_NOT_ALLOWED", "ENTITY_NOT_FOUND", "DATA_VALIDATION_FAILED", "SNS_PUBLISH_ERROR", "SQS_PUBLISH_ERROR" ], "type": "string", "description": "Error code.", "example": "" }, "message": { "type": "string", "description": "Specific error message.", "nullable": true, "example": "" }, "info": { "type": "string", "description": "Information about type of the error.", "nullable": true, "example": "" } }, "additionalProperties": false }, "ErrorFeedbackEntity": { "type": "object", "properties": { "id": { "type": "string", "description": "Basware internal ID for the error.", "nullable": true, "example": "ba118ccb-1fd3-4d63-936a-f01e40babba7" }, "requestId": { "type": "string", "description": "RequestId of the message posted by Customer to Basware API, on which this error occurred. The requestId generated by Basware API and returned on response header when sending a message to the API.", "nullable": true, "example": "40d1f86c-8446-45dd-a62f-8b23ef77d304" }, "externalCode": { "type": "string", "description": "ExternalCode of the record on which the error occurred.", "nullable": true, "example": "4847-31231212-212121-1970" }, "errorEntity": { "type": "string", "description": "JSON object containing the data posted for the record containing the error.", "nullable": true, "example": "{\\\"CostCenterCode\\\":\\\"35680\\\",\\\"CostCenterNames\\\":[{\\\"Translation\\\":\\\"Helsinki Harbour\\\",\\\"Language\\\":\\\"en-US\\\"}],\\\"ExternalCode\\\":\\\"4847-31231212-212121-1970\\\",\\\"Companies\\\":[{\\\"CompanyCode\\\":\\\"208\\\",\\\"Active\\\":true},{\\\"CompanyCode\\\":\\\"01\\\",\\\"Active\\\":false}],\\\"LastUpdated\\\":\\\"10/08/2020 09:52:49\\\"}" }, "entityType": { "enum": [ "Account", "Contract", "CostCenter", "TaxCode", "ExchangeRate", "PaymentTerm", "User", "Project", "MatchingOrder", "MatchingOrderLine", "GenericList", "AdvancedPermission", "TransferResponse", "PaymentResponse", "PrebookResponse", "Vendor", "AdvancedValidation", "PurchaseRequisition", "PurchaseOrder", "PurchaseGoodsReceipt", "Organization", "EnrichmentTransferResponse", "UserGroup", "UserGroupAssociatedUser", "UserGroupPermission" ], "type": "string", "description": "Entity (interface) type of the record on which the error occurred.", "example": "CostCenter" }, "errorStamp": { "type": "string", "description": "Timestamp when the error occurred.", "format": "date-time" }, "errors": { "type": "array", "items": { "type": "string" }, "description": "List of errors which occurred on the record.", "nullable": true }, "targetSystem": { "type": "string", "description": "Target system from which the error originated. Examples: P2P, Vendor Manager, Purchase Manager.", "nullable": true, "example": "P2P" } }, "additionalProperties": false }, "ErrorFeedbackResponse": { "required": [ "errorList" ], "type": "object", "properties": { "errorList": { "type": "array", "items": { "$ref": "#/components/schemas/ErrorFeedbackEntity" } } }, "additionalProperties": false }, "ExchangeRateCompanyEntity": { "required": [ "active", "companyCode" ], "type": "object", "properties": { "companyCode": { "maxLength": 32, "minLength": 1, "type": "string", "description": "Defines the organization that the exchange rate is mapped to", "example": "BW00" }, "active": { "type": "boolean", "description": "This flag will enable the data to be visible on UI, provided if the value is true, not visible in case of value is false. It will be also used for soft delete.", "example": true } }, "additionalProperties": false }, "ExchangeRateEntity": { "required": [ "companies", "currencyCodeFrom", "currencyCodeTo", "externalCode", "rate", "validFrom" ], "type": "object", "properties": { "rate": { "maximum": 1000000000, "minimum": 0, "type": "number", "description": "Defines the selected currency's exchange rate. Multiplying amount in 'from' -currency by rate provides the amount in 'to' -currency.", "format": "double", "example": 0.564858 }, "currencyCodeTo": { "maxLength": 3, "minLength": 2, "type": "string", "description": "The currency code defines the base currency.", "example": "EUR" }, "currencyCodeFrom": { "maxLength": 3, "minLength": 2, "type": "string", "description": "The currency code defines the quote currency.", "example": "AUD" }, "validFrom": { "type": "string", "description": "Defines the date when the exchange rate becomes valid", "format": "date-time", "example": "2020-04-08" }, "companies": { "type": "array", "items": { "$ref": "#/components/schemas/ExchangeRateCompanyEntity" }, "description": "List of company units to associate exchangerate to P2P organization hierarchy" }, "externalCode": { "maxLength": 36, "minLength": 1, "type": "string", "description": "External identifier that is used as a key in API.", "example": "4847-31231212-212121-1212" }, "lastUpdated": { "type": "string", "description": "Timestamp when the record was last sent to API. Set automatically.", "format": "date-time" } }, "additionalProperties": false }, "ExchangeRateResponse": { "required": [ "exchangeRates" ], "type": "object", "properties": { "exchangeRates": { "type": "array", "items": { "$ref": "#/components/schemas/ExchangeRateEntity" } } }, "additionalProperties": false }, "ExportedContractEntity": { "required": [ "active", "companyCode", "currencyCode", "externalCode", "owner", "referenceCode", "suppliers", "title", "total", "validFrom", "validTo" ], "type": "object", "properties": { "externalCode": { "maxLength": 100, "minLength": 1, "type": "string", "description": "External identifier that is used as a key in API.", "example": "4847-31231212-212121-1212" }, "referenceCode": { "maxLength": 255, "minLength": 1, "type": "string", "description": "FreeText Reference shown in contracts view (Contract Number)", "example": "12197627" }, "processingStatus": { "enum": [ "WaitingForExport", "Exported" ], "type": "string", "description": "Processing status of the contract spend in Basware API. Use 'WaitingForExport' to get unacknowledged records.", "example": "WaitingForExport" }, "companyCode": { "maxLength": 25, "minLength": 1, "type": "string", "description": "Buyer Company Code", "example": "200" }, "companyName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Buyer Company Name", "nullable": true, "example": "Acme Motor leasinc inc." }, "title": { "maxLength": 250, "minLength": 1, "type": "string", "description": "A short name generally used to identify the contract in reporting", "example": "Car Leasing" }, "description": { "maxLength": 2000, "minLength": 0, "type": "string", "description": "General information on contract", "nullable": true, "example": "This contract is for car leasing for Acme Motor leasing inc." }, "type": { "maxLength": 100, "minLength": 1, "type": "string", "description": "Determined by the contract management system. Types are displayed only for informational purposes", "nullable": true, "example": "" }, "validFrom": { "type": "string", "description": "The date on which the contract legally came in to force", "format": "date-time", "example": "2021-01-01" }, "validTo": { "type": "string", "description": "The date on which the contract will naturally end if not active decisions are made to extend or terminate early", "format": "date-time", "example": "2023-12-31" }, "total": { "type": "number", "description": "Total expected expenditure under this contract between the Start and End Dates specified above", "format": "double", "example": 10000 }, "amountType": { "enum": [ "Net", "Gross" ], "type": "string", "description": "net or gross", "example": "12197627" }, "currencyCode": { "maxLength": 3, "minLength": 2, "type": "string", "description": "Currency for the total value", "example": "EUR" }, "paymentTermCode": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Payment term for this contract", "nullable": true, "example": "NET30" }, "owner": { "maxLength": 100, "minLength": 1, "type": "string", "description": "The person owning the contract", "example": "Liz Black" }, "contactPerson": { "maxLength": 100, "minLength": 0, "type": "string", "description": "The person to contact on contract matters", "nullable": true, "example": "Liz Black" }, "active": { "type": "boolean", "description": "States if the contract can be used or not", "example": true }, "suppliers": { "type": "array", "items": { "$ref": "#/components/schemas/ExportedContractSupplier" }, "description": "Suppliers for contract" }, "externalLinks": { "type": "array", "items": { "$ref": "#/components/schemas/ExportedContractExternalLink" }, "description": "ExternalLinks for contract", "nullable": true }, "spendTotals": { "type": "array", "items": { "$ref": "#/components/schemas/ExportedContractSpendTotal" }, "description": "Aggregate sums of all projected / spent amounts per document type. \r\n1) For 'AccountingDocument', this is the actual total spend. The spend is from invoices which are transferred to accounting (documents in circulation are not included). All invoices linked to the contract are included, whether PO, non-PO, or payment plan matched invoices. \r\n2) For 'PurchaseOrder', this is the projected total spend. Included are all purchaseOrders in P2P Purchase, which are sent to supplier and linked to the contract. It does not matter whether the orders have been invoiced or not. Spend from matching orders is not included. \r\n3) For 'SpendPlan', this is the projected total spend. Included are all active spend plans. The spend from a spend plan gets added the moment the spend plan is activated. It does not matter if the spend plan has received any invoices or not. \r\nNote: The individual spend events can be accessed through exportedContractSpends API by providing the externalCode of the contract and optionally the document type.", "nullable": true }, "orderSpend": { "type": "boolean", "description": "States if spend of orders using this contract is collected for spend reporting.", "example": true }, "spendPlanSpend": { "type": "boolean", "description": "States if spend of spend plans using this contract is collected for spend reporting.", "example": true }, "invoiceSpend": { "type": "boolean", "description": "States if spend of invoices using this contract is collected for spend reporting.", "example": true }, "lastUpdated": { "type": "string", "description": "Timestamp when the record was last sent to API. Set automatically.", "format": "date-time" } }, "additionalProperties": false }, "ExportedContractExternalLink": { "required": [ "externalLinkName" ], "type": "object", "properties": { "externalLinkName": { "maxLength": 512, "minLength": 1, "type": "string", "description": "Name shown in UI for external link", "example": "Acme motor leasing" }, "externalLinkURL": { "maxLength": 2000, "minLength": 1, "type": "string", "description": "URL used when selecting external link", "nullable": true, "example": "https://www.acmemotorsinc.com" } }, "additionalProperties": false }, "ExportedContractSpendEntity": { "required": [ "contractNumber", "externalCode", "processingStatus" ], "type": "object", "properties": { "externalCode": { "maxLength": 100, "minLength": 1, "type": "string", "description": "External identifier that is used as a key in API to identify the contract spend.", "example": "4847-31231212-212121-1212" }, "processingStatus": { "enum": [ "WaitingForExport", "Exported" ], "type": "string", "description": "Processing status of the contract spend in Basware API. Use 'WaitingForExport' to get unacknowledged records.", "example": "WaitingForExport" }, "contractNumber": { "maxLength": 255, "minLength": 1, "type": "string", "description": "Contract number in P2P.", "example": "2125400" }, "contractExternalCode": { "maxLength": 100, "minLength": 0, "type": "string", "description": "External identifier that is used as a key in API for the contract to which this spend belongs. The contract can be found using this code from exportedContracts API.", "nullable": true, "example": "4847-31231212-565656-3344" }, "companyCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Buyer Company Code", "nullable": true, "example": "200" }, "companyName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Buyer Company Name", "nullable": true, "example": "Basware Oyj" }, "supplierCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Code of the supplier in the contract spend event.", "nullable": true, "example": "25365" }, "supplierName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Name of the supplier in the contract spend event.", "nullable": true, "example": "Acme Motor Leasing inc." }, "documentType": { "enum": [ "AccountingDocument", "PurchaseOrder", "SpendPlan" ], "type": "string", "description": "Type of the spend source document. \r\n1) AccountingDocument = An approved invoice transferred to accounting (available trough accountingDocuments API). Spend is exported when the invoice is transferred to accounting. \r\n2) PurchaseOrder = An order created in or imported to P2P Purchase, which is sent to supplier (available from exportedPurchaseOrders API when export is enabled). \r\nNote: Spend is updated whenever the order is updated. \r\n3) SpendPlan = Spend plan created in P2P. Spend is exported when Spend plan is activated in P2P and removed if the spend plan is deactivated. SpendPlans are not available through Basware API. Note: When using spendPlans or PurchaseOrders, the spend is exported twice - first on the spendplan/PO and second on the invoice. Spend of PurchaseOrders and SpendPlans are considered as spend reservations and invoice spend as the actual spend.", "example": "WaitingForExport" }, "documentExternalCode": { "maxLength": 100, "minLength": 1, "type": "string", "description": "External identifier of the spend source document. This can be used to fetch the document from accountingDocuments API (by invoiceId) or exportedPurchaseOrders API (by externalCode).", "nullable": true, "example": "138e7d94997847aebe7432e521b3dac9" }, "documentNumber": { "maxLength": 100, "minLength": 0, "type": "string", "description": "DocumentNumber of the spend source document, ie. Invoice number, order number, spend plan reference. Corresponds to 'invoiceNumber' in accountingDocuments API or to 'orderNumber' in exportedPurchaseOrders API.", "nullable": true, "example": "80000330200233" }, "netSumDocument": { "type": "number", "description": "Net currency amount spent on this contract on the spend source document, indicated in currency of the spend source document.", "format": "double", "example": 150 }, "grossSumDocument": { "type": "number", "description": "Gross currency amount spent on this contract on the spend source document, indicated in currency of the spend source document.", "format": "double", "example": 250 }, "currencyCodeDocument": { "maxLength": 3, "minLength": 2, "type": "string", "description": "Currency of the spend source document.", "nullable": true, "example": "EUR" }, "netSumContract": { "type": "number", "description": "Net currency amount spent on the spend document, indicated in currency of the contract.", "format": "double", "example": 150 }, "grossSumContract": { "type": "number", "description": "Gross currency amount spent on the spend document, indicated in currency of the contract.", "format": "double", "example": 250 }, "currencyCodeContract": { "maxLength": 3, "minLength": 2, "type": "string", "description": "Currency of the contract.", "nullable": true, "example": "EUR" }, "netSumCompany": { "type": "number", "description": "Net currency amount spent on the spend document, indicated in currency of the byuer company.", "format": "double", "example": 1534.5 }, "grossSumCompany": { "type": "number", "description": "Gross currency amount spent on the spend document, indicated in currency of the buyer company.", "format": "double", "example": 1902.16 }, "currencyCodeCompany": { "maxLength": 3, "minLength": 2, "type": "string", "description": "Currency of the buyer company.", "nullable": true, "example": "Liz Black" }, "netSumOrganization": { "type": "number", "description": "Net currency amount spent on the spend document, indicated in currency of the byuer organization.", "format": "double", "example": 126 }, "grossSumOrganization": { "type": "number", "description": "Gross currency amount spent on the spend document, indicated in currency of the buyer organization.", "format": "double", "example": 156.2 }, "currencyCodeOrganization": { "maxLength": 3, "minLength": 2, "type": "string", "description": "Currency of the buyer organization.", "nullable": true, "example": "GBP" }, "isCancelled": { "type": "boolean", "description": "Indicates whether the spend is cancelled. An existing spend may be cancelled for example when wrong contract was linked to a document.", "example": false }, "lastUpdated": { "type": "string", "description": "Timestamp when the record was last sent to API. Set automatically.", "format": "date-time" } }, "additionalProperties": false, "description": "Contains details on indivisual spend events. Note that a spend event can contain just a part of the whole amount indicated on spend source document, such as when part of the invoice lines correspond to a contract." }, "ExportedContractSpendTotal": { "type": "object", "properties": { "documentType": { "enum": [ "AccountingDocument", "PurchaseOrder", "SpendPlan" ], "type": "string", "description": "Specifies the type of document for which sums of projected / spent amounts are stated.", "example": "AccountingDocument" }, "netSumContract": { "type": "number", "description": "Net sum of spends in the currency of the contract.", "format": "double", "example": 2000 }, "grossSumContract": { "type": "number", "description": "Gross sum of spends in the currency of the contract.", "format": "double", "example": 2480 }, "currencyCodeContract": { "type": "string", "description": "Currency code of the contract.", "nullable": true, "example": "EUR" }, "netSumCompany": { "type": "number", "description": "Net sum of spends in the currency of the company.", "format": "double", "example": 10230 }, "grossSumcompany": { "type": "number", "description": "Gross sum of spends in the currency of the company.", "format": "double", "example": 12685.2 }, "currencyCodecompany": { "maxLength": 3, "minLength": 2, "type": "string", "description": "Currency code of the company.", "nullable": true, "example": "SEK" }, "netSumOrganization": { "type": "number", "description": "Net sum of spends in the currency of the Organization.", "format": "double", "example": 1680 }, "grossSumOrganization": { "type": "number", "description": "Gross sum of spends in the currency of the Organization.", "format": "double", "example": 2291.52 }, "currencyCodeOrganization": { "maxLength": 3, "minLength": 2, "type": "string", "description": "Currency code of the Organization.", "nullable": true, "example": "GBP" } }, "additionalProperties": false }, "ExportedContractSpendsResponse": { "required": [ "contractSpends" ], "type": "object", "properties": { "contractSpends": { "type": "array", "items": { "$ref": "#/components/schemas/ExportedContractSpendEntity" } } }, "additionalProperties": false }, "ExportedContractSupplier": { "required": [ "supplierCode" ], "type": "object", "properties": { "supplierCode": { "maxLength": 25, "minLength": 1, "type": "string", "description": "Code of the supplier on the contract", "example": "32789" }, "supplierName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Acme Motor Leasing inc.", "nullable": true, "example": "32789" } }, "additionalProperties": false }, "ExportedContractsRequest": { "required": [ "contract" ], "type": "object", "properties": { "contract": { "$ref": "#/components/schemas/ExportedContractEntity" } }, "additionalProperties": false }, "ExportedContractsResponse": { "required": [ "contracts" ], "type": "object", "properties": { "contracts": { "type": "array", "items": { "$ref": "#/components/schemas/ExportedContractEntity" } } }, "additionalProperties": false }, "ExportedPurchaseOrderEntity": { "required": [ "creator", "deliveryAddress", "documentSource", "externalCode", "hidePricesFromSupplier", "orderCreationTime", "orderExportTimestamp", "orderNumber", "owner", "processingStatus", "releaseOrdersRequired", "requisitionCreationTime", "requisitionNumber", "sendingMethod" ], "type": "object", "properties": { "externalCode": { "maxLength": 100, "minLength": 1, "type": "string", "description": "External identifier that is used as a key in API.", "example": "4847-31231212-212121-1212" }, "orderNumber": { "maxLength": 32, "minLength": 1, "type": "string", "description": "Order number in Basware P2P.", "example": "P2P-PO-2123682" }, "extOrderNumber": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Order number in external system (for imported orders).", "nullable": true, "example": "SAP-PO-213451" }, "parentOrderNumber": { "maxLength": 32, "minLength": 0, "type": "string", "description": "Used only if the order type is release to specify what is the order number of the parent blanket order in P2P Purchase.", "nullable": true, "example": "P2P-PO-2123682" }, "parentOrderExternalCode": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Used only if the order type is release to specify what is Basware API external code of the parent blanket order.", "nullable": true, "example": "4847-31231212-212121-1212" }, "parentOrderExtOrderNumber": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Used only if the order type is release to specify what is order number of the parent blanket order in the external system.", "nullable": true, "example": "SAP-PO-213451" }, "processingStatus": { "enum": [ "WaitingForExport", "Exported" ], "type": "string", "description": "Processing status of the order in Basware API. Can be used for retrieving order updates which have not been acknowledged by customer. 'WaitingForExport' = Has not been acknowledged. 'Exported' = Has been acknowledged.", "example": "WaitingForExport" }, "orderStatus": { "enum": [ "Confirmed", "ReadyForOrder", "Ordered", "SupplierRejected", "SupplierConfirmed", "ModifiedBySupplier", "PartiallyReceived", "Received", "Canceled", "OrderCreated", "Closed" ], "type": "string", "description": "Order status in Basware P2P Purchase.", "example": "Ordered" }, "reasonForPendingAction": { "enum": [ "None", "SendingFailed", "ModifiedBySupplier", "ModifiedByBuyer" ], "type": "string", "description": "Specifies reason for action pending for user in P2P.", "example": "None" }, "requisitionNumber": { "maxLength": 32, "minLength": 1, "type": "string", "description": "Requisition number of related requisition in Basware P2P.", "example": "Alusta-PR-321424" }, "extRequisitionNumber": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Requisition number of related requisition in external system (for imported requisitions).", "nullable": true, "example": "SAP-PR-12321" }, "organizationUnitCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "P2P company code for buyer organisation unit.", "nullable": true, "example": "BE100" }, "organizationUnitName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "P2P company name for buyer organisation unit.", "nullable": true, "example": "BuyerLtd" }, "purchasingGroupCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Purchasing group code.", "nullable": true, "example": "PG201" }, "purchasingGroupName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Purchasing group name.", "nullable": true, "example": "Office equipment" }, "purpose": { "maxLength": 2000, "minLength": 0, "type": "string", "description": "Reason why order is placed.", "nullable": true, "example": "Goods for Project A" }, "validityPeriodStartDate": { "type": "string", "description": "Used only if the order type is blanket to specify the start date for blanket purchase order validity period (date format: yyyy-MM-dd).", "format": "date-time", "nullable": true, "example": "" }, "validityPeriodEndDate": { "type": "string", "description": "Used only if the order type is blanket to specify the end date for blanket purchase order validity period (date format: yyyy-MM-dd).", "format": "date-time", "nullable": true, "example": "" }, "desiredDeliveryDate": { "type": "string", "description": "Delivery date requested by buyer.", "format": "date-time", "nullable": true, "example": "2020-10-24T00:00:00" }, "desiredDeliveryEndDate": { "type": "string", "description": "Buyer requested latest delivery date.", "format": "date-time", "nullable": true, "example": "2020-10-24T00:00:00" }, "promisedDeliveryDate": { "type": "string", "description": "Delivery date provided by supplier.", "format": "date-time", "nullable": true, "example": "2020-10-24T00:00:00" }, "promisedDeliveryEndDate": { "type": "string", "description": "Supplier confirmed deliverytime.", "format": "date-time", "nullable": true, "example": "2020-10-24T00:00:00" }, "classification": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Order classification code. Values are specified by customer. Often used to group orders and assign groups for handling by different persons.", "nullable": true, "example": "Project A" }, "cancellationNote": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Reason for cancelling order (if order is cancelled).", "nullable": true, "example": "" }, "requisitionCreationTime": { "type": "string", "description": "Creation time of related purchase requisition in P2P.", "format": "date-time", "example": "2020-10-24T00:00:00" }, "orderCreationTime": { "type": "string", "description": "Creation time of order in P2P.", "format": "date-time", "example": "2020-10-24T00:00:00" }, "orderExportTimestamp": { "type": "string", "description": "Export time of order to Basware API.", "format": "date-time", "example": "2020-10-24T00:00:00" }, "documentSource": { "enum": [ "P2P", "ImportedAsRequisition", "ImportedAsOrder" ], "type": "string", "description": "Specifies where the order was created (imported or created manually in P2P).", "example": "P2P" }, "sendingMethod": { "enum": [ "BaswareNetwork", "Email", "SmartOrder" ], "type": "string", "description": "Determines which method Basware P2P uses to send order to supplier when the order is placed.", "example": "BaswareNetwork" }, "salesOrderNumber": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Reference to sales order that this order relates to.", "nullable": true, "example": "" }, "documentLink": { "type": "string", "description": "URL link to view the order in Basware P2P.", "format": "uri", "nullable": true, "example": "http://customertenant.p2p.basware.com/Portal/Default.aspx?forms=1&sl=1&tid=customertenant&dl=(Search/PurchaseOrderDetails-SearchOrderId(e105de8f-3e13-4487-a7e5-8c1ba12d7ea9))" }, "contractNumber": { "maxLength": 255, "minLength": 0, "type": "string", "description": "Reference to contract that this order relates to.", "nullable": true, "example": "CON-1262" }, "orderType": { "enum": [ "Standard", "Blanket", "Release" ], "type": "string", "description": "Standard order is a quantity-based purchase order. It specifies quantity amounts, prices and desired delivery dates for the items or services. \r\nStandard purchase orders typically require goods receipts.\r\n\r\nBlanket order is a sum-based long-term purchase order. It is placed for items or services for a specific period of time (validity period) \r\nand with an pre-determined maximum currency amount. Blanket orders are typically used for recurring invoices, for example ordering office cleaning \r\nfor one year. They can be used for ordering both services and consumable goods. Quantity amount used on the blanket order is always '1'. \r\nGoods receipts are not used with blanket orders.\r\n\r\nRelease orders are purchase orders that are created against/from a blanket order to authorize delivery and invoicing. If a blanket order requires \r\nrelease orders, the supplier should not act upon receiving the blanket order, but needs to wait for the release orders. The release orders are created \r\nfrom the blanket order. The release orders need no further acceptance because they are consuming an already approved blanket order. Invoicing will happen \r\nagainst the release orders.", "example": "standard" }, "noteToSupplier": { "maxLength": 2000, "minLength": 0, "type": "string", "description": "Note to supplier concerning this order. This is sent to supplier when order is placed.", "nullable": true, "example": "Please deliver to 2nd floor" }, "noteFromSupplier": { "maxLength": 2000, "minLength": 0, "type": "string", "description": "Note received from supplier concerning this order.", "nullable": true, "example": "Will be delivered to front desk not 2nd floor" }, "companyCode": { "maxLength": 32, "minLength": 0, "type": "string", "description": "P2P company code for buyer company.", "nullable": true, "example": "BE100" }, "companyName": { "maxLength": 255, "minLength": 0, "type": "string", "description": "P2P company name for buyer company.", "nullable": true, "example": "BuyerLtd" }, "supplierCode": { "maxLength": 32, "minLength": 0, "type": "string", "description": "Supplier code to whom the order is addressed.", "nullable": true, "example": "SU100" }, "supplierName": { "maxLength": 255, "minLength": 0, "type": "string", "description": "Supplier name to whom the order is addressed.", "nullable": true, "example": "ACME goods and gadgets inc" }, "supplierContactName": { "maxLength": 255, "minLength": 0, "type": "string", "description": "Supplier contact name to whom the order is addressed.", "nullable": true, "example": "Mark Green" }, "supplierOrderingEmail": { "maxLength": 1800, "minLength": 0, "type": "string", "description": "The email address(es) where the order is sent to when sending order to supplier. Can contain multiple email addresses.", "nullable": true, "example": "Mark@supplier.com" }, "ownerOrderingEmail": { "maxLength": 1800, "minLength": 0, "pattern": "^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*)@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])$", "type": "string", "description": "Contact email to which supplier can send questions about the order. Note: When order is sent to supplier, it is not sent to this email. Note: Fields visible on the order sent to supplier are configured in P2P Purchase.", "nullable": true, "example": "john.smith@buyer.com" }, "otherOrderingEmail": { "type": "string", "description": "The email address(es) where the order is sent by P2P purchase. Can contain multiple email addresses. The order is sent to these addresses when orderRecipientType is 'Owner' or 'Both'.", "nullable": true, "example": "Mark@supplier.com" }, "paymentTermCode": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Order payment term code.", "nullable": true, "example": "30N" }, "paymentTermName": { "maxLength": 2000, "minLength": 0, "type": "string", "description": "Order payment term name.", "nullable": true, "example": "30DaysNet" }, "releaseOrdersRequired": { "type": "boolean", "description": "Used only if the order type is blanket to specify, if the blanket order requires release orders.", "example": false }, "hidePricesFromSupplier": { "type": "boolean", "description": "Specifies, if all price information is hidden from the supplier in the outgoing order.", "example": false }, "attachPdfToNetworkOrder": { "type": "boolean", "description": "Specifies if order is attached as pdf file when order is sent to supplier through Basware network.", "example": true }, "orderRecipientType": { "enum": [ "Supplier", "Owner", "SupplierAndOwner" ], "type": "string", "description": "Determines who order is sent to.\r\n-Supplier(0) : Order is sent only to supplier.\r\n-If orderingMethod is email, order is sent to the email indicated by 'supplierOrderingEmail'. -If orderingMethod is network, the order is sent through Basware network.\r\n-Owner (1): Order is sent only to email address(es) indicated by field 'otherOrderingEmail'. Used for example when goods were picked up from a store and no order needs to be sent to supplier.\r\n-SupplierAndOwner (2): Order is sent to both supplier and email addresses indicated by field 'otherOrderingEmail'. Order delivery method to supplier is determined by orderingMethod, same as above.", "example": "Supplier" }, "deliveryLocation": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Details on Delivery.", "nullable": true, "example": "" }, "deliveryTerm": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Delivery term. Generally Incoterms (International Commercial Terms) are used here, however customer and supplier can also agree to use different sets of delivery terms.", "nullable": true, "example": "Supplier to Buyer via Post" }, "deliveryReceiverName": { "maxLength": 255, "minLength": 0, "type": "string", "description": "Person receiving delivery of ordered goods.", "nullable": true, "example": "SallyPetersSectetary" }, "purchaseCurrency": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Currency code for currency in which the order is placed.", "nullable": true, "example": "EUR" }, "companyCurrency": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Currency code of the company in P2P for which the order is placed.", "nullable": true, "example": "EUR" }, "groupCurrency": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Currency code of the group / organization in P2P for which the order is placed. \r\nThe group is a parent-level entity to the company in P2P.", "nullable": true, "example": "EUR" }, "exchangeRateComp": { "type": "number", "description": "Exchange rate between order currency (=purchaseCurrency) and company currency.", "format": "double", "nullable": true, "example": 1 }, "exchangeRateOrg": { "type": "number", "description": "Exchange rate between order currency (=purchaseCurrency) and group currency.", "format": "double", "nullable": true, "example": 1 }, "grossSum": { "type": "number", "description": "Gross sum of order in order currency (=purchaseCurrency).", "format": "double", "example": 125 }, "grossSumComp": { "type": "number", "description": "Gross sum of order in company currency.", "format": "double", "example": 125 }, "grossSumOrg": { "type": "number", "description": "Gross sum of order in company currency.", "format": "double", "example": 125 }, "netSum": { "type": "number", "description": "Net sum of order in order currency (=purchaseCurrency).", "format": "double", "example": 100 }, "netSumComp": { "type": "number", "description": "Net sum of order in company currency.", "format": "double", "example": 100 }, "netSumOrg": { "type": "number", "description": "Net sum of order in organization currency.", "format": "double", "example": 100 }, "taxSum": { "type": "number", "description": "Tax sum of order in order currency (=purchaseCurrency).", "format": "double", "example": 25 }, "taxSumComp": { "type": "number", "description": "Tax sum of order in company currency.", "format": "double", "example": 25 }, "taxSumOrg": { "type": "number", "description": "Tax sum of order in company currency.", "format": "double", "example": 25 }, "headerDataDate1": { "type": "string", "description": "HeaderDataDate1-5: Reserved for customer-specific date fields.", "format": "date-time", "nullable": true, "example": "2020-10-24T00:00:00" }, "headerDataDate2": { "type": "string", "format": "date-time", "nullable": true, "example": "" }, "headerDataDate3": { "type": "string", "format": "date-time", "nullable": true, "example": "" }, "headerDataDate4": { "type": "string", "format": "date-time", "nullable": true, "example": "" }, "headerDataDate5": { "type": "string", "format": "date-time", "nullable": true, "example": "" }, "headerDataNum1": { "type": "number", "description": "HeaderDataNum1-5: Can be used for customer-specific numeric fields.", "format": "double", "nullable": true, "example": 3122 }, "headerDataNum2": { "type": "number", "format": "double", "nullable": true, "example": 0 }, "headerDataNum3": { "type": "number", "format": "double", "nullable": true, "example": 0 }, "headerDataNum4": { "type": "number", "format": "double", "nullable": true, "example": 0 }, "headerDataNum5": { "type": "number", "format": "double", "nullable": true, "example": 0 }, "headerDataText1": { "maxLength": 250, "minLength": 0, "type": "string", "description": "HeaderDataText1-5: Can be used for customer-specific numeric fields.", "nullable": true, "example": "" }, "headerDataText2": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "headerDataText3": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "headerDataText4": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "headerDataText5": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "lastUpdated": { "type": "string", "description": "Timestamp when the purchase order was last updated (from Basware P2P or from customer end).", "format": "date-time" }, "creator": { "$ref": "#/components/schemas/Creator" }, "owner": { "$ref": "#/components/schemas/Owner" }, "deliveryAddress": { "$ref": "#/components/schemas/DeliveryAddress" }, "orderLines": { "type": "array", "items": { "$ref": "#/components/schemas/ExportedPurchaseOrderLineEntity" }, "description": "Purchase order lines.", "nullable": true } }, "additionalProperties": false }, "ExportedPurchaseOrderGoodsReceiptEntity": { "required": [ "externalCode", "goodsReceiptDocumentCreationTime", "notifyFault", "receivedGrossSum", "receivedNetSum", "receivedQuantity", "receivingDate" ], "type": "object", "properties": { "externalCode": { "maxLength": 100, "minLength": 1, "type": "string", "description": "Unique external identifier that is used as a key in API. \r\nIdentifies goods receipt line for updates through API.", "example": "060cb8ea-5464-11ea-a38b-2e728ce88123" }, "grHeaderExternalCode": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Unique external identifier that is used as a key in API. \r\nIdentifies goods receipt document for updates through API. On goods receipt document can contain multiple goods receipt lines.", "nullable": true, "example": "dlaskjdg-d264-11kj-asdb-22idulkjahs8" }, "goodsReceiptNumber": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Basware P2P goods receipt document number for the GR.", "nullable": true, "example": "98762139" }, "documentLink": { "type": "string", "description": "Specifies URL to view corresponding GR in Alusta.", "format": "uri", "nullable": true, "example": "http://customertenant.p2p.basware.com/Portal/Default.aspx?forms=1&sl=1&tid=customertenant&dl=(Search/GoodsReceiptSearchDetails-GrId(e105de8f-3e13-4487-a7e5-8c1ba12d7ea9))" }, "extGoodsReceiptNumber": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Goods receipt document number in external system (for imported goods receipts)", "nullable": true, "example": "9732816" }, "deliveryNoteNumber": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Reference to delivery note this delivery relates to.", "nullable": true, "example": "D871263998" }, "goodsReceiptDocumentCreationTime": { "type": "string", "description": "Timestamp when goods receipt document was entered to receiving system. This data key-in timestamp may differ from receivingDate if data key-in is not done at the same time.", "format": "date-time", "example": "2020-10-24T00:00:00" }, "receivingDate": { "type": "string", "description": "Date on which goods have been received.", "format": "date-time", "example": "2020-10-24T00:00:00" }, "goodsReceiptLocationAddress": { "maxLength": 2000, "minLength": 0, "type": "string", "description": "Specifies where the receiving took place (Order Location).", "nullable": true, "example": "" }, "productSerialNumber": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Product serial number.", "nullable": true, "example": "" }, "receivedQuantity": { "type": "number", "description": "Quantity received.", "format": "double", "example": 1 }, "unitOfMeasure": { "maxLength": 30, "minLength": 0, "type": "string", "description": "Unit of measure.", "nullable": true, "example": "PCS" }, "receivedNetSum": { "type": "number", "description": "Net total of receiving.", "format": "double", "example": 100 }, "receivedGrossSum": { "type": "number", "description": "Gross total of receiving.", "format": "double", "example": 125 }, "receivalMethod": { "enum": [ "Quantity", "NetSum", "GrossSum" ], "type": "string", "description": "Specifies whether the receival has been done by Quantity, NetSum or GrossSum. Same receival method needs to be used for all future goods receipts done to the same order line. The receival method can only be changed by first reversing all the previously received goods receipts to the order line.", "nullable": true, "example": "Quantity" }, "notifyFault": { "type": "boolean", "description": "Used to notify supplier of damaged goods. True if goods are faulty while receiving.", "example": false }, "information": { "maxLength": 255, "minLength": 0, "type": "string", "description": "Additional information.", "nullable": true, "example": "" }, "referenceGRNumber": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Specifies original goods receipt to be reversed (used only on reverse GR lines) Contains Basware P2P internal document number of the GR from which to substract reversed amount.", "nullable": true, "example": "" }, "referenceGRExternalCode": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Specifies original goods receipt to be reversed (used only on reverse GR lines) Contains external document number of the GR from which to substract reversed amount. Applicable only for GRs imported from external systems.", "nullable": true, "example": "" }, "receiver": { "$ref": "#/components/schemas/Receiver" } }, "additionalProperties": false }, "ExportedPurchaseOrderLineCodingRowEntity": { "required": [ "externalCode", "rowIndex", "splitPercent" ], "type": "object", "properties": { "externalCode": { "maxLength": 100, "minLength": 1, "type": "string", "description": "Unique external identifier that is used as a key in API.", "example": "060cb8ea-5464-11ea-a38b-2e728ce88122" }, "rowIndex": { "type": "integer", "description": "Purchase internal coding row number.", "format": "int32", "example": 1 }, "splitPercent": { "type": "number", "description": "Percentage of order line's cost which this coding row covers (cost can be split between coding lines).", "format": "double", "example": 100 }, "accountCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Account code.", "nullable": true, "example": "765232" }, "accountName": { "maxLength": 2000, "minLength": 0, "type": "string", "description": "Account name.", "nullable": true, "example": "IT costs" }, "costCenterCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Cost center code.", "nullable": true, "example": "213441" }, "costCenterName": { "maxLength": 2000, "minLength": 0, "type": "string", "description": "Cost center name.", "nullable": true, "example": "Sao Paolo" }, "projectCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Project code.", "nullable": true, "example": "" }, "projectName": { "maxLength": 255, "minLength": 0, "type": "string", "description": "Project name.", "nullable": true, "example": "" }, "fixedAssetCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Fixed asset code.", "nullable": true, "example": "" }, "fixedAssetName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Fixed asset name.", "nullable": true, "example": "" }, "fixedAssetSubCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Fixed asset sub code.", "nullable": true, "example": "" }, "fixedAssetSubName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Fixed assets sub name.", "nullable": true, "example": "" }, "internalOrderCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Internal order code.", "nullable": true, "example": "" }, "internalOrderName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Internal order name.", "nullable": true, "example": "" }, "profitCenterCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Profit center code.", "nullable": true, "example": "" }, "profitCenterName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Profit center name.", "nullable": true, "example": "" }, "businessUnitCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Business unit code.", "nullable": true, "example": "" }, "businessUnitName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Business unit name.", "nullable": true, "example": "" }, "projectSubCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Project sub code.", "nullable": true, "example": "" }, "projectSubName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Project sub name.", "nullable": true, "example": "" }, "employeeCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Employee code.", "nullable": true, "example": "" }, "employeeName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Employee name.", "nullable": true, "example": "" }, "vehicleNumber": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Vehicle number.", "nullable": true, "example": "" }, "vehicleName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Vehicle name.", "nullable": true, "example": "" }, "salesOrderCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Sales order code.", "nullable": true, "example": "" }, "salesOrderName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Sales order name.", "nullable": true, "example": "" }, "salesOrderSubCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Sales order sub code.", "nullable": true, "example": "" }, "salesOrderSubName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Sales order sub name.", "nullable": true, "example": "" }, "customerCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Customer code.", "nullable": true, "example": "" }, "customerName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Customer name.", "nullable": true, "example": "" }, "accAssignmentCategoryCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Account assignment category code.", "nullable": true, "example": "" }, "accAssignmentCategoryName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Account assignment category name.", "nullable": true, "example": "" }, "budgetCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Budget code.", "nullable": true, "example": "" }, "budgetName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Budget name.", "nullable": true, "example": "" }, "serviceCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Service code.", "nullable": true, "example": "" }, "serviceName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Service name.", "nullable": true, "example": "" }, "businessAreaCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Business area code.", "nullable": true, "example": "" }, "businessAreaName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Business area name.", "nullable": true, "example": "" }, "workOrderCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Work order code.", "nullable": true, "example": "" }, "workOrderName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Work order name.", "nullable": true, "example": "" }, "workOrderSubCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Work order sub code.", "nullable": true, "example": "" }, "workOrderSubName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Work order sub name.", "nullable": true, "example": "" }, "distributionCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Distribution code.", "nullable": true, "example": "" }, "distributionMode": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Distribution mode.", "nullable": true, "example": "" }, "dimCode1": { "maxLength": 25, "minLength": 0, "type": "string", "description": "DimCode 1-10: Code fields for Customer-specific coding dimensions.", "nullable": true, "example": "" }, "dimCode2": { "maxLength": 25, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimCode3": { "maxLength": 25, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimCode4": { "maxLength": 25, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimCode5": { "maxLength": 25, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimCode6": { "maxLength": 25, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimCode7": { "maxLength": 25, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimCode8": { "maxLength": 25, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimCode9": { "maxLength": 25, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimCode10": { "maxLength": 25, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimName1": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Distribution mode.", "nullable": true, "example": "" }, "dimName2": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimName3": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimName4": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimName5": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimName6": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimName7": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimName8": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimName9": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimName10": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "num1": { "type": "number", "description": "LineInvoicingNum1-5: Can be used for for customer-specific date fields.", "format": "double", "nullable": true }, "num2": { "type": "number", "format": "double", "nullable": true }, "num3": { "type": "number", "format": "double", "nullable": true }, "num4": { "type": "number", "format": "double", "nullable": true }, "num5": { "type": "number", "format": "double", "nullable": true }, "text1": { "maxLength": 250, "minLength": 0, "type": "string", "description": "LineInvoicingText1-5: Can be used for for customer-specific date fields.", "nullable": true, "example": "" }, "text2": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text3": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text4": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text5": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "date1": { "type": "string", "description": "LineInvoicingDate1-5: Can be used for for customer-specific date fields.", "format": "date-time", "nullable": true, "example": "" }, "date2": { "type": "string", "format": "date-time", "nullable": true, "example": "" }, "date3": { "type": "string", "format": "date-time", "nullable": true, "example": "" }, "date4": { "type": "string", "format": "date-time", "nullable": true, "example": "" }, "date5": { "type": "string", "format": "date-time", "nullable": true, "example": "" } }, "additionalProperties": false }, "ExportedPurchaseOrderLineEntity": { "required": [ "deliveryAddress", "externalCode", "grossPrice", "grossPriceComp", "grossPriceOrg", "grossSum", "grossSumComp", "grossSumOrg", "grossUnitPriceComp", "grossUnitPriceOrg", "lineType", "netPrice", "netPriceComp", "netPriceOrg", "netSum", "netSumComp", "netSumOrg", "netUnitPriceComp", "netUnitPriceOrg", "orderLineNumber", "priceType", "receivingRequired", "taxTotal", "taxTotalComp", "taxTotalOrg" ], "type": "object", "properties": { "externalCode": { "maxLength": 100, "minLength": 1, "type": "string", "description": "Unique external identifier that is used as a key in API. \r\nIdentifies order line for updates through API.", "example": "060cb8ea-5464-11ea-a38b-2e728ce88123" }, "orderLineNumber": { "type": "integer", "description": "Order line number in Basware P2P.", "format": "int32", "example": 1 }, "extOrderLineNumber": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Order line number in customer system (for imported orders).", "nullable": true, "example": "1" }, "parentOrderLineExternalCode": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Used only if the order type on headers is release. Contains a line-level reference to the parent blanket order line, from which the release order line was released.", "nullable": true, "example": "4847-31231212-212121-1212" }, "lineStatus": { "enum": [ "ReadyForOrder", "Ordered", "SupplierRejected", "SupplierConfirmed", "PartiallyReceived", "Received", "Canceled", "Deleted", "AttachedToOrder", "Closed" ], "type": "string", "description": "Status of order line in Basware P2P.", "example": "Ordered" }, "cancellationNote": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Reason for cancelling order line (if line is cancelled).", "nullable": true, "example": "" }, "categoryCode": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Category code linked to product.", "nullable": true, "example": "007" }, "categoryName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Category name linked to product.", "nullable": true, "example": "IT" }, "buyerProductCode": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Product code used by buyer.", "nullable": true, "example": "1239873" }, "supplierProductCode": { "maxLength": 50, "minLength": 0, "type": "string", "description": "Product code used by supplier.", "nullable": true, "example": "126587213" }, "supplierProductName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Product name used by supplier.", "nullable": true, "example": "External USB3 hard drive, 1Tb" }, "manufacturerProductCode": { "maxLength": 255, "minLength": 0, "type": "string", "description": "Manufacturer product code is an identification number supplied by a manufacturer to uniquely identify products that aren't easily distinquishable from one another. It allows consumers to search for the exact product they need without any technical knowledge. Commonly used for example with automotive or electronics replacement parts. Required P2P 23.10 or later.", "nullable": true, "example": "ManufacturerProductCode" }, "description": { "maxLength": 2000, "minLength": 0, "type": "string", "description": "Product description.", "nullable": true, "example": "1Tb external hard disk" }, "leadTime": { "maxLength": 255, "minLength": 0, "type": "string", "description": "Specifies how soon after receiving order the supplier usually is able to deliver the goods. Informative field.", "nullable": true, "example": "" }, "desiredDeliveryDate": { "type": "string", "description": "Delivery date requested by buyer.", "format": "date-time", "nullable": true, "example": "2020-10-24T00:00:00" }, "desiredDeliveryEndDate": { "type": "string", "description": "Buyer requested end date for delivery.", "format": "date-time", "nullable": true, "example": "2020-10-24T00:00:00" }, "promisedDeliveryDate": { "type": "string", "description": "Delivery date provided by supplier.", "format": "date-time", "nullable": true, "example": "2020-10-24T00:00:00" }, "promisedDeliveryEndDate": { "type": "string", "description": "Delivery end date provided by supplier.", "format": "date-time", "nullable": true, "example": "2020-10-24T00:00:00" }, "deliveryTerm": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Delivery term.", "nullable": true, "example": "Supplier to Buyer via Post" }, "allowPartialDeliveries": { "type": "boolean", "description": "Specifies if partial deliveries are allowed. true = allowed, false = not allowed.", "example": false }, "noteFromSupplier": { "maxLength": 2000, "minLength": 0, "type": "string", "description": "Note received from supplier concerning order line.", "nullable": true, "example": "" }, "noteToSupplier": { "maxLength": 2000, "minLength": 0, "type": "string", "description": "Note sent to supplier concerning this order line. Sent to supplier when order is placed.", "nullable": true, "example": "" }, "additionalInfo": { "maxLength": 2000, "minLength": 0, "type": "string", "description": "Contains data from custom fields in free-text ordering forms.", "nullable": true, "example": "" }, "receivingRequired": { "type": "boolean", "description": "Specifies if receiving is required on this order line. \r\nTrue - User needs to receive the order line in Purchase (receival task created for user)\r\nFalse - User does not need to receive the order line in Purchase (no receival task created)", "example": true }, "receiveAutomatically": { "type": "boolean", "description": "Specifies if order line will be received automatically. \r\nTrue - Order line will be automatically received(no user input required)\r\nFalse - Order line will not be automatically received.", "example": false }, "quoteReference": { "maxLength": 255, "minLength": 0, "type": "string", "description": "Reference to quote related to order line.", "nullable": true, "example": "Q1873" }, "deliveryInstruction": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Delivery instruction for supplier.", "nullable": true, "example": "Requires delivery between 12:00-16:00" }, "plant": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Plant.", "nullable": true, "example": "" }, "storageLocation": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Storage location.", "nullable": true, "example": "" }, "unspsc": { "maxLength": 64, "minLength": 0, "type": "string", "description": "Product classification code (UNSPC).", "nullable": true, "example": "" }, "grNote": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Note for receiving goods.", "nullable": true, "example": "" }, "lineType": { "enum": [ "Catalog", "FreeText", "Punchout", "CostLine", "Marketplace" ], "type": "string", "description": "Specifies how the order line got created - from cataloque, freeText, marketplace, etc.", "example": "Catalog" }, "lineDataDate1": { "type": "string", "description": "LineDataDate1-5 can be used for customer-specific date fields. These fields are from ‘Line data’ -tab of the order line in P2P.", "format": "date-time", "nullable": true, "example": "2020-10-24T00:00:00" }, "lineDataDate2": { "type": "string", "format": "date-time", "nullable": true, "example": "" }, "lineDataDate3": { "type": "string", "format": "date-time", "nullable": true, "example": "" }, "lineDataDate4": { "type": "string", "format": "date-time", "nullable": true, "example": "" }, "lineDataDate5": { "type": "string", "format": "date-time", "nullable": true, "example": "" }, "lineDataNum1": { "type": "string", "description": "LineDataNum1-5 can be used for customer-specific numeric fields. These fields are from ‘Line data’ -tab of the order line in P2P.", "nullable": true, "example": "32123" }, "lineDataNum2": { "type": "string", "nullable": true, "example": "" }, "lineDataNum3": { "type": "string", "nullable": true, "example": "" }, "lineDataNum4": { "type": "string", "nullable": true, "example": "" }, "lineDataNum5": { "type": "string", "nullable": true, "example": "" }, "lineDataText1": { "maxLength": 250, "minLength": 0, "type": "string", "description": "LineDataText1-5 can be used for customer-specific text fields. These fields are from ‘Line data’ -tab of the order line in P2P.", "nullable": true, "example": "" }, "lineDataText2": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "lineDataText3": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "lineDataText4": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "lineDataText5": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "quantity": { "type": "number", "description": "Ordered quantity.", "format": "double", "nullable": true, "example": 1 }, "quantityUnit": { "maxLength": 10, "minLength": 0, "type": "string", "description": "Unit code for ordered quantity (pcs, kg, litre, boxes, etc).", "nullable": true, "example": "PCS" }, "quantityUnitName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Description for quantityUnit.", "nullable": true, "example": "Pieces" }, "receivedNetSum": { "type": "number", "description": "Total net sum received. This is added up from goods receipts done to the order line.", "format": "double", "nullable": true, "example": 100 }, "receivedGrossSum": { "type": "number", "description": "Total gross sum received. This is added up from goods receipts done to the order line.", "format": "double", "nullable": true, "example": 125 }, "receivedQuantity": { "type": "number", "description": "Total quantity received. This is added up from goods receipts done to the order line.", "format": "double", "nullable": true, "example": 1 }, "receivalMethod": { "enum": [ "Quantity", "NetSum", "GrossSum" ], "type": "string", "description": "Specifies whether the receival has been done by Quantity, NetSum or GrossSum. Same receival method is used for all goods receipts done to the same order line. If the first goods receipt has been done through P2P Purchase UI, that will determine the receival method expected on any future goods receipts (also those imported through API). If all the previously goods receipts for the row have been also reversed, then the receival method can be chosen again. \r\n\r\nNote that this field can change it's value, for example:\r\n* First export without GRs: Value is null.\r\n* Second export with GRs received by quantity: Value is Quantity.\r\n* Third export with previous GRs reversed: Value is null.\r\n* Fourth export with new GRs received by NetSum: Value is NetSum.", "nullable": true, "example": "Quantity" }, "priceType": { "enum": [ "Net", "Gross" ], "type": "string", "description": "Specified whether price been originally net or gross.", "example": "gross" }, "subUom": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Sub unit of measure.", "nullable": true, "example": "" }, "refundLine": { "type": "boolean", "description": "Specifies whether the line is a refund line. \r\nTrue = refund line, false = not a refund line.", "nullable": true, "example": false }, "discountPercent": { "type": "number", "description": "Percentage of discount on order line.", "format": "double", "nullable": true, "example": 10 }, "discountPercentReason": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Reason for discount.", "nullable": true, "example": "" }, "grossSum": { "type": "number", "description": "Gross sum in purchasing currency (including discount).", "format": "double", "example": 125 }, "grossSumComp": { "type": "number", "description": "Gross sum in company currency (including discount).", "format": "double", "example": 125 }, "grossSumOrg": { "type": "number", "description": "Gross sum in organization currency (including discount).", "format": "double", "example": 125 }, "netSum": { "type": "number", "description": "Net sum in purchasing currency (including discount).", "format": "double", "example": 100 }, "netSumComp": { "type": "number", "description": "Net sum in company currency (including discount).", "format": "double", "example": 100 }, "netSumOrg": { "type": "number", "description": "Net sum in organization currency (including discount).", "format": "double", "example": 100 }, "tax1Sum": { "type": "number", "description": "Tax sum 1 in purchasing currency.", "format": "double", "nullable": true, "example": 25 }, "tax1SumComp": { "type": "number", "description": "Tax sum 1 in company currency.", "format": "double", "nullable": true, "example": 25 }, "tax1SumOrg": { "type": "number", "description": "Tax sum 1 in organization currency.", "format": "double", "nullable": true, "example": 25 }, "tax2Sum": { "type": "number", "description": "Tax sum 2 in purchasing currency.", "format": "double", "nullable": true, "example": 0 }, "tax2SumComp": { "type": "number", "description": "Tax sum 2 in company currency.", "format": "double", "nullable": true, "example": 0 }, "tax2SumOrg": { "type": "number", "description": "Tax sum 2 in organization currency.", "format": "double", "nullable": true, "example": 0 }, "taxTotal": { "type": "number", "description": "Total tax sum in purchasing currency.", "format": "double", "example": 25 }, "taxTotalComp": { "type": "number", "description": "Total tax sum in company currency.", "format": "double", "example": 25 }, "taxTotalOrg": { "type": "number", "description": "Total tax sum in organization currency.", "format": "double", "example": 25 }, "taxCategory": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Tax category.", "nullable": true, "example": "" }, "taxCode": { "maxLength": 32, "minLength": 0, "type": "string", "description": "Tax code.", "nullable": true, "example": "T25" }, "taxJurisdictionCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Tax juristiction code.", "nullable": true, "example": "" }, "taxPercent": { "type": "number", "description": "Tax percent 1.", "format": "double", "nullable": true, "example": 25 }, "taxPercent2": { "type": "number", "description": "Tax percent 2. Can be used for example for handling reverse charges on EU VAT.", "format": "double", "nullable": true, "example": 0 }, "grossUnitPrice": { "type": "number", "description": "Gross unit price in purchasing currency (without discount).", "format": "double", "nullable": true, "example": 125 }, "grossUnitPriceComp": { "type": "number", "description": "Gross unit price in company currency (without discount).", "format": "double", "example": 125 }, "grossUnitPriceOrg": { "type": "number", "description": "Gross unit price in organization currency (without discount).", "format": "double", "example": 125 }, "netPrice": { "type": "number", "description": "Net unit price in purchasing currency (with discount).", "format": "double", "example": 100 }, "netPriceComp": { "type": "number", "description": "Net unit price in company currency (with discount).", "format": "double", "example": 100 }, "netPriceOrg": { "type": "number", "description": "Net unit price in organization currency (with discount).", "format": "double", "example": 100 }, "grossPrice": { "type": "number", "description": "Gross unit price in purchasing currency (with discount).", "format": "double", "example": 125 }, "grossPriceComp": { "type": "number", "description": "Gross unit price in company currency (with discount).", "format": "double", "example": 125 }, "grossPriceOrg": { "type": "number", "description": "Gross unit price in organization currency (with discount).", "format": "double", "example": 125 }, "netUnitPrice": { "type": "number", "description": "Net unit price in purchasing currency (without discount).", "format": "double", "nullable": true, "example": 100 }, "netUnitPriceComp": { "type": "number", "description": "Net unit price in organization currency (without discount).", "format": "double", "example": 100 }, "netUnitPriceOrg": { "type": "number", "description": "Net unit price in company currency (without discount).", "format": "double", "example": 100 }, "conversionNumerator": { "type": "number", "description": "Factor for conversions.", "format": "double", "nullable": true }, "conversionDenumerator": { "type": "number", "description": "Factor for conversions.", "format": "double", "nullable": true }, "materialGroup": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Material group.", "nullable": true, "example": "" }, "linePricingDate1": { "type": "string", "description": "LinePricingDate1-5 can be used for customer-specific date fields. These fields are from ‘Pricing’ -tab of the order line in P2P.", "format": "date-time", "nullable": true, "example": "" }, "linePricingDate2": { "type": "string", "format": "date-time", "nullable": true, "example": "" }, "linePricingDate3": { "type": "string", "format": "date-time", "nullable": true, "example": "" }, "linePricingDate4": { "type": "string", "format": "date-time", "nullable": true, "example": "" }, "linePricingDate5": { "type": "string", "format": "date-time", "nullable": true, "example": "" }, "linePricingNum1": { "type": "number", "description": "LinePricingNum1-5 can be used for customer-specific numeric fields. These fields are from ‘Pricing’ -tab of the order line in P2P.", "format": "double", "nullable": true }, "linePricingNum2": { "type": "number", "format": "double", "nullable": true }, "linePricingNum3": { "type": "number", "format": "double", "nullable": true }, "linePricingNum4": { "type": "number", "format": "double", "nullable": true }, "linePricingNum5": { "type": "number", "format": "double", "nullable": true }, "linePricingText1": { "maxLength": 250, "minLength": 0, "type": "string", "description": "LinePricingText1-5 can be used for customer-specific text fields. These fields are from ‘Pricing’ -tab of the order line in P2P.", "nullable": true, "example": "" }, "linePricingText2": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "linePricingText3": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "linePricingText4": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "linePricingText5": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "deliveryAddress": { "$ref": "#/components/schemas/DeliveryAddress" }, "codingRows": { "type": "array", "items": { "$ref": "#/components/schemas/ExportedPurchaseOrderLineCodingRowEntity" }, "description": "Coding rows for the order line.", "nullable": true }, "goodsReceipts": { "type": "array", "items": { "$ref": "#/components/schemas/ExportedPurchaseOrderGoodsReceiptEntity" }, "description": "Goods receipts for the order line.", "nullable": true } }, "additionalProperties": false }, "ExportedPurchaseOrdersResponse": { "required": [ "exportedPurchaseOrders" ], "type": "object", "properties": { "exportedPurchaseOrders": { "type": "array", "items": { "$ref": "#/components/schemas/ExportedPurchaseOrderEntity" } } }, "additionalProperties": false }, "ExportedPurchaseRequisitionCodingRow": { "required": [ "externalCode" ], "type": "object", "properties": { "externalCode": { "maxLength": 36, "minLength": 1, "type": "string", "description": "External identifier that is used as a key in API for the coding line.", "example": "1547e4371231ad32dff2132985aae212" }, "rowIndex": { "type": "integer", "description": "Purchase internal document coding line number.", "format": "int32", "example": 1 }, "splitPercent": { "type": "number", "description": "Percentage of requisition line’s cost which this coding row covers (cost can be split between coding lines). Current always 100 (as long as there is one coding line per requisition line).", "format": "double", "example": 100 }, "accountCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Account code.", "nullable": true, "example": "10017" }, "accountName": { "maxLength": 2000, "minLength": 0, "type": "string", "description": "Account name.", "nullable": true, "example": "IT equipment costs" }, "costCenterCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Cost center code.", "nullable": true, "example": "23800" }, "costCenterName": { "maxLength": 2000, "minLength": 0, "type": "string", "description": "Cost center name.", "nullable": true, "example": "Lift engine research" }, "projectCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Project code.", "nullable": true, "example": "" }, "projectName": { "maxLength": 255, "minLength": 0, "type": "string", "description": "Project name.", "nullable": true, "example": "" }, "fixedAssetCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Fixed asset code.", "nullable": true, "example": "" }, "fixedAssetName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Fixed asset name.", "nullable": true, "example": "" }, "fixedAssetSubCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Fixed asset sub code.", "nullable": true, "example": "" }, "fixedAssetSubName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Fixed asset sub name.", "nullable": true, "example": "" }, "internalOrderCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Internal order code.", "nullable": true, "example": "" }, "internalOrderName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Internal order name.", "nullable": true, "example": "" }, "profitCenterCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Profit center code.", "nullable": true, "example": "" }, "profitCenterName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Profit center name.", "nullable": true, "example": "" }, "businessUnitCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Business unit code.", "nullable": true, "example": "" }, "businessUnitName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Business unit name.", "nullable": true, "example": "" }, "projectSubCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Project sub code.", "nullable": true, "example": "" }, "projectSubName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Project sub name.", "nullable": true, "example": "" }, "employeeCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Employee code.", "nullable": true, "example": "815722" }, "employeeName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Employee name.", "nullable": true, "example": "Jim Green" }, "vehicleName": { "maxLength": 255, "minLength": 0, "type": "string", "description": "Vehicle name.", "nullable": true, "example": "" }, "vehicleNumber": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Vehicle number.", "nullable": true, "example": "" }, "salesOrderCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Sales order code.", "nullable": true, "example": "" }, "salesOrderName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Sales order name.", "nullable": true, "example": "" }, "salesOrderSubCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Sales order sub code.", "nullable": true, "example": "" }, "salesOrderSubName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Sales order sub name.", "nullable": true, "example": "" }, "customerCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Customer code.", "nullable": true, "example": "" }, "customerName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Customer name.", "nullable": true, "example": "" }, "accAssignmentCategoryCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Account assignment category code.", "nullable": true, "example": "" }, "accAssignmentCategoryName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Account assignment category name.", "nullable": true, "example": "" }, "budgetCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Budget code.", "nullable": true, "example": "B36782" }, "budgetName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Budget name.", "nullable": true, "example": "IT equipment 2020" }, "serviceCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Service code.", "nullable": true, "example": "" }, "serviceName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Service name.", "nullable": true, "example": "" }, "businessAreaCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Business area code.", "nullable": true, "example": "" }, "businessAreaName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Business area name.", "nullable": true, "example": "" }, "workOrderCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Work order code.", "nullable": true, "example": "" }, "workOrderName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Work order name.", "nullable": true, "example": "" }, "workOrderSubCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Work order sub code.", "nullable": true, "example": "" }, "workOrderSubName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Work order sub name.", "nullable": true, "example": "" }, "distributionCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Distribution code.", "nullable": true, "example": "" }, "distributionMode": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Distribution mode.", "nullable": true, "example": "" }, "dimCode1": { "maxLength": 25, "minLength": 0, "type": "string", "description": "DimCode1-10 are often used for additional, customer-specific, coding dimensions. Specifies the dimension code.", "nullable": true, "example": "2800" }, "dimCode2": { "maxLength": 25, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimCode3": { "maxLength": 25, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimCode4": { "maxLength": 25, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimCode5": { "maxLength": 25, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimCode6": { "maxLength": 25, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimCode7": { "maxLength": 25, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimCode8": { "maxLength": 25, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimCode9": { "maxLength": 25, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimCode10": { "maxLength": 25, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimName1": { "maxLength": 250, "minLength": 0, "type": "string", "description": "DimName1-10 are often used for additional, customer-specific, coding dimensions. Specifies the dimension name.", "nullable": true, "example": "EU Purchases" }, "dimName2": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimName3": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimName4": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimName5": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimName6": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimName7": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimName8": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimName9": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimName10": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "num1": { "type": "number", "description": "Num1-5 can be used for additional, customer-specific, numeric fields.", "format": "double", "nullable": true }, "num2": { "type": "number", "format": "double", "nullable": true }, "num3": { "type": "number", "format": "double", "nullable": true }, "num4": { "type": "number", "format": "double", "nullable": true }, "num5": { "type": "number", "format": "double", "nullable": true }, "text1": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Text1-5 can be used for additional, customer-specific, text fields", "nullable": true, "example": "" }, "text2": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text3": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text4": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text5": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "date1": { "type": "string", "description": "Date1-5 can be used for additional, customer-specific, date fields", "format": "date-time", "nullable": true }, "date2": { "type": "string", "format": "date-time", "nullable": true }, "date3": { "type": "string", "format": "date-time", "nullable": true }, "date4": { "type": "string", "format": "date-time", "nullable": true }, "date5": { "type": "string", "format": "date-time", "nullable": true } }, "additionalProperties": false }, "ExportedPurchaseRequisitionEntity": { "required": [ "companyCode", "companyCurrency", "companyName", "creator", "deliveryAddress", "exchangeRateComp", "exchangeRateOrg", "externalCode", "grossSum", "grossSumComp", "grossSumOrg", "groupCurrency", "netSum", "netSumComp", "netSumOrg", "organizationUnitCode", "organizationUnitName", "owner", "processingStatus", "purchaseCurrency", "requisitionCreationTime", "requisitionExportTimestamp", "requisitionNumber", "taxSum", "taxSumComp", "taxSumOrg" ], "type": "object", "properties": { "externalCode": { "maxLength": 100, "minLength": 1, "type": "string", "description": "External identifier that is used as a key in API for the requisition.", "example": "be84e5ba6ad748bebbe8a5a10146e685da" }, "requisitionNumber": { "maxLength": 32, "minLength": 1, "type": "string", "description": "Requisition number in Basware P2P.", "example": "Alusta-PR-100" }, "extRequisitionNumber": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Requisition number in external system (for imported requisitions).", "nullable": true, "example": "SAP-PR-100" }, "extOrderNumber": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Order number in external system (for imported orders).", "nullable": true, "example": "SAP-PO-100" }, "requisitionStatus": { "enum": [ "Approved", "Canceled", "Rejected" ], "type": "string", "description": "Status of the requisition in Basware P2P.", "example": "Approved" }, "processingStatus": { "enum": [ "WaitingForExport", "Exported" ], "type": "string", "description": "Processing status of exported purchase requisition in Basware API. WaitingForExport = New requisition data (not acknowledged), which is waiting to be fetched. Exported = This requisition has been acknowledged by customer system.", "example": "WaitingForExport" }, "companyCode": { "maxLength": 25, "minLength": 1, "type": "string", "description": "P2P company code name for buyer company.", "example": "BE100" }, "companyName": { "maxLength": 250, "minLength": 1, "type": "string", "description": "P2P company name for buyer company.", "example": "BuyerLtd" }, "organizationUnitCode": { "maxLength": 25, "minLength": 1, "type": "string", "description": "P2P company code for buyer organisation unit.", "example": "BE100" }, "organizationUnitName": { "maxLength": 250, "minLength": 1, "type": "string", "description": "P2P company name for buyer organisation unit.", "example": "Buyer Ltd" }, "purchasingGroupCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Purchasing group code.", "nullable": true, "example": "PG201" }, "purchasingGroupName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Purchasing group name.", "nullable": true, "example": "Office equipment" }, "purpose": { "maxLength": 2000, "minLength": 0, "type": "string", "description": "Reason why order is placed (text description).", "nullable": true, "example": "Goods for Project A" }, "desiredDeliveryDate": { "type": "string", "description": "Delivery date requested by buyer.", "format": "date-time", "nullable": true, "example": "2020-10-24T00:00:00" }, "desiredDeliveryEndDate": { "type": "string", "description": "Buyer requested latest delivery date.", "format": "date-time", "nullable": true, "example": "2020-10-24T00:00:00" }, "deliveryInstructions": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Delivery instructions for supplier.", "nullable": true, "example": "Delivery required between 10AM-4PM." }, "classification": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Requisition classification code (values specified by customer). Often used to group requisitions and assign different groups to be handled to different persons.", "nullable": true, "example": "Group F" }, "requisitionCreationTime": { "type": "string", "description": "Creation time of the requisition in P2P.", "format": "date-time", "example": "2020-10-24T00:00:00" }, "requisitionExportTimestamp": { "type": "string", "description": "Timestamp when the requisition was exported from P2P to Basware API.", "format": "date-time", "example": "2020-10-24T00:00:00" }, "documentSource": { "enum": [ "P2P", "ImportedAsRequisition", "ImportedAsOrder" ], "type": "string", "description": "States whether the requisition was created in P2P or imported from external system.", "example": "P2P" }, "documentLink": { "type": "string", "description": "URL link to view the requisition in Basware P2P.", "format": "uri", "nullable": true, "example": "http://customertenant.p2p.basware.com/Portal/Default.aspx?forms=1&sl=1&tid=customertenant&dl=(RequisitionDetailsPage-requisitionid((e105de8f-3e13-4487-a7e5-8c1ba12d7ea9))" }, "purchaseCurrency": { "maxLength": 25, "minLength": 1, "type": "string", "description": "Currency code for currency in which the requisition is placed.", "example": "EUR" }, "companyCurrency": { "maxLength": 25, "minLength": 1, "type": "string", "description": "Currency code of the company in P2P for which the requisition is placed.", "example": "EUR" }, "groupCurrency": { "maxLength": 25, "minLength": 1, "type": "string", "description": "Currency code of the group / organization in P2P for which the requisition is placed. \r\nThe group is a parent-level entity to the company in P2P.", "example": "EUR" }, "exchangeRateComp": { "type": "number", "description": "Exchange rate between requisition currency (=purchaseCurrency) and company currency.", "format": "double", "example": 1 }, "exchangeRateOrg": { "type": "number", "description": "Exchange rate between requisition currency (=purchaseCurrency) and group currency.", "format": "double", "example": 1 }, "grossSum": { "type": "number", "description": "Gross sum of requisition in requisition currency (purchaseCurrency).", "format": "double", "example": 125 }, "grossSumComp": { "type": "number", "description": "Gross sum of requisition in company currency.", "format": "double", "example": 125 }, "grossSumOrg": { "type": "number", "description": "Gross sum of requisition in company currency.", "format": "double", "example": 125 }, "netSum": { "type": "number", "description": "Net sum of requisition in requisition currency (purchaseCurrency).", "format": "double", "example": 100 }, "netSumComp": { "type": "number", "description": "Net sum of requisition in company currency.", "format": "double", "example": 100 }, "netSumOrg": { "type": "number", "description": "Net sum of requisition in company currency.", "format": "double", "example": 100 }, "taxSum": { "type": "number", "description": "Tax sum of requisition in requisition currency (purchaseCurrency).", "format": "double", "example": 25 }, "taxSumComp": { "type": "number", "description": "Tax sum of requisition in company currency.", "format": "double", "example": 25 }, "taxSumOrg": { "type": "number", "description": "Tax sum of requisition in company currency.", "format": "double", "example": 25 }, "headerDataDate1": { "type": "string", "description": "HeaderDataDate1-5: Can be used for for customer-specific date fields.", "format": "date-time", "nullable": true }, "headerDataDate2": { "type": "string", "format": "date-time", "nullable": true }, "headerDataDate3": { "type": "string", "format": "date-time", "nullable": true }, "headerDataDate4": { "type": "string", "format": "date-time", "nullable": true }, "headerDataDate5": { "type": "string", "format": "date-time", "nullable": true }, "headerDataNum1": { "type": "number", "description": "HeaderDataNum1-5: Can be used for for customer-specific numeric fields.", "format": "double", "nullable": true, "example": 2264 }, "headerDataNum2": { "type": "number", "format": "double", "nullable": true, "example": 0 }, "headerDataNum3": { "type": "number", "format": "double", "nullable": true, "example": 0 }, "headerDataNum4": { "type": "number", "format": "double", "nullable": true, "example": 0 }, "headerDataNum5": { "type": "number", "format": "double", "nullable": true, "example": 0 }, "headerDataText1": { "maxLength": 250, "minLength": 0, "type": "string", "description": "HeaderDataText1-5: Can be used for for customer-specific text fields.", "nullable": true, "example": "" }, "headerDataText2": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "headerDataText3": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "headerDataText4": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "headerDataText5": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "lastUpdated": { "type": "string", "description": "Timestamp when the purchase order was last updated (from Basware P2P or from customer end).", "format": "date-time" }, "creator": { "$ref": "#/components/schemas/Creator" }, "owner": { "$ref": "#/components/schemas/Owner" }, "deliveryAddress": { "$ref": "#/components/schemas/DeliveryAddress" }, "lines": { "type": "array", "items": { "$ref": "#/components/schemas/ExportedPurchaseRequisitionLineEntity" }, "nullable": true }, "orderGrouping": { "type": "array", "items": { "$ref": "#/components/schemas/OrderGrouping" }, "description": "Specifies how the requisition lines will be grouped by P2P into orders (according to grouping criteria).", "nullable": true } }, "additionalProperties": false }, "ExportedPurchaseRequisitionLineEntity": { "required": [ "companyCurrency", "externalCode", "groupCurrency", "hidePricesFromSupplier", "refundLine", "releaseOrdersRequired", "requisitionLineNumber" ], "type": "object", "properties": { "externalCode": { "maxLength": 100, "minLength": 1, "type": "string", "description": "External identifier that is used as a key in API for the requisition line.", "example": "987236sd-sd31-3562-1239-9asffa986asd" }, "requisitionLineNumber": { "maxLength": 100, "minLength": 1, "type": "string", "description": "The requisition line number in Basware P2P.", "example": "1" }, "extRequisitionLineNumber": { "maxLength": 100, "minLength": 0, "type": "string", "description": "The requisition line number in the external system. The value must be unique for each line on the requisition.", "nullable": true, "example": "1" }, "isRejected": { "type": "boolean", "description": "Specifies if the requisition line is rejected.", "example": false }, "lineStatus": { "enum": [ "Approved", "Canceled", "Rejected" ], "type": "string", "description": "Status of the requisition line in Basware P2P.", "example": "Approved" }, "categoryCode": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Code for the item's purchasing category. The code must match a valid, active purchasing category for the organization. If invalid, the field will be emptied during import.", "nullable": true, "example": "6200" }, "categoryName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Code for the item's purchasing category.", "nullable": true, "example": "Office equipment" }, "supplierCode": { "maxLength": 32, "minLength": 0, "type": "string", "description": "Supplier code. The code must match a valid supplier for the organization, or it will be emptied during import. If the purchase order is a self-service order and the supplier is invalid, the import will fail.", "nullable": true, "example": "10280" }, "supplierName": { "maxLength": 255, "minLength": 0, "type": "string", "description": "Supplier name.", "nullable": true, "example": "ACME services and supplies" }, "contractNumber": { "maxLength": 255, "minLength": 0, "type": "string", "description": "Contract number.", "nullable": true, "example": "66236" }, "orderType": { "enum": [ "Standard", "Blanket" ], "type": "string" }, "releaseOrdersRequired": { "type": "boolean", "description": "Used only if the order type is blanket to specify, if the blanket purchase order requires release orders.", "example": false }, "sendingMethod": { "enum": [ "BaswareNetwork", "Email" ], "type": "string", "description": "Determines how Basware P2P sends order to supplier when the order is placed.", "nullable": true, "example": "BaswareNetwork" }, "buyerProductCode": { "maxLength": 250, "minLength": 0, "type": "string", "description": "A code that identifies purchased items for internal reporting and communication.", "nullable": true, "example": "1239873" }, "supplierProductName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Supplier product name.", "nullable": true, "example": "External USB3 hard drive, 1Tb" }, "supplierProductCode": { "maxLength": 50, "minLength": 0, "type": "string", "description": "Supplier product code.", "nullable": true, "example": "126587213" }, "manufacturerProductCode": { "maxLength": 255, "minLength": 0, "type": "string", "description": "Manufacturer product code is an identification number supplied by a manufacturer to uniquely identify products that aren't easily distinquishable from one another. It allows consumers to search for the exact product they need without any technical knowledge. Commonly used for example with automotive or electronics replacement parts. Required P2P 23.10 or later.", "nullable": true, "example": "ManufacturerProductCode" }, "description": { "maxLength": 2000, "minLength": 0, "type": "string", "description": "Description.", "nullable": true, "example": "1Tb external hard disk" }, "validityPeriodStartDate": { "type": "string", "description": "Used only if the order type is blanket to specify the start date for blanket purchase order validity period (date format: yyyy-MM-dd).", "format": "date-time", "nullable": true, "example": "" }, "validityPeriodEndDate": { "type": "string", "description": "Used only if the order type is blanket to specify the end date for blanket purchase order validity period (date format: yyyy-MM-dd).", "format": "date-time", "nullable": true, "example": "" }, "leadTime": { "maxLength": 255, "minLength": 0, "type": "string", "description": "Specifies how soon after receiving order the supplier usually is able to deliver the goods. Informative field.", "nullable": true, "example": "" }, "desiredDeliveryDate": { "type": "string", "description": "Desired date the goods are to be delivered.", "format": "date-time", "nullable": true, "example": "2020-01-08T00:00:00" }, "desiredDeliveryEndDate": { "type": "string", "description": "Desired end date the goods are to be delivered.", "format": "date-time", "nullable": true, "example": "2020-01-08T00:00:00" }, "paymentTermCode": { "maxLength": 255, "minLength": 0, "type": "string", "description": "Payment term code. Identifies terms of payment when supplier charges the customer.", "nullable": true, "example": "30N" }, "paymentTermName": { "maxLength": 2000, "minLength": 0, "type": "string", "description": "Payment term name.", "nullable": true, "example": "30 days net" }, "deliveryTerm": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Identifier for the agreed delivery term for the item. If empty, supplier's default delivery term is used.", "nullable": true, "example": "" }, "deliveryLocation": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Delivery location. Used to further specify the delivery term.", "nullable": true, "example": "" }, "allowPartialDeliveries": { "type": "boolean", "description": "Indicates if the partial delivery of goods is allowed.", "nullable": true, "example": false }, "hidePricesFromSupplier": { "type": "boolean", "description": "Specifies, if all price information is hidden from the supplier in the outgoing purchase order.", "example": false }, "deliveryInstruction": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Delivery instruction for supplier.", "nullable": true, "example": "" }, "supplierOrderingEmail": { "maxLength": 1800, "minLength": 0, "type": "string", "description": "Specifies the email address(es) where the order is sent to when sending order to supplier. Can contain multiple email addresses. Used when orderRecipientType is set as 'Owner' or 'SupplierAndOwner'.", "nullable": true, "example": "john.smith@company.com" }, "ownerOrderingEmail": { "maxLength": 1800, "minLength": 0, "type": "string", "description": "Specifies the email address(es) where the order is sent to when sending order to owner. Can contain multiple email addresses. Used when orderRecipientType is set as 'Owner' or 'SupplierAndOwner'.", "nullable": true, "example": "john.smith@company.com" }, "otherOrderingEmail": { "type": "string", "description": "The email address(es) where the order is sent by P2P purchase. Can contain multiple email addresses. The order is sent to these addresses when orderRecipientType is 'Owner' or 'Both'.", "nullable": true, "example": "john.smith@company.com" }, "attachPdfToNetworkOrder": { "type": "boolean", "description": "Specifies if order is attached as pdf file when order is sent to supplier through Basware network.", "nullable": true, "example": true }, "noteToSupplier": { "maxLength": 2000, "minLength": 0, "type": "string", "description": "Note sent to supplier concerning this order. Send to supplier when order is placed.", "nullable": true, "example": "" }, "additionalInfo": { "maxLength": 2000, "minLength": 0, "type": "string", "description": "Additional information. Contains data from custom fields in free-text ordering forms.", "nullable": true, "example": "" }, "receiveAutomatically": { "type": "boolean", "description": "Indicates if the goods can be automatically received by Basware P2P on behalf of the user.", "nullable": true, "example": false }, "plant": { "maxLength": 10, "minLength": 0, "type": "string", "description": "Plant.", "nullable": true, "example": "" }, "storageLocation": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Storage location.", "nullable": true, "example": "" }, "unspsc": { "maxLength": 64, "minLength": 0, "type": "string", "description": "The United Nations Standard Products and Services Code, a unique 8-digit number used to identify trade items, products, and services. \r\nThe value can also be used to match order lines to invoice lines. If empty, resolved by Basware P2P using the item's categoryCode.", "nullable": true, "example": "43211578" }, "grNote": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Note for receiving goods.", "nullable": true, "example": "" }, "lineType": { "enum": [ "Catalog", "FreeText", "Punchout", "Marketplace" ], "type": "string", "description": "Specifies how the requisition line got created.", "example": "BaswareNetwork" }, "lineDataDate1": { "type": "string", "description": "LineDataDate1-5 can be used for customer-specific date fields. These fields are from 'Line data' -tab of the requisition line in P2P.", "format": "date-time", "nullable": true }, "lineDataDate2": { "type": "string", "format": "date-time", "nullable": true }, "lineDataDate3": { "type": "string", "format": "date-time", "nullable": true }, "lineDataDate4": { "type": "string", "format": "date-time", "nullable": true }, "lineDataDate5": { "type": "string", "format": "date-time", "nullable": true }, "lineDataNum1": { "type": "number", "description": "LineDataNum1-5 can be used for customer-specific numeric fields. These fields are from 'Line data' -tab of the requisition line in P2P.", "format": "double", "nullable": true }, "lineDataNum2": { "type": "number", "format": "double", "nullable": true }, "lineDataNum3": { "type": "number", "format": "double", "nullable": true }, "lineDataNum4": { "type": "number", "format": "double", "nullable": true }, "lineDataNum5": { "type": "number", "format": "double", "nullable": true }, "lineDataText1": { "maxLength": 250, "minLength": 0, "type": "string", "description": "LineDataText1-5 can be used for customer-specific text fields. These fields are from 'Line data' -tab of the requisition line in P2P.", "nullable": true, "example": "" }, "lineDataText2": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "lineDataText3": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "lineDataText4": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "lineDataText5": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "quantity": { "type": "number", "description": "Defines how many items a customer wants to purchase. The quantity must contain a positive value.", "format": "double", "nullable": true, "example": 1 }, "quantityUnit": { "maxLength": 10, "minLength": 0, "type": "string", "description": "Quantity unit code.", "nullable": true, "example": "PCS" }, "quantityUnitName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Quantity unit name.", "nullable": true, "example": "Pieces" }, "priceType": { "enum": [ "Net", "Gross" ], "type": "string", "description": "Defines if the unit price stated is net or gross.", "example": "Net" }, "subUOM": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Sub-unit of measure.", "nullable": true, "example": "" }, "refundLine": { "type": "boolean", "description": "Specifies whether the line is a refund line. True = refund line, false = not a refund line.", "example": false }, "discountPercent": { "maximum": 1000000000, "minimum": 0, "type": "number", "description": "Discount percent.", "format": "double", "nullable": true, "example": 0 }, "discountPercentReason": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Reason for discount.", "nullable": true, "example": "" }, "purchaseCurrency": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Currency code for currency in which the requisition is placed.", "nullable": true, "example": "" }, "companyCurrency": { "maxLength": 25, "minLength": 1, "type": "string", "description": "Identifies the company's home currency. All lines within a requisition have the same company home currency.", "example": "EUR" }, "groupCurrency": { "maxLength": 25, "minLength": 1, "type": "string", "description": "Identifies the organization's home currency. All lines within a requisition have the same organization currency.", "example": "EUR" }, "grossSum": { "type": "number", "description": "Gross sum in purchasing currency (=purchaseCurrency).", "format": "double", "example": 125 }, "grossSumComp": { "type": "number", "description": "Gross sum in company home currency.", "format": "double", "example": 125 }, "grossSumOrg": { "type": "number", "description": "Gross sum in organization home currency.", "format": "double", "example": 125 }, "netSum": { "type": "number", "description": "Net sum in purchasing currency (=purchaseCurrency).", "format": "double", "example": 100 }, "netSumComp": { "type": "number", "description": "Net sum in company home currency.", "format": "double", "example": 100 }, "netSumOrg": { "type": "number", "description": "Net sum of order in organization home currency.", "format": "double", "example": 100 }, "tax1Sum": { "type": "number", "description": "Tax sum 1 in purchasing currency (=purchaseCurrency).", "format": "double", "nullable": true, "example": 25 }, "tax1SumComp": { "type": "number", "description": "Tax sum 1 in company home currency.", "format": "double", "nullable": true, "example": 25 }, "tax1SumOrg": { "type": "number", "description": "Tax sum 1 in organization home currency.", "format": "double", "example": 25 }, "tax2Sum": { "type": "number", "description": "Tax sum 2 in purchasing currency (=purchaseCurrency).", "format": "double", "nullable": true, "example": 0 }, "tax2SumComp": { "type": "number", "description": "Tax sum 2 in company home currency.", "format": "double", "nullable": true, "example": 0 }, "tax2SumOrg": { "type": "number", "description": "Tax sum 2 in organization home currency.", "format": "double", "nullable": true, "example": 0 }, "taxTotal": { "type": "number", "description": "Total tax sum in purchasing currency (=purchaseCurrency).", "format": "double", "example": 25 }, "taxTotalComp": { "type": "number", "description": "Total tax sum in company home currency.", "format": "double", "example": 25 }, "taxTotalOrg": { "type": "number", "description": "Total tax sum in organization home currency.", "format": "double", "example": 25 }, "taxCategory": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Tax category", "nullable": true, "example": "" }, "taxCode": { "maxLength": 32, "minLength": 0, "type": "string", "description": "Tax code.", "nullable": true, "example": "T25" }, "taxJuristictionCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Tax juristiction code.", "nullable": true, "example": "" }, "taxPercent": { "maximum": 1000000000, "minimum": -1000000000, "type": "number", "description": "Tax percent 1.", "format": "double", "nullable": true, "example": 25 }, "taxPercent2": { "type": "number", "description": "Tax percent 2. Can be used for example for handling reverse charges on EU VAT.", "format": "double", "nullable": true, "example": 0 }, "grossPrice": { "type": "number", "description": "Gross unit price in purchasing currency (with discount).", "format": "double", "example": 125 }, "grossPriceComp": { "type": "number", "description": "Gross unit price in company currency (with discount).", "format": "double", "example": 125 }, "grossPriceOrg": { "type": "number", "description": "Gross unit price in organization currency (with discount).", "format": "double", "example": 125 }, "grossUnitPrice": { "type": "number", "description": "Gross unit price in purchasing currency (without discount).", "format": "double", "nullable": true, "example": 125 }, "grossUnitPriceComp": { "type": "number", "description": "Gross unit price in company currency (without discount).", "format": "double", "nullable": true, "example": 125 }, "grossUnitPriceOrg": { "type": "number", "description": "Gross unit price in organization currency (without discount).", "format": "double", "nullable": true, "example": 125 }, "netPrice": { "type": "number", "description": "Net unit price in purchasing currency (with discount).", "format": "double", "example": 100 }, "netPriceComp": { "type": "number", "description": "Net unit price in company currency (with discount).", "format": "double", "example": 100 }, "netPriceOrg": { "type": "number", "description": "Net unit price in organization currency (with discount).", "format": "double", "example": 100 }, "netUnitPrice": { "type": "number", "description": "Net unit price in purchasing currency (without discount).", "format": "double", "nullable": true }, "netUnitPriceComp": { "type": "number", "description": "Net unit price in organization currency (without discount).", "format": "double", "nullable": true, "example": 100 }, "netUnitPriceOrg": { "type": "number", "description": "Net unit price in company currency (without discount).", "format": "double", "nullable": true, "example": 100 }, "conversionNumerator": { "type": "number", "description": "Conversion numerator. Factor for conversions.", "format": "double", "nullable": true, "example": 1 }, "conversionDenominator": { "type": "number", "description": "Conversion denominator. Factor for conversions.", "format": "double", "nullable": true, "example": 1 }, "materialGroup": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Material group.", "nullable": true, "example": "" }, "linePricingDate1": { "type": "string", "description": "LinePricingDate1-5 can be used for customer-specific date fields. These fields are from 'Pricing' -tab of the requisition line in P2P.", "format": "date-time", "nullable": true }, "linePricingDate2": { "type": "string", "format": "date-time", "nullable": true }, "linePricingDate3": { "type": "string", "format": "date-time", "nullable": true }, "linePricingDate4": { "type": "string", "format": "date-time", "nullable": true }, "linePricingDate5": { "type": "string", "format": "date-time", "nullable": true }, "linePricingNum1": { "type": "number", "description": "LinePricingNum1-5 can be used for customer-specific numeric fields. These fields are from 'Pricing' -tab of the requisition line in P2P.", "format": "double", "nullable": true }, "linePricingNum2": { "type": "number", "format": "double", "nullable": true }, "linePricingNum3": { "type": "number", "format": "double", "nullable": true }, "linePricingNum4": { "type": "number", "format": "double", "nullable": true }, "linePricingNum5": { "type": "number", "format": "double", "nullable": true }, "linePricingText1": { "maxLength": 250, "minLength": 0, "type": "string", "description": "LinePricingText1-5 can be used for customer-specific text fields. These fields are from 'Pricing' -tab of the requisition line in P2P.", "nullable": true, "example": "" }, "linePricingText2": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "linePricingText3": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "linePricingText4": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "linePricingText5": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "receivers": { "type": "array", "items": { "$ref": "#/components/schemas/ExportedPurchaseRequisitionUserEntity" }, "description": "Lists person(s) who should receive the goods.", "nullable": true }, "receiverToContact": { "$ref": "#/components/schemas/ExportedPurchaseRequisitionUserEntity" }, "deliveryAddress": { "$ref": "#/components/schemas/DeliveryAddress" }, "codingRows": { "type": "array", "items": { "$ref": "#/components/schemas/ExportedPurchaseRequisitionCodingRow" }, "description": "Coding line(s). Note: Each requisition line currently has one coding row.", "nullable": true } }, "additionalProperties": false, "description": "Purchase requisition lines." }, "ExportedPurchaseRequisitionUserEntity": { "type": "object", "properties": { "personCode": { "type": "string", "description": "Person code.", "nullable": true, "example": "031573" }, "userName": { "type": "string", "description": "User name.", "nullable": true, "example": "Jim Huskinson" }, "loginAccount": { "type": "string", "description": "Login account.", "nullable": true, "example": "company\\\\jimhuski" }, "emailAddress": { "type": "string", "description": "Email address.", "nullable": true, "example": "jim.huskinson@company.com" }, "externalCode": { "type": "string", "description": "External code.", "nullable": true, "example": "8e5a304e74d34dc19911425914aae427" } }, "additionalProperties": false }, "ExportedPurchaseRequisitionsResponse": { "required": [ "exportedPurchaseRequisitions" ], "type": "object", "properties": { "exportedPurchaseRequisitions": { "type": "array", "items": { "$ref": "#/components/schemas/ExportedPurchaseRequisitionEntity" } } }, "additionalProperties": false }, "FieldMaintenanceConfiguration": { "required": [ "fieldName", "maintainedBy" ], "type": "object", "properties": { "fieldName": { "minLength": 1, "type": "string" }, "maintainedBy": { "minLength": 1, "type": "string" }, "defaultValue": { "nullable": true }, "hidden": { "type": "boolean" }, "userOverridden": { "type": "boolean" } }, "additionalProperties": false }, "FinancialAccountIdentifierEntity": { "required": [ "schemeId" ], "type": "object", "properties": { "schemeId": { "maxLength": 36, "minLength": 1, "type": "string", "description": "Account type: BBAN / IBAN.", "example": "IBAN" }, "description": { "maxLength": 200, "minLength": 0, "type": "string", "description": "Description. Note: Field is not used in P2P.", "nullable": true, "example": "UK only" }, "id": { "maxLength": 50, "minLength": 0, "type": "string", "description": "The account number. Note: Max 32 chars when used with P2P.", "nullable": true, "example": "GB29 NWBK 6016 1331 9268 19" }, "accountHolderName": { "maxLength": 200, "minLength": 0, "type": "string", "description": "Account holder name. Note: Field is not used in P2P.", "nullable": true, "example": "United Parcels UK" }, "currencyCode": { "maxLength": 3, "minLength": 3, "type": "string", "description": "Currency code of the account. Note: Field is not used in P2P. To import the supplier specific currency code to P2P, use the 'currencyCode' field in 'paymentMeans' -block.", "nullable": true, "example": "GBP" }, "accountAdditionalData1": { "maxLength": 200, "minLength": 0, "type": "string", "description": "Account additional data field 1.", "nullable": true, "example": "FRS123" }, "accountAdditionalData2": { "maxLength": 200, "minLength": 0, "type": "string", "description": "Account additional data field 2.", "nullable": true, "example": "971298-1212" }, "default": { "type": "boolean", "description": "Is this the default account (true / false).", "nullable": true }, "linkedBbanOrIban": { "maxLength": 50, "minLength": 0, "type": "string", "description": "Allows linking BBAN and IBAN together when both represent the same bank account.\r\nAccounts are linked when the value of linkedBbanOrlban' on account A is the same as the value of 'id' on account B (and also the other way around).\r\nAlso, the schemeld values need to be 'IBAN' and 'BBAN' and values of fields 'currencyCode', 'accountAdditionalDatal', 'accountAdditionalData2', 'default' need to be same on both accounts.\r\nAccount linking is supported only by P2P.", "nullable": true, "example": "" } }, "additionalProperties": false }, "FinancialInstitutionEntity": { "required": [ "id", "name", "schemeId" ], "type": "object", "properties": { "name": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Specifies the vendor's bank name.", "example": "Nordea UK" }, "id": { "maxLength": 20, "minLength": 1, "type": "string", "description": "Specifies the value for idenfitier type specified in 'schemeId'. Typically used for importing bank account BIC/SWIFT number.", "example": "NDEAGB2L" }, "schemeId": { "maxLength": 36, "minLength": 1, "type": "string", "description": "Specifies the identifier type for field 'id'. Use 'BIC' for importing bank account BIC/SWIFT number in field 'id'.", "example": "BIC" }, "branchId": { "maxLength": 50, "minLength": 0, "type": "string", "description": "BranchId. Note: Field is not used in P2P.", "nullable": true }, "branchIdSchemeId": { "maxLength": 36, "minLength": 0, "type": "string", "description": "BranchIdSchemeId. Note: Field is not used in P2P.", "nullable": true }, "countryId": { "maxLength": 2, "minLength": 2, "type": "string", "description": "Defines the country ID for the vendor. Please use 2-char ISO country codes (according to ISO-3166-1 -standard). Note: Field is not used in P2P.", "nullable": true, "example": "US" } }, "additionalProperties": false }, "GenericListCompanyEntity": { "required": [ "active", "companyCode" ], "type": "object", "properties": { "companyCode": { "maxLength": 32, "minLength": 1, "type": "string", "description": "Company code identifier. Corresponds to company code used in P2P. Used as key in this array.", "example": "BW01" }, "active": { "type": "boolean", "description": "Gets or Sets Active" } }, "additionalProperties": false }, "GenericListEntity": { "required": [ "externalCode" ], "type": "object", "properties": { "externalCode": { "maxLength": 36, "minLength": 1, "type": "string", "description": "Id of the list entry.", "example": "6532e1d70e194ff8a193e42beab4a0d9" }, "text_1": { "type": "string", "description": "Text column for lists.", "nullable": true, "example": "032141" }, "text_2": { "type": "string", "description": "Text column for lists.", "nullable": true, "example": "John Smith" }, "text_3": { "type": "string", "description": "Text column for lists.", "nullable": true, "example": "true" }, "text_4": { "type": "string", "description": "Text column for lists.", "nullable": true, "example": "false" }, "text_5": { "type": "string", "description": "Text column for lists.", "nullable": true, "example": "620018A" }, "text_6": { "type": "string", "description": "Text column for lists.", "nullable": true, "example": "" }, "text_7": { "type": "string", "description": "Text column for lists.", "nullable": true, "example": "" }, "text_8": { "type": "string", "description": "Text column for lists.", "nullable": true, "example": "" }, "text_9": { "type": "string", "description": "Text column for lists.", "nullable": true, "example": "" }, "text_10": { "type": "string", "description": "Text column for lists.", "nullable": true, "example": "" }, "text_11": { "type": "string", "description": "Text column for lists.", "nullable": true, "example": "" }, "text_12": { "type": "string", "description": "Text column for lists.", "nullable": true, "example": "" }, "text_13": { "type": "string", "description": "Text column for lists.", "nullable": true, "example": "" }, "text_14": { "type": "string", "description": "Text column for lists.", "nullable": true, "example": "" }, "text_15": { "type": "string", "description": "Text column for lists.", "nullable": true, "example": "" }, "text_16": { "type": "string", "description": "Text column for lists.", "nullable": true, "example": "" }, "text_17": { "type": "string", "description": "Text column for lists.", "nullable": true, "example": "" }, "text_18": { "type": "string", "description": "Text column for lists.", "nullable": true, "example": "" }, "text_19": { "type": "string", "description": "Text column for lists.", "nullable": true, "example": "" }, "text_20": { "type": "string", "description": "Text column for lists.", "nullable": true, "example": "" }, "text_21": { "type": "string", "description": "Text column for lists.", "nullable": true, "example": "" }, "text_22": { "type": "string", "description": "Text column for lists.", "nullable": true, "example": "" }, "text_23": { "type": "string", "description": "Text column for lists.", "nullable": true, "example": "" }, "text_24": { "type": "string", "description": "Text column for lists.", "nullable": true, "example": "" }, "text_25": { "type": "string", "description": "Text column for lists.", "nullable": true, "example": "" }, "number_1": { "type": "number", "description": "Numeric column for lists.", "format": "double", "nullable": true, "example": 10000 }, "number_2": { "type": "number", "description": "Numeric column for lists.", "format": "double", "nullable": true, "example": 0 }, "number_3": { "type": "number", "description": "Numeric column for lists.", "format": "double", "nullable": true, "example": 0 }, "number_4": { "type": "number", "description": "Numeric column for lists.", "format": "double", "nullable": true, "example": 0 }, "number_5": { "type": "number", "description": "Numeric column for lists.", "format": "double", "nullable": true, "example": 0 }, "number_6": { "type": "number", "description": "Numeric column for lists.", "format": "double", "nullable": true, "example": 0 }, "number_7": { "type": "number", "description": "Numeric column for lists.", "format": "double", "nullable": true, "example": 0 }, "number_8": { "type": "number", "description": "Numeric column for lists.", "format": "double", "nullable": true, "example": 0 }, "number_9": { "type": "number", "description": "Numeric column for lists.", "format": "double", "nullable": true, "example": 0 }, "number_10": { "type": "number", "description": "Numeric column for lists.", "format": "double", "nullable": true, "example": 0 }, "number_11": { "type": "number", "description": "Numeric column for lists.", "format": "double", "nullable": true, "example": 0 }, "number_12": { "type": "number", "description": "Numeric column for lists.", "format": "double", "nullable": true, "example": 0 }, "number_13": { "type": "number", "description": "Numeric column for lists.", "format": "double", "nullable": true, "example": 0 }, "number_14": { "type": "number", "description": "Numeric column for lists.", "format": "double", "nullable": true, "example": 0 }, "number_15": { "type": "number", "description": "Numeric column for lists.", "format": "double", "nullable": true, "example": 0 }, "dateValue_1": { "type": "string", "description": "DateTime column for lists.", "format": "date-time", "nullable": true, "example": "2019-11-11" }, "dateValue_2": { "type": "string", "description": "DateTime column for lists.", "format": "date-time", "nullable": true, "example": "2019-11-11" }, "dateValue_3": { "type": "string", "description": "DateTime column for lists.", "format": "date-time", "nullable": true, "example": "2019-11-11" }, "dateValue_4": { "type": "string", "description": "DateTime column for lists.", "format": "date-time", "nullable": true, "example": "2019-11-11" }, "dateValue_5": { "type": "string", "description": "DateTime column for lists.", "format": "date-time", "nullable": true, "example": "2019-11-11" }, "dateValue_6": { "type": "string", "description": "DateTime column for lists.", "format": "date-time", "nullable": true, "example": "2019-11-11" }, "dateValue_7": { "type": "string", "description": "DateTime column for lists.", "format": "date-time", "nullable": true, "example": "2019-11-11" }, "dateValue_8": { "type": "string", "description": "DateTime column for lists.", "format": "date-time", "nullable": true, "example": "2019-11-11" }, "dateValue_9": { "type": "string", "description": "DateTime column for lists.", "format": "date-time", "nullable": true, "example": "2019-11-11" }, "dateValue_10": { "type": "string", "description": "DateTime column for lists.", "format": "date-time", "nullable": true, "example": "2019-11-11" }, "dateValue_11": { "type": "string", "description": "DateTime column for lists.", "format": "date-time", "nullable": true, "example": "2019-11-11" }, "dateValue_12": { "type": "string", "description": "DateTime column for lists.", "format": "date-time", "nullable": true, "example": "2019-11-11" }, "dateValue_13": { "type": "string", "description": "DateTime column for lists.", "format": "date-time", "nullable": true, "example": "2019-11-11" }, "dateValue_14": { "type": "string", "description": "DateTime column for lists.", "format": "date-time", "nullable": true, "example": "2019-11-11" }, "dateValue_15": { "type": "string", "description": "DateTime column for lists.", "format": "date-time", "nullable": true, "example": "2019-11-11" }, "lastUpdated": { "type": "string", "description": "Timestamp when the record was last sent to API. Set automatically.", "format": "date-time" }, "companies": { "type": "array", "items": { "$ref": "#/components/schemas/GenericListCompanyEntity" }, "description": "List of company units to associate genericlist to P2P organization hierarchy", "nullable": true }, "listContent": { "enum": [ "Plant", "ProfitCenter", "BusinessUnit", "Project", "ProjectSub", "Employee", "Vehicle", "Customer", "AccAssignmentCategory", "Budget", "Service", "BusinessArea", "PartnerProfitCenter", "FixedAsset", "FixedAssetSubCode", "WorkOrderCode", "WorkOrderSubCode", "CommitmentItem", "ControllingArea", "FunctionalArea", "Network", "NetworkActivity", "Tax", "TaxJurisdiction", "Dimension1", "Dimension2", "Dimension3", "Dimension4", "Dimension5", "Dimension6", "Dimension7", "Dimension8", "Dimension9", "Dimension10", "InternalOrder", "SalesOrder", "SalesOrderSub" ], "type": "string", "description": "Purchase manager list identifier. Needed if Purchase Manager is integrated through Basware API. Not used by P2P.", "nullable": true, "example": "" } }, "additionalProperties": false }, "GenericListResponse": { "required": [ "listItems" ], "type": "object", "properties": { "listItems": { "type": "array", "items": { "$ref": "#/components/schemas/GenericListEntity" } } }, "additionalProperties": false }, "GenericListSNSResponse": { "required": [ "listItems", "listKey" ], "type": "object", "properties": { "listKey": { "minLength": 1, "type": "string" }, "listItems": { "type": "array", "items": { "$ref": "#/components/schemas/GenericListEntity" } } }, "additionalProperties": false }, "GetBatchCompaniesRequest": { "type": "object", "properties": { "companyCodes": { "type": "array", "items": { "type": "string" }, "nullable": true }, "requestDateTime": { "type": "string", "format": "date-time", "nullable": true }, "requestDateTimeTicks": { "type": "integer", "format": "int64" } }, "additionalProperties": false }, "GetBatchRequest": { "type": "object", "properties": { "externalCodes": { "type": "array", "items": { "type": "string" }, "nullable": true }, "requestDateTime": { "type": "string", "format": "date-time", "nullable": true }, "requestDateTimeTicks": { "type": "integer", "format": "int64" }, "requestId": { "type": "string", "nullable": true } }, "additionalProperties": false }, "GetFailedBatchRequest": { "type": "object", "properties": { "externalCodes": { "type": "array", "items": { "type": "string" }, "nullable": true }, "responseMessage": { "type": "string", "nullable": true } }, "additionalProperties": false }, "GetOrganisationsResponse": { "type": "object", "properties": { "organizations": { "type": "array", "items": { "$ref": "#/components/schemas/OrganizationEntity" }, "nullable": true } }, "additionalProperties": false }, "GoodsReceiptEntity": { "required": [ "externalCode", "goodsReceiptNumber", "quantity" ], "type": "object", "properties": { "externalCode": { "maxLength": 36, "minLength": 1, "type": "string", "description": "Identifies the goods receipt for future updates through Basware API. Typically Generated by the system calling Basware API.", "example": "234-3444-74334667-1434612" }, "goodsReceiptNumber": { "maxLength": 100, "minLength": 1, "type": "string", "description": "Goods receipt number.", "example": "487632933422" }, "goodsReceiptLineNumber": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Goods receipt line number.", "nullable": true, "example": "1" }, "referenceGRExternalCode": { "maxLength": 36, "minLength": 0, "type": "string", "description": "Used to cancel (part of) an existing goods receipt. Place the 'externalCode' value of the original goods receipt here when this receipt item is a negative return/cancellation item for an earlier receipt. \r\n\r\nNote: If the original GR does not have netPrice / grossPrice, reversing part of the original GR will set the netSum / grossSum of the original GR to 0. This happens because the the sums get recalculated based on quantity x (net/gross)Price when values are updated.", "nullable": true, "example": "" }, "deliveryNoteNumber": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Identifier of the delivery from where the receipt was made.", "nullable": true, "example": "8718232387" }, "bestFitGrouping": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Grouping factor for received items that are invoiced together without any delivery indicator. The value can be for example a delivery note number or a delivery date. Used in best-fit matching.", "nullable": true, "example": "4847432142354" }, "quantity": { "type": "number", "description": "Received quantity", "format": "double", "example": 10 }, "netSum": { "type": "number", "description": "Total currency value of the received items, excluding tax. Note: Either net or gross currency amounts are required on the entire purchase order (both can be provided). Depending on type of provided amounts, either net or gross -based invoice matching can be used.", "format": "double", "nullable": true, "example": 1000 }, "grossSum": { "type": "number", "description": "Total currency value of the received items, including tax. Note: Either net or gross currency amounts are required on the entire purchase order (both can be provided). Depending on type of provided amounts, either net or gross -based invoice matching can be used.", "format": "double", "nullable": true, "example": 1160 }, "netPrice": { "type": "number", "description": "The unit price of the received item (price for a single item), excluding tax. \r\n\r\nNote: If the original GR does not have netPrice, reversing part of the original GR (done using 'referenceGRExternalCode' field) will set the netSum of the original GR to 0. This happens because the netSum gets recalculated based on quantity x netPrice when values are updated.", "format": "double", "nullable": true, "example": 100 }, "grossPrice": { "type": "number", "description": "The unit price of the received item (price for a single item), including tax.\r\n\r\nNote: If the original GR does not have grossPrice, reversing part of the original GR (done using 'referenceGRExternalCode' field) will set the grossSum of the original GR to 0. This happens because the grosstSum gets recalculated based on quantity x grossPrice when values are updated.", "format": "double", "nullable": true, "example": 116 }, "isDeleted": { "type": "boolean", "description": "Indicates whether the received item is deleted. If TRUE, the received item has been marked as deleted. Default value: FALSE.", "nullable": true, "example": false }, "notifyFault": { "type": "boolean", "description": "Used to indicate goods have been received as damaged. 'True' if goods are faulty. P2P can be configured to stop automatic invoice processing when an invoice has been matched against damaged goods.", "nullable": true, "example": false }, "invoicedQuantity": { "type": "number", "description": "Quantity that already has been matched from the line item", "format": "double", "nullable": true, "example": 0 }, "invoicedNetSum": { "type": "number", "description": "Sum that already has been matched excluding tax", "format": "double", "nullable": true }, "invoicedGrossSum": { "type": "number", "description": "Sum that already has been matched including tax", "format": "double", "nullable": true }, "unitOfMeasure": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Unit of measure of the line item. Valid value is UN/ECE CEFACT Trade Facilitation Recommendation No. 20 common code value represented as string.", "nullable": true, "example": "" }, "subUnitOfMeasure": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Alternative unit of measurement of the line item. Valid value is UN/ECE CEFACT Trade Facilitation Recommendation No. 20 common code value represented as string.", "nullable": true, "example": "" }, "goodsReceiptType": { "type": "integer", "description": "Goods receipt type, specified by Customer.", "format": "int32", "nullable": true }, "receiveMethod": { "type": "integer", "description": "Receive method, specified by customer.", "format": "int32", "nullable": true }, "voucherNumber": { "maxLength": 100, "minLength": 0, "type": "string", "description": "A reference to a buyer-generated document that authorizes a purchase transaction", "nullable": true, "example": "201809PO0001" }, "goodsReceiptNote": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Free-form text applying to the goods receipt. This field may contain notes or any other similar information that is not contained explicitly in another structure.", "nullable": true, "example": "Quality check ok" }, "fiscalYear": { "type": "string", "description": "Used when goods or services are received this fiscal year and will be paid for next fiscal year", "format": "date-time", "nullable": true }, "deliveryDate": { "type": "string", "description": "Date when the goods/services are delivered. Valid values are in format: CCYY-MM-DD. If the time zone is known, it must be represented with +hh:mm or -hh:mm or Z (which means UTC). If the time zone is not known, it must be left empty.", "format": "date-time", "nullable": true }, "productSerialNumber": { "maxLength": 250, "minLength": 0, "type": "string", "description": "A serial number is a code to uniquely identify the received item.", "nullable": true, "example": "8-01553-01" }, "comment": { "maxLength": 255, "minLength": 0, "type": "string", "description": "Available for additional information regarding the goods receipt, such as description of damaged goods.", "nullable": true }, "text1": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Text1-5 are available for customer-specific text fields.", "nullable": true, "example": "" }, "text2": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Custom field in the business document", "nullable": true, "example": "" }, "text3": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Custom field in the business document", "nullable": true, "example": "" }, "text4": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Custom field in the business document", "nullable": true, "example": "" }, "text5": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Custom field in the business document", "nullable": true, "example": "" }, "text6": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Custom field in the business document", "nullable": true, "example": "account" }, "text7": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Custom field in the business document", "nullable": true, "example": "" }, "text8": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Custom field in the business document", "nullable": true, "example": "" }, "text9": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Custom field in the business document", "nullable": true, "example": "" }, "text10": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Custom field in the business document", "nullable": true, "example": "" }, "numeric1": { "type": "number", "description": "Numeric1-5 are available for customer-specific numericfields.", "format": "double", "nullable": true }, "numeric2": { "type": "number", "format": "double", "nullable": true }, "numeric3": { "type": "number", "format": "double", "nullable": true }, "numeric4": { "type": "number", "format": "double", "nullable": true }, "numeric5": { "type": "number", "format": "double", "nullable": true }, "date1": { "type": "string", "description": "Date1-5 are available for customer-specific date fields.", "format": "date-time", "nullable": true }, "date2": { "type": "string", "format": "date-time", "nullable": true }, "date3": { "type": "string", "format": "date-time", "nullable": true }, "date4": { "type": "string", "format": "date-time", "nullable": true }, "date5": { "type": "string", "format": "date-time", "nullable": true }, "serviceEntrySheetDocId": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Custom field in the business document", "nullable": true, "example": "" }, "receiptCoding": { "type": "array", "items": { "$ref": "#/components/schemas/OrderLineCodingEntity" }, "description": "ReceiptCoding (for Service POs only) defines default coding dimension values for matched invoice lines. For Service POs, only one codingRow is allowed.", "nullable": true } }, "additionalProperties": false }, "GoodsReceiptLine": { "required": [ "externalCode", "orderLineExternalCode" ], "type": "object", "properties": { "externalCode": { "maxLength": 100, "minLength": 1, "type": "string", "description": "Unique identifier of the goods receipt line.", "example": "06dagdea-5123-71ea-a38b-2e128ce88122" }, "orderLineExternalCode": { "maxLength": 100, "minLength": 1, "type": "string", "description": "External code of the order line for which goods/services are being received.", "example": "060cb8ea-5464-11ea-a38b-2e728ce88123" }, "deliveryNoteNumber": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Do not use - Use header level DeliveryNoteNumber instead from P2P 23.3 or later.", "nullable": true, "example": "D128735871", "deprecated": true }, "productSerialNumber": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Product serial number. Generally used with goods receipt cancellations.", "nullable": true, "example": "" }, "receivedQuantity": { "type": "number", "description": "Quantity received. Value is allowed in only one of the following fields: 'receivedQuantity', 'receivedNetSum', 'receivedGrossSum' (one of these fields must have a value). The field which has a value specifies whether the receival has been done by quantity, net sum or gross sum. Same receival method needs to be used for all goods receipts done to the same order line. If the first goods receipt has been done through P2P Purchase UI, that will determine the receival method expected on any future goods receipts (also those imported through API). If all the previous goods receipts done to the order row have been reversed, then the receival method can be chosen again. Use a negative value if you are reversing a previous GR line.", "format": "double", "nullable": true, "example": 1 }, "receivedNetSum": { "type": "number", "description": "Net sum received. Value is allowed in only one of the following fields: 'receivedQuantity', 'receivedNetSum', 'receivedGrossSum' (one of these fields must have a value). The field which has a value specifies whether the receival has been done by quantity, net sum or gross sum. Same receival method needs to be used for all goods receipts done to the same order line. If the first goods receipt has been done through P2P Purchase UI, that will determine the receival method expected on any future goods receipts (also those imported through API). If all the previous goods receipts done to the order row have been reversed, then the receival method can be chosen again. Use a negative value if you are reversing a previous GR line.", "format": "double", "nullable": true, "example": 100 }, "receivedGrossSum": { "type": "number", "format": "double", "nullable": true }, "referenceGRLineExternalCode": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Used when this receipt item is a negative return/cancellation item for an earlier receipt. Needs to match with externalCode of the original goods receipt line.", "nullable": true, "example": "" }, "comment": { "maxLength": 255, "minLength": 0, "type": "string", "description": "Available for additional information regarding the GR line, such as reason for cancellation in case of reversing the GR.", "nullable": true, "example": "" }, "notifyFault": { "type": "boolean", "description": "Used to notify supplier of damaged goods. True if goods are faulty while receiving.", "example": false } }, "additionalProperties": false }, "GoodsReceiver": { "type": "object", "properties": { "loginAccount": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Login account.", "nullable": true, "example": "company\\\\jyrik" }, "emailAddress": { "maxLength": 320, "minLength": 0, "pattern": "^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*)@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])$", "type": "string", "description": "Email address.", "nullable": true, "example": "emailaddress@company.com" }, "externalCode": { "maxLength": 50, "minLength": 0, "type": "string", "description": "External code.", "nullable": true, "example": "sadkj2983g87i12diuodsahyukjd" } }, "additionalProperties": false, "description": "Specifies who has received the goods. At least one of the values needs to be provided." }, "GroupingLine": { "required": [ "externalCode", "requisitionLineNumber" ], "type": "object", "properties": { "externalCode": { "maxLength": 100, "minLength": 1, "type": "string", "example": "987236sd-sd31-3562-1239-9asffa986asd" }, "requisitionLineNumber": { "maxLength": 100, "minLength": 1, "type": "string", "example": "1" } }, "additionalProperties": false }, "Identifiers": { "required": [ "description", "externalCode", "id", "schemeId" ], "type": "object", "properties": { "externalCode": { "maxLength": 100, "minLength": 1, "type": "string", "description": "External identifier for the Business identifier. Needs to be unique within business identifiers.", "example": "4847-31231212-212121-1212" }, "id": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Specifies identifier value for the selected identifier type. The identifier type is determined by field 'schemeId'.", "example": "FI190101452" }, "schemeId": { "minLength": 1, "type": "string", "description": "Specifies identifier type. The identifier value is determined by field 'id'. Available values:\r\n\"DUNS\", \"EMAIL-RFC2822\", \"GLN\", \"IBAN\", \"ISO6523-ACTORID-UPIS\", \"UNKNOWN\", \"FI:Y-TUNNUS\", \"FI:VAT\", \"FI:OVT\", \"SE:ORGNR\", \"SE:VAT\", \"GLN\", \"NO:ORGNR\", \"NO:VAT\", \"DK:CVR\", \"DK:P\", \"DK:DIGST\", \"GLN\", \"FR:SIRENE\", \"FR:SIRET\", \"FR:VAT\", \"GLN\", \"DE:ORGNR\", \"DE:HRN\", \"DE:VAT\", \"DE:LWID\", \"GLN\", \"BE:EN\", \"BE:VAT\", \"GLN\", \"NL:KVK\", \"NL:VAT\", \"IBAN\", \"IT:FISCALE\", \"IT:IPA\", \"IT:IVA\", \"PT:NIF\", \"ES:CIF\", \"ES:NIF\", \"PL:KRS\", \"PL:REGON\", \"PL:VAT\", \"EE:ORGNR\", \"EE:VAT\", \"IE:ORGNR\", \"IE:VAT\", \"GLN\", \"GB:ORGNR\", \"GB:VAT\", \"XI:VAT\", \"GB:UTR\", \"GLN\", \"AT:ORGNR\", \"AT:VAT\", \"AT:GOV\", \"AT:CID\", \"CH:ORGNR\", \"CH:VAT\", \"HU:VAT\", \"RO:VAT\", \"GR:VAT\", \"GR:GEMI\", \"LI:VAT\", \"LU:VAT\", \"LT:LEC\", \"LT:VAT\", \"LV:VAT\", \"CZ:ORGNR\", \"CZ:VAT\", \"IS:KTNR\", \"IS:VAT\", \"BG:VAT\", \"HR:VAT\", \"SK:ORGNR\", \"SK:VAT\", \"CY:VAT\", \"US:TIN\", \"CA:BN\", \"CA:GST\", \"MX:VAT\", \"IN:GSTIN\", \"CN:BRN\", \"MY:GST\", \"AU:ABN\", \"AU:ACN\", \"AU:TFN\", \"NZ:BN\"", "example": "FI:VAT" }, "description": { "maxLength": 500, "minLength": 0, "type": "string", "description": "Describes the business identifier. Auto-filled by API based on identifier scheme id, but can be set manually for 'UNKNOWN' type identifiers to provide information what kind of identifier is used.", "example": "Finnish Value Added Tax identifier." }, "category": { "enum": [ "Legal", "NonLegal" ], "type": "string", "description": "Specifies identifier category. Legal identifiers can no longer be changed after the company is published.", "nullable": true }, "inherited": { "type": "boolean", "description": "Specifies whether the identifier has been inherited from a parent company. Legal identifiers for Units are automatically inherited from parent Company.", "example": false } }, "additionalProperties": false, "description": "Identifiers" }, "ImportedPurchaseOrderLineCodingRowEntity": { "required": [ "externalCode" ], "type": "object", "properties": { "externalCode": { "maxLength": 100, "minLength": 1, "type": "string", "description": "Unique external identifier that is used as a key in API.", "example": "060cb8ea-5464-11ea-a38b-2e728ce88122" }, "accountCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Account code.", "nullable": true, "example": "18200" }, "accountName": { "maxLength": 2000, "minLength": 0, "type": "string", "description": "Account name.", "nullable": true, "example": "Equipment purchases" }, "costCenterCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Cost center code.", "nullable": true, "example": "71830" }, "costCenterName": { "maxLength": 2000, "minLength": 0, "type": "string", "description": "Cost center name.", "nullable": true, "example": "Tokyo" }, "projectCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Project code.", "nullable": true, "example": "" }, "projectName": { "maxLength": 255, "minLength": 0, "type": "string", "description": "Project name.", "nullable": true, "example": "" }, "fixedAssetCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Fixed asset code.", "nullable": true, "example": "" }, "fixedAssetName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Fixed asset name.", "nullable": true, "example": "" }, "fixedAssetSubCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Fixed asset sub code.", "nullable": true, "example": "" }, "fixedAssetSubName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Fixed assets sub name.", "nullable": true, "example": "" }, "internalOrderCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Internal order code.", "nullable": true, "example": "" }, "internalOrderName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Internal order name.", "nullable": true, "example": "" }, "profitCenterCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Profit center code.", "nullable": true, "example": "" }, "profitCenterName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Profit center name.", "nullable": true, "example": "" }, "businessUnitCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Business unit code.", "nullable": true, "example": "" }, "businessUnitName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Business unit name.", "nullable": true, "example": "" }, "projectSubCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Project sub code.", "nullable": true, "example": "" }, "projectSubName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Project sub name.", "nullable": true, "example": "" }, "employeeCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Employee code.", "nullable": true, "example": "" }, "employeeName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Employee name.", "nullable": true, "example": "" }, "vehicleNumber": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Vehicle number.", "nullable": true, "example": "" }, "vehicleName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Vehicle name.", "nullable": true, "example": "" }, "salesOrderCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Sales order code.", "nullable": true, "example": "" }, "salesOrderName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Sales order name.", "nullable": true, "example": "" }, "salesOrderSubCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Sales order sub code.", "nullable": true, "example": "" }, "salesOrderSubName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Sales order sub name.", "nullable": true, "example": "" }, "customerCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Customer code.", "nullable": true, "example": "" }, "customerName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Customer name.", "nullable": true, "example": "" }, "accAssignmentCategoryCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Account assignment category code.", "nullable": true, "example": "" }, "accAssignmentCategoryName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Account assignment category name.", "nullable": true, "example": "" }, "budgetCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Budget code.", "nullable": true, "example": "" }, "budgetName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Budget name.", "nullable": true, "example": "" }, "serviceCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Service code.", "nullable": true, "example": "" }, "serviceName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Service name.", "nullable": true, "example": "" }, "businessAreaCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Business area code.", "nullable": true, "example": "" }, "businessAreaName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Business area name.", "nullable": true, "example": "" }, "workOrderCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Work order code.", "nullable": true, "example": "" }, "workOrderName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Work order name.", "nullable": true, "example": "" }, "workOrderSubCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Work order sub code.", "nullable": true, "example": "" }, "workOrderSubName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Work order sub name.", "nullable": true, "example": "" }, "distributionCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Distribution code.", "nullable": true, "example": "" }, "distributionMode": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Distribution mode.", "nullable": true, "example": "" }, "dimCode1": { "maxLength": 25, "minLength": 0, "type": "string", "description": "DimCode 1-10: Code fields for Customer-specific coding dimensions.", "nullable": true, "example": "" }, "dimCode2": { "maxLength": 25, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimCode3": { "maxLength": 25, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimCode4": { "maxLength": 25, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimCode5": { "maxLength": 25, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimCode6": { "maxLength": 25, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimCode7": { "maxLength": 25, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimCode8": { "maxLength": 25, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimCode9": { "maxLength": 25, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimCode10": { "maxLength": 25, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimName1": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Distribution mode.", "nullable": true, "example": "" }, "dimName2": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimName3": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimName4": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimName5": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimName6": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimName7": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimName8": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimName9": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimName10": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "num1": { "type": "number", "description": "LineInvoicingNum1-5: Can be used for for customer-specific date fields.", "format": "double", "nullable": true }, "num2": { "type": "number", "format": "double", "nullable": true }, "num3": { "type": "number", "format": "double", "nullable": true }, "num4": { "type": "number", "format": "double", "nullable": true }, "num5": { "type": "number", "format": "double", "nullable": true }, "text1": { "maxLength": 250, "minLength": 0, "type": "string", "description": "LineInvoicingText1-5: Can be used for for customer-specific date fields.", "nullable": true, "example": "" }, "text2": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text3": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text4": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text5": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "date1": { "type": "string", "description": "LineInvoicingDate1-5: Can be used for for customer-specific date fields.", "format": "date-time", "nullable": true, "example": "" }, "date2": { "type": "string", "format": "date-time", "nullable": true, "example": "" }, "date3": { "type": "string", "format": "date-time", "nullable": true, "example": "" }, "date4": { "type": "string", "format": "date-time", "nullable": true, "example": "" }, "date5": { "type": "string", "format": "date-time", "nullable": true, "example": "" } }, "additionalProperties": false }, "ImportedPurchaseOrderStatusUpdateRequest": { "required": [ "processingStatus" ], "type": "object", "properties": { "processingStatus": { "enum": [ "Uncompleted", "ReadyForImport", "ImportInProgress", "Imported", "ImportFailed" ], "type": "string", "description": "Order status to update" } }, "additionalProperties": false }, "InternalAttachment": { "type": "object", "properties": { "filename": { "type": "string", "nullable": true }, "description": { "type": "string", "nullable": true }, "fileSize": { "type": "number", "format": "double" }, "s3Path": { "type": "string", "nullable": true }, "s3Bucket": { "type": "string", "nullable": true }, "externalCode": { "type": "string", "description": "Attachment external code. Used to retrieve the actual attachment file through the accountingDocuments/{invoiceId}/{attachmentExternalCode} endpoint.", "nullable": true, "example": "fafv67fe21747s791f2eeafgc9ab78ae" }, "category": { "type": "string", "description": "Attachment category. Available values: ORIGINALIMAGE, ATTACHMENT, EXPORTEDEMAIL.", "nullable": true, "example": "ATTACHMENT" }, "isConfidential": { "type": "boolean", "description": "Indicates whether the attachment is confidential. true = confidential, false = not confidential.", "example": false }, "creationTime": { "type": "string", "description": "Creation time of the attachment in P2P.", "format": "date-time", "example": "2024-03-19T09:28:19.093Z" } }, "additionalProperties": false }, "InternalDeleteOrganisationRequest": { "type": "object", "properties": { "changedBy": { "type": "string", "nullable": true }, "deleteDraftChildrenOnly": { "type": "boolean", "description": "Flag for deleting only draft child orgs", "nullable": true }, "externalCode": { "type": "string", "nullable": true } }, "additionalProperties": false }, "InternalOrganizationByIDResponse": { "type": "object", "properties": { "externalCode": { "type": "string", "description": "Gets or sets the external code of the organization.", "nullable": true }, "organizationName": { "type": "string", "description": "Gets or sets the name of the organization.", "nullable": true }, "organizationCode": { "type": "string", "nullable": true }, "type": { "enum": [ "Company", "Group", "Unit" ], "type": "string", "nullable": true }, "isIncludedInRequest": { "type": "boolean", "description": "Gets or sets a value indicating whether the organization is included in the request." }, "published": { "type": "boolean" }, "mode": { "type": "string", "description": "Gets or sets the mode of the organization.", "nullable": true }, "organizationHierarchy": { "type": "string", "description": "Gets or sets the hierarchy of the organization.", "nullable": true }, "orgTreeLocation": { "$ref": "#/components/schemas/OrganizationTreeLocation" }, "homeCurrency": { "type": "string", "description": "Gets or sets the home currency of the organization.", "nullable": true }, "countryCode": { "type": "string", "description": "Gets or sets the country code of the organization.", "nullable": true } }, "additionalProperties": false, "description": "Represents the response containing organization details for internal use." }, "InvoiceLine": { "type": "object", "properties": { "externalCode": { "type": "string", "description": "Basware P2P identifier for the invoice row", "nullable": true, "example": "a86f243081c24d6a939f6e885ed0e539" }, "rowIndex": { "type": "integer", "description": "Invoice row number", "format": "int32", "nullable": true, "example": 1 }, "productCode": { "type": "string", "description": "Product code", "nullable": true, "example": "1.000000" }, "productName": { "type": "string", "description": "Product name", "nullable": true }, "quantity": { "type": "number", "description": "Quantity", "format": "double", "nullable": true }, "orderNumber": { "type": "string", "description": "Order number", "nullable": true, "example": "6000235428" }, "netPrice": { "type": "number", "description": "Net unit price", "format": "double", "nullable": true, "example": 1000 }, "taxPercent": { "type": "number", "description": "Tax percent", "format": "double", "nullable": true, "example": 25 }, "taxSum": { "type": "number", "description": "Tax sum", "format": "double", "nullable": true, "example": 250 }, "quantityUnit": { "type": "string", "description": "Unit in which quantity is specified, e.g. pcs, kg", "nullable": true }, "infoItem": { "type": "integer", "description": "Information about the item", "format": "int32", "nullable": true, "example": 0 }, "grossPrice": { "type": "number", "description": "Gross unit price", "format": "double", "nullable": true, "example": 1250 }, "additionalCost": { "type": "boolean", "nullable": true }, "additionalCostRecognition": { "maxLength": 200, "minLength": 0, "type": "string", "description": "Additional cost recognition keywork. The keywords are configured in P2P.", "nullable": true }, "deliveryNoteNumber": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Delivery note number", "nullable": true }, "discountAmount": { "type": "number", "description": "Discount amount", "format": "double", "nullable": true, "example": 0 }, "discountPercent": { "type": "number", "description": "Discount percentage", "format": "double", "nullable": true, "example": 0 }, "grossSum": { "type": "number", "description": "Gross sum", "format": "double", "nullable": true, "example": 1250 }, "itemTotalSum": { "type": "number", "description": "Total amount of the item", "format": "double", "nullable": true, "example": 0 }, "lineType": { "type": "integer", "format": "int32", "nullable": true }, "netSum": { "type": "number", "description": "Net sum", "format": "double", "nullable": true, "example": 1000 }, "orderRowNumber": { "maxLength": 50, "minLength": 0, "type": "string", "description": "Order row number", "nullable": true }, "taxCode": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Tax code", "nullable": true }, "taxPercent2": { "type": "number", "description": "Secondary tax percent", "format": "double", "nullable": true, "example": 0 }, "taxSum2": { "type": "number", "description": "Secondary tax sum", "format": "double", "nullable": true, "example": 0 }, "date1": { "type": "string", "description": "date1-5 Customer specific date field", "format": "date-time", "nullable": true, "example": "\"2023-05-23T11:17:25.830Z\"" }, "date2": { "type": "string", "format": "date-time", "nullable": true }, "date3": { "type": "string", "format": "date-time", "nullable": true }, "date4": { "type": "string", "format": "date-time", "nullable": true }, "date5": { "type": "string", "format": "date-time", "nullable": true }, "numeric1": { "type": "number", "description": "numeric1-20 Customer specific numeric field", "format": "double", "nullable": true, "example": 0 }, "numeric2": { "type": "number", "format": "double", "nullable": true }, "numeric3": { "type": "number", "format": "double", "nullable": true }, "numeric4": { "type": "number", "format": "double", "nullable": true }, "numeric5": { "type": "number", "format": "double", "nullable": true }, "numeric6": { "type": "number", "format": "double", "nullable": true }, "numeric7": { "type": "number", "format": "double", "nullable": true }, "numeric8": { "type": "number", "format": "double", "nullable": true }, "numeric9": { "type": "number", "format": "double", "nullable": true }, "numeric10": { "type": "number", "format": "double", "nullable": true }, "text1": { "maxLength": 250, "minLength": 0, "type": "string", "description": "text1-85 Customer specific text field", "nullable": true }, "text2": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true }, "text3": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true }, "text4": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true }, "text5": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true }, "text6": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true }, "text7": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true }, "text8": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true }, "text9": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true }, "text10": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true } }, "additionalProperties": false }, "LanguageTranslationEntity": { "required": [ "language", "translation" ], "type": "object", "properties": { "translation": { "maxLength": 2000, "minLength": 2, "type": "string", "description": "Translated text", "example": "Office supplies" }, "language": { "maxLength": 10, "minLength": 2, "type": "string", "description": "Language code", "example": "en-US" } }, "additionalProperties": false }, "MockResponseInternal": { "type": "object", "properties": { "root": { "type": "array", "items": { "$ref": "#/components/schemas/Root" }, "nullable": true } }, "additionalProperties": false }, "OperatorUserEntity": { "required": [ "externalCode", "fullName", "loginAccount" ], "type": "object", "properties": { "externalCode": { "maxLength": 128, "minLength": 1, "type": "string", "description": "External identifier that is used as a key in API.", "example": "4847-31231212-212121-1212" }, "fullName": { "maxLength": 200, "minLength": 3, "type": "string", "description": "Specifies the user's first name.", "example": "John Smith" }, "uiLanguage": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Specifies the language in which the user uses the system.The languages, for example English or Finnish, are available in the language picker.", "nullable": true, "example": "en-US" }, "loginAccount": { "maxLength": 100, "minLength": 1, "type": "string", "description": "User’s login account when Basware access is not in use (loginType is not 4). Unique user id.A new user id means a new user, using existing user id will update existing user data.When Access is in use, email is used as login account.", "example": "en-US" }, "email": { "pattern": "^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*)@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])$", "type": "string", "description": "Specifies the user’s email address. When loginType = 4 (Basware Access),this is used as user’s login account and must be unique.User needs access to the email account in order to set password.", "nullable": true, "example": "Mark@supplier.com" }, "validFrom": { "type": "string", "description": "The user is active and can use the system starting from this date.", "format": "date-time", "nullable": true, "example": "2017-01-01" }, "validUntil": { "type": "string", "description": "On this date, the user is deactivated and can no longer use the system.", "format": "date-time", "nullable": true, "example": "2017-01-01" }, "title": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Specifies the user's title.", "nullable": true, "example": "Solid line manager" }, "accessRealms": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Normally empty. Used in special cases, when systems require separate login accounts internally. For example if user needs access to basware network in both US and Europe. \\r\\nWhen field needs to be used, values are provided by Basware SaaS production -personnel. You can specify multiple realms in a comma-separated list. Use comma (not semicolon) as the separator.", "nullable": true, "example": "" }, "accessLoginMethod": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Normally empty. Used when customer uses several login/authentication methods in use with Basware Access.Specifies login/authentication method (such as SSO-USA), when Basware Access is in use(loginType = 4). When field needs to be used, applicable login method code(s) codes are provided by Basware SaaS production -personnel.When field is empty, default value is used internally.", "nullable": true, "example": "" }, "accessTimeout": { "maximum": 28800, "minimum": 900, "type": "integer", "description": "User specific session idle timeout in seconds to use instead of the login method default. Determines how long user can stay logged in without using the system.Used only when loginType = 4(= Basware Access).", "format": "int32", "nullable": true, "example": 1800 }, "mfa": { "maxLength": 100, "minLength": 0, "type": "string", "description": "'Used only when loginType = 4 (=Basware Access). Determines Multi Factor Authentication settings(additional authentication using SMS or Google authenticator app for smartphones): required, allowed or disabled.' pattern: notAllowed|optional|mandatory", "nullable": true, "example": "" }, "sendAccountCreationEmail": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Used only when loginType = 4 (=Basware Access). Use 'welcome' if Basware Access should send welcome email containing a link for account activation. The password within the welcome email expires within an hour and can be recovered using 'forgot password' -function.Use 'notSend' if customer wants to send welcome email themselves or if welcome email is not required.ResetPwd is reserved for internal API usage.", "nullable": true, "example": "NotSend" }, "accountCreationURI": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Used only when loginType = 4 (=Basware Access). Defines service address for welcome email sent by Basware Access.Put here the login URL of the service where you want the user to land (P2P, network, etc). In P2P case this is the URL that consultant would give for customer when using SSO login.", "nullable": true, "example": "https://tenantcode.p2p.basware.com/Portal/WifLogin" }, "loginAllowed": { "type": "boolean", "description": "This value defines whether the user can access the system after the user details are saved.", "example": true }, "roles": { "type": "array", "items": { "$ref": "#/components/schemas/Role" }, "nullable": true }, "deleted": { "type": "boolean", "description": "This value defines whether the user can access the system after the user details are saved." }, "lastUpdated": { "type": "string", "description": "Timestamp when the record was last sent to API. Set automatically.", "format": "date-time", "example": "2017-01-01" } }, "additionalProperties": false }, "OperatorUserResponse": { "required": [ "operatorUsers" ], "type": "object", "properties": { "operatorUsers": { "type": "array", "items": { "$ref": "#/components/schemas/OperatorUserEntity" } } }, "additionalProperties": false }, "OrderEntity": { "required": [ "companyCode", "currencyCode", "externalCode", "orderNumber", "organizationElementCode", "sourceSystem", "supplierCode" ], "type": "object", "properties": { "externalCode": { "maxLength": 36, "minLength": 1, "type": "string", "description": "Identifies the order for future updates through Basware API. Typically Generated by the system calling Basware API.", "example": "6741ecc7-848a-443c-83ad-ea95e4df06fa" }, "orderNumber": { "maxLength": 100, "minLength": 1, "type": "string", "description": "Order number. Identifier typically generated by the system in which the order is created.", "example": "450004534" }, "sourceSystem": { "maxLength": 36, "minLength": 1, "type": "string", "description": "Identifies the source system from where the purchase order is originated", "example": "SAPEUR1" }, "companyCode": { "maxLength": 25, "minLength": 1, "type": "string", "description": "Company code. Identifier for an organization element that represents the legal structure of an organization. A purchase order company is compared with the values set in the company filter when the system identifies the correct matching configuration to be used. It is also used when searching purchase orders to be matched by the system or a user.", "example": "1010" }, "companyName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Company name.", "nullable": true, "example": "Amazing Store Central City, Phoenix, Arizona" }, "organizationElementCode": { "maxLength": 25, "minLength": 2, "type": "string", "description": "Identifier for an administrative organization element on top of the the company set for the purchase order. The organization element is used to identify if the user has rights to see the purchase order in Basware P2P Matching view.", "example": "1000" }, "organizationElementName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Name of the organization element.", "nullable": true, "example": "Amazing Store Inc." }, "orderTypeCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "A grouping element for purchase orders. orderTypeCode is commonly used in OM Category filters.", "nullable": true, "example": "NB" }, "currencyCode": { "maxLength": 3, "minLength": 2, "type": "string", "description": "Currency presentation of the purchase order document. Valid values are in ISO 4217 Alpha format.", "example": "USD" }, "created": { "type": "string", "description": "The date when the purchase order was issued. Valid values are in format: CCYY-MM-DD. If the time zone is known, it must be represented with +hh:mm or -hh:mm or Z (which means UTC). If the time zone is not known, it must be left empty.", "format": "date-time", "nullable": true, "example": "2017-07-02T07:36:13.053Z" }, "isClosed": { "type": "boolean", "description": "Indicates whether the purchase order is closed. Not inherited to order lines, which have their own indicator. Informative field.", "nullable": true, "example": false }, "description": { "maxLength": 1000, "minLength": 0, "type": "string", "description": "Description of purchase order.", "nullable": true, "example": "Economy letters - 500" }, "purchaseOrganizationCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Party that is the accountable buyer of the goods/services in the referred business document. The purchaseOrganizationCode does not have an impact to the matching process.", "nullable": true, "example": "1017" }, "purchaseOrganizationName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Name of the purchase organization unit", "nullable": true, "example": "Marketing" }, "supplierCode": { "maxLength": 25, "minLength": 1, "type": "string", "description": "Supplier code to which the order is placed. The supplier of the goods/services in the referred business document.", "example": "114612065012" }, "supplierName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Name of the supplier.", "nullable": true, "example": "Acme Supplier Inc." }, "invoicingSupplierCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Supplier code of supplier sending the invoice. In some cases may be different from the main supplierCode.", "nullable": true, "example": "540077" }, "invoicingSupplierName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Name of supplier sending the invoice.", "nullable": true, "example": "Office Warehouse Inc." }, "requestedDeliveryDate": { "type": "string", "description": "Date when goods/services are expected to be delivered. Valid values are in format: CCYY-MM-DD. If the time zone is known, it must be represented with +hh:mm or -hh:mm or Z (which means UTC). If the time zone is not known, it must be left empty.", "format": "date-time", "nullable": true, "example": "2018-07-02T07:36:13.053Z" }, "actualDeliveryDate": { "type": "string", "description": "Date when goods/services were delivered. Valid values are in format: CCYY-MM-DD. If the time zone is known, it must be represented with +hh:mm or -hh:mm or Z (which means UTC). If the time zone is not known, it must be left empty.", "format": "date-time", "nullable": true, "example": "2018-07-02T07:36:13.053Z" }, "validFrom": { "type": "string", "description": "Date when the validity of the purchase order starts. Valid values are in format: CCYY-MM-DD. If the time zone is known, it must be represented with +hh:mm or -hh:mm or Z (which means UTC). If the time zone is not known, it must be left empty. By default, the field does not impact the matching logic in P2P.", "format": "date-time", "nullable": true, "example": "2018-01-01T07:36:13.053Z" }, "validTo": { "type": "string", "description": "Date when the validity of the purchase order ends. Valid values are in format: CCYY-MM-DD. If the time zone is known, it must be represented with +hh:mm or -hh:mm or Z (which means UTC). If the time zone is not known, it must be left empty. By default, the field does not impact the matching logic in P2P.", "format": "date-time", "nullable": true, "example": "2018-12-31T07:36:13.053Z" }, "paymentTermCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Identifier for the agreed payment term that is to be used when supplier charges the customer. Required if using matching validation rule to check payment term on order is same as on invoice. By default, this field does not impact the matching logic in P2P.", "nullable": true, "example": "NT30" }, "paymentTermName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Name of the payment term", "nullable": true, "example": "30 days net" }, "text1": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Custom field in the business document", "nullable": true, "example": "" }, "text2": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Custom field in the business document", "nullable": true, "example": "" }, "text3": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Custom field in the business document", "nullable": true, "example": "" }, "text4": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Custom field in the business document", "nullable": true, "example": "" }, "text5": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Custom field in the business document", "nullable": true, "example": "" }, "text6": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Custom field in the business document", "nullable": true, "example": "" }, "text7": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Custom field in the business document", "nullable": true, "example": "" }, "text8": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Custom field in the business document", "nullable": true, "example": "" }, "text9": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Custom field in the business document", "nullable": true, "example": "" }, "text10": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Custom field in the business document", "nullable": true, "example": "" }, "numeric1": { "type": "number", "description": "Custom field in the business document", "format": "double", "nullable": true, "example": 0 }, "numeric2": { "type": "number", "description": "Custom field in the business document", "format": "double", "nullable": true, "example": 0 }, "numeric3": { "type": "number", "description": "Custom field in the business document", "format": "double", "nullable": true, "example": 0 }, "numeric4": { "type": "number", "description": "Custom field in the business document", "format": "double", "nullable": true, "example": 0 }, "numeric5": { "type": "number", "description": "Custom field in the business document", "format": "double", "nullable": true, "example": 0 }, "date1": { "type": "string", "description": "Custom field in the business document. Valid values are in format: CCYY-MM-DD. If the time zone is known, it must be represented with +hh:mm or -hh:mm or Z (which means UTC). If the time zone is not known, it must be left empty.", "format": "date-time", "nullable": true, "example": "2018-07-02T07:36:13.053Z" }, "date2": { "type": "string", "description": "Custom field in the business document. Valid values are in format: CCYY-MM-DD. If the time zone is known, it must be represented with +hh:mm or -hh:mm or Z (which means UTC). If the time zone is not known, it must be left empty.", "format": "date-time", "nullable": true, "example": "2018-07-02T07:36:13.053Z" }, "date3": { "type": "string", "description": "Custom field in the business document. Valid values are in format: CCYY-MM-DD. If the time zone is known, it must be represented with +hh:mm or -hh:mm or Z (which means UTC). If the time zone is not known, it must be left empty.", "format": "date-time", "nullable": true, "example": "2018-07-02T07:36:13.053Z" }, "date4": { "type": "string", "description": "Custom field in the business document. Valid values are in format: CCYY-MM-DD. If the time zone is known, it must be represented with +hh:mm or -hh:mm or Z (which means UTC). If the time zone is not known, it must be left empty.", "format": "date-time", "nullable": true, "example": "2018-07-02T07:36:13.053Z" }, "date5": { "type": "string", "description": "Custom field in the business document. Valid values are in format: CCYY-MM-DD. If the time zone is known, it must be represented with +hh:mm or -hh:mm or Z (which means UTC). If the time zone is not known, it must be left empty.", "format": "date-time", "nullable": true, "example": "2018-07-02T07:36:13.053Z" }, "isInvoiced": { "type": "boolean", "description": "Indicates whether the purchase order is invoiced. By default, the field does not impact the matching logic in P2P.", "nullable": true, "example": false }, "isDelivered": { "type": "boolean", "description": "Indicates whether the purchase order is delivered. By default, the field does not impact the matching logic in P2P.", "nullable": true, "example": false }, "lastUpdated": { "type": "string", "description": "Timestamp when the record was last sent to API. Set automatically.", "format": "date-time" }, "orderReference": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Reference to parent order. Allows an invoice to be matched to child order(s) under the parent order. Intended for scenarios where one order number is given to supplier while customer keeps generating new orders, which are still matched using the parent order number given to supplier. This method of matching is by default not enabled and needs to be manually activated in P2P.", "nullable": true, "example": "PO4300157" } }, "additionalProperties": false }, "OrderGrouping": { "required": [ "hidePricesFromSupplier", "releaseOrdersRequired" ], "type": "object", "properties": { "supplierCode": { "maxLength": 32, "minLength": 0, "type": "string", "description": "Supplier code.", "nullable": true, "example": "SU100" }, "supplierName": { "maxLength": 255, "minLength": 0, "type": "string", "description": "Supplier name.", "nullable": true, "example": "ProjectSupplierLtd" }, "paymentTermCode": { "maxLength": 255, "minLength": 0, "type": "string", "description": "Payment term code.", "nullable": true, "example": "30N" }, "paymentTermName": { "maxLength": 2000, "minLength": 0, "type": "string", "description": "Payment term name.", "nullable": true, "example": "30DaysNet" }, "contractNumber": { "maxLength": 255, "minLength": 0, "type": "string", "description": "Contract number.", "nullable": true, "example": "Contract-100" }, "orderType": { "enum": [ "Standard", "Blanket" ], "type": "string" }, "validityPeriodStartDate": { "type": "string", "description": "Used only if the order type is blanket to specify the start date for blanket purchase order validity period (date format: yyyy-MM-dd).", "format": "date-time", "nullable": true, "example": "" }, "validityPeriodEndDate": { "type": "string", "description": "Used only if the order type is blanket to specify the end date for blanket purchase order validity period (date format: yyyy-MM-dd).", "format": "date-time", "nullable": true, "example": "" }, "deliveryTerm": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Delivery term.", "nullable": true, "example": "Supplier to Buyer via Post" }, "deliveryLocation": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Delivery location.", "nullable": true, "example": "" }, "deliveryInstruction": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Delivery instruction.", "nullable": true, "example": "Check the packing so it will not break" }, "sendingMethod": { "enum": [ "BaswareNetwork", "Email" ], "type": "string", "description": "Determines how Basware P2P will sends the order to supplier when the order is placed.", "nullable": true, "example": "BaswareNetwork" }, "orderRecipientType": { "enum": [ "Supplier", "Owner", "SupplierAndOwner" ], "type": "string", "description": "Determines who order is sent to.\r\n-Supplier(0) : Order is sent only to supplier.\r\n-If orderingMethod is email, order is sent to the email indicated by 'supplierOrderingEmail'. -If orderingMethod is network, the order is sent through Basware network.\r\n-Owner (1): Order is sent only to email address(es) indicated by field 'otherOrderingEmail'. Used for example when goods were picked up from a store and no order needs to be sent to supplier.\r\n-SupplierAndOwner (2): Order is sent to both supplier and email addresses indicated by field 'otherOrderingEmail'. Order delivery method to supplier is determined by orderingMethod, same as above.", "example": "Supplier" }, "supplierOrderingEmail": { "maxLength": 1800, "minLength": 0, "type": "string", "description": "Specifies the email address(es) where the order is sent to when sending order to supplier. Can contain multiple email addresses. Used when orderRecipientType is set as 'Owner' or 'SupplierAndOwner'.", "nullable": true, "example": "john.smith@company.com" }, "ownerOrderingEmail": { "maxLength": 1800, "minLength": 0, "type": "string", "description": "Contact email to which supplier can send questions about the order. Note: When order is sent to supplier, it is not sent to this email. Note: Fields visible on the order sent to supplier are configured in P2P Purchase.", "nullable": true, "example": "john.smith@company.com" }, "otherOrderingEmail": { "type": "string", "description": "The email address(es) where the order is sent by P2P purchase. Can contain multiple email addresses. The order is sent to these addresses when orderRecipientType is 'Owner' or 'Both'.", "nullable": true, "example": "john.smith@company.com" }, "releaseOrdersRequired": { "type": "boolean", "description": "Used only if the order type is blanket to specify, if the blanket purchase order requires release orders.", "example": false }, "hidePricesFromSupplier": { "type": "boolean", "description": "Specifies, if all price information is hidden from the supplier in the outgoing purchase order.", "example": false }, "attachPdfToNetworkOrder": { "type": "boolean", "description": "Specifies if order is attached as pdf file when order is sent to supplier through Basware network.", "nullable": true, "example": true }, "grossSum": { "type": "number", "description": "Gross sum of the grouped order line(s).", "format": "double", "example": 125 }, "netSum": { "type": "number", "description": "Net sum of the grouped order line(s).", "format": "double", "example": 100 }, "receivers": { "type": "array", "items": { "$ref": "#/components/schemas/ExportedPurchaseRequisitionUserEntity" }, "description": "List of people who should receive the order.", "nullable": true }, "receiverToContact": { "$ref": "#/components/schemas/ExportedPurchaseRequisitionUserEntity" }, "requisitionLines": { "type": "array", "items": { "$ref": "#/components/schemas/GroupingLine" }, "description": "Specifies the requisition lines which are on-course for being grouped to this order.", "nullable": true } }, "additionalProperties": false }, "OrderLineCodingEntity": { "required": [ "allocatedQuantity", "externalCode", "rowIndex" ], "type": "object", "properties": { "externalCode": { "maxLength": 36, "minLength": 1, "type": "string", "description": "Unique identifier used for updates through Basware API.", "example": "1547e437-1231-ad32-dff2-132985aae212" }, "rowIndex": { "maximum": 100000, "minimum": 0, "type": "integer", "description": "Row number of coding row on the PO line.", "format": "int32", "example": 0 }, "netTotal": { "type": "number", "description": "Represents total excluding tax that is allocated for the accounting dimensions set in the coding row item. Note: Either net or gross currency amounts are required on the entire purchase order (both can be provided). Depending on type of provided amounts, either net or gross -based invoice matching can be used.", "format": "double", "nullable": true }, "grossTotal": { "type": "number", "description": "Represents total including tax that is allocated for the accounting dimensions set in the coding row item. Note: Either net or gross currency amounts are required on the entire purchase order (both can be provided). Depending on type of provided amounts, either net or gross -based invoice matching can be used.", "format": "double", "nullable": true }, "accountCode": { "maxLength": 50, "minLength": 0, "type": "string", "description": "Account code. A code that identifies the general ledger account to where the matched spend is recorded.", "nullable": true, "example": "28520" }, "accountName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Name of the account", "nullable": true, "example": "Other marketing expences" }, "costCenterCode": { "maxLength": 200, "minLength": 0, "type": "string", "description": "Cost center code. A code that identifies the part of an organization to which costs may be charged for accounting purposes", "nullable": true, "example": "1010" }, "costCenterName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Name of the cost center", "nullable": true, "example": "Global presales and Marketing" }, "projectCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "A code that identifies the project when the spend is required to be recorded", "nullable": true, "example": "32101" }, "projectName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Name of the project", "nullable": true, "example": "Basware Connect 2022" }, "conversionNumerator": { "type": "number", "description": "A conversion factor is used to change the units of a nominator in quantity without changing its value. For example, one envelope weighs 7 g.", "format": "double", "nullable": true }, "conversionDenominator": { "type": "number", "description": "A conversion factor is used to change the units of a denominator in quantity without changing its value.", "format": "double", "nullable": true }, "conversionDeNumerator": { "type": "number", "description": "Deprecated - field not in use.", "format": "double", "nullable": true }, "taxCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Tax code.", "nullable": true, "example": "T16" }, "taxPercent": { "maximum": 1000000000, "minimum": -1000000000, "type": "number", "description": "Tax percent.", "format": "double", "nullable": true, "example": 16 }, "taxPercent2": { "maximum": 1000000000, "minimum": -1000000000, "type": "number", "description": "Tax percent 2. Can be used for example for handling reverse charges on EU VAT.", "format": "double", "nullable": true, "example": 0 }, "taxSum": { "type": "number", "description": "Tax sum.", "format": "double", "nullable": true, "example": 16 }, "taxSum2": { "type": "number", "description": "Tax sum 2.", "format": "double", "nullable": true, "example": 0 }, "partnerProfitCenter": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Identifies transfers of goods and services between profit centers", "nullable": true, "example": "" }, "fixedAssetCode": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Long-term tangible piece of property that a company owns and uses in its operations to generate income", "nullable": true, "example": "" }, "fixedAssetName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Name of the fixed asset", "nullable": true, "example": "" }, "materialGroup": { "maxLength": 100, "minLength": 0, "type": "string", "description": "A code that groups together several materials or services with the same characteristics", "nullable": true, "example": "" }, "fixedAssetSubCode": { "maxLength": 50, "minLength": 0, "type": "string", "description": "A code identifying an accessory / special equipment that you maintain on a fixed asset", "nullable": true, "example": "" }, "fixedAssetSubName": { "maxLength": 50, "minLength": 0, "type": "string", "description": "Name of the sub-asset", "nullable": true, "example": "" }, "internalOrderCode": { "maxLength": 50, "minLength": 0, "type": "string", "description": "A code to identify an internal order that normally is used to plan, collect, and settle the costs of internal jobs and tasks", "nullable": true, "example": "" }, "internalOrderName": { "maxLength": 50, "minLength": 0, "type": "string", "description": "Name of the internal order", "nullable": true, "example": "" }, "profitCenterCode": { "maxLength": 50, "minLength": 0, "type": "string", "description": "A code to identify a part of a business which is expected to make an identifiable contribution to the organization's profits", "nullable": true, "example": "" }, "profitCenterName": { "maxLength": 50, "minLength": 0, "type": "string", "description": "Name of the profit center", "nullable": true, "example": "" }, "businessUnitCode": { "maxLength": 50, "minLength": 0, "type": "string", "description": "A code to identify a division of a large company that operates as an independent enterprise with responsibility for a particular range of products or activities", "nullable": true, "example": "" }, "businessUnitName": { "maxLength": 50, "minLength": 0, "type": "string", "description": "Name of the business unit", "nullable": true, "example": "" }, "projectSubCode": { "maxLength": 50, "minLength": 0, "type": "string", "description": "A code to identify a project that is part of a larger project", "nullable": true, "example": "" }, "projectSubName": { "maxLength": 50, "minLength": 0, "type": "string", "description": "Name of the sub-project", "nullable": true, "example": "" }, "employeeCode": { "maxLength": 50, "minLength": 0, "type": "string", "description": "A code to identify an employee related to the cost", "nullable": true, "example": "" }, "employeeName": { "maxLength": 50, "minLength": 0, "type": "string", "description": "Name of the employee", "nullable": true, "example": "" }, "vehicleNumber": { "maxLength": 50, "minLength": 0, "type": "string", "description": "A code to identify a vehicle related to the cost", "nullable": true, "example": "" }, "vehicleName": { "maxLength": 50, "minLength": 0, "type": "string", "description": "Name of the vehicle", "nullable": true, "example": "" }, "salesOrderCode": { "maxLength": 50, "minLength": 0, "type": "string", "description": "A code to identify a sales order", "nullable": true, "example": "" }, "salesOrderName": { "maxLength": 50, "minLength": 0, "type": "string", "description": "Name of the sales order", "nullable": true, "example": "" }, "salesOrderSubCode": { "maxLength": 50, "minLength": 0, "type": "string", "description": "A code to identify another order that is part of a sales order", "nullable": true, "example": "" }, "salesOrderSubName": { "maxLength": 50, "minLength": 0, "type": "string", "description": "Name of the sub sales order", "nullable": true, "example": "" }, "customerCode": { "maxLength": 50, "minLength": 0, "type": "string", "description": "A code to identify a customer", "nullable": true, "example": "" }, "customerName": { "maxLength": 50, "minLength": 0, "type": "string", "description": "Name of the customer", "nullable": true, "example": "" }, "accAssignmentCategoryCode": { "maxLength": 50, "minLength": 0, "type": "string", "description": "A code to identify account assignment category", "nullable": true, "example": "" }, "accAssignmentCategoryName": { "maxLength": 50, "minLength": 0, "type": "string", "description": "A code to identify a budget where the cost belongs", "nullable": true, "example": "" }, "budgetCode": { "maxLength": 50, "minLength": 0, "type": "string", "description": "Name of the bugdet", "nullable": true, "example": "" }, "budgetName": { "maxLength": 50, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "serviceCode": { "maxLength": 50, "minLength": 0, "type": "string", "description": "A code to identify a service related to the cost", "nullable": true, "example": "" }, "serviceName": { "maxLength": 50, "minLength": 0, "type": "string", "description": "Name of the service", "nullable": true, "example": "" }, "businessAreaCode": { "maxLength": 50, "minLength": 0, "type": "string", "description": "A code to identify a business area", "nullable": true, "example": "" }, "businessAreaName": { "maxLength": 50, "minLength": 0, "type": "string", "description": "Name of the business area", "nullable": true, "example": "" }, "taxJurisdictionCode": { "maxLength": 50, "minLength": 0, "type": "string", "description": "A code to identify which area or which tax authority is involved", "nullable": true, "example": "" }, "subUOM": { "maxLength": 50, "minLength": 0, "type": "string", "description": "Alternative unit of measurement of the line item. Valid value is UN/ECE CEFACT Trade Facilitation Recommendation No. 20 common code value represented as a string.", "nullable": true, "example": "" }, "workOrderCode": { "maxLength": 50, "minLength": 0, "type": "string", "description": "A code to identify work order", "nullable": true, "example": "" }, "workOrderName": { "maxLength": 50, "minLength": 0, "type": "string", "description": "Name of the work order", "nullable": true, "example": "" }, "workOrderSubCode": { "maxLength": 50, "minLength": 0, "type": "string", "description": "A code to identify another order related to work order", "nullable": true, "example": "" }, "workOrderSubName": { "maxLength": 50, "minLength": 0, "type": "string", "description": "Name of the sub work order", "nullable": true, "example": "" }, "commitmentItem": { "maxLength": 50, "minLength": 0, "type": "string", "description": "A code to identify an element that represents the functional grouping of expenditures and revenues within a financial management area", "nullable": true, "example": "" }, "controllingArea": { "maxLength": 50, "minLength": 0, "type": "string", "description": "A code to identify an organizational unit in an organization that represents a closed system used for cost accounting purposes", "nullable": true, "example": "" }, "functionalArea": { "maxLength": 50, "minLength": 0, "type": "string", "description": "A code to identify a functional area, like teams of employees, who have similar skills and expertise", "nullable": true, "example": "" }, "dimCode1": { "maxLength": 100, "minLength": 0, "type": "string", "description": "dimCode1-10 are often used for additional, customer-specific, coding dimensions. Specifies the dimension code.", "nullable": true, "example": "" }, "dimCode2": { "maxLength": 100, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimCode3": { "maxLength": 100, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimCode4": { "maxLength": 100, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimCode5": { "maxLength": 100, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimCode6": { "maxLength": 100, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimCode7": { "maxLength": 100, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimCode8": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Custom field in the business document", "nullable": true, "example": "" }, "dimCode9": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Custom field in the business document", "nullable": true, "example": "" }, "dimCode10": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Custom field in the business document", "nullable": true, "example": "" }, "dimName1": { "maxLength": 100, "minLength": 0, "type": "string", "description": "dimName1-10 are often used for additional, customer-specific, coding dimensions. Specifies the dimension name.", "nullable": true, "example": "" }, "dimName2": { "maxLength": 100, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimName3": { "maxLength": 100, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimName4": { "maxLength": 100, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimName5": { "maxLength": 100, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimName6": { "maxLength": 100, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimName7": { "maxLength": 100, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimName8": { "maxLength": 100, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimName9": { "maxLength": 100, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimName10": { "maxLength": 100, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "num1": { "type": "number", "description": "Num1-5 are available for customer-specific numeric fields.", "format": "double", "nullable": true }, "num2": { "type": "number", "format": "double", "nullable": true }, "num3": { "type": "number", "format": "double", "nullable": true }, "num4": { "type": "number", "format": "double", "nullable": true }, "num5": { "type": "number", "format": "double", "nullable": true }, "allocatedQuantity": { "type": "number", "description": "Specifies quantity per coding-line. Needed especially when creating multiple coding lines for a single order row.", "format": "double", "example": 1 }, "text1": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Text1-5 are available for customer-specific text fields.", "nullable": true, "example": "" }, "text2": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Custom field in the business document", "nullable": true, "example": "" }, "text3": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Custom field in the business document", "nullable": true, "example": "" }, "text4": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Custom field in the business document", "nullable": true, "example": "" }, "text5": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Custom field in the business document", "nullable": true, "example": "" }, "date1": { "type": "string", "description": "Date1-5 are available for customer-specific date fields.", "format": "date-time", "nullable": true }, "date2": { "type": "string", "format": "date-time", "nullable": true }, "date3": { "type": "string", "format": "date-time", "nullable": true }, "date4": { "type": "string", "format": "date-time", "nullable": true }, "date5": { "type": "string", "format": "date-time", "nullable": true }, "network": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "networkActivity": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" } }, "additionalProperties": false }, "OrderLineEntity": { "required": [ "externalCode", "lineNumber", "matchingMode", "orderExternalCode", "quantity" ], "type": "object", "properties": { "externalCode": { "maxLength": 36, "minLength": 1, "type": "string", "description": "Identifies the order line for future updates through Basware API.", "example": "6741ecc7-848a-443c-83ad-ea95e4df06yh" }, "orderExternalCode": { "maxLength": 36, "minLength": 1, "type": "string", "description": "Links the order line to the corresponding order header. The header needs to have been posted to API before order line(s).", "example": "6741ecc7-848a-443c-83ad-ea95e4df06fa" }, "lineNumber": { "maxLength": 100, "minLength": 1, "type": "string", "description": "Purchase order row number.", "example": "1" }, "sortNumber": { "type": "integer", "description": "Technical row number, used also for sorting. Typically the same as purchase order row number.", "format": "int32", "nullable": true, "example": 1 }, "quantity": { "type": "number", "description": "Defines how many items a customer has purchased. The quantity must be higher than zero. With isBlanketOrderLine TRUE, the quantity must be set 1. For service PO's quantity must always be 1.", "format": "double", "example": 10 }, "netSum": { "type": "number", "description": "Total currency amount excluding tax amount of the purchase order line. Note: Either net or gross currency amounts are required on the entire purchase order (both can be provided). Depending on type of provided amounts, either net or gross -based invoice matching can be used.", "format": "double", "nullable": true, "example": 1000 }, "grossSum": { "type": "number", "description": "Total currency amount including tax amount of the purchase order line. Note: Either net or gross currency amounts are required on the entire purchase order (both can be provided). Depending on type of provided amounts, either net or gross -based invoice matching can be used.", "format": "double", "nullable": true, "example": 1160 }, "currencyCode": { "maxLength": 3, "minLength": 2, "type": "string", "description": "A code that identifies the currency of the total payable amount in the purchase order line. Valid values are in ISO 4217 Alpha format. When empty, the currency from the purchase order is used. It is possible to have different currencies in order lines with different needs like products and transportation costs. Exchange rates for matching are based on the exchange rate date defined in the purchase invoice. Gain/loss is expected based on the difference between rate on receive date and rate on invoice date.", "nullable": true, "example": "USD" }, "matchingMode": { "enum": [ "Standard", "Blanket", "Return", "Service" ], "type": "string", "description": "Specifies how the order row is handled when matching invoice lines to order lines.\r\n'Standard' - Standard matching, based on quantities and sums.\r\n'Blanket' - Matching is based on sum. Quantity is fixed to '1' and is not used in matching. \r\n'Return' - Standard matching with negative unit price. Used when a new PO is needed for matching against returned items. \r\n'Service' - Service PO, are sum based PO's. Quantity is not considered here, default quantity is always 1 in these PO's.", "example": "Standard" }, "isReceiptRequired": { "type": "boolean", "description": "Indicates whether the line item requires receipts. When FALSE, the line item does not require receipts. When TRUE, the system evaluates the received quantity and sum at the time of matching. When field omitted, value gets defaulted to 'false' in P2P. Value 'true' is not allowed with matchingMode = 'Blanket'. For service PO's IsReceiptRequired is mandatory and value must always be true.", "nullable": true, "example": true }, "isReceiptBasedMatching": { "type": "boolean", "description": "Indicates whether the matching takes place with line item or a goods receipt. When FALSE, a matched invoice is associated with the purchase order line and one coding line is generated per matched order line. When TRUE, an invoice is matched with a goods receipt that belongs to the line item and one coding line is generated for each of the goods receipts under the order line. When field omitted, value gets defaulted to 'false' in P2P. For service PO's IsReceiptBasedMatching is mandatory and value must always be true.", "nullable": true, "example": true }, "isOverreceivalAllowed": { "type": "boolean", "description": "Indicates whether over-delivery is allowed for the line item. When FALSE, the system evaluates the matching using the ordered quantity instead of possible higher quantity from receipts.", "nullable": true, "example": false }, "isClosed": { "type": "boolean", "description": "Indicates whether the line item is closed. When TRUE, new receipts are not expected for the order line and matching is possible only with unmatched or partly matched goods receipts that have been recorded to the purchase order earlier. When FALSE, the order line is open for new deliveries and matching. When field omitted, value gets defaulted to 'false' in P2P.", "nullable": true, "example": false }, "isDeleted": { "type": "boolean", "description": "Indicates whether the line item is deleted. If TRUE, the line item has been marked as deleted. Default value: FALSE. Note: This field must have a value if an order line is intended to be matched with an invoice using best-fit recognition methods.", "nullable": true, "example": false }, "isSelfApproved": { "type": "boolean", "description": "Specifies has the PO line bypassed standard requisition approval flow in PO source system before order line has been sent to P2P. If true, approval has been bypassed in PO seource system. Invoices matched to such PO lines can be sent to additional approval in P2P.", "nullable": true, "example": false }, "uom": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Unit of measure of the line item. Valid value is UN/ECE CEFACT Trade Facilitation Recommendation No. 20 common code value represented as string.", "nullable": true, "example": "PCS" }, "subUOM": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Alternative unit of measurement of the line item. Valid value is UN/ECE CEFACT Trade Facilitation Recommendation No. 20 common code value represented as string.", "nullable": true, "example": "G" }, "netPrice": { "type": "number", "description": "The price of the line item excluding tax. Note: Either net or gross currency amounts are required on the entire purchase order (both can be provided). Depending on type of provided amounts, either net or gross -based invoice matching can be used.", "format": "double", "nullable": true, "example": 100 }, "grossPrice": { "type": "number", "description": "The price of the line item including tax. Note: Either net or gross currency amounts are required on the entire purchase order (both can be provided). Depending on type of provided amounts, either net or gross -based invoice matching can be used.", "format": "double", "nullable": true, "example": 116 }, "priceUnit": { "maxLength": 25, "minLength": 0, "type": "string", "description": "The unit by which the line item is sold (boxes, litres, tons, pcs, kg, etc). Reguired when using line-level invoice matching with unit validation.", "nullable": true, "example": "BOX" }, "priceUnitDescription": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Name of the price unit.", "nullable": true, "example": "BOX" }, "taxCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Tax code.", "nullable": true, "example": "VN" }, "taxPercent": { "maximum": 1000000000, "minimum": 0, "type": "number", "description": "Tax percentage.", "format": "double", "nullable": true, "example": 16 }, "taxPercent2": { "type": "number", "description": "Return tax.", "format": "double", "nullable": true, "example": 0 }, "taxSum": { "type": "number", "description": "Tax sum.", "format": "double", "nullable": true, "example": 160 }, "taxSum2": { "type": "number", "description": "Tax sum 2.", "format": "double", "nullable": true }, "invoicedQuantity": { "type": "number", "description": "Quantity that already has been matched from the line item.", "format": "double", "nullable": true, "example": 0 }, "invoicedNetSum": { "type": "number", "description": "Sum that already has been matched, excluding tax.", "format": "double", "nullable": true, "example": 0 }, "invoicedGrossSum": { "type": "number", "description": "Sum that already has been matched, including tax.", "format": "double", "nullable": true, "example": 0 }, "validFrom": { "type": "string", "description": "Date when the validity of the purchase order starts. Valid values are in format: CCYY-MM-DD. If the time zone is known, it must be represented with +hh:mm or -hh:mm or Z (which means UTC). If the time zone is not known, it must be left empty.", "format": "date-time", "nullable": true, "example": "2018-01-01T07:36:13.053Z" }, "validTo": { "type": "string", "description": "Date when the validity of the purchase order ends. Valid values are in format: CCYY-MM-DD. If the time zone is known, it must be represented with +hh:mm or -hh:mm or Z (which means UTC). If the time zone is not known, it must be left empty.", "format": "date-time", "nullable": true, "example": "2018-12-31T07:36:13.053Z" }, "productCode": { "maxLength": 250, "minLength": 0, "type": "string", "description": "A code that identifies the purchased items to the party that is the supplier of the goods/services. This is typically matched to the product code on invoice lines. Required when using line-level invoice matching.", "nullable": true, "example": "1950469687" }, "productName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Name of the product", "nullable": true, "example": "Envelopes A5 - 1000 pce/package" }, "materialGroup": { "maxLength": 250, "minLength": 0, "type": "string", "description": "A code that groups together several materials or services with the same characteristics", "nullable": true, "example": "Communication" }, "globalTradeItemNumber": { "maxLength": 250, "minLength": 0, "type": "string", "description": "The GTIN is a globally unique 14-digit number used to identify trade items, products, or services. Can also be used to match order rows to invoice lines.", "nullable": true, "example": "00012345678905" }, "unspsc": { "maxLength": 25, "minLength": 0, "type": "string", "description": "The United Nations Standard Products and Services Code is a unique 8-digit number used to identify trade items, products, and services. Can also be used to match order rows to invoice lines.", "nullable": true, "example": "44121504" }, "buyerProductCode": { "maxLength": 250, "minLength": 0, "type": "string", "description": "A code that identifies purchased items for internal reporting and communication", "nullable": true, "example": "env0002" }, "contractNumber": { "maxLength": 255, "minLength": 0, "type": "string", "description": "Contract number.", "nullable": true, "example": "123456" }, "description": { "maxLength": 1000, "minLength": 0, "type": "string", "description": "Description of the business document's line item", "nullable": true, "example": "" }, "comment": { "maxLength": 1000, "minLength": 0, "type": "string", "description": "Free-form text pertinent to this document, conveying information that is not contained explicitly in other structures", "nullable": true, "example": "" }, "requestedDeliveryDate": { "type": "string", "description": "Date the goods are to be delivered. Valid values are in format: CCYY-MM-DD. If the time zone is known, it must be represented with +hh:mm or -hh:mm or Z (which means UTC). If the time zone is not known, it must be left empty.", "format": "date-time", "nullable": true, "example": "2018-07-02T07:36:13.053Z" }, "actualDeliveryDate": { "type": "string", "description": "Date the goods are to be delivered. Valid values are in format: CCYY-MM-DD. If the time zone is known, it must be represented with +hh:mm or -hh:mm or Z (which means UTC). If the time zone is not known, it must be left empty.", "format": "date-time", "nullable": true, "example": "2018-07-02T07:36:13.053Z" }, "text1": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Text1-10 are available for customer-specific text fields.", "nullable": true, "example": "" }, "text2": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text3": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text4": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text5": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text6": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text7": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text8": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text9": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text10": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "numeric1": { "type": "number", "description": "Numeric-5 are available for customer-specific numeric fields.", "format": "double", "nullable": true }, "numeric2": { "type": "number", "format": "double", "nullable": true, "example": 0 }, "numeric3": { "type": "number", "format": "double", "nullable": true, "example": 0 }, "numeric4": { "type": "number", "format": "double", "nullable": true, "example": 0 }, "numeric5": { "type": "number", "format": "double", "nullable": true, "example": 0 }, "date1": { "type": "string", "description": "Date1-10 are available for customer-specific date fields.", "format": "date-time", "nullable": true, "example": "2018-07-02T07:36:13.053Z" }, "date2": { "type": "string", "format": "date-time", "nullable": true, "example": "2018-07-02T07:36:13.053Z" }, "date3": { "type": "string", "format": "date-time", "nullable": true, "example": "2018-07-02T07:36:13.053Z" }, "date4": { "type": "string", "format": "date-time", "nullable": true, "example": "2018-07-02T07:36:13.053Z" }, "date5": { "type": "string", "format": "date-time", "nullable": true, "example": "2018-07-02T07:36:13.053Z" }, "orderLineCoding": { "type": "array", "items": { "$ref": "#/components/schemas/OrderLineCodingEntity" }, "description": "Order line coding is used for adding values to coding dimensions. These values will be used by default when producing coding rows on the invoice line(s) matched to this order line. It is applicable for all matching modes (Standard, Blanket, and Return) except Service POs.", "nullable": true }, "goodsReceipts": { "type": "array", "items": { "$ref": "#/components/schemas/GoodsReceiptEntity" }, "description": "Goods receipts indicate whether the ordered goods or services have been received. Goods receipts are required when using goods receipts -based matching.", "nullable": true }, "referenceUsers": { "type": "array", "items": { "$ref": "#/components/schemas/OrderLineUserEntity" }, "description": "Users related to order (buyer, owner, reference person, etc). Note: Not shown in old silverlight based P2P user interface. If this block is sent, userEmail or userExternalCode is required to identify user.", "nullable": true }, "lastUpdated": { "type": "string", "description": "Timestamp when the record was last sent to API. Set automatically.", "format": "date-time" } }, "additionalProperties": false }, "OrderLineResponse": { "required": [ "matchingOrderLines" ], "type": "object", "properties": { "matchingOrderLines": { "type": "array", "items": { "$ref": "#/components/schemas/OrderLineEntity" } } }, "additionalProperties": false }, "OrderLineUserEntity": { "type": "object", "properties": { "userExternalCode": { "maxLength": 36, "minLength": 0, "type": "string", "description": "External code. Either userExternalCode or userEmail is required.", "nullable": true, "example": "6532e1d70e194ff8a193e42beab4a0d9" }, "userEmail": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Email address. Either userExternalCode or userEmail is required.", "nullable": true, "example": "buyer@company.com" }, "userRole": { "enum": [ "Buyer", "Owner", "ReferencePerson", "Other" ], "type": "string", "description": "User role.", "nullable": true, "example": "" }, "lastUpdated": { "type": "string", "description": "Timestamp when the record was last sent to API. Set automatically.", "format": "date-time" } }, "additionalProperties": false }, "OrderResponse": { "required": [ "matchingOrders" ], "type": "object", "properties": { "matchingOrders": { "type": "array", "items": { "$ref": "#/components/schemas/OrderEntity" } } }, "additionalProperties": false }, "OrgBizIdentifier": { "type": "object", "properties": { "country": { "type": "string", "nullable": true }, "schemeId": { "type": "string", "nullable": true }, "uiLabel": { "type": "string", "nullable": true }, "isLegalIdentifier": { "type": "boolean" }, "isRequiredforCountry": { "type": "boolean" }, "description": { "type": "string", "nullable": true } }, "additionalProperties": false, "description": "Organization Business Identifier" }, "OrganizationContextRequest": { "type": "object", "properties": { "externalCode": { "type": "string", "description": "Gets or sets the external code of the organization.", "nullable": true }, "mode": { "type": "string", "description": "Gets or sets the mode for the organization context request.", "nullable": true } }, "additionalProperties": false, "description": "Represents a request for organization context, including external code and mode." }, "OrganizationEntity": { "required": [ "countryCode", "externalCode", "homeCurrency", "organizationCode", "organizationName", "orgTreeLocation", "type" ], "type": "object", "properties": { "externalCode": { "maxLength": 100, "minLength": 1, "pattern": "^[^;:=]*$", "type": "string", "description": "External identifier for the organization element. Used to identify right organization element when the organization element is updated. Needs to be unique within the API. Cannot contain characters : ; =.", "example": "4847-31231212-212121-1212" }, "organizationCode": { "maxLength": 25, "minLength": 1, "type": "string", "description": "Organization code. Must be unique within the tenant. Value cannot be modified after publishing.", "example": "200" }, "organizationName": { "maxLength": 100, "minLength": 1, "type": "string", "description": "Organization name.", "example": "Acme corporation" }, "type": { "enum": [ "Company", "Group", "Unit" ], "type": "string", "description": "Specifies organization element type: 'Group' is a collection point of other organization elements. 'Company' is normally used to represent a legal company. 'OrganizationUnit' is a general element which is usually representing business unit or cost center in system.", "example": "Company" }, "homeCurrency": { "maxLength": 3, "minLength": 3, "type": "string", "description": "Specifies home currency for the organization element. Mandatory when 'type' = 'Company'.", "example": "EUR" }, "countryCode": { "maxLength": 2, "minLength": 0, "type": "string", "description": "Specifies home country for the organization element. Mandatory when 'type' = 'Company'. Value cannot be modified after publishing. Country code is specified in ISO 3166-1 alpha-2 format.", "example": "FI" }, "published": { "type": "boolean", "description": "Determines whether the organization element is a draft (for previewing in Basware Admin) or whether it is published to be available in Basware systems. Organization elements can no longer be removed after publishing. True = published to all systems, False = Draft. Default value: false.", "example": true }, "activeFrom": { "type": "string", "description": "Specifies validity start date for the organization element.", "format": "date-time", "nullable": true, "example": "2022-01-01" }, "activeTo": { "type": "string", "description": "Specifies validity end date for the organization element.", "format": "date-time", "nullable": true, "example": "2026-12-12" }, "description": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Available for additional information or a description regarding the company.", "nullable": true, "example": "" }, "sourceSystem": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Specifies the source system from where the organization element is imported.", "nullable": true, "example": "SAP_1" }, "lastUpdated": { "type": "string", "description": "Timestamp when the record was last updated. This value is set automatically by API when a new/changed record is received.", "format": "date-time" }, "orgTreeLocation": { "$ref": "#/components/schemas/OrganizationTreeLocation" }, "businessIdentifiers": { "type": "array", "items": { "$ref": "#/components/schemas/Identifiers" }, "description": "Company business identifiers. See \"Usage scenario 6: Import companies on Basware API developer site for explanation of available identifier type values. Note: Identifiers are not allowed on 'group' type organization elements.", "nullable": true } }, "additionalProperties": false }, "OrganizationTreeLocation": { "required": [ "parentExternalCode" ], "type": "object", "properties": { "pathToRoot": { "type": "array", "items": { "type": "string" }, "description": "Lists all parent externalCodes on the way to root organization element (set automatically by API).", "nullable": true }, "parentExternalCode": { "minLength": 1, "type": "string", "description": "External code of the parent company. Note: Parent company cannot be changed after the company is published (published = true).", "example": "ROOT" }, "parentCompanyCode": { "type": "string", "description": "Company code of the parent company. This value is set automatically by API.", "nullable": true, "example": "ROOT" }, "level": { "type": "integer", "description": "Specifies how many levels from root node the organization element resides from. This value is set automatically by API based on number of parents on the way to the root node.", "format": "int32", "example": 1 }, "childCount": { "type": "integer", "description": "Count of child organization elements (immediate children) of this organization element. This value is set automatically by API.", "format": "int32", "example": 0 }, "sortPosition": { "type": "integer", "description": "Specifies the sorting position for organization elements under the same parent element. Used for placement of the company within the organization tree in UI.", "format": "int32", "example": 3 } }, "additionalProperties": false, "description": "Speficies the organization element's position within the organization tree." }, "Owner": { "type": "object", "properties": { "personCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Person code.", "nullable": true, "example": "22110" }, "userName": { "maxLength": 227, "minLength": 0, "type": "string", "description": "User name.", "nullable": true, "example": "Liz Green" }, "loginAccount": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Login account.", "nullable": true, "example": "company\\\\lizgreen" }, "emailAddress": { "maxLength": 320, "minLength": 0, "pattern": "^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*)@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])$", "type": "string", "description": "Email address.", "nullable": true, "example": "liz.green@company.com" }, "externalCode": { "maxLength": 50, "minLength": 0, "type": "string", "description": "External code.", "nullable": true, "example": "908123lkhjhdsai213io7" } }, "additionalProperties": false, "description": "Specifies owner for the order / requisition. Owner is by default same person as creator, unless manually changed." }, "ParentEntity": { "required": [ "parentCodes", "parentType" ], "type": "object", "properties": { "parentType": { "maxLength": 100, "minLength": 1, "type": "string", "example": "Department" }, "parentCodes": { "type": "array", "items": { "type": "string" } }, "parents": { "type": "array", "items": { "$ref": "#/components/schemas/ParentEntity" }, "nullable": true } }, "additionalProperties": false }, "PaymentResponseEntity": { "required": [ "externalCode", "paymentBlock", "success" ], "type": "object", "properties": { "externalCode": { "maxLength": 36, "minLength": 1, "type": "string", "description": "External identifier that is used as a key in API. External code of the paymentResponse needs to be unique within an accountingDocument -record. You should always create a new externalCode when sending response, there is no overwriting/editing of previous response. This will enable the visibility that all responses are tracked in API. ExternalCode in response messages plays no role in P2P (other than it is used in communication between P2P and the API layer).", "example": "f24fff19120445de9c23651434129991" }, "success": { "type": "boolean", "description": "Indicates a succesful response from ERP. Needs to be 'true' for P2P to update invoice data field contents.", "example": true }, "responseMessage": { "maxLength": 250, "minLength": 0, "type": "string", "description": "This message is stored to P2P invoice action log.", "nullable": true, "example": "Invoice Paid." }, "sourceSystem": { "maxLength": 32, "minLength": 0, "type": "string", "description": "Indicates the system that is returning payment response.", "nullable": true, "example": "ERP1" }, "paymentDate": { "type": "string", "description": "Date when the invoice was paid can be updated here.", "format": "date-time", "nullable": true }, "paymentTermCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Invoice payment term code can be updated here.", "nullable": true, "example": "7D2-NT30" }, "paymentBlock": { "type": "boolean", "description": "Payment block.", "example": false }, "paymentMethod": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Payment method can be updated here.", "nullable": true, "example": "BankTransfer" }, "paidTotal": { "type": "number", "description": "Total amount paid for the invoice so far. For partial payments, this value will increase each time more of the invoice is paid.", "format": "double", "nullable": true, "example": 1136.8 }, "cashDiscount": { "type": "number", "description": "discount amount can be updated here.", "format": "double", "nullable": true, "example": 23.2 }, "checkNumber": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Unique identifier from the check used in payment transaction.", "nullable": true, "example": "123456012" }, "paymentMessage": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Payment message can be updated here.", "nullable": true, "example": "" }, "paymentNumber": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Payment number can be updated here.", "nullable": true, "example": "122447-55257552" }, "paymentDocument": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Payment document number can be updated here.", "nullable": true, "example": "873326806" }, "paymentReversalDocument": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Payment reversal document can be updated here.", "nullable": true, "example": "873326806" } }, "additionalProperties": false }, "PaymentTermCompanyEntity": { "required": [ "active", "companyCode", "inherit" ], "type": "object", "properties": { "companyCode": { "maxLength": 32, "minLength": 1, "type": "string", "description": "The payment term for different suppliers is attached to this company code.", "example": "BW01" }, "inherit": { "type": "boolean", "description": "The value defines whether the payment is inherited to lower organization units in the organization structure." }, "active": { "type": "boolean", "description": "This flag will enable the data to be visible on UI, provided if the value is true, not visible in case of value is false. It will be also used for soft delete.", "example": true } }, "additionalProperties": false }, "PaymentTermDiscountRule": { "required": [ "active", "externalCode" ], "type": "object", "properties": { "externalCode": { "maxLength": 36, "minLength": 1, "type": "string", "description": "External code is a unique code for the payment term's discount rules.", "example": "c9921a52-6d8b-1017-cb8c-923d" }, "discountDays": { "maximum": 2147483647, "minimum": 0, "type": "integer", "description": "Defines number of days used in dynamic cash discount. The number of days must be unique for each discount percentage.", "format": "int32", "nullable": true, "example": 21 }, "discountPercent": { "maximum": 1000000000, "minimum": 0, "type": "number", "description": "Defines the discount percentage that the supplier offers for the buyer for early cash payments", "format": "double", "nullable": true, "example": 1 }, "active": { "type": "boolean", "description": "This flag will enable the data to be visible on UI, provided if the value is true, not visible in case of value is false. It will be also used for soft delete.", "example": false } }, "additionalProperties": false }, "PaymentTermEntity": { "required": [ "companies", "externalCode", "paymentTermCode", "paymentTermNames", "validFrom", "validTo" ], "type": "object", "properties": { "paymentTermCode": { "maxLength": 25, "minLength": 1, "type": "string", "description": "Specifies code for the payment term.", "example": "NT60" }, "paymentTermNames": { "type": "array", "items": { "$ref": "#/components/schemas/LanguageTranslationEntity" }, "description": "Defines name(s) for the payment term. Please always include 'en-US' language tag for Basware global support, as well as any local-language tag being used. If both translations are not available, please use the same string with both language tags." }, "sortOrder": { "maximum": 2147483647, "minimum": 0, "type": "integer", "description": "Specifies position of a payment term in selection list.", "format": "int32", "nullable": true, "example": 8 }, "moveDueDatesTo": { "pattern": "0|1|2", "type": "string", "description": "Specifies whether to move due date and cash date to next/previous working day (in case due date occurs during weekend). \r\n0 = Do not move due date.\r\n1 = Move to next working day.\r\n2 = Move to previous working day.", "nullable": true, "example": "0" }, "dueDateCalc": { "pattern": "0|1", "type": "integer", "description": "Specifies due date calculation method. \r\n1 = Due date is calculated automatically according to rules specified in this payment term. \r\n0 = Due date is entered manually (no automatic calculation).", "format": "int32", "nullable": true, "example": 1 }, "dueDateDays": { "maximum": 2147483647, "minimum": 0, "type": "integer", "description": "Used in due date calculation. Specifies number of days to be added to the base date.", "format": "int32", "nullable": true, "example": 60 }, "dueDateDays2": { "maximum": 2147483647, "minimum": 0, "type": "integer", "description": "Used in due date calculation. Specifies the amount of days to be added after month-end -moves.", "format": "int32", "nullable": true, "example": 0 }, "dueDateEom": { "maximum": 2147483647, "minimum": 0, "type": "integer", "description": "Accepts integer values from 0 to 12 only.\r\nUsed in due date calculation. Specifies number of month-ends to be added to due date. Month-ends are added after adding dueDateDays to base calculation date.\r\n0 = Date not moved to end of month.\r\n1 = Date is moved to end of month\r\n2 = Date is moved to end of next month \r\n3 = Date is moved in following way: Add 2 full months, then move date to end of resulting month. \r\nn = Date is moved in following way: Add (n-1) full months, then move date to end of resulting month.", "format": "int32", "nullable": true, "example": 0 }, "cashDueDateCalc": { "pattern": "0|1|2", "type": "integer", "description": "Specifies cash date calculation method.\r\n0 = Cash date is entered manually (no calculation)\r\n1 = Calculate cash date (accorging to rules specified on this payment term)\r\n2 = Calculate dynamic cash date and cash discount (specified in paymentTermDiscountRules -block)", "format": "int32", "nullable": true, "example": 2 }, "cashDueDateDays": { "maximum": 2147483647, "minimum": 0, "type": "integer", "description": "Used in cash date calculation. Specifies number of days to be added to the base date.", "format": "int32", "nullable": true, "example": 21 }, "cashDueDateDays2": { "maximum": 2147483647, "minimum": 0, "type": "integer", "description": "Used in cash date calculation. Specifies the amount of days to be added after month-end -moves.", "format": "int32", "nullable": true, "example": 0 }, "cashDueDateEom": { "maximum": 2147483647, "minimum": 0, "type": "integer", "description": "Accepts integer values from 0 to 12 only.\r\nUsed in cash date calculation. Specifies number of month-ends to be added to cash date. Month-ends are added after adding dueDateDays to base calculation date.\r\n0 = Date not moved to end of month.\r\n1 = Date is moved to end of month\r\n2 = Date is moved to end of next month \r\n3 = Date is moved in following way: Add 2 full months, then move date to end of resulting month. \r\nn = Date is moved in following way: Add (n-1) full months, then move date to end of resulting month.", "format": "int32", "nullable": true, "example": 0 }, "cashDiscount": { "maximum": 1000000000, "minimum": 0, "type": "number", "description": "Defines the discount percentage. This amount of discount is received if invoice is paid by cash date.", "format": "double", "nullable": true, "example": 1 }, "validFrom": { "type": "string", "description": "Defines the date when the payment term's validity period starts.", "format": "date-time", "example": "2015-01-01" }, "validTo": { "type": "string", "description": "Defines the date when the payment term's validity period ends.", "format": "date-time", "example": "2016-01-02" }, "companies": { "type": "array", "items": { "$ref": "#/components/schemas/PaymentTermCompanyEntity" }, "description": "List of company units to associate paymentterm to P2P organization hierarchy" }, "paymentTermDiscountRules": { "type": "array", "items": { "$ref": "#/components/schemas/PaymentTermDiscountRule" }, "description": "PaymentTermDiscountRules can be used to specify multiple cash discount dates. Data is imported to \"Calculate cynamic cash date and cash discount\" -section in P2P. \r\nTo enable cash discount calculation using these rules, 'cashDueDateCalc' must be set to 2. When enabled, overrides the standard cash date calculation -fields cashDiscount, cashDueDateDays and cashDueDateDays2.\r\nPaymentTermDiscountRules -block is used and mandatory only when 'cashDueDateCalc' is set to 2.", "nullable": true }, "externalCode": { "maxLength": 36, "minLength": 1, "type": "string", "description": "External identifier that is used as a key in API.", "example": "4847-31231212-212121-1212" }, "lastUpdated": { "type": "string", "description": "Timestamp when the record was last sent to API. Set automatically.", "format": "date-time" } }, "additionalProperties": false }, "PaymentTermResponse": { "required": [ "paymentTerms" ], "type": "object", "properties": { "paymentTerms": { "type": "array", "items": { "$ref": "#/components/schemas/PaymentTermEntity" } } }, "additionalProperties": false }, "PrebookResponseEntity": { "required": [ "externalCode", "paymentBlock", "responseMessage", "success" ], "type": "object", "properties": { "externalCode": { "maxLength": 36, "minLength": 1, "type": "string", "description": "External identifier", "example": "ff842a95dbb445b8bb3dcb4d53e51f44" }, "success": { "maxLength": 250, "minLength": 1, "type": "boolean", "description": "Specifies if the invoice was succesfully prebooked to ERP system (true = invoice successfully prebooked, false = prebook failed). Note that if success = false, only the responseMessage and prebook status are saved to the invoice. Other fields, such as the voucher numbers or paymentBlock, are not updated.", "example": true }, "responseMessage": { "maxLength": 250, "minLength": 1, "type": "string", "description": "Informative message for P2P user regarding the prebook. If prebook failed, please indicate reason for failure in this message. This message is shown in invoice action log.", "example": "Prebooked to ERP" }, "sourceSystem": { "maxLength": 32, "minLength": 0, "type": "string", "description": "Indicates the system that is returning prebook response.", "nullable": true, "example": "ERP1" }, "voucherNumber1": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Available for returning voucher number from ERP system. Voucher number is saved onto the invoice in P2P.", "nullable": true, "example": "114785224" }, "voucherNumber2": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Available for returning second voucher number from ERP system. Voucher number 2 is saved onto the invoice in P2P.", "nullable": true, "example": "774785220" }, "prebookDate": { "type": "string", "description": "Prebook date. Note: Field is not saved to P2P (P2P saves the moment when prebook response message arrives).", "format": "date-time", "nullable": true }, "paymentBlock": { "type": "boolean", "description": "Available for indicating if invoice has been set to payment blocked -state by the receiving ERP system. Saved onto the invoice in P2P.", "example": false } }, "additionalProperties": false }, "ProcessedItem": { "type": "object", "properties": { "externalCode": { "type": "string", "description": "ExternalCode of the processed record.", "nullable": true, "example": "aedf21df912ebc89123687cgh181ea4" }, "parentExternalCode": { "type": "string", "description": "ExternalCode of the parent record, if applicable. For example, for accounting document responses we will provide InvoiceID in this field.", "nullable": true }, "status": { "enum": [ "InProgress", "NotProcessed", "Warning", "Success", "Error", "RecordExpired", "Unpublished" ], "type": "string", "description": "Status of the processed record. \r\n* InProgress: Record is still being processed. \r\n* NotProcessed: Record skipped due to no changes from previous version of the record. \r\n* Warning: Record saved with warning(s). Some data on the record may not be saved. Example: One or more user group(s) indicated on user record not found in P2P. User was saved, missing user groups were omitted. \r\n* Success: Record succesfully saved (no errors/warnings). \r\n* Error: Error processing the record. \r\n* RecordExpired: More recent version of the record has been posted to API. Skipped this version since only the more recent version will be saved. This usually requires the same record to have been updated two or more times within less than a second.\r\n* Unpublished: Record is in draft status ('published' = 'false') and is not distributed to any target system. This status is used only with organizations API (coming soon).", "example": "Error" }, "errors": { "type": "array", "items": { "$ref": "#/components/schemas/ProcessedItemErrorDetail" }, "nullable": true } }, "additionalProperties": false }, "ProcessedItemErrorDetail": { "type": "object", "properties": { "type": { "enum": [ "Error", "Warning", "RecordExpired" ], "type": "string", "description": "Mesage type.\r\n* Error: Error processing the record. \r\n* Warning: Record saved with warning(s). Some data on the record may not be saved. Example: One or more user group(s) indicated on user record not found in P2P. User was saved, missing user groups were omitted.\r\n* RecordExpired: More recent version of the record has been posted to API. Skipped this version since only the more recent version will be saved. This usually requires the same record to have been updated two or more times within less than a second.", "example": "Error" }, "message": { "type": "string", "description": "Error message.", "nullable": true, "example": "Record skipped due to wrong or missing CompanyCode" }, "category": { "enum": [ "Unknown", "Technical", "DataValidation" ], "type": "string", "description": "Error category.\r\n* DataValidation: Data validation error. Typically correctable by customr through correcting an error in the data payload sent by customer.\r\n* Technical: Technical error. These typically require an intervention from Basware. \r\n* Unknown: Error category not identified.", "example": "Data validation" } }, "additionalProperties": false }, "ProcessingStatusGetBatchRequest": { "type": "object", "properties": { "requestIds": { "type": "array", "items": { "type": "string" }, "description": "List of requestIds to acknowledge. Several requests can be acknowledged in one operation.", "nullable": true } }, "additionalProperties": false }, "ProjectCompanyEntity": { "required": [ "active", "companyCode" ], "type": "object", "properties": { "companyCode": { "maxLength": 32, "minLength": 1, "type": "string", "description": "Defines the company code that the project is mapped to. You can map many projects to one company.", "example": "BW01" }, "active": { "type": "boolean", "description": "This flag will enable the data to be visible on UI, provided if the value is true, not visible in case of value is false. It will be also used for soft delete.", "example": true } }, "additionalProperties": false }, "ProjectEntity": { "required": [ "companies", "externalCode", "projectCode", "projectNames", "validFrom", "validUntil" ], "type": "object", "properties": { "projectCode": { "maxLength": 25, "minLength": 1, "type": "string", "description": "Defines a code for the project that is mapped with the organization. The code is used when creating purchase requisitions, purchase orders, and invoice coding.", "example": "677020A" }, "projectNames": { "type": "array", "items": { "$ref": "#/components/schemas/LanguageTranslationEntity" }, "description": "Defines name(s) for the project. Please always include 'en-US' language tag for Basware global support, as well as any local-language tag being used. If both translations are not available, please use the same string with both language tags." }, "description": { "maxLength": 500, "minLength": 0, "type": "string", "description": "Defines a project description that is shown when a user selects the project", "nullable": true, "example": "Test Project 1" }, "validFrom": { "type": "string", "description": "Specifies the date when the project validity starts. Needs to be after '2001-01-01'.", "format": "date-time", "example": "2021-01-01" }, "validUntil": { "type": "string", "description": "Specifies the date when the project validity ends", "format": "date-time", "example": "2022-06-30" }, "companies": { "type": "array", "items": { "$ref": "#/components/schemas/ProjectCompanyEntity" }, "description": "List of company units to associate project to P2P organization hierarchy" }, "externalCode": { "maxLength": 36, "minLength": 1, "type": "string", "description": "External identifier that is used as a key in API.", "example": "4847-31231212-212121-1212" }, "lastUpdated": { "type": "string", "description": "Timestamp when the record was last sent to API. Set automatically.", "format": "date-time" } }, "additionalProperties": false }, "ProjectEntityV2": { "required": [ "companies", "externalCode", "projectCode", "projectName", "validFrom", "validUntil" ], "type": "object", "properties": { "projectCode": { "maxLength": 25, "minLength": 1, "type": "string", "description": "Defines a code for the project that is mapped with the organization. The code is used when creating purchase requisitions, purchase orders, and invoice coding.", "example": "677020A" }, "projectName": { "maxLength": 100, "minLength": 1, "type": "string", "description": "Defines name for the project.", "example": "Chicago warehouse renewal" }, "description": { "maxLength": 500, "minLength": 0, "type": "string", "description": "Defines a project description that is shown when a user selects the project", "nullable": true, "example": "Upgrade to support robot logistics" }, "validFrom": { "type": "string", "description": "Specifies the date when the project validity starts", "format": "date-time", "example": "2017-01-01" }, "validUntil": { "type": "string", "description": "Specifies the date when the project validity ends", "format": "date-time", "example": "2018-01-01" }, "companies": { "type": "array", "items": { "$ref": "#/components/schemas/ProjectCompanyEntity" }, "description": "List of company units to associate project to P2P organization hierarchy" }, "externalCode": { "maxLength": 36, "minLength": 1, "type": "string", "description": "External identifier that is used as a key in API.", "example": "4847-31231212-212121-1212" }, "lastUpdated": { "type": "string", "description": "Timestamp when the record was last sent to API. Set automatically.", "format": "date-time" } }, "additionalProperties": false }, "ProjectResponse": { "required": [ "projects" ], "type": "object", "properties": { "projects": { "type": "array", "items": { "$ref": "#/components/schemas/ProjectEntity" } } }, "additionalProperties": false }, "ProjectResponseV2": { "required": [ "projects" ], "type": "object", "properties": { "projects": { "type": "array", "items": { "$ref": "#/components/schemas/ProjectEntityV2" } } }, "additionalProperties": false }, "PublishOrganisationRequest": { "type": "object", "properties": { "externalcodes": { "type": "array", "items": { "type": "string" }, "nullable": true }, "changedBy": { "type": "string", "nullable": true }, "publishDraftChildrenOnly": { "type": "boolean", "nullable": true } }, "additionalProperties": false }, "PurchaseGoodsReceiptEntity": { "required": [ "externalCode", "externalGRNumber", "lineReceivings", "orderExternalCode", "receiveDate", "receiver" ], "type": "object", "properties": { "externalCode": { "maxLength": 100, "minLength": 1, "type": "string", "description": "GR document external code. External identifier that is used as a key in API. Identifies goods receipt for updates through API.", "example": "4847-31231212-212121-1212" }, "externalGRNumber": { "maxLength": 100, "minLength": 1, "type": "string", "description": "Goods receipt document number in the system from which it is being imported.", "example": "GR123652138" }, "orderExternalCode": { "maxLength": 100, "minLength": 1, "type": "string", "description": "External code of the order for which goods/services are being received. Needs to match with 'externalCode' in exportedPurchaseOrders API.", "example": "ERP1_PO1234233267" }, "processingStatus": { "enum": [ "ImportInProgress", "Imported", "ImportFailed" ], "type": "string", "description": "Processing status of the goods receipt (set automatically by Basware API).", "example": "ImportInProgress" }, "receiveDate": { "type": "string", "description": "Date on which goods have been received.", "format": "date-time", "example": "2020-10-24T00:00:00" }, "referenceGRDocumentExternalCode": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Indicates a return/cancellation for an earlier receipt. In such case, 1) this field needs to contain value of 'externalCode' field of the original goods receipt document and 2) lineReceivings need to contain referenceGRLineExternalCodes, 3) receivedQuantity is expected to be negative.", "nullable": true, "example": "" }, "deliveryNoteNumber": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Reference to the delivery note this delivery relates to.", "nullable": true, "example": "D128735871" }, "lastUpdated": { "type": "string", "description": "Timestamp when the record was last updated in API. Set automatically.", "format": "date-time" }, "receiver": { "$ref": "#/components/schemas/GoodsReceiver" }, "lineReceivings": { "type": "array", "items": { "$ref": "#/components/schemas/GoodsReceiptLine" }, "description": "List of individual goods receipt lines." } }, "additionalProperties": false }, "PurchaseGoodsReceiptResponse": { "required": [ "goodsReceipts" ], "type": "object", "properties": { "goodsReceipts": { "type": "array", "items": { "$ref": "#/components/schemas/PurchaseGoodsReceiptEntity" } } }, "additionalProperties": false }, "PurchaseGoodsReceiptStatusUpdateRequest": { "required": [ "processingStatus" ], "type": "object", "properties": { "processingStatus": { "enum": [ "ImportInProgress", "Imported", "ImportFailed" ], "type": "string", "description": "Invoice status to update" } }, "additionalProperties": false }, "PurchaseManagerModuleAccess": { "type": "object", "properties": { "purchasing": { "type": "boolean", "description": "Whether user has access to Purchase Manager module or not." }, "travel": { "type": "boolean", "description": "Whether user has access to Travel & Expense module or not.", "example": false }, "spendManager": { "type": "boolean", "description": "Whether user has access to Spend Manager module or not.", "example": false }, "assets": { "type": "boolean", "description": "Whether user has access to Asset Manager module or not.", "example": false }, "budgets": { "type": "boolean", "description": "Whether user has access to Budget Manager module or not.", "example": false } }, "additionalProperties": false, "description": "Module access in Purchase Manager. Not used in Basware P2P." }, "PurchaseManagerUserLocations": { "type": "object", "properties": { "shipToCode": { "maxLength": 100, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "shipToName": { "maxLength": 100, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "billToCode": { "maxLength": 100, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "billToName": { "maxLength": 100, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "chargeToCode": { "maxLength": 100, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "chargeToName": { "maxLength": 100, "minLength": 0, "type": "string", "nullable": true, "example": "" } }, "additionalProperties": false, "description": "User default locations in Purchase Manager. Not used in Basware P2P." }, "PurchaseOrderEntity": { "required": [ "externalCode", "extOrderNumber", "extRequisitionNumber" ], "type": "object", "properties": { "externalCode": { "maxLength": 100, "minLength": 1, "type": "string", "description": "External identifier that is used as a key in API.", "example": "4847-31231212-212121-1212" }, "extOrderNumber": { "maxLength": 100, "minLength": 1, "type": "string", "description": "Order number in external system", "example": "PO1235876123" }, "extRequisitionNumber": { "maxLength": 100, "minLength": 1, "type": "string", "description": "Requisition number of related requisition in external system (for imported requisitions).", "example": "REQ21037756" }, "processingStatus": { "enum": [ "Uncompleted", "ReadyForImport", "ImportInProgress", "Imported", "ImportFailed" ], "type": "string", "description": "Processing status of the order in Basware API. Enables importing orders with > 200 lines. Possible values to POST by API user: 1) 'Uncompleted' - Order will not be imported to P2P and more lines can be added using PATCH method. 2) 'ReadyForImport' - Order will now be imported to P2P, no more lines can be sent. Default Value: 'Uncompleted'. After starting import, processingStatus changes automatically to 'ImportInProgress' and 'Imported' / 'ImportFailed' to indicate updated import status.", "nullable": true, "example": "ReadyForImport" }, "organizationUnitCode": { "maxLength": 32, "minLength": 0, "type": "string", "description": "P2P company code for buyer organisation unit. Either 'organizationUnitCode' or 'organizationIdentifier' is required.", "nullable": true, "example": "BE100" }, "organizationIdentifier": { "maxLength": 32, "minLength": 0, "type": "string", "description": "Organization identifier for buyer organisation unit. Needs to match with what is configured on the organization unit in P2P. Either 'organizationUnitCode' or 'organizationIdentifier' is required.", "nullable": true, "example": "0037321832176" }, "purchasingGroupCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Purchasing group code.", "nullable": true, "example": "" }, "purchasingGroupName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Purchasing group name.", "nullable": true, "example": "" }, "purpose": { "maxLength": 2000, "minLength": 0, "type": "string", "description": "Reason why order is placed.", "nullable": true, "example": "Goods for Project X" }, "noteToSupplier": { "maxLength": 2000, "minLength": 0, "type": "string", "description": "This note is included when order is sent to supplier.", "nullable": true, "example": "" }, "validityPeriodStartDate": { "type": "string", "description": "Used only if the order type is blanket to specify the start date for blanket purchase order validity period (date format: yyyy-MM-dd).", "format": "date-time", "nullable": true, "example": "" }, "validityPeriodEndDate": { "type": "string", "description": "Used only if the order type is blanket to specify the end date for blanket purchase order validity period (date format: yyyy-MM-dd).", "format": "date-time", "nullable": true, "example": "" }, "desiredDeliveryDate": { "type": "string", "description": "Delivery date requested by buyer.", "format": "date-time", "nullable": true, "example": "2020-10-24T00:00:00" }, "desiredDeliveryEndDate": { "type": "string", "description": "Buyer requested latest delivery date.", "format": "date-time", "nullable": true, "example": "2020-10-24T00:00:00" }, "deliveryInstruction": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Delivery instruction to supplier (shown on header). Here users can provide free-text information in addition to deliveryTerm and deliveryLocation.", "nullable": true, "example": "" }, "classification": { "maxLength": 250, "minLength": 0, "type": "string", "description": "\"Order classification code. Values can be specified by customer. Often used to group orders and assign different groups to be handled to different persons.", "nullable": true, "example": "" }, "contractNumber": { "maxLength": 255, "minLength": 0, "type": "string", "description": "Specifies contract which this order relates to.", "nullable": true, "example": "CON2198763" }, "orderType": { "enum": [ "Standard", "Blanket" ], "type": "string", "nullable": true }, "supplierCode": { "maxLength": 32, "minLength": 1, "type": "string", "description": "Supplier code to whom the order is addressed.", "nullable": true, "example": "321687" }, "supplierName": { "maxLength": 255, "minLength": 0, "type": "string", "description": "Supplier name to whom the order is addressed.", "nullable": true, "example": "ACME supplier ltd." }, "ownerOrderingEmail": { "maxLength": 1800, "minLength": 0, "pattern": "^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*)@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])$", "type": "string", "description": "Contact email to which supplier can send questions about the order. Note: When order is sent to supplier, it is not sent to this email. Note: Fields visible on the order sent to supplier are configured in P2P Purchase.", "nullable": true, "example": "john.smith@buyer.com" }, "supplierOrderingEmail": { "maxLength": 1800, "minLength": 0, "pattern": "^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*)@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])$", "type": "string", "description": "The email address(es) where the order is sent to when sending order to supplier. Can contain multiple email addresses separated by semicolon.", "nullable": true, "example": "Mark@supplier.com" }, "otherOrderingEmail": { "pattern": "^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*)@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])$", "type": "string", "description": "The email address(es) where the order is sent by P2P purchase. Can contain multiple email addresses separated by semicolon. The order is sent to these addresses when orderRecipientType is 'Owner' or 'Both'.", "nullable": true, "example": "Mark@supplier.com" }, "paymentTermCode": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Order payment term code.", "nullable": true, "example": "30N" }, "paymentTermName": { "maxLength": 2000, "minLength": 0, "type": "string", "description": "Order payment term name.", "nullable": true, "example": "30 Days Net" }, "releaseOrdersRequired": { "type": "boolean", "description": "Used only if the order type is blanket to specify, if the blanket order requires release orders.", "nullable": true, "example": false }, "hidePricesFromSupplier": { "type": "boolean", "description": "Specifies, if all price information is hidden from the supplier in the outgoing order.", "nullable": true, "example": false }, "attachPdfToNetworkOrder": { "type": "boolean", "description": "Specifies if order is attached as pdf file when order is sent to supplier through Basware network.", "example": true }, "orderRecipientType": { "enum": [ "Supplier", "Owner", "SupplierAndOwner" ], "type": "string", "description": "Determines who order is sent to.\r\n-Supplier(0) : Order is sent only to supplier.\r\n-If orderingMethod is email, order is sent to the email indicated by 'supplierOrderingEmail'. -If orderingMethod is network, the order is sent through Basware network.\r\n-Owner (1): Order is sent only to email address(es) indicated by field 'otherOrderingEmail'. Used for example when goods were picked up from a store and no order needs to be sent to supplier.\r\n-Both (2): Order is sent to both supplier and email addresses indicated by field 'otherOrderingEmail'. Order delivery method to supplier is determined by orderingMethod, same as above.", "nullable": true, "example": "Supplier" }, "deliveryLocation": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Details on Delivery", "nullable": true, "example": "" }, "deliveryTerm": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Delivery term. Generally Incoterms (International Commercial Terms) are used here, however customer and supplier can also agree to use different sets of delivery terms.", "nullable": true, "example": "Supplier to Buyer via Post" }, "deliveryReceivers": { "type": "array", "items": { "$ref": "#/components/schemas/PurchaseOrderUserEntity" }, "description": "List of people who will get GR -task in Purchase for this order. The users specified needs to have appropriate permission to P2P to receive goods. Each entry must uniquely identify a user. Identifiers are applied in following order: 1) externalCode, 2) loginAccount, 3) emailAddress. This is a list with max. 20 items.", "nullable": true }, "purchaseCurrency": { "maxLength": 25, "minLength": 1, "type": "string", "description": "Currency code for currency in which the order is placed.", "nullable": true, "example": "USD" }, "headerDataDate1": { "type": "string", "description": "HeaderDataDate1-5: Can be used for customer-specific date fields.", "format": "date-time", "nullable": true, "example": "" }, "headerDataDate2": { "type": "string", "format": "date-time", "nullable": true, "example": "" }, "headerDataDate3": { "type": "string", "format": "date-time", "nullable": true, "example": "" }, "headerDataDate4": { "type": "string", "format": "date-time", "nullable": true, "example": "" }, "headerDataDate5": { "type": "string", "format": "date-time", "nullable": true, "example": "" }, "headerDataNum1": { "type": "number", "description": "HeaderDataNum1-5: Can be used for customer-specific numeric fields.", "format": "double", "nullable": true }, "headerDataNum2": { "type": "number", "format": "double", "nullable": true }, "headerDataNum3": { "type": "number", "format": "double", "nullable": true }, "headerDataNum4": { "type": "number", "format": "double", "nullable": true }, "headerDataNum5": { "type": "number", "format": "double", "nullable": true }, "headerDataText1": { "maxLength": 250, "minLength": 0, "type": "string", "description": "HeaderDataText1-5: Can be used for customer-specific numeric fields.", "nullable": true, "example": "" }, "headerDataText2": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "headerDataText3": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "headerDataText4": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "headerDataText5": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "lastUpdated": { "type": "string", "description": "Timestamp when the record was last sent to API. Set automatically.", "format": "date-time" }, "owner": { "$ref": "#/components/schemas/PurchaseOrderUserEntity" }, "receiverToContact": { "$ref": "#/components/schemas/PurchaseOrderUserEntity" }, "lines": { "type": "array", "items": { "$ref": "#/components/schemas/PurchaseOrderLineEntity" }, "description": "Purchase order lines. Notes: \r\n1. Row count needs to be min 1 and max 200. At least one of the rows needs to have quantity > 0. \r\n2. An order needs to have at least non-refund line. \r\n3. If you need to import an order with more than 100 lines, this can be done by setting ‘processingStatus’ to ‘Uncompleted’ when POSTing the purchaseOrder and then adding additional lines to it using the PATCH method.", "nullable": true }, "deliveryAddress": { "$ref": "#/components/schemas/DeliveryAddress" } }, "additionalProperties": false }, "PurchaseOrderLineEntity": { "required": [ "categoryCode", "externalCode", "extOrderLineNumber", "priceType", "unitPrice" ], "type": "object", "properties": { "externalCode": { "maxLength": 100, "minLength": 1, "type": "string", "description": "Unique external identifier that is used as a key in API. Identifies order line for updates through API.", "example": "060cb8ea-5464-11ea-a38b-2e728ce88123\"" }, "extOrderLineNumber": { "maxLength": 100, "minLength": 1, "type": "string", "description": "Order line number in customer system.", "example": "1" }, "categoryCode": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Category code linked to product", "example": "007" }, "buyerProductCode": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Product code used by buyer.", "nullable": true, "example": "ProjectLaptops100" }, "supplierProductCode": { "maxLength": 50, "minLength": 0, "type": "string", "description": "Product code used by supplier.", "nullable": true, "example": "912736320" }, "supplierProductName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Product name used by supplier.", "nullable": true, "example": "Developer laptop, 15 inch" }, "manufacturerProductCode": { "maxLength": 255, "minLength": 0, "type": "string", "description": "Manufacturer product code is an identification number supplied by a manufacturer to uniquely identify products that aren't easily distinquishable from one another. It allows consumers to search for the exact product they need without any technical knowledge. Commonly used for example with automotive or electronics replacement parts. Required P2P 23.10 or later.", "nullable": true, "example": "ManufacturerProductCode" }, "description": { "maxLength": 2000, "minLength": 0, "type": "string", "description": "Product description.", "nullable": true, "example": "Developer laptop, 15 inch, model MK2160" }, "leadTime": { "maxLength": 255, "minLength": 0, "type": "string", "description": "Specifies how soon after receiving order the supplier usually is able to deliver the goods. Informative field.", "nullable": true, "example": "" }, "desiredDeliveryDate": { "type": "string", "description": "Delivery date requested by buyer.", "format": "date-time", "nullable": true, "example": "2020-10-24T00:00:00" }, "desiredDeliveryEndDate": { "type": "string", "description": "Buyer requested end date for delivery.", "format": "date-time", "nullable": true, "example": "2020-10-24T00:00:00" }, "allowPartialDeliveries": { "type": "boolean", "description": "Specifies whether the goods need to be delivered in one batch.", "example": false }, "additionalInfo": { "maxLength": 2000, "minLength": 0, "type": "string", "description": "Free-text field for additional notes regarding order line. Sent to vendor along with the order.", "nullable": true, "example": "one year" }, "receiveAutomatically": { "type": "boolean", "description": "Specifies if order line will be received automatically. \r\nTrue - Order line will be automatically received(no user input required)\r\nFalse - Order line will not be automatically received.", "example": false }, "deliveryInstruction": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Delivery instruction for supplier.", "nullable": true, "example": "Must be delivered before 17:00" }, "plant": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Plant.", "nullable": true, "example": "" }, "storageLocation": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Storage location.", "nullable": true, "example": "" }, "unspsc": { "maxLength": 64, "minLength": 0, "type": "string", "description": "Product classification code (UNSPC).", "nullable": true, "example": "" }, "grNote": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Note for receiving goods.", "nullable": true, "example": "" }, "lineDataDate1": { "type": "string", "description": "LineDataDate1-5 can be used for customer-specific date fields. This data will go to ‘Line data’ -tab of the order line in P2P.", "format": "date-time", "nullable": true, "example": "2020-10-24T00:00:00" }, "lineDataDate2": { "type": "string", "format": "date-time", "nullable": true, "example": "" }, "lineDataDate3": { "type": "string", "format": "date-time", "nullable": true, "example": "" }, "lineDataDate4": { "type": "string", "format": "date-time", "nullable": true, "example": "" }, "lineDataDate5": { "type": "string", "format": "date-time", "nullable": true, "example": "" }, "lineDataNum1": { "type": "number", "description": "LineDataNum1-5 can be used for customer-specific numeric fields. This data will go to ‘Line data’ -tab of the order line in P2P.", "format": "double", "nullable": true }, "lineDataNum2": { "type": "number", "format": "double", "nullable": true }, "lineDataNum3": { "type": "number", "format": "double", "nullable": true }, "lineDataNum4": { "type": "number", "format": "double", "nullable": true }, "lineDataNum5": { "type": "number", "format": "double", "nullable": true }, "lineDataText1": { "maxLength": 250, "minLength": 0, "type": "string", "description": "LineDataText1-5 can be used for customer-specific text fields. This data will go to ‘Line data’ -tab of the order line in P2P.", "nullable": true, "example": "" }, "lineDataText2": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "lineDataText3": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "lineDataText4": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "lineDataText5": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "quantity": { "type": "number", "description": "Ordered quantity.", "format": "double", "example": 1 }, "quantityUnit": { "maxLength": 10, "minLength": 0, "type": "string", "description": "Unit code for ordered quantity (pcs, kg, litre, boxes, etc).", "nullable": true, "example": "PCS" }, "quantityUnitName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Description for quantityUnit.", "nullable": true, "example": "Pieces" }, "priceType": { "enum": [ "Net", "Gross" ], "type": "string", "description": "Specified whether price been originally net (0) or gross (1).", "example": "gross" }, "refundLine": { "type": "boolean", "description": "Specifies whether the line is a refund line. True = refund line, false = not a refund line. Prices needs to be be negative on refund lines.", "example": false }, "unitPrice": { "type": "number", "description": "Price per unit, without discount.", "format": "double", "example": 125 }, "subUOM": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Sub unit of measure.", "nullable": true, "example": "" }, "discountPercent": { "type": "number", "description": "Percentage of discount on order line. This percentage amount is deducted from unitPrice by P2P when calculating discounted price.", "format": "double", "example": 0 }, "discountPercentReason": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Reason for discount.", "nullable": true, "example": "" }, "taxCode": { "maxLength": 32, "minLength": 0, "type": "string", "description": "If empty, tax code will be resolved using tax percent. If both are empty, Basware P2P resolves the value using the tax percent from the purchasing category.", "nullable": true, "example": "T25" }, "taxJurisdictionCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Tax juristiction code.", "nullable": true, "example": "" }, "taxPercent": { "type": "number", "description": "When taxCode is provided, taxPercent will be overwritten by the tax percent configured on the specified taxCode.", "format": "double", "nullable": true, "example": 25 }, "taxPercent2": { "type": "number", "description": "When taxCode is provided, taxPercent will be overwritten by the tax percent configured on the specified taxCode.", "format": "double", "nullable": true, "example": 0 }, "conversionNumerator": { "type": "number", "description": "Factor for conversions.", "format": "double" }, "conversionDenumerator": { "type": "number", "description": "Factor for conversions.", "format": "double" }, "materialGroup": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Material group.", "nullable": true, "example": "" }, "linePricingDate1": { "type": "string", "description": "LinePricingDate1-5 can be used for customer-specific date fields. This data will go to ‘Pricing’ -tab of the order line in P2P.", "format": "date-time", "nullable": true, "example": "" }, "linePricingDate2": { "type": "string", "format": "date-time", "nullable": true, "example": "" }, "linePricingDate3": { "type": "string", "format": "date-time", "nullable": true, "example": "" }, "linePricingDate4": { "type": "string", "format": "date-time", "nullable": true, "example": "" }, "linePricingDate5": { "type": "string", "format": "date-time", "nullable": true, "example": "" }, "linePricingNum1": { "type": "number", "description": "LinePricingNum1-5 can be used for customer-specific numeric fields. This data will go to ‘Pricing’ -tab of the order line in P2P.", "format": "double", "nullable": true }, "linePricingNum2": { "type": "number", "format": "double", "nullable": true }, "linePricingNum3": { "type": "number", "format": "double", "nullable": true }, "linePricingNum4": { "type": "number", "format": "double", "nullable": true }, "linePricingNum5": { "type": "number", "format": "double", "nullable": true }, "linePricingText1": { "maxLength": 250, "minLength": 0, "type": "string", "description": "LinePricingText1-5 can be used for customer-specific text fields. This data will go to ‘Pricing’ -tab of the order line in P2P.", "nullable": true, "example": "" }, "linePricingText2": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "linePricingText3": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "linePricingText4": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "linePricingText5": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "codingRows": { "type": "array", "items": { "$ref": "#/components/schemas/ImportedPurchaseOrderLineCodingRowEntity" }, "description": "Each order line can have only one coding row.", "nullable": true }, "deliveryAddress": { "$ref": "#/components/schemas/DeliveryAddress" } }, "additionalProperties": false }, "PurchaseOrderUserEntity": { "type": "object", "properties": { "externalCode": { "maxLength": 36, "minLength": 0, "type": "string", "description": "ExternalCode of user.", "nullable": true, "example": "4847-31231212-212121-1212" }, "loginAccount": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Login account of user.", "nullable": true, "example": "basware\\\\jyrik" }, "emailAddress": { "maxLength": 320, "minLength": 0, "pattern": "^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*)@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])$", "type": "string", "description": "Email address of user.", "nullable": true, "example": "testmail1@mailtest.com" } }, "additionalProperties": false }, "PurchaseOrdersResponse": { "required": [ "purchaseOrders" ], "type": "object", "properties": { "purchaseOrders": { "type": "array", "items": { "$ref": "#/components/schemas/PurchaseOrderEntity" } } }, "additionalProperties": false }, "PurchaseRequisitionEntity": { "required": [ "extDocumentNumber", "externalCode", "lines", "purpose" ], "type": "object", "properties": { "externalCode": { "maxLength": 36, "minLength": 1, "type": "string", "description": "External document identifier that is used as a key in API. This number must be unique in Basware P2P, and cannot be updated after the first import.", "example": "987236sd-sd31-3562-1239-9asffa986asd" }, "extDocumentNumber": { "maxLength": 100, "minLength": 2, "type": "string", "description": "Requisition document number from an external system. Needs to be unique. This is visible and searchable in Basware Purchase.", "example": "REQ000213786" }, "sendToProcess": { "type": "boolean", "description": "Indicates if the requisition is automatically sent to approval process. If false, requisition is saved as draft.", "nullable": true, "example": false }, "organizationUnitCode": { "maxLength": 100, "minLength": 0, "type": "string", "description": "The code that identifies the buyer organization, as defined in Basware P2P Administration. Alternatively, organizationIdentifier can be used. Both cannot be used simultaneously.", "nullable": true, "example": "BW00" }, "organizationIdentifier": { "maxLength": 50, "minLength": 0, "type": "string", "description": "A custom identifier for the buyer organization, as defined in Basware P2P Administration. Alternatively, organizationUnitCode can be used. Both cannot be used simultaneously.", "nullable": true, "example": "003749272021" }, "purchasingGroupCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Purchasing Group Code.", "nullable": true, "example": "P3" }, "purchasingGroupName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Purchasing Group Name.", "nullable": true, "example": "IT-equipment for internal use" }, "orderType": { "enum": [ "Standard", "Blanket" ], "type": "string", "description": "Standard order is a quantity-based purchase order. It specifies quantity amounts, prices and desired delivery dates for the items or services. \r\nStandard purchase orders typically require goods receipts.\r\n\r\nBlanket order is a sum-based long-term purchase order. It is placed for items or services for a specific period of time (validity period) \r\nand with an pre-determined maximum currency amount. Blanket orders are typically used for recurring invoices, for example ordering office cleaning \r\nfor one year. They can be used for ordering both services and consumable goods. Quantity amount used on the blanket order is always '1'. \r\nGoods receipts are not used with blanket orders.", "example": "standard" }, "releaseOrdersRequired": { "type": "boolean", "description": "Used only if the order type is blanket to specify, if the blanket purchase order requires release orders.", "nullable": true, "example": false }, "hidePricesFromSupplier": { "type": "boolean", "description": "Specifies, if all price information is hidden from the supplier in the outgoing purchase order.", "nullable": true, "example": false }, "ownerEmail": { "pattern": "^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*)@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])$", "type": "string", "description": "Email address of requisition owner.", "nullable": true, "example": "john.smith@company.com" }, "ownerLogin": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Login username for the requisition owner. The user must have 'Use Basware Purchase' user right. \r\nUsers with Use restricted/simplified Basware Purchase user rights are invalid.", "nullable": true, "example": "BASWARE\\\\JOHNSMITH" }, "ownerExternalCode": { "maxLength": 36, "minLength": 0, "type": "string", "description": "ExternalCode for the requisition owner.", "nullable": true, "example": "987236sd-sd31-3562-1239-9asffa986asd" }, "purpose": { "maxLength": 2000, "minLength": 1, "type": "string", "description": "Requisition purpose.", "example": "To Replace 3 years old laptop according to company policy." }, "validityPeriodStartDate": { "type": "string", "description": "Used only if the order type is blanket to specify the start date for blanket purchase order validity period (date format: yyyy-MM-dd).", "format": "date-time", "nullable": true, "example": "" }, "validityPeriodEndDate": { "type": "string", "description": "Used only if the order type is blanket to specify the end date for blanket purchase order validity period (date format: yyyy-MM-dd).", "format": "date-time", "nullable": true, "example": "" }, "desiredDeliveryDate": { "type": "string", "description": "Date when goods/services are expected to be delivered.", "format": "date-time", "nullable": true, "example": "2021-11-01T00:00:00" }, "desiredDeliveryEndDate": { "type": "string", "description": "End date when goods/services are expected to be delivered.", "format": "date-time", "nullable": true, "example": "2021-11-31T00:00:00" }, "deliveryInstructions": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Delivery instructions for goods/services.", "nullable": true, "example": "Please deliver between 9-17." }, "classification": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Requisition classification.", "nullable": true, "example": "Internal costs" }, "headerDataDate1": { "type": "string", "description": "HeaderDataDate1-5: Can be used for customer-specific date fields.", "format": "date-time", "nullable": true, "example": "2020-01-01T07:36:13.053Z" }, "headerDataDate2": { "type": "string", "format": "date-time", "nullable": true, "example": "2020-01-01T07:36:13.053Z" }, "headerDataDate3": { "type": "string", "format": "date-time", "nullable": true, "example": "2020-01-01T07:36:13.053Z" }, "headerDataDate4": { "type": "string", "format": "date-time", "nullable": true, "example": "2020-01-01T07:36:13.053Z" }, "headerDataDate5": { "type": "string", "format": "date-time", "nullable": true, "example": "2020-01-01T07:36:13.053Z" }, "headerDataText1": { "maxLength": 250, "minLength": 0, "type": "string", "description": "HeaderDataText1-5: Can be used for customer-specific text fields.", "nullable": true, "example": "" }, "headerDataText2": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "headerDataText3": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "headerDataText4": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "headerDataText5": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "headerDataNum1": { "type": "number", "description": "HeaderDataNum1-5: Can be used for customer-specific numeric fields.", "format": "double", "nullable": true }, "headerDataNum2": { "type": "number", "format": "double", "nullable": true }, "headerDataNum3": { "type": "number", "format": "double", "nullable": true }, "headerDataNum4": { "type": "number", "format": "double", "nullable": true }, "headerDataNum5": { "type": "number", "format": "double", "nullable": true }, "lastUpdated": { "type": "string", "format": "date-time" }, "deliveryAddress": { "$ref": "#/components/schemas/DeliveryAddress" }, "lines": { "type": "array", "items": { "$ref": "#/components/schemas/RequisitionLine" }, "description": "Notes: \r\n1) The requisition must contain at least one line, and can contain up to 200 lines. \r\n2) When Basware P2P creates the requisition it numbers the lines internally based on their order in the JSON. \r\n3) All lines on the requisition must have the same currencyCode. \r\n4) At least one line must contain a positive Quantity value. \r\n5) Total price for each requisition line is calculated by Basware P2P from the quantity, unit price, and applicable taxes and discounts.\r\n6) All supplierCodes stated on requisition lines needs to exist in P2P as valid supplier. These suppliers needs to have an ordering method defined in P2P (else requisition will be imported with empty supplier). Suppliers using email ordering method need also to have a valid ordering email defined. \r\n7) If there are refund lines, the requisition must have at least one non-refund line. \r\n8) If there are refund lines, only one order needs to result from the requisition lines." } }, "additionalProperties": false }, "PurchaseRequisitionEntityInternal": { "required": [ "extDocumentNumber", "externalCode", "lines", "purpose" ], "type": "object", "properties": { "extDocumentNumber": { "maxLength": 100, "minLength": 2, "type": "string", "description": "Requisition document number from an external system. Needs to be unique. This is visible and searchable in Basware Purchase.", "example": "REQ000213786" }, "organizationUnitCode": { "maxLength": 100, "minLength": 0, "type": "string", "description": "The code that identifies the buyer organization, as defined in Basware P2P Administration. Alternatively, organizationIdentifier can be used. Both cannot be used simultaneously.", "nullable": true, "example": "BW00" }, "organizationIdentifier": { "maxLength": 50, "minLength": 0, "type": "string", "description": "A custom identifier for the buyer organization, as defined in Basware P2P Administration. Alternatively, organizationUnitCode can be used. Both cannot be used simultaneously.", "nullable": true, "example": "003749272021" }, "purchasingGroupCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Purchasing Group Code.", "nullable": true, "example": "P3" }, "purchasingGroupName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Purchasing Group Name.", "nullable": true, "example": "IT-equipment for internal use\"" }, "orderType": { "enum": [ "Standard", "Blanket" ], "type": "string", "description": "Standard order is a quantity-based purchase order. It specifies quantity amounts, prices and desired delivery dates for the items or services. \r\nStandard purchase orders typically require goods receipts.\r\n\r\nBlanket order is a sum-based long-term purchase order. It is placed for items or services for a specific period of time (validity period) \r\nand with an pre-determined maximum currency amount. Blanket orders are typically used for recurring invoices, for example ordering office cleaning \r\nfor one year. They can be used for ordering both services and consumable goods. Quantity amount used on the blanket order is always '1'. \r\nGoods receipts are not used with blanket orders.", "example": "standard" }, "releaseOrdersRequired": { "type": "boolean", "description": "Used only if the order type is blanket to specify, if the blanket purchase order requires release orders.", "nullable": true, "example": false }, "hidePricesFromSupplier": { "type": "boolean", "nullable": true }, "ownerEmail": { "pattern": "^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*)@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])$", "type": "string", "description": "Email address of requisition owner.", "nullable": true, "example": "john.smith@company.com" }, "ownerExternalCode": { "maxLength": 36, "minLength": 0, "type": "string", "description": "ExternalCode for the requisition owner.", "nullable": true, "example": "987236sd-sd31-3562-1239-9asffa986asd" }, "ownerLogin": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Login username for the requisition owner. The user must have 'Use Basware Purchase' user right. \r\nUsers with Use restricted/simplified Basware Purchase user rights are invalid.", "nullable": true, "example": "BASWARE\\\\JOHNSMITH" }, "purpose": { "maxLength": 2000, "minLength": 1, "type": "string", "description": "Requisition purpose.", "example": "To Replace 3 years old laptop according to company policy." }, "validityPeriodStartDate": { "type": "string", "description": "Used only if the order type is blanket to specify the start date for blanket purchase order validity period (date format: yyyy-MM-dd).", "format": "date-time", "nullable": true, "example": "" }, "validityPeriodEndDate": { "type": "string", "description": "Used only if the order type is blanket to specify the end date for blanket purchase order validity period (date format: yyyy-MM-dd).", "format": "date-time", "nullable": true, "example": "" }, "desiredDeliveryDate": { "type": "string", "description": "Date when goods/services are expected to be delivered.", "format": "date-time", "nullable": true, "example": "2020-01-01T00:00:00\"" }, "desiredDeliveryEndDate": { "type": "string", "description": "End date when goods/services are expected to be delivered.", "format": "date-time", "nullable": true, "example": "2020-01-01T00:00:00\"" }, "deliveryInstructions": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Delivery instructions for goods/services.", "nullable": true, "example": "Please deliver between 9-17." }, "classification": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Requisition classification.", "nullable": true, "example": "Internal costs\"" }, "headerDataDate1": { "type": "string", "description": "Custom field in the business document.", "format": "date-time", "nullable": true, "example": "2020-01-01T07:36:13.053Z" }, "headerDataDate2": { "type": "string", "description": "Custom field in the business document.", "format": "date-time", "nullable": true, "example": "2020-01-01T07:36:13.053Z" }, "headerDataDate3": { "type": "string", "description": "Custom field in the business document.", "format": "date-time", "nullable": true, "example": "2020-01-01T07:36:13.053Z" }, "headerDataDate4": { "type": "string", "description": "Custom field in the business document.", "format": "date-time", "nullable": true, "example": "2020-01-01T07:36:13.053Z" }, "headerDataDate5": { "type": "string", "description": "Custom field in the business document.", "format": "date-time", "nullable": true, "example": "2020-01-01T07:36:13.053Z" }, "headerDataText1": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Custom field in the business document.", "nullable": true, "example": "" }, "headerDataText2": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Custom field in the business document.", "nullable": true, "example": "" }, "headerDataText3": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Custom field in the business document.", "nullable": true, "example": "" }, "headerDataText4": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Custom field in the business document.", "nullable": true, "example": "" }, "headerDataText5": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Custom field in the business document.", "nullable": true, "example": "" }, "headerDataNum1": { "type": "number", "description": "Custom field in the business document.", "format": "double", "nullable": true }, "headerDataNum2": { "type": "number", "description": "Custom field in the business document.", "format": "double", "nullable": true }, "headerDataNum3": { "type": "number", "description": "Custom field in the business document.", "format": "double", "nullable": true }, "headerDataNum4": { "type": "number", "description": "Custom field in the business document.", "format": "double", "nullable": true }, "headerDataNum5": { "type": "number", "description": "Custom field in the business document.", "format": "double", "nullable": true }, "lines": { "type": "array", "items": { "$ref": "#/components/schemas/RequisitionLineInternal" }, "description": "The requisition must contain at least one line, and can contain up to 100 lines. \r\nWhen Basware P2P creates the requisition it numbers the lines internally based on their order in the JSON. \r\nAll lines on the requisition must have the same currencyCode. At least one line must contain a positive Quantity value. \r\nNote - the total price for each requisition line is calculated by Basware P2P from the quantity, unit price, and applicable taxes and discounts.." }, "deliveryAddress": { "$ref": "#/components/schemas/DeliveryAddress" }, "sendToProcess": { "type": "boolean", "description": "Indicates if the requisition is automatically sent to approval process. If false, requisition is saved as draft.", "nullable": true }, "externalCode": { "maxLength": 36, "minLength": 1, "type": "string", "description": "External document identifier that is used as a key in API. This number must be unique in Basware P2P, and cannot be updated after the first import.", "example": "987236sd-sd31-3562-1239-9asffa986asd" }, "lastUpdated": { "type": "string", "description": "Timestamp when the record was last sent to API. Set automatically.", "format": "date-time" } }, "additionalProperties": false }, "PurchaseRequisitionResponse": { "required": [ "purchaseRequisitions" ], "type": "object", "properties": { "purchaseRequisitions": { "type": "array", "items": { "$ref": "#/components/schemas/PurchaseRequisitionEntity" } } }, "additionalProperties": false }, "PurchaseRequisitionResponseInternal": { "required": [ "purchaseRequisitions" ], "type": "object", "properties": { "purchaseRequisitions": { "type": "array", "items": { "$ref": "#/components/schemas/PurchaseRequisitionEntityInternal" } } }, "additionalProperties": false }, "PurchasingGroups": { "type": "object", "properties": { "groupName": { "maxLength": 50, "minLength": 0, "type": "string", "description": "Gets or Sets Group Name", "nullable": true, "example": "G12" }, "companyCode": { "maxLength": 32, "minLength": 1, "type": "string", "description": "The company code specifies the purchasing groups organization element.", "nullable": true, "example": "BW01" } }, "additionalProperties": false }, "Receiver": { "type": "object", "properties": { "personCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Person code.", "nullable": true, "example": "32232" }, "userName": { "maxLength": 227, "minLength": 0, "type": "string", "description": "User name.", "nullable": true, "example": "Timothy Smith" }, "loginAccount": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Login account.", "nullable": true, "example": "company\\\\timsmith" }, "emailAddress": { "maxLength": 320, "minLength": 0, "type": "string", "description": "Email address.", "nullable": true, "example": "timothy.smith@company.com" }, "externalCode": { "maxLength": 50, "minLength": 0, "type": "string", "description": "External code.", "nullable": true, "example": "douikj327sa8d07213879" } }, "additionalProperties": false, "description": "Specifies who has received the goods." }, "RedistributeRequest": { "required": [ "entityType", "subscribedService" ], "type": "object", "properties": { "entityType": { "enum": [ "Account", "Contract", "CostCenter", "TaxCode", "ExchangeRate", "PaymentTerm", "User", "Project", "MatchingOrder", "MatchingOrderLine", "GenericList", "AdvancedPermission", "TransferResponse", "PaymentResponse", "PrebookResponse", "Vendor", "AdvancedValidation", "PurchaseRequisition", "PurchaseOrder", "PurchaseGoodsReceipt", "Organization", "EnrichmentResponse", "UserGroup" ], "type": "string", "description": "Specifies the entity type (=interface). The data in specified interface is redistributed from API to target system(s).", "example": "CostCenter" }, "subscribedService": { "enum": [ "All", "Alusta", "Network", "PM", "Gateway", "Access", "ScanMarket", "APAssurance", "SmartPDF" ], "type": "string", "description": "Currently the ‘subscribedService’ -parameter value is ignored and data is distributed to all target systems. This is likely to be enhanced in a further release to allow specifying the target system.", "example": "All" }, "lastUpdated": { "type": "string", "description": "Records with lastUpdated -timestamp after the specified value are redistributed. '0001-01-01' can be used as input value to redistribute all records.", "format": "date-time", "nullable": true, "example": "2019-01-01" }, "externalCodes": { "type": "array", "items": { "type": "string" }, "description": "Specifies an array of external codes to be redistributed. If both externalCodes and lastUpdated -filter are specified, only the externalCodes -filter is used. For TransferResponse, EnrichmentResponse, PaymentResponse and PrebookResponse entities, use the externalCode of the related accountingDocument (not the externalCode of the response).", "nullable": true }, "listKey": { "enum": [ "ACC_LIST_1", "ACC_LIST_2", "ACC_LIST_3", "ACC_LIST_4", "ACC_LIST_5", "ACC_LIST_6", "ACC_LIST_7", "ACC_LIST_8", "ACC_LIST_9", "ACC_LIST_10", "ACC_LIST_11", "ACC_LIST_12", "ACC_LIST_13", "ACC_LIST_14", "ACC_LIST_15", "ACC_LIST_16", "ACC_LIST_17", "ACC_LIST_18", "ACC_LIST_19", "ACC_LIST_20", "ACC_LIST_21", "ACC_LIST_22", "ACC_LIST_23", "ACC_LIST_24", "ACC_LIST_25", "ACC_LIST_26", "ACC_LIST_27", "ACC_LIST_28", "ACC_LIST_29", "ACC_LIST_30", "ACC_LIST_31", "ACC_LIST_32", "ACC_LIST_33", "ACC_LIST_34", "ACC_LIST_35", "CUST_RESOLVER_1", "CUST_RESOLVER_2", "CUST_RESOLVER_3", "CUST_RESOLVER_4", "CUST_RESOLVER_5", "INV_LIST_1", "INV_LIST_2", "INV_LIST_3", "INV_LIST_4", "INV_LIST_5", "INV_LIST_6", "INV_LIST_7", "INV_LIST_8", "INV_LIST_9", "INV_LIST_10", "INV_LIST_11", "INV_LIST_12", "INV_LIST_13", "INV_LIST_14", "INV_LIST_15", "INV_LIST_16", "INV_LIST_17", "INV_LIST_18", "INV_LIST_19", "INV_LIST_20" ], "type": "string", "description": "Used when redistributing data to 'GenericList' entity types. Specifies the list key.", "nullable": true }, "version": { "enum": [ "V1", "V2" ], "type": "string", "description": "Specifies the API version, as in /v1/projects or /v2/projects. Default value: V1.", "nullable": true, "example": "V1" } }, "additionalProperties": false }, "RedistributeResponse": { "type": "object", "properties": { "statusApiLink": { "type": "string", "nullable": true }, "taskName": { "type": "string", "nullable": true }, "taskStatus": { "type": "string", "nullable": true } }, "additionalProperties": false }, "RemoveResponseEntity": { "required": [ "externalCode", "responseMessage" ], "type": "object", "properties": { "externalCode": { "maxLength": 36, "minLength": 2, "type": "string", "description": "External identifier", "example": "dd79ba5612a744bf9a92333fe14a6aef" }, "success": { "type": "boolean", "description": "Identifies if the invoice was succesfully removed", "nullable": true, "example": false }, "responseMessage": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Message that gives more details of the deviance that was identified in the invoice details. The message is stored to a comment field in the invoice action log item that is created based on the result.", "example": "" }, "sourceSystem": { "maxLength": 32, "minLength": 0, "type": "string", "description": "Indicates the system that is returning transfer response.", "nullable": true, "example": "ERP1" } }, "additionalProperties": false }, "RequestStatusFilter": { "type": "object", "properties": { "requestIds": { "type": "array", "items": { "type": "string" }, "nullable": true }, "status": { "enum": [ "InProgress", "Success", "Error", "AcknowledgedSuccess", "AcknowledgedError" ], "type": "string", "nullable": true }, "entityType": { "enum": [ "Account", "Contract", "CostCenter", "TaxCode", "ExchangeRate", "PaymentTerm", "Budget", "User", "Project", "MatchingOrder", "MatchingOrderLine", "AccountingDocument", "GenericList", "MatchingGoodsReceipt", "AdvancedPermission", "TransferResponse", "PaymentResponse", "PrebookResponse", "Vendor", "AdvancedValidation", "PurchaseRequisition", "ErrorFeedback", "RedistributeData", "TaskStatus", "Company", "CompanyGroup", "CompanyView", "ExportedPurchaseOrder", "PurchaseOrder", "PurchaseGoodsReceipt", "ApplicationGroup", "ExportedPurchaseRequisition", "OperatorUser", "ExportedContract", "ExportedContractSpend", "RequestStatus", "Organization", "EnrichmentTransferResponse", "UserGroup", "UserGroupAssociatedUser", "UserGroupPermission" ], "type": "string", "nullable": true }, "ignoreSuccessfullItems": { "type": "boolean", "nullable": true }, "system": { "type": "string", "nullable": true }, "lastUpdatedStartDate": { "type": "string", "format": "date-time", "nullable": true }, "lastUpdatedEndDate": { "type": "string", "format": "date-time", "nullable": true } }, "additionalProperties": false }, "RequestStatusResponse": { "required": [ "requestStatus" ], "type": "object", "properties": { "requestStatus": { "type": "array", "items": { "$ref": "#/components/schemas/ConsumerLogEventUserView" } } }, "additionalProperties": false }, "RequisitionCodingRow": { "required": [ "externalCode" ], "type": "object", "properties": { "externalCode": { "maxLength": 36, "minLength": 1, "type": "string", "description": "The coding row number in the external system.", "example": "1547e437-1231-ad32-dff2-132985aae212" }, "accountCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Defines code for the account. If empty, defaults based on item's purchasing category.", "nullable": true, "example": "10017" }, "accountName": { "maxLength": 2000, "minLength": 0, "type": "string", "description": "Defines name for the account. If empty, defaults based on the item's purchasing category.", "nullable": true, "example": "IT equipment costs" }, "costCenterCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Cost center code. If empty, the requisition owner's default cost center is used.", "nullable": true, "example": "23800" }, "costCenterName": { "maxLength": 2000, "minLength": 0, "type": "string", "description": "Cost center name.", "nullable": true, "example": "Lift engine research" }, "projectCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Project code.", "nullable": true, "example": "" }, "projectName": { "maxLength": 255, "minLength": 0, "type": "string", "description": "Project name.", "nullable": true, "example": "" }, "fixedAssetCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Fixed asset code.", "nullable": true, "example": "" }, "fixedAssetName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Fixed asset name.", "nullable": true, "example": "" }, "fixedAssetSubCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Fixed asset sub code.", "nullable": true, "example": "" }, "fixedAssetSubName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Fixed asset sub name.", "nullable": true, "example": "" }, "internalOrderCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Internal order code.", "nullable": true, "example": "" }, "internalOrderName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Internal order name.", "nullable": true, "example": "" }, "profitCenterCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Profit center code.", "nullable": true, "example": "" }, "profitCenterName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Profit center name.", "nullable": true, "example": "" }, "businessUnitCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Business unit code.", "nullable": true, "example": "" }, "businessUnitName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Business unit name.", "nullable": true, "example": "" }, "projectSubCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Project sub code.", "nullable": true, "example": "" }, "projectSubName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Project sub name.", "nullable": true, "example": "" }, "employeeCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Employee code. If empty, defaults to requisition owner's employee code.", "nullable": true, "example": "815722" }, "employeeName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Employee name. If empty, defaults to requisition owner's name.", "nullable": true, "example": "Jim Green" }, "vehicleName": { "maxLength": 255, "minLength": 0, "type": "string", "description": "Vehicle name.", "nullable": true, "example": "" }, "vehicleNumber": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Vehicle number.", "nullable": true, "example": "" }, "salesOrderCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Sales order code.", "nullable": true, "example": "" }, "salesOrderName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Sales order name.", "nullable": true, "example": "" }, "salesOrderSubCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Sales order sub code.", "nullable": true, "example": "" }, "salesOrderSubName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Sales order sub name.", "nullable": true, "example": "" }, "customerCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Customer code.", "nullable": true, "example": "" }, "customerName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Customer name.", "nullable": true, "example": "" }, "accAssignmentCategoryCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Account assignment category code. If empty, defaults based on the item's purchasing category.", "nullable": true, "example": "" }, "accAssignmentCategoryName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Account assignment category name. If empty, defaults based on the item's purchasing category.", "nullable": true, "example": "" }, "budgetCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Defines a code for the budget.", "nullable": true, "example": "B36782" }, "budgetName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Defines name for the budget.", "nullable": true, "example": "IT equipment 2020" }, "serviceCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Service code.", "nullable": true, "example": "" }, "serviceName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Service name.", "nullable": true, "example": "" }, "businessAreaCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Business area code.", "nullable": true, "example": "" }, "businessAreaName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Business area name.", "nullable": true, "example": "" }, "workOrderCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Work order code.", "nullable": true, "example": "" }, "workOrderName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Work order name.", "nullable": true, "example": "" }, "workOrderSubCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Work order sub code.", "nullable": true, "example": "" }, "workOrderSubName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Work order sub name.", "nullable": true, "example": "" }, "distributionCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Distribution code.", "nullable": true, "example": "" }, "distributionMode": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Distribution mode.", "nullable": true, "example": "" }, "dimCode1": { "maxLength": 25, "minLength": 0, "type": "string", "description": "DimCode1-10 are often used for additional, customer-specific, coding dimensions. Specifies the dimension code.", "nullable": true, "example": "236710" }, "dimCode2": { "maxLength": 25, "minLength": 0, "type": "string", "description": "DimCode2", "nullable": true, "example": "" }, "dimCode3": { "maxLength": 25, "minLength": 0, "type": "string", "description": "DimCode3", "nullable": true, "example": "" }, "dimCode4": { "maxLength": 25, "minLength": 0, "type": "string", "description": "DimCode4", "nullable": true, "example": "" }, "dimCode5": { "maxLength": 25, "minLength": 0, "type": "string", "description": "DimCode5", "nullable": true, "example": "" }, "dimCode6": { "maxLength": 25, "minLength": 0, "type": "string", "description": "DimCode6", "nullable": true, "example": "" }, "dimCode7": { "maxLength": 25, "minLength": 0, "type": "string", "description": "DimCode7", "nullable": true, "example": "" }, "dimCode8": { "maxLength": 25, "minLength": 0, "type": "string", "description": "DimCode8", "nullable": true, "example": "" }, "dimCode9": { "maxLength": 25, "minLength": 0, "type": "string", "description": "DimCode9", "nullable": true, "example": "" }, "dimCode10": { "maxLength": 25, "minLength": 0, "type": "string", "description": "DimCode10", "nullable": true, "example": "" }, "dimName1": { "maxLength": 250, "minLength": 0, "type": "string", "description": "DimName1-10 is used for additional, customer-specific, coding dimensions. Specifies the dimension name.", "nullable": true, "example": "Maple street office" }, "dimName2": { "maxLength": 250, "minLength": 0, "type": "string", "description": "DimName2", "nullable": true, "example": "" }, "dimName3": { "maxLength": 250, "minLength": 0, "type": "string", "description": "DimName3", "nullable": true, "example": "" }, "dimName4": { "maxLength": 250, "minLength": 0, "type": "string", "description": "DimName4", "nullable": true, "example": "" }, "dimName5": { "maxLength": 250, "minLength": 0, "type": "string", "description": "DimName5", "nullable": true, "example": "" }, "dimName6": { "maxLength": 250, "minLength": 0, "type": "string", "description": "DimName6", "nullable": true, "example": "" }, "dimName7": { "maxLength": 250, "minLength": 0, "type": "string", "description": "DimName7", "nullable": true, "example": "" }, "dimName8": { "maxLength": 250, "minLength": 0, "type": "string", "description": "DimName8", "nullable": true, "example": "" }, "dimName9": { "maxLength": 250, "minLength": 0, "type": "string", "description": "DimName9", "nullable": true, "example": "" }, "dimName10": { "maxLength": 250, "minLength": 0, "type": "string", "description": "DimName10", "nullable": true, "example": "" }, "num1": { "type": "number", "description": "Num1-5 are custom fields in the business document.", "format": "double", "nullable": true }, "num2": { "type": "number", "description": "Num2", "format": "double", "nullable": true }, "num3": { "type": "number", "description": "Num3", "format": "double", "nullable": true }, "num4": { "type": "number", "description": "Num4", "format": "double", "nullable": true }, "num5": { "type": "number", "description": "Num5", "format": "double", "nullable": true }, "text1": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Text1-5 are custom fields in the business document.", "nullable": true, "example": "" }, "text2": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Text2", "nullable": true, "example": "" }, "text3": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Text3", "nullable": true, "example": "" }, "text4": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Text4", "nullable": true, "example": "" }, "text5": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Text5", "nullable": true, "example": "" }, "date1": { "type": "string", "description": "Date1-5 are custom fields in the business document.", "format": "date-time", "nullable": true }, "date2": { "type": "string", "description": "Date2", "format": "date-time", "nullable": true }, "date3": { "type": "string", "description": "Date3", "format": "date-time", "nullable": true }, "date4": { "type": "string", "description": "Date4", "format": "date-time", "nullable": true }, "date5": { "type": "string", "description": "Date5", "format": "date-time", "nullable": true } }, "additionalProperties": false }, "RequisitionLine": { "required": [ "currencyCode", "externalCode", "extRequisitionLineNumber" ], "type": "object", "properties": { "externalCode": { "maxLength": 36, "minLength": 1, "type": "string", "description": "External identifier that is used as a key in API for the requisition line.", "example": "987236sd-sd31-3562-1239-9asffa986asd" }, "extRequisitionLineNumber": { "minLength": 1, "type": "string", "description": "The requisition line number in the external system. The value must be unique for each line on the requisition.", "example": "1" }, "categoryCode": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Code for the item's purchasing category. The code must match a valid, active purchasing category for the organization. \r\nIf invalid, the field will be emptied during import.", "nullable": true, "example": "6200" }, "supplierCode": { "maxLength": 32, "minLength": 0, "type": "string", "description": "A code to identify the supplier. The code must match a valid supplier for the organization, or it will be emptied during import. \r\nIf the purchase order is a self-service order and the supplier is invalid, the import will fail.", "nullable": true, "example": "10280" }, "supplierName": { "maxLength": 255, "minLength": 0, "type": "string", "description": "Supplier name.", "nullable": true, "example": "ACME IT services and suppliers" }, "contractNumber": { "maxLength": 255, "minLength": 0, "type": "string", "description": "Contract number.", "nullable": true, "example": "" }, "buyerProductCode": { "maxLength": 250, "minLength": 0, "type": "string", "description": "A code that identifies purchased items for internal reporting and communication.", "nullable": true, "example": "38172105" }, "supplierProductName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Supplier product name.", "nullable": true, "example": "Developer laptop, 15inch" }, "supplierProductCode": { "maxLength": 50, "minLength": 0, "type": "string", "description": "Supplier product code.", "nullable": true, "example": "00494233" }, "manufacturerProductCode": { "maxLength": 255, "minLength": 0, "type": "string", "description": "Manufacturer product code is an identification number supplied by a manufacturer to uniquely identify products that aren't easily distinquishable from one another. It allows consumers to search for the exact product they need without any technical knowledge. Commonly used for example with automotive or electronics replacement parts. Required P2P 23.10 or later.", "nullable": true, "example": "ManufacturerProductCode" }, "description": { "maxLength": 2000, "minLength": 0, "type": "string", "description": "Description.", "nullable": true, "example": "" }, "leadTime": { "maxLength": 255, "minLength": 0, "type": "string", "description": "Specifies how soon after receiving order the supplier usually is able to deliver the goods. Informative field.", "nullable": true, "example": "" }, "desiredDeliveryDate": { "type": "string", "description": "Desired date the goods are to be delivered.", "format": "date-time", "nullable": true, "example": "2020-01-08T00:00:00" }, "deliveryTerm": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Identifier for the agreed delivery term for the item. If empty, supplier's delivery term is used.", "nullable": true, "example": "" }, "allowPartialDeliveries": { "type": "boolean", "description": "Indicates if the partial delivery of goods is allowed. If empty, defaults to false.", "nullable": true, "example": false }, "paymentTermCode": { "maxLength": 255, "minLength": 0, "type": "string", "description": "Identifier for the agreed payment term to be used when supplier charges the customer. \r\nIf empty, defaults to the supplier's payment term.", "nullable": true, "example": "NT60" }, "paymentTermName": { "maxLength": 2000, "minLength": 0, "type": "string", "description": "Name of the payment term.", "nullable": true, "example": "60 days net" }, "additionalInfo": { "maxLength": 2000, "minLength": 0, "type": "string", "description": "Additional information.", "nullable": true, "example": "" }, "receiveAutomatically": { "type": "boolean", "description": "Indicates if the goods can be automatically received by Basware P2P on behalf of the user. If empty, defaults to false.", "nullable": true, "example": false }, "plant": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Plant.", "nullable": true, "example": "" }, "storageLocation": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Storage location.", "nullable": true, "example": "" }, "unspsc": { "maxLength": 64, "minLength": 0, "type": "string", "description": "The United Nations Standard Products and Services Code, a unique 8-digit number used to identify trade items, products, and services. \r\nThe value can also be used to match order lines to invoice lines. If empty, resolved by Basware P2P using the item's categoryCode.", "nullable": true, "example": "43211578" }, "grNote": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Note for receiving goods.", "nullable": true, "example": "" }, "lineDataDate1": { "type": "string", "description": "LineDataDate1-5 can be used for customer-specific date fields. This data will go to ‘Line data’ -tab of the requisition line in P2P.", "format": "date-time", "nullable": true }, "lineDataDate2": { "type": "string", "format": "date-time", "nullable": true }, "lineDataDate3": { "type": "string", "format": "date-time", "nullable": true }, "lineDataDate4": { "type": "string", "format": "date-time", "nullable": true }, "lineDataDate5": { "type": "string", "format": "date-time", "nullable": true }, "lineDataNum1": { "type": "number", "description": "LineDataNum1-5 can be used for customer-specific numeric fields. This data will go to ‘Line data’ -tab of the requisition line in P2P.", "format": "double", "nullable": true }, "lineDataNum2": { "type": "number", "format": "double", "nullable": true }, "lineDataNum3": { "type": "number", "format": "double", "nullable": true }, "lineDataNum4": { "type": "number", "format": "double", "nullable": true }, "lineDataNum5": { "type": "number", "format": "double", "nullable": true }, "lineDataText1": { "maxLength": 250, "minLength": 0, "type": "string", "description": "LineDataText1-5 can be used for customer-specific text fields. This data will go to ‘Line data’ -tab of the requisition line in P2P.", "nullable": true, "example": "" }, "lineDataText2": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "lineDataText3": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "lineDataText4": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "lineDataText5": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "quantity": { "type": "number", "description": "Defines how many items a customer wants to purchase. The quantity must contain a positive value.", "format": "double", "nullable": true, "example": 1 }, "quantityUnitCode": { "maxLength": 10, "minLength": 0, "type": "string", "description": "Quantity unit code.", "nullable": true, "example": "PCS" }, "quantityUnitName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Quantity unit name.", "nullable": true, "example": "Pieces" }, "priceType": { "enum": [ "Net", "Gross" ], "type": "string", "description": "Defines if the unit price stated is net (0) or gross (1). If empty, defaults to net (0).", "example": "Net" }, "subUOM": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Sub-unit of measure, when used.", "nullable": true, "example": "" }, "refundLine": { "type": "boolean", "description": "Specifies whether the line is a refund line. True = refund line, false = not a refund line. Prices needs to be be negative on refund lines.", "example": false }, "unitPrice": { "type": "number", "description": "Price for a single unit without discount. Price type (Net / Gross) is specified in field 'priceType'.", "format": "double", "nullable": true, "example": 1050 }, "discountPercent": { "maximum": 1000000000, "minimum": 0, "type": "number", "description": "Discount percent.", "format": "double", "nullable": true, "example": 0 }, "currencyCode": { "maxLength": 25, "minLength": 1, "type": "string", "description": "A code that identifies the currency of the price on the line. All requisition lines must have the same currency code. \r\nIf the code is different from the organization's currency, an exchange rate must exist for both codes in Basware P2P Administration, or the import will fail.", "example": "EUR" }, "taxCode": { "maxLength": 32, "minLength": 0, "type": "string", "description": "Defines name for the tax code. If empty, Basware P2P resolves the value using the tax percent from the purchasing category.", "nullable": true, "example": "T25" }, "taxJuristictionCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Tax juristiction code.", "nullable": true, "example": "" }, "taxPercent": { "maximum": 1000000000, "minimum": 0, "type": "number", "description": "Defines the tax percent. If empty, Basware P2P resolves the value using the tax percent from the purchasing category.", "format": "double", "nullable": true, "example": 10 }, "taxPercent2": { "type": "number", "description": "Second tax percent. Used for example for handling reverse charges on EU VAT.", "format": "double", "nullable": true, "example": 0 }, "attachPdfToNetworkOrder": { "type": "boolean", "description": "Specifies if order is attached as pdf file when order is sent to supplier through Basware network.", "nullable": true }, "ownerOrderingEmail": { "maxLength": 1800, "minLength": 0, "pattern": "^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*)@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])$", "type": "string", "description": "Contact email to which supplier can send questions about the order. Note: When order is sent to supplier, it is not sent to this email. Note: Fields visible on the order sent to supplier are configured in P2P Purchase.", "nullable": true, "example": "john.smith@company.com" }, "orderRecipientType": { "enum": [ "Supplier", "Owner", "SupplierAndOwner" ], "type": "string", "description": "Determines who order is sent to.\r\n-Supplier(0) : Order is sent only to supplier.\r\n-If orderingMethod is email, order is sent to the email indicated by 'supplierOrderingEmail'. -If orderingMethod is network, the order is sent through Basware network.\r\n-Owner (1): Order is sent only to email address(es) indicated by field 'otherOrderingEmail'. Used for example when goods were picked up from a store and no order needs to be sent to supplier.\r\n-SupplierAndOwner (2): Order is sent to both supplier and email addresses indicated by field 'otherOrderingEmail'. Order delivery method to supplier is determined by orderingMethod, same as above.", "example": "0" }, "supplierOrderingEmail": { "maxLength": 1800, "minLength": 0, "pattern": "^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*)@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])$", "type": "string", "description": "Email address used to override the default supplier email address, when orderRecipientType is Supplier or SupplierAndOwner.", "nullable": true, "example": "john.smith@company.com" }, "otherOrderingEmail": { "pattern": "^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*)@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])$", "type": "string", "description": "The email address(es) where the order is sent by P2P purchase. Can contain multiple email addresses separated by semicolon. The order is sent to these addresses when orderRecipientType is 'Owner' or 'Both'.", "nullable": true, "example": "john.smith@company.com" }, "conversionNumerator": { "type": "number", "description": "Conversion numerator.", "format": "double", "nullable": true }, "conversionDenominator": { "type": "number", "description": "Conversion denominator.", "format": "double", "nullable": true }, "materialGroup": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Material group.", "nullable": true, "example": "" }, "linePricingDate1": { "type": "string", "description": "LinePricingDate1-5 can be used for customer-specific date fields. This data will go to ‘Pricing’ -tab of the requisition line in P2P.", "format": "date-time", "nullable": true }, "linePricingDate2": { "type": "string", "format": "date-time", "nullable": true }, "linePricingDate3": { "type": "string", "format": "date-time", "nullable": true }, "linePricingDate4": { "type": "string", "format": "date-time", "nullable": true }, "linePricingDate5": { "type": "string", "format": "date-time", "nullable": true }, "linePricingNum1": { "type": "number", "description": "LinePricingNum1-5 can be used for customer-specific numeric fields. This data will go to ‘Pricing’ -tab of the requisition line in P2P.", "format": "double", "nullable": true }, "linePricingNum2": { "type": "number", "format": "double", "nullable": true }, "linePricingNum3": { "type": "number", "format": "double", "nullable": true }, "linePricingNum4": { "type": "number", "format": "double", "nullable": true }, "linePricingNum5": { "type": "number", "format": "double", "nullable": true }, "linePricingText1": { "maxLength": 250, "minLength": 0, "type": "string", "description": "LinePricingText1-5 can be used for customer-specific text fields. This data will go to ‘Pricing’ -tab of the requisition line in P2P.", "nullable": true, "example": "" }, "linePricingText2": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "linePricingText3": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "linePricingText4": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "linePricingText5": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "deliveryAddress": { "$ref": "#/components/schemas/DeliveryAddress" }, "codingRows": { "type": "array", "items": { "$ref": "#/components/schemas/RequisitionCodingRow" }, "description": "Each requisition line can have only one coding row.", "nullable": true } }, "additionalProperties": false }, "RequisitionLineInternal": { "required": [ "currencyCode", "extRequisitionLineNumber" ], "type": "object", "properties": { "extRequisitionLineNumber": { "minLength": 1, "type": "string", "description": "The requisition line number in the external system. The value must be unique for each line of the requisition.", "example": "1" }, "categoryCode": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Code for the item's purchasing category. The code must match a valid, active purchasing category for the organization. \r\nIf invalid, the field will be emptied during import.", "nullable": true, "example": "6200" }, "supplierCode": { "maxLength": 32, "minLength": 0, "type": "string", "description": "A code to identify the supplier. The code must match a valid supplier for the organization, or it will be emptied during import. \r\nIf the purchase order is a self-service order and the supplier is invalid, the import will fail.", "nullable": true, "example": "10280" }, "supplierName": { "maxLength": 255, "minLength": 0, "type": "string", "description": "Supplier name.", "nullable": true, "example": "ACME IT services and suppliers" }, "contractNumber": { "maxLength": 255, "minLength": 0, "type": "string", "description": "Contract number.", "nullable": true, "example": "" }, "buyerProductCode": { "maxLength": 250, "minLength": 0, "type": "string", "description": "A code that identifies purchased items for internal reporting and communication.", "nullable": true, "example": "38172105" }, "supplierProductName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Supplier product name.", "nullable": true, "example": "Developer laptop, 15inch\"" }, "supplierProductCode": { "maxLength": 50, "minLength": 0, "type": "string", "description": "Supplier product code.", "nullable": true, "example": "00494233" }, "manufacturerProductCode": { "maxLength": 255, "minLength": 0, "type": "string", "description": "Manufacturer product code is an identification number supplied by a manufacturer to uniquely identify products that aren't easily distinquishable from one another. It allows consumers to search for the exact product they need without any technical knowledge. Commonly used for example with automotive or electronics replacement parts. Required P2P 23.10 or later.", "nullable": true, "example": "ManufacturerProductCode" }, "description": { "maxLength": 2000, "minLength": 0, "type": "string", "description": "Description.", "nullable": true, "example": "" }, "leadTime": { "maxLength": 255, "minLength": 0, "type": "string", "description": "Specifies how soon after receiving order the supplier usually is able to deliver the goods. Informative field.", "nullable": true, "example": "" }, "desiredDeliveryDate": { "type": "string", "description": "Desired date the goods are to be delivered.", "format": "date-time", "nullable": true, "example": "2020-01-08T07:36:13.053Z" }, "paymentTermCode": { "maxLength": 255, "minLength": 0, "type": "string", "description": "Identifier for the agreed payment term to be used when supplier charges the customer. \r\nIf empty, defaults to the supplier's payment term.", "nullable": true, "example": "NT60" }, "paymentTermName": { "maxLength": 2000, "minLength": 0, "type": "string", "description": "Name of the payment term.", "nullable": true, "example": "60 days net" }, "deliveryTermCode": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Identifier for the agreed delivery term for the item. If empty, supplier's delivery term is used.", "nullable": true, "example": "" }, "deliveryTerm": { "type": "string", "nullable": true }, "additionalInfo": { "maxLength": 2000, "minLength": 0, "type": "string", "description": "Additional information.", "nullable": true, "example": "" }, "allowPartialDeliveries": { "type": "boolean", "description": "Indicates if the partial delivery of goods is allowed. If empty, defaults to false.", "nullable": true, "example": false }, "receiveAutomatically": { "type": "boolean", "description": "Indicates if the goods can be automatically received by Basware P2P on behalf of the user. If empty, defaults to false.", "nullable": true, "example": false }, "plant": { "maxLength": 10, "minLength": 0, "type": "string", "description": "Plant.", "nullable": true, "example": "" }, "storageLocation": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Storage location.", "nullable": true, "example": "" }, "unspsc": { "maxLength": 64, "minLength": 0, "type": "string", "description": "The United Nations Standard Products and Services Code, a unique 8-digit number used to identify trade items, products, and services. \r\nThe value can also be used to match order lines to invoice lines. If empty, resolved by Basware P2P using the item's categoryCode.", "nullable": true, "example": "43211578" }, "grNote": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Note for receiving goods.", "nullable": true, "example": "" }, "lineDataDate1": { "type": "string", "description": "Custom field in the business document. Below custom fields go to 'Line data' -tab of the requisition line.", "format": "date-time", "nullable": true, "example": "" }, "lineDataDate2": { "type": "string", "description": "Custom field in the business document.", "format": "date-time", "nullable": true, "example": "" }, "lineDataDate3": { "type": "string", "description": "Custom field in the business document.", "format": "date-time", "nullable": true, "example": "" }, "lineDataDate4": { "type": "string", "description": "Custom field in the business document.", "format": "date-time", "nullable": true, "example": "" }, "lineDataDate5": { "type": "string", "description": "Custom field in the business document.", "format": "date-time", "nullable": true, "example": "" }, "lineDataNum1": { "type": "number", "description": "Custom field in the business document.", "format": "double", "nullable": true }, "lineDataNum2": { "type": "number", "description": "Custom field in the business document.", "format": "double", "nullable": true }, "lineDataNum3": { "type": "number", "description": "Custom field in the business document.", "format": "double", "nullable": true }, "lineDataNum4": { "type": "number", "description": "Custom field in the business document.", "format": "double", "nullable": true }, "lineDataNum5": { "type": "number", "description": "Custom field in the business document.", "format": "double", "nullable": true }, "lineDataText1": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Custom field in the business document.", "nullable": true, "example": "" }, "lineDataText2": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Custom field in the business document.", "nullable": true, "example": "" }, "lineDataText3": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Custom field in the business document.", "nullable": true, "example": "" }, "lineDataText4": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Custom field in the business document.", "nullable": true, "example": "" }, "lineDataText5": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Custom field in the business document.", "nullable": true, "example": "" }, "quantity": { "type": "number", "description": "Defines how many items a customer wants to purchase. At least one requisition line must contain a positive quantity value.", "format": "double", "nullable": true }, "quantityUnitCode": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Quantity unit code.", "nullable": true, "example": "PCS" }, "quantityUnitName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Quantity unit name.", "nullable": true, "example": "Pieces" }, "priceType": { "enum": [ "Net", "Gross" ], "type": "string", "description": "Defines if the unit price stated is net (0) or gross (1). If empty, defaults to net (0).", "example": "Net" }, "subUOM": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Sub-unit of measure, when used.", "nullable": true, "example": "" }, "refundLine": { "type": "boolean", "description": "Specifies whether the line is a refund line. True = refund line, false = not a refund line. Prices needs to be be negative on refund lines.", "example": false }, "unitPrice": { "type": "number", "description": "Unit price.", "format": "double", "nullable": true, "example": 1050 }, "discountPercent": { "maximum": 1000000000, "minimum": 0, "type": "number", "description": "Discount percent.", "format": "double", "nullable": true, "example": 0 }, "currencyCode": { "maxLength": 25, "minLength": 1, "type": "string", "description": "A code that identifies the currency of the price on the line. All requisition lines must have the same currency code. \r\nIf the code is different from the organization's currency, an exchange rate must exist for both codes in Basware P2P Administration, or the import will fail.", "example": "EUR" }, "taxCode": { "maxLength": 32, "minLength": 0, "type": "string", "description": "Defines name for the tax code. If empty, Basware P2P resolves the value using the tax percent from the purchasing category.", "nullable": true, "example": "T10" }, "taxPercent": { "maximum": 1000000000, "minimum": 0, "type": "number", "description": "Defines the tax percent. If empty, Basware P2P resolves the value using the tax percent from the purchasing category.", "format": "double", "nullable": true, "example": 10 }, "taxPercent2": { "type": "number", "description": "Second tax percent. Used for example for handling reverse charges on EU VAT.", "format": "double", "nullable": true, "example": 0 }, "taxJuristictionCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Tax juristiction code.", "nullable": true, "example": "" }, "conversionNumerator": { "type": "number", "description": "Conversion numerator.", "format": "double", "nullable": true }, "conversionDenominator": { "type": "number", "description": "Conversion denominator.", "format": "double", "nullable": true }, "materialGroup": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Material group.", "nullable": true, "example": "" }, "linePricingDate1": { "type": "string", "description": "Custom field in the business document. Below custom fields go to 'Pricing' -tab of the requisition line.", "format": "date-time", "nullable": true, "example": "" }, "linePricingDate2": { "type": "string", "description": "Custom field in the business document.", "format": "date-time", "nullable": true, "example": "" }, "linePricingDate3": { "type": "string", "description": "Custom field in the business document.", "format": "date-time", "nullable": true, "example": "" }, "linePricingDate4": { "type": "string", "description": "Custom field in the business document.", "format": "date-time", "nullable": true, "example": "" }, "linePricingDate5": { "type": "string", "description": "Custom field in the business document.", "format": "date-time", "nullable": true, "example": "" }, "linePricingNum1": { "type": "number", "description": "Custom field in the business document.", "format": "double", "nullable": true }, "linePricingNum2": { "type": "number", "description": "Custom field in the business document.", "format": "double", "nullable": true }, "linePricingNum3": { "type": "number", "description": "Custom field in the business document.", "format": "double", "nullable": true }, "linePricingNum4": { "type": "number", "description": "Custom field in the business document.", "format": "double", "nullable": true }, "linePricingNum5": { "type": "number", "description": "Custom field in the business document.", "format": "double", "nullable": true }, "linePricingText1": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Custom field in the business document.", "nullable": true, "example": "" }, "linePricingText2": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Custom field in the business document.", "nullable": true, "example": "" }, "linePricingText3": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Custom field in the business document.", "nullable": true, "example": "" }, "linePricingText4": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Custom field in the business document.", "nullable": true, "example": "" }, "linePricingText5": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Custom field in the business document.", "nullable": true, "example": "" }, "codingRows": { "type": "array", "items": { "$ref": "#/components/schemas/RequisitionCodingRow" }, "description": "Each requisition line can have only one coding row.", "nullable": true }, "deliveryAddress": { "$ref": "#/components/schemas/DeliveryAddress" }, "attachOrderPdfToXml": { "type": "boolean", "description": "Indicates whether the order PDF will be attached to the XML order sent to the supplier.", "nullable": true, "example": false }, "attachPdfToNetworkOrder": { "type": "boolean", "nullable": true }, "orderOwnerEmailAddress": { "maxLength": 1800, "minLength": 0, "pattern": "^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*)@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])$", "type": "string", "description": "Recipient email address where order is sent when orderRecipientType is set as Owner or SupplierAndOwner.", "nullable": true, "example": "john.smith@company.com" }, "ownerOrderingEmail": { "type": "string", "nullable": true }, "orderRecipientType": { "enum": [ "Supplier", "Owner", "SupplierAndOwner" ], "type": "string", "description": "Determines who order is sent to.\r\n-Supplier(0) : Order is sent only to supplier.\r\n-If orderingMethod is email, order is sent to the email indicated by 'supplierOrderingEmail'. -If orderingMethod is network, the order is sent through Basware network.\r\n-Owner (1): Order is sent only to email address(es) indicated by field 'otherOrderingEmail'. Used for example when goods were picked up from a store and no order needs to be sent to supplier.\r\n-SupplierAndOwner (2): Order is sent to both supplier and email addresses indicated by field 'otherOrderingEmail'. Order delivery method to supplier is determined by orderingMethod, same as above.", "example": "0" }, "supplierEmailAddress": { "maxLength": 1800, "minLength": 0, "pattern": "^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*)@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])$", "type": "string", "description": "Email address used to override the default supplier email address, when orderRecipientType is Supplier or SupplierAndOwner.", "nullable": true, "example": "john.smith@company.com" }, "supplierOrderingEmail": { "type": "string", "nullable": true }, "otherOrderingEmail": { "pattern": "^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*)@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])$", "type": "string", "description": "The email address(es) where the order is sent by P2P purchase. Can contain multiple email addresses separated by semicolon. The order is sent to these addresses when orderRecipientType is 'Owner' or 'Both'.", "nullable": true, "example": "john.smith@company.com" } }, "additionalProperties": false }, "ResponseEntityList": { "type": "object", "properties": { "requestId": { "type": "string", "description": "ID of the request on which error occurred (generated by Basware API).", "nullable": true, "example": "fbc082a2-65a4-469c-b230-d84a252f18fc" }, "hasErrors": { "type": "boolean", "description": "Specifies whether the request has errors." }, "errors": { "type": "array", "items": { "$ref": "#/components/schemas/ErrorEntity" }, "nullable": true } }, "additionalProperties": false, "description": "Errors returned here are returned synchronously from Basware API middle layer. Additional errors coming from target system(s) may be returned through errorFeedbacks API." }, "Role": { "type": "object", "properties": { "code": { "type": "string", "description": "TODO- Fix description- Specifies the role that is assigned to user. possible values \"https://confluence.basware.com/pages/viewpage.action?pageId=328080739#RM1258BaswareandPartnerUserLogin-Solution\". Remove p2p in front and add roles \"NetworkAU\" and \"NetworkUS\". No validation.", "nullable": true }, "tenants": { "type": "array", "items": { "$ref": "#/components/schemas/Tenant" }, "description": "Optional tenant list for filtering access by tenant. If left empty user is granted access to all tenants he has the system level access.", "nullable": true } }, "additionalProperties": false }, "Root": { "type": "object", "properties": { "applicationCode": { "type": "string", "nullable": true }, "applicationPermissions": { "type": "array", "items": { "$ref": "#/components/schemas/ApplicationPrivilege" }, "nullable": true } }, "additionalProperties": false }, "SaveOrganisationRequest": { "type": "object", "properties": { "organisations": { "type": "array", "items": { "$ref": "#/components/schemas/OrganizationEntity" }, "nullable": true }, "changedBy": { "type": "string", "nullable": true }, "isNewOrganization": { "type": "boolean", "nullable": true }, "isSuperAdmin": { "type": "boolean", "nullable": true } }, "additionalProperties": false }, "SaveSingleUserRequest": { "type": "object", "properties": { "changedBy": { "type": "string", "nullable": true }, "isNewUser": { "type": "boolean" }, "user": { "$ref": "#/components/schemas/UserEntity" } }, "additionalProperties": false }, "SaveUserRequest": { "type": "object", "properties": { "changedBy": { "type": "string", "nullable": true }, "users": { "type": "array", "items": { "$ref": "#/components/schemas/UserEntity" }, "nullable": true } }, "additionalProperties": false }, "SaveUserResponse": { "type": "object", "properties": { "requestId": { "type": "string", "description": "ID of the request on which error occurred (generated by Basware API).", "nullable": true, "example": "fbc082a2-65a4-469c-b230-d84a252f18fc" }, "hasErrors": { "type": "boolean", "description": "Specifies whether the request has errors." }, "errors": { "type": "array", "items": { "$ref": "#/components/schemas/ErrorEntity" }, "nullable": true }, "successExternalCodes": { "type": "array", "items": { "type": "string" }, "nullable": true } }, "additionalProperties": false }, "SchemaMaintenanceConfiguration": { "required": [ "fieldMaintenanceConfigurations", "schema" ], "type": "object", "properties": { "schema": { "enum": [ "Account", "Contract", "CostCenter", "TaxCode", "ExchangeRate", "PaymentTerm", "User", "Project", "MatchingOrder", "MatchingOrderLine", "GenericList", "AdvancedPermission", "TransferResponse", "PaymentResponse", "PrebookResponse", "Vendor", "AdvancedValidation", "PurchaseRequisition", "PurchaseOrder", "PurchaseGoodsReceipt", "Organization", "EnrichmentTransferResponse", "UserGroup", "UserGroupAssociatedUser", "UserGroupPermission" ], "type": "string" }, "fieldMaintenanceConfigurations": { "type": "array", "items": { "$ref": "#/components/schemas/FieldMaintenanceConfiguration" } } }, "additionalProperties": false }, "SourceConfiguration": { "type": "object", "properties": { "region": { "type": "string", "nullable": true }, "entityTypes": { "type": "array", "items": { "type": "string" }, "nullable": true } }, "additionalProperties": false }, "SpendingLimits": { "required": [ "category", "limit" ], "type": "object", "properties": { "category": { "maxLength": 100, "minLength": 1, "type": "string", "example": "C12" }, "limit": { "type": "number", "format": "double", "example": 10000 } }, "additionalProperties": false }, "StandardCodingEntity": { "required": [ "externalCode" ], "type": "object", "properties": { "externalCode": { "maxLength": 36, "minLength": 1, "type": "string", "description": "Coding row external code.", "example": "d5dc444e5c4a4222bc70ee1f8eabcb7d" }, "rowIndex": { "maximum": 100000, "minimum": 0, "type": "integer", "description": "Unique number assigned to a row at the time of it's creation. \r\nNote: Does not necessarily contain sequential numbers. May contain gaps (as in 1,2,5,6) in cases where coding lines are deleted.", "format": "int32", "nullable": true, "example": 1 }, "accountCode": { "maxLength": 50, "minLength": 0, "type": "string", "description": "Account code.", "nullable": true, "example": "18620" }, "accountName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Account name.", "nullable": true, "example": "Office expenses" }, "costCenterCode": { "maxLength": 200, "minLength": 0, "type": "string", "description": "Cost center code.", "nullable": true, "example": "61300" }, "costCenterName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Cose center name.", "nullable": true, "example": "Helsinki Office" }, "deliveryNoteNumber": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Delivery note number.", "nullable": true, "example": "" }, "lastComment": { "maxLength": 1000, "minLength": 0, "type": "string", "description": "Last user comment related to a coding row.", "nullable": true, "example": "" }, "matchingType": { "type": "integer", "description": "Order matching type. Possible values: \r\n0 = Regular, \r\n1 = Framework, \r\n2 = Return, \r\n3 = Service, \r\n4 = Many, \r\n5 = Subsequent.", "format": "int32", "nullable": true, "example": 0 }, "grossTotal": { "type": "number", "description": "Coding row gross sum, in invoice currency.", "format": "double", "nullable": true, "example": 1160 }, "grossTotalCompany": { "type": "number", "description": "Coding row gross sum, in company home currency.", "format": "double", "nullable": true, "example": 1160 }, "grossTotalOrganization": { "type": "number", "description": "Coding row gross sum, in organization currency.", "format": "double", "nullable": true, "example": 1160 }, "netTotal": { "type": "number", "description": "Coding row net sum, in invoice currency.", "format": "double", "nullable": true, "example": 1000 }, "netTotalCompany": { "type": "number", "description": "Coding row net sum, in company home currency.", "format": "double", "nullable": true, "example": 1000 }, "netTotalOrganization": { "type": "number", "description": "Coding row net sum, in organization currency.", "format": "double", "nullable": true, "example": 1000 }, "orderLineNetTotal": { "type": "number", "description": "Net total on (matched) order line.", "format": "double", "nullable": true, "example": 1000 }, "orderLineGrossTotal": { "type": "number", "description": "Gross total on (matched) order line.", "format": "double", "nullable": true, "example": 1160 }, "receivedQuantity": { "type": "number", "description": "Received quantity on (matched) goods receipt.", "format": "double", "nullable": true, "example": 100 }, "receivedNetPrice": { "type": "number", "description": "Received net unit price on (matched) goods receipt.", "format": "double", "nullable": true, "example": 10 }, "receivedGrossPrice": { "type": "number", "description": "Received gross unit price on (matched) goods receipt.", "format": "double", "nullable": true, "example": 11.6 }, "receivedNetTotal": { "type": "number", "description": "Received net total on (matched) goods receipt.", "format": "double", "nullable": true, "example": 1000 }, "receivedGrossTotal": { "type": "number", "description": "Received gross total on (matched) goods receipt.", "format": "double", "nullable": true, "example": 1160 }, "organizationElementName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Organization element name.", "nullable": true, "example": "Basware Helsinki" }, "organizationElementCode": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Organization element code.", "nullable": true, "example": "BW00" }, "freightSlip": { "type": "string", "description": "Freight slip.", "nullable": true, "example": "" }, "conversionNumerator": { "type": "number", "description": "Conversion numerator. Used in giving fractional unit amounts. Used with SAP.", "format": "double", "nullable": true, "example": 1 }, "conversionDeNumerator": { "type": "number", "description": "Deprecated field - not in use.", "format": "double", "nullable": true, "example": 1 }, "conversionDenominator": { "type": "number", "description": "Conversion denominator. Used in giving fractional unit amounts. Used with SAP.", "format": "double", "nullable": true, "example": 1 }, "orderedQuantity": { "type": "number", "description": "Ordered quantity on (matched) order line.", "format": "double", "nullable": true, "example": 10 }, "orderNetTotal": { "type": "number", "description": "Ordered net total on (matched) order line.", "format": "double", "nullable": true, "example": 1000 }, "orderGrossTotal": { "type": "number", "description": "Ordered gross total on (matched) order line.", "format": "double", "nullable": true, "example": 1160 }, "orderedNetPrice": { "type": "number", "description": "Ordered net unit price (matched) order line.", "format": "double", "nullable": true, "example": 10 }, "orderedGrossPrice": { "type": "number", "description": "Ordered gross unit price on (matched) order line.", "format": "double", "nullable": true, "example": 11.6 }, "internalOrderCode": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Internal order code.", "nullable": true, "example": "" }, "internalOrderName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Internal order name.", "nullable": true, "example": "" }, "orderItemNumber": { "type": "string", "description": "Order item number (from matched order line).", "nullable": true, "example": "1" }, "orderNumber": { "maxLength": 1000, "minLength": 0, "type": "string", "description": "Order number (from matched order).", "nullable": true, "example": "PO612298" }, "orderLineNumber": { "maxLength": 2000, "minLength": 0, "type": "string", "description": "Order line number (from matched order line).", "nullable": true, "example": "1" }, "contractNumber": { "maxLength": 255, "minLength": 0, "type": "string", "description": "Contract number.", "nullable": true, "example": "123456" }, "allocatedQuantity": { "type": "number", "description": "Allocated quantity.", "format": "double", "nullable": true, "example": 10 }, "matchedQuantity": { "type": "number", "description": "Matched quantity.", "format": "double", "nullable": true, "example": 10 }, "matchedNetSum": { "type": "number", "description": "Matched net sum.", "format": "double", "nullable": true, "example": 1000 }, "matchedGrossSum": { "type": "number", "description": "Matched gross sum.", "format": "double", "nullable": true, "example": 1160 }, "closeOrder": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Close order -indicator.", "nullable": true, "example": "" }, "plant": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Plant.", "nullable": true, "example": "" }, "profitCenterCode": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Profit center code.", "nullable": true, "example": "" }, "profitCenterName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Profit center name.", "nullable": true, "example": "" }, "businessUnitCode": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Business unit code.", "nullable": true, "example": "" }, "businessUnitName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Business unit name.", "nullable": true, "example": "" }, "projectCode": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Project code.", "nullable": true, "example": "" }, "projectName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Project name.", "nullable": true, "example": "" }, "projectSubCode": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Project sub code.", "nullable": true, "example": "" }, "projectSubName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Project sub name.", "nullable": true, "example": "" }, "employeeCode": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Employee code.", "nullable": true, "example": "" }, "employeeName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Employee name.", "nullable": true, "example": "" }, "vehicleNumber": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Vehicle number.", "nullable": true, "example": "" }, "vehicleName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Vehicle name.", "nullable": true, "example": "" }, "salesOrderCode": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Sales order code.", "nullable": true, "example": "" }, "salesOrderName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Sales order name.", "nullable": true, "example": "" }, "salesOrderSubCode": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Sales order sub code.", "nullable": true, "example": "" }, "salesOrderSubName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Sales order sub name.", "nullable": true, "example": "" }, "customerCode": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Customer code.", "nullable": true, "example": "" }, "customerName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Customer name.", "nullable": true, "example": "" }, "conditionType": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Condition type.", "nullable": true, "example": "" }, "accAssignmentCategoryCode": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Account assignment cotegory code.", "nullable": true, "example": "" }, "accAssignmentCategoryName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Account assignment category name.", "nullable": true, "example": "" }, "budgetCode": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Budget code.", "nullable": true, "example": "" }, "budgetName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Budget name.", "nullable": true, "example": "" }, "serviceCode": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Service code.", "nullable": true, "example": "" }, "serviceName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Service name.", "nullable": true, "example": "" }, "businessAreaCode": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Business area code.", "nullable": true, "example": "" }, "businessAreaName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Business area name.", "nullable": true, "example": "" }, "productCode": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Product code.", "nullable": true, "example": "" }, "productName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Product name.", "nullable": true, "example": "" }, "buyerName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Buyer name.", "nullable": true, "example": "" }, "orderLineDescription": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Order line description (from matched order line).", "nullable": true, "example": "Box of ball-point pencils" }, "orderLinePriceUnit": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Order line price unit (from matched order line).", "nullable": true, "example": "BOX" }, "orderLinePriceUnitDescription": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Order line price unit description (from matched order line).", "nullable": true, "example": "Box" }, "partnerProfitCenter": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Partner profit center.", "nullable": true, "example": "" }, "fixedAssetCode": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Fixed asset code.", "nullable": true, "example": "" }, "fixedAssetName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Fixed asset name.", "nullable": true, "example": "" }, "goodsReceiptItemNumber": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Goods receipt item number (from matched goods receipt).", "nullable": true, "example": "1" }, "goodsReceiptNumber": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Goods receipt number (from matched goods receipt).", "nullable": true, "example": "215871624" }, "materialGroup": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Material group.", "nullable": true, "example": "" }, "fiscalYear": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Fiscal Year.", "nullable": true, "example": "2021" }, "fixedAssetSubCode": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Fixed asset sub code.", "nullable": true, "example": "" }, "fixedAssetSubName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Fixed asset sub name.", "nullable": true, "example": "" }, "orderLineUOM": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Order line unit of measure (from matched order line).", "nullable": true, "example": "BOX" }, "subUOM": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Order line sub unit of measure (from matched order line).", "nullable": true, "example": "" }, "workOrderCode": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Work order code.", "nullable": true, "example": "" }, "workOrderName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Work order name.", "nullable": true, "example": "" }, "workOrderSubCode": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Work order sub code.", "nullable": true, "example": "" }, "workOrderSubName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Work order sub name.", "nullable": true, "example": "" }, "commitmentItem": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Commitment item.", "nullable": true, "example": "" }, "controllingArea": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Controlling area.", "nullable": true, "example": "" }, "functionalArea": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Functional area.", "nullable": true, "example": "" }, "network": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Network.", "nullable": true, "example": "" }, "networkActivity": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Network activity.", "nullable": true, "example": "" }, "orderCodingRowNumber": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Order coding row number - from coding row(s) of matched order line.", "nullable": true, "example": "1" }, "ownerName": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Owner name.", "nullable": true, "example": "" }, "taxCode": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Tax code.", "nullable": true, "example": "T16" }, "taxJurisdictionCode": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Tax juristiction code.", "nullable": true, "example": "" }, "taxPercent": { "maximum": 1000000000, "minimum": -1000000000, "type": "number", "description": "Tax percent.", "format": "double", "nullable": true, "example": 16 }, "taxPercent2": { "maximum": 1000000000, "minimum": -1000000000, "type": "number", "description": "Tax percent 2. Can be used for example for handling reverse charges on EU VAT.", "format": "double", "nullable": true, "example": 0 }, "taxSum": { "type": "number", "description": "Coding row tax sum, in invoice currency.", "format": "double", "nullable": true, "example": 160 }, "taxSumCompany": { "type": "number", "description": "Coding row tax sum, in company home currency.", "format": "double", "nullable": true, "example": 160 }, "taxSumOrganization": { "type": "number", "description": "Coding row tax sum, in organization currency.", "format": "double", "nullable": true, "example": 160 }, "taxSum2": { "type": "number", "description": "Coding row tax sum 2, in invoice currency.", "format": "double", "nullable": true, "example": 0 }, "taxSum2Company": { "type": "number", "description": "Coding row tax sum 2, in company home currency.", "format": "double", "nullable": true, "example": 0 }, "taxSum2Organization": { "type": "number", "description": "Coding row tax sum 2, in organization currency.", "format": "double", "nullable": true, "example": 0 }, "rowOrigin": { "maxLength": 50, "minLength": 0, "type": "string", "description": "Not in use. Reserved for indicating how coding row was created.", "nullable": true, "example": "" }, "plannedAdditionalCostType": { "type": "integer", "description": "Planned additional cost type.", "format": "int32", "example": 0 }, "dimCode1": { "maxLength": 250, "minLength": 0, "type": "string", "description": "dimCode1-10 are often used for additional, customer-specific, coding dimensions. Specifies the dimension code.", "nullable": true, "example": "" }, "dimCode2": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimCode3": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimCode4": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimCode5": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimCode6": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimCode7": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimCode8": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimCode9": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimCode10": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimName1": { "maxLength": 250, "minLength": 0, "type": "string", "description": "dimName1-10 are often used for additional, customer-specific, coding dimensions. Specifies the dimension name.", "nullable": true, "example": "" }, "dimName2": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimName3": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimName4": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimName5": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimName6": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimName7": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimName8": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimName9": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "dimName10": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "num1": { "type": "number", "description": "Num1-5 can be used for additional, customer-specific, numeric coding fields.", "format": "double", "nullable": true }, "num2": { "type": "number", "format": "double", "nullable": true }, "num3": { "type": "number", "format": "double", "nullable": true }, "num4": { "type": "number", "format": "double", "nullable": true }, "num5": { "type": "number", "format": "double", "nullable": true }, "text1": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Text1-5, Text84-85 can be used for additional, customer-specific, text coding fields.", "nullable": true, "example": "" }, "text2": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text3": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text4": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text5": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text84": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "text85": { "maxLength": 250, "minLength": 0, "type": "string", "nullable": true, "example": "" }, "date1": { "type": "string", "description": "Date1-5 can be used for additional, customer-specific, date coding fields.", "format": "date-time", "nullable": true }, "date2": { "type": "string", "format": "date-time", "nullable": true }, "date3": { "type": "string", "format": "date-time", "nullable": true }, "date4": { "type": "string", "format": "date-time", "nullable": true }, "date5": { "type": "string", "format": "date-time", "nullable": true } }, "additionalProperties": false }, "TargetConfiguration": { "type": "object", "properties": { "applicationCode": { "type": "string", "nullable": true }, "region": { "type": "string", "nullable": true }, "entityTypes": { "type": "array", "items": { "type": "string" }, "nullable": true } }, "additionalProperties": false }, "TaxCodeAdditionalData": { "type": "object", "properties": { "externalCode": { "maxLength": 32, "minLength": 0, "type": "string", "description": "Exernal code for tax calculation rule.", "nullable": true, "example": "c9921a52-6d8b-1017-cb8c-923d" }, "account": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Tax account. Used in creating tax account posting for SAP.", "nullable": true, "example": "46860" }, "statistical": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Statistical indicator. Used in SAP business logic for balance calculations. values: 'X' or null. When X, SAP skips balance check.", "nullable": true, "example": "X" }, "transactionType": { "maxLength": 25, "minLength": 0, "type": "string", "description": "SAP tax transaction type. Example values: MWST, VST.", "nullable": true, "example": "MWST" }, "taxPercent": { "type": "number", "description": "Tax percentage used for this tax calculation rule.", "format": "double", "nullable": true, "example": 25 }, "country": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Country code. Example values: DE, EN.", "nullable": true, "example": "EN" }, "condition": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Condition type. Technical field required back by SAP when posting invoices. Example values: MWVS, MWAS.", "nullable": true, "example": "MWVS" }, "active": { "type": "boolean", "description": "Is calculation rule active (true / false).", "nullable": true } }, "additionalProperties": false }, "TaxCodeCompanyEntity": { "required": [ "active", "companyCode", "inherit" ], "type": "object", "properties": { "companyCode": { "maxLength": 32, "minLength": 1, "type": "string", "description": "Defines a company code that the tax code is mapped to", "example": "BW01" }, "inherit": { "type": "boolean", "description": "The value specifies whether the property is inherited to lower organizations.", "example": false }, "active": { "type": "boolean", "description": "This flag will enable the data to be visible on UI, provided if the value is true, not visible in case of value is false. It will be also used for soft delete.", "example": true } }, "additionalProperties": false }, "TaxCodeEntity": { "required": [ "companies", "externalCode", "taxCode", "taxCodeNames", "taxPercentage" ], "type": "object", "properties": { "taxCode": { "maxLength": 25, "minLength": 1, "type": "string", "description": "Tax code.", "example": "B9" }, "taxCodeNames": { "type": "array", "items": { "$ref": "#/components/schemas/LanguageTranslationEntity" }, "description": "Defines name(s) for the tax code. Please always include 'en-US' language tag for Basware global support, as well as any local-language tag being used. If both translations are not available, please use the same string with both language tags." }, "taxGroup": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Tax Group", "nullable": true, "example": "" }, "taxPercentage": { "maximum": 1000000000, "minimum": -1000000000, "type": "number", "description": "Specifies the tax percentage.", "format": "double", "example": 10 }, "taxPercentage2": { "maximum": 1000000000, "minimum": -1000000000, "type": "number", "description": "Tax percentage 2 (may be used for example for partially deductible VAT)", "format": "double", "nullable": true, "example": 0 }, "additionalData": { "type": "array", "items": { "$ref": "#/components/schemas/TaxCodeAdditionalData" }, "description": "SAP tax calculation rules. Used with SAP interfaces.", "nullable": true }, "companies": { "type": "array", "items": { "$ref": "#/components/schemas/TaxCodeCompanyEntity" }, "description": "List of company units to associate taxcodes to P2P organization hierarchy" }, "externalCode": { "maxLength": 36, "minLength": 1, "type": "string", "description": "External identifier that is used as a key in API.", "example": "4847-31231212-212121-1212" }, "lastUpdated": { "type": "string", "description": "Timestamp when the record was last sent to API. Set automatically.", "format": "date-time" } }, "additionalProperties": false }, "TaxCodeResponse": { "type": "object", "properties": { "taxCodes": { "type": "array", "items": { "$ref": "#/components/schemas/TaxCodeEntity" }, "nullable": true } }, "additionalProperties": false }, "Tenant": { "required": [ "tenantCode" ], "type": "object", "properties": { "tenantCode": { "maxLength": 100, "minLength": 1, "type": "string", "description": "Specifies Basware Unique Tenant Id, currently basware customer id", "example": "acme:prod:eu:n:ak5eh4" } }, "additionalProperties": false }, "TenantProvisioningRequest": { "type": "object", "properties": { "sourceConfiguration": { "$ref": "#/components/schemas/SourceConfiguration" }, "targetConfigurations": { "type": "array", "items": { "$ref": "#/components/schemas/TargetConfiguration" }, "nullable": true }, "enabled": { "type": "boolean" }, "cloudFrontRedirect": { "type": "boolean" }, "accountingDocumentsStatusEndpointEnabled": { "type": "boolean" }, "preventDuplicateRecords": { "type": "boolean" }, "bwCustomerId": { "type": "string", "nullable": true }, "portfolioTenantId": { "type": "string", "nullable": true }, "tenantCode": { "type": "string", "nullable": true } }, "additionalProperties": false }, "TenantSettingsConfigurationRequest": { "type": "object", "properties": { "cloudFrontRedirect": { "type": "boolean" } }, "additionalProperties": false }, "TransferParameterEntity": { "required": [ "key", "value" ], "type": "object", "properties": { "key": { "maxLength": 250, "minLength": 1, "type": "string", "example": "InvoiceBatchId" }, "value": { "maxLength": 250, "minLength": 1, "type": "string", "example": "ca7f0c603388437ea9584446e26cf01c" } }, "additionalProperties": false }, "TransferResponseEntity": { "required": [ "externalCode", "paymentBlock", "responseMessage", "success" ], "type": "object", "properties": { "externalCode": { "maxLength": 36, "minLength": 1, "type": "string", "description": "External identifier that is used as a key in API. External code of the transferResponse needs to be unique within an accountingDocument -record. You should always create a new externalCode when sending response, there is no overwriting/editing of previous response. This will enable the visibility that all responses are tracked in API. ExternalCode in response messages plays no role in P2P (other than it is used in communication between P2P and the API layer).", "example": "9c857869cb5c4028ac79b03b57af12795" }, "success": { "type": "boolean", "description": "Specifies if the invoice was succesfully transfered to ERP system (true = invoice successfully transferred, false = transfer failed).", "example": true }, "responseMessage": { "maxLength": 250, "minLength": 1, "type": "string", "description": "Informative message for P2P user regarding the transfer. If transfer failed, please indicate reason for transfer failure in this message. This message is shown in invoice action log.", "example": "Invoice transferred to ERP." }, "sourceSystem": { "maxLength": 32, "minLength": 0, "type": "string", "description": "Indicates the system that is returning transfer response.", "nullable": true, "example": "ERP1" }, "voucherNumber1": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Available for returning voucher number from ERP system. Voucher number is saved onto the invoice in P2P.", "nullable": true, "example": "114785224" }, "voucherNumber2": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Available for returning second voucher number from ERP system. Voucher number 2 is saved onto the invoice in P2P.", "nullable": true, "example": "774785220" }, "transferDate": { "type": "string", "description": "Transfer date. Saved onto the invoice in P2P. Note: Field needs to be made visible in P2P UI to see sent value.", "format": "date-time", "nullable": true }, "paymentBlock": { "type": "boolean", "description": "Available for indicating if invoice has been set to payment blocked -state by the receiving ERP system. Saved onto the invoice in P2P.", "example": false } }, "additionalProperties": false }, "UserChangeHistory": { "type": "object", "properties": { "changedBy": { "type": "string", "nullable": true }, "customerId": { "type": "string", "nullable": true }, "requestId": { "type": "string", "nullable": true }, "action": { "type": "string", "nullable": true }, "organizationExternalCode": { "type": "string", "nullable": true }, "organizationHierarchy": { "type": "string", "nullable": true }, "sourceOfChange": { "type": "string", "nullable": true }, "oldJson": { "$ref": "#/components/schemas/UserEntityInternal" }, "newJson": { "$ref": "#/components/schemas/UserEntityInternal" } }, "additionalProperties": false }, "UserChangeHistoryRequest": { "type": "object", "properties": { "startDate": { "type": "string", "format": "date-time", "nullable": true }, "endDate": { "type": "string", "format": "date-time", "nullable": true }, "username": { "type": "string", "nullable": true }, "externalCode": { "type": "string", "nullable": true }, "organizationExternalCode": { "type": "string", "nullable": true } }, "additionalProperties": false }, "UserChangeHistoryResponse": { "type": "object", "properties": { "userChangeHistory": { "type": "array", "items": { "$ref": "#/components/schemas/UserChangeHistory" }, "nullable": true } }, "additionalProperties": false }, "UserEntity": { "required": [ "companyCode", "email", "externalCode", "firstName", "loginAccount", "surName" ], "type": "object", "properties": { "firstName": { "maxLength": 100, "minLength": 1, "type": "string", "description": "Specifies the user's first name.", "example": "John" }, "surName": { "maxLength": 100, "minLength": 1, "type": "string", "description": "Specifies the user's last name.", "example": "Smith" }, "uiLanguage": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Language code. Specifies the language in which the user uses the system. The languages, for example English or Finnish, are available in the language picker.", "nullable": true, "example": "en-US" }, "countryCode": { "maxLength": 3, "minLength": 2, "type": "string", "description": "Specifies user's country code. Not used in Basware P2P.", "nullable": true, "example": "FIN" }, "telephone": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Specifies the user's telephone number.", "nullable": true, "example": "501234567" }, "loginAccount": { "maxLength": 100, "minLength": 1, "type": "string", "description": "User identifier for authentication. With SSO loginAccount needs to match to the data that identity provider sends to Basware and with P2P basic authentication the loginAccount needs to match to what user keys in during authentication. For example BASWARE\\john.smith or john.smith@basware.com. Basware Access basic authentication uses email instead of loginAccount. P2P and Access allow changes to loginAccount without creating a new user, but in Network Portal loginAccount is unique identifier i.e. changed loginAccount means new user into Network Portal.", "example": "BASWARE\\\\JOHNSMITH" }, "middleInitial": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Specifies the user's middle name's initial letter.", "nullable": true, "example": "S" }, "email": { "maxLength": 320, "minLength": 3, "pattern": "^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*)@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])$", "type": "string", "description": "Specifies the user’s email address. User needs access to the email account in order to set password. Note: When loginType = 4 (Basware Access), the email is used as user’s login account and must be unique within a tenant. Else only the first user having the same email is accepted, next users are not created.", "example": "john.smith@company.com" }, "costCenterCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "User's default cost center code.", "nullable": true, "example": "1000" }, "validFrom": { "type": "string", "description": "The user is active and can use the system starting from this date. Note: This field is used by P2P and Access, not used by Network.", "format": "date-time", "nullable": true, "example": "2017-01-01" }, "validUntil": { "type": "string", "description": "On this date, the user is deactivated and can no longer use the system. Note: This field is used by P2P and Access, not used by Network.", "format": "date-time", "nullable": true, "example": "2018-01-02" }, "supervisorLoginAccount": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Unique user id of the user’s supervisor.", "nullable": true, "example": "BASWARE\\\\JOEGREEN" }, "personCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Defines the user’s person code that is mapped with the user’s employee ID.", "nullable": true, "example": "1002" }, "title": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Specifies the user's title.", "nullable": true, "example": "Solid line manager" }, "loginType": { "pattern": "0|2|4|99|", "type": "string", "description": "User 'loginType' needs to be 4 (user authentication through Basware Access) when the user is imported to any system besides (or in addition to) P2P. Following types of login are available.\r\nSingle service username and password login (0): Entry level option for cases when only one Basware service is in use. User is created to the Basware service user repository and authentication is with username and password. If more than one Basware service is in use this may cause situation where same user has different passwords for different Basware services and needs to authenticate separately to each service. Passwords are delivered via separate emails.\r\nSingle service SSO login (2): Single Sign On integrated solution for cases when only one Basware service is in use. Also used for Purchase Manager and Invoice Automation point to point authentication integration if other Basware services are not in use. Not applicable with some Basware Services (username and separate password is used in those services instead).\r\nBasware Access login (4): Authentication through Basware Access. Authentication for cases when all Basware services are in use or when Single Sign On integration is required and not otherwise supported. Supports both username and password authentication and SSO integrations. Requires provisioning Basware Access service into use. 'Password' -field above needs to be null when using Basware Access login type.\r\nDefined in P2P (99): Allows login type to be changed to one of the above in P2P Administration's user management module. Defaults to 'Default login type' set for the user's home organization in P2P.", "nullable": true, "example": "2" }, "accessEnabledLogin": { "type": "boolean", "description": "Allows user to login through Basware Access even if loginType != 4 (login through Basware Access).\r\nNeeds to be set to 'true' in cases where P2P uses a different loginType than 4 and CloudScan 3.0 or Reporting is required on the same user account.", "nullable": true, "example": true }, "approvalPasswordUseAllowed": { "type": "string", "description": "This value defines whether the system generates an approval password for the user to be used when approving purchase requisitions, purchase orders, and invoices.", "nullable": true, "example": "0" }, "collaborationSendType": { "pattern": "0|1|2|", "type": "string", "description": "Defines how notifications are sent for discussions and announcements. The options are: 0 = No notifications, 1 = For each new message, 2 = Daily summary.", "nullable": true, "example": "1" }, "messageSendType": { "pattern": "0|1|2|", "type": "string", "description": "Defines how notifications are sent for tasks. The options are: 0 = No notifications, 1= For each new task, 2 = Daily summary.", "nullable": true, "example": "1" }, "groups": { "type": "array", "items": { "$ref": "#/components/schemas/UserGroup" }, "description": "User groups in P2P. These determine user rights within P2P application. User groups are created and configured in P2P user group administration UI. When user group creation has been done, the groups can be assigned to users through this section of users API.", "nullable": true }, "userRecipientIdentifiers": { "$ref": "#/components/schemas/UserRecipientIdentifiers" }, "accessLoginMethod": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Used only when loginType = 4 (=Basware Access). Normally empty. Used when multiple login methods are used with Basware Access. Values supported by Access: 'EmailAndPwd', 'SSO1', (empty).\r\nWhen field needs to be used, applicable login method code(s) are provided by Basware SaaS production -personnel. When field empty, uses default value (which is configured by SaaS production).", "nullable": true, "example": "SSO1" }, "accessTimeout": { "maximum": 28800, "minimum": 900, "type": "integer", "description": "Used only when loginType = 4 (=Basware Access). User specific session idle timeout in seconds to use instead of the login method default. Determines how long user can stay logged in without using the system.", "format": "int32", "nullable": true, "example": 1800 }, "mfa": { "pattern": "notAllowed|optional|mandatory", "type": "string", "description": "Used only when loginType = 4 (=Basware Access). Determines Multi Factor Authentication settings (additional authentication using SMS or Google authenticator app for smartphones): required, allowed or disabled.", "nullable": true, "example": "optional" }, "sendAccountCreationEmail": { "pattern": "welcome|resetPwd|notSend", "type": "string", "description": "Used only when loginType = 4 (=Basware Access). Use 'welcome' if Basware Access should send welcome email containing a link for account activation. The password within the welcome email expires within an hour and can be recovered using 'forgot password' -function. Use 'notSend' if customer wants to send welcome email themselves or if welcome email is not required. ResetPwd is reserved for internal API usage.", "nullable": true, "example": "notSend" }, "accountCreationURI": { "type": "string", "description": "Used only when loginType = 4 (=Basware Access). Defines service address for welcome email sent by Basware Access. Put here the login URL of the service where you want the user to land (P2P, network, etc). In P2P case this is the URL that consultant would give for customer when using SSO login.", "nullable": true, "example": "https://tenantcode.p2p.basware.com/Portal/WifLogin" }, "companyCode": { "maxLength": 32, "minLength": 1, "type": "string", "description": "The company code specifies the user's home organization element. Note: The company to which a user is imported needs to be set up as an administrative site in P2P.", "example": "BW01" }, "loginAllowed": { "type": "boolean", "description": "Determines whether the user can access the system after the user details are saved. If field is omitted, it is treated as 'false'.", "nullable": true, "example": true }, "applicationGroups": { "type": "array", "items": { "type": "string" }, "description": "Used for assigning the user to application groups, which give the user login-access to specific applications (P2P, Reporting, Supplier Portal, etc). The applications belonging to each applicationGroup are maintained through applicationGroups API. Value(s) posted need to match to applicationGroupCodes created in applicationGroups API. Application group needs to be created before posting user to API. If no applicationGroups are specified, user will receive those applicationGroups where 'default' = 'true'.", "nullable": true }, "externalCode": { "maxLength": 36, "minLength": 1, "type": "string", "description": "Unique identifier in P2P and in Basware Access. Change to external code means a new user. The externalCode is ignored by Network Portal, which uses loginAccount as unique identifier.", "example": "BASWARE\\\\JOHNSMITH" }, "lastUpdated": { "type": "string", "description": "Timestamp when the record was last sent to API. Set automatically.", "format": "date-time" } }, "additionalProperties": false }, "UserEntityInternal": { "required": [ "companyCode", "email", "externalCode", "firstName", "loginAccount", "surName" ], "type": "object", "properties": { "applications": { "type": "array", "items": { "$ref": "#/components/schemas/Applications" }, "nullable": true }, "firstName": { "maxLength": 100, "minLength": 1, "type": "string", "description": "Specifies the user's first name.", "example": "John" }, "surName": { "maxLength": 100, "minLength": 1, "type": "string", "description": "Specifies the user's last name.", "example": "Smith" }, "uiLanguage": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Language code. Specifies the language in which the user uses the system. The languages, for example English or Finnish, are available in the language picker.", "nullable": true, "example": "en-US" }, "countryCode": { "maxLength": 3, "minLength": 2, "type": "string", "description": "Specifies user's country code. Not used in Basware P2P.", "nullable": true, "example": "FIN" }, "telephone": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Specifies the user's telephone number.", "nullable": true, "example": "501234567" }, "loginAccount": { "maxLength": 100, "minLength": 1, "type": "string", "description": "User identifier for authentication. With SSO loginAccount needs to match to the data that identity provider sends to Basware and with P2P basic authentication the loginAccount needs to match to what user keys in during authentication. For example BASWARE\\john.smith or john.smith@basware.com. Basware Access basic authentication uses email instead of loginAccount. P2P and Access allow changes to loginAccount without creating a new user, but in Network Portal loginAccount is unique identifier i.e. changed loginAccount means new user into Network Portal.", "example": "BASWARE\\\\JOHNSMITH" }, "middleInitial": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Specifies the user's middle name's initial letter.", "nullable": true, "example": "S" }, "email": { "maxLength": 320, "minLength": 3, "pattern": "^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*)@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])$", "type": "string", "description": "Specifies the user’s email address. User needs access to the email account in order to set password. Note: When loginType = 4 (Basware Access), the email is used as user’s login account and must be unique within a tenant. Else only the first user having the same email is accepted, next users are not created.", "example": "john.smith@company.com" }, "costCenterCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "User's default cost center code.", "nullable": true, "example": "1000" }, "validFrom": { "type": "string", "description": "The user is active and can use the system starting from this date. Note: This field is used by P2P and Access, not used by Network.", "format": "date-time", "nullable": true, "example": "2017-01-01" }, "validUntil": { "type": "string", "description": "On this date, the user is deactivated and can no longer use the system. Note: This field is used by P2P and Access, not used by Network.", "format": "date-time", "nullable": true, "example": "2018-01-02" }, "supervisorLoginAccount": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Unique user id of the user’s supervisor.", "nullable": true, "example": "BASWARE\\\\JOEGREEN" }, "personCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Defines the user’s person code that is mapped with the user’s employee ID.", "nullable": true, "example": "1002" }, "title": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Specifies the user's title.", "nullable": true, "example": "Solid line manager" }, "loginType": { "pattern": "0|2|4|99|", "type": "string", "description": "User 'loginType' needs to be 4 (user authentication through Basware Access) when the user is imported to any system besides (or in addition to) P2P. Following types of login are available.\r\nSingle service username and password login (0): Entry level option for cases when only one Basware service is in use. User is created to the Basware service user repository and authentication is with username and password. If more than one Basware service is in use this may cause situation where same user has different passwords for different Basware services and needs to authenticate separately to each service. Passwords are delivered via separate emails.\r\nSingle service SSO login (2): Single Sign On integrated solution for cases when only one Basware service is in use. Also used for Purchase Manager and Invoice Automation point to point authentication integration if other Basware services are not in use. Not applicable with some Basware Services (username and separate password is used in those services instead).\r\nBasware Access login (4): Authentication through Basware Access. Authentication for cases when all Basware services are in use or when Single Sign On integration is required and not otherwise supported. Supports both username and password authentication and SSO integrations. Requires provisioning Basware Access service into use. 'Password' -field above needs to be null when using Basware Access login type.\r\nDefined in P2P (99): Allows login type to be changed to one of the above in P2P Administration's user management module. Defaults to 'Default login type' set for the user's home organization in P2P.", "nullable": true, "example": "2" }, "accessEnabledLogin": { "type": "boolean", "description": "Allows user to login through Basware Access even if loginType != 4 (login through Basware Access).\r\nNeeds to be set to 'true' in cases where P2P uses a different loginType than 4 and CloudScan 3.0 or Reporting is required on the same user account.", "nullable": true, "example": true }, "approvalPasswordUseAllowed": { "type": "string", "description": "This value defines whether the system generates an approval password for the user to be used when approving purchase requisitions, purchase orders, and invoices.", "nullable": true, "example": "0" }, "collaborationSendType": { "pattern": "0|1|2|", "type": "string", "description": "Defines how notifications are sent for discussions and announcements. The options are: 0 = No notifications, 1 = For each new message, 2 = Daily summary.", "nullable": true, "example": "1" }, "messageSendType": { "pattern": "0|1|2|", "type": "string", "description": "Defines how notifications are sent for tasks. The options are: 0 = No notifications, 1= For each new task, 2 = Daily summary.", "nullable": true, "example": "1" }, "groups": { "type": "array", "items": { "$ref": "#/components/schemas/UserGroup" }, "description": "User groups in P2P. These determine user rights within P2P application. User groups are created and configured in P2P user group administration UI. When user group creation has been done, the groups can be assigned to users through this section of users API.", "nullable": true }, "userRecipientIdentifiers": { "$ref": "#/components/schemas/UserRecipientIdentifiers" }, "accessLoginMethod": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Used only when loginType = 4 (=Basware Access). Normally empty. Used when multiple login methods are used with Basware Access. Values supported by Access: 'EmailAndPwd', 'SSO1', (empty).\r\nWhen field needs to be used, applicable login method code(s) are provided by Basware SaaS production -personnel. When field empty, uses default value (which is configured by SaaS production).", "nullable": true, "example": "SSO1" }, "accessTimeout": { "maximum": 28800, "minimum": 900, "type": "integer", "description": "Used only when loginType = 4 (=Basware Access). User specific session idle timeout in seconds to use instead of the login method default. Determines how long user can stay logged in without using the system.", "format": "int32", "nullable": true, "example": 1800 }, "mfa": { "pattern": "notAllowed|optional|mandatory", "type": "string", "description": "Used only when loginType = 4 (=Basware Access). Determines Multi Factor Authentication settings (additional authentication using SMS or Google authenticator app for smartphones): required, allowed or disabled.", "nullable": true, "example": "optional" }, "sendAccountCreationEmail": { "pattern": "welcome|resetPwd|notSend", "type": "string", "description": "Used only when loginType = 4 (=Basware Access). Use 'welcome' if Basware Access should send welcome email containing a link for account activation. The password within the welcome email expires within an hour and can be recovered using 'forgot password' -function. Use 'notSend' if customer wants to send welcome email themselves or if welcome email is not required. ResetPwd is reserved for internal API usage.", "nullable": true, "example": "notSend" }, "accountCreationURI": { "type": "string", "description": "Used only when loginType = 4 (=Basware Access). Defines service address for welcome email sent by Basware Access. Put here the login URL of the service where you want the user to land (P2P, network, etc). In P2P case this is the URL that consultant would give for customer when using SSO login.", "nullable": true, "example": "https://tenantcode.p2p.basware.com/Portal/WifLogin" }, "companyCode": { "maxLength": 32, "minLength": 1, "type": "string", "description": "The company code specifies the user's home organization element. Note: The company to which a user is imported needs to be set up as an administrative site in P2P.", "example": "BW01" }, "loginAllowed": { "type": "boolean", "description": "Determines whether the user can access the system after the user details are saved. If field is omitted, it is treated as 'false'.", "nullable": true, "example": true }, "applicationGroups": { "type": "array", "items": { "type": "string" }, "description": "Used for assigning the user to application groups, which give the user login-access to specific applications (P2P, Reporting, Supplier Portal, etc). The applications belonging to each applicationGroup are maintained through applicationGroups API. Value(s) posted need to match to applicationGroupCodes created in applicationGroups API. Application group needs to be created before posting user to API. If no applicationGroups are specified, user will receive those applicationGroups where 'default' = 'true'.", "nullable": true }, "externalCode": { "maxLength": 36, "minLength": 1, "type": "string", "description": "Unique identifier in P2P and in Basware Access. Change to external code means a new user. The externalCode is ignored by Network Portal, which uses loginAccount as unique identifier.", "example": "BASWARE\\\\JOHNSMITH" }, "lastUpdated": { "type": "string", "description": "Timestamp when the record was last sent to API. Set automatically.", "format": "date-time" } }, "additionalProperties": false }, "UserExistenceRequest": { "type": "object", "properties": { "externalCode": { "type": "string", "nullable": true } }, "additionalProperties": false }, "UserExistenceResponse": { "type": "object", "properties": { "doesUserExists": { "type": "boolean" } }, "additionalProperties": false }, "UserGroup": { "required": [ "externalGroupCode" ], "type": "object", "properties": { "externalGroupCode": { "maxLength": 260, "minLength": 1, "type": "string", "description": "Specifies the user group to which the user gets assigned. Needs to match with 'External code' of User group in P2P user groups administration UI.", "example": "Approvers_200" }, "active": { "type": "boolean", "description": "Specifies is the user group active. Note: P2P allows a delete/insert -import of user groups by enabling setting: \"P2P Administration\" -> \"Settings\" -> \"Delete existing user groups when importing users\".", "nullable": true, "example": true } }, "additionalProperties": false }, "UserRecipientIdentifiers": { "type": "object", "properties": { "identifier1": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Identifier1-5: Specifies invoice recipient group(s), to which the user belongs.", "nullable": true, "example": "Europe" }, "identifier2": { "maxLength": 250, "minLength": 0, "type": "string", "description": "", "nullable": true, "example": "" }, "identifier3": { "maxLength": 250, "minLength": 0, "type": "string", "description": "", "nullable": true, "example": "" }, "identifier4": { "maxLength": 250, "minLength": 0, "type": "string", "description": "", "nullable": true, "example": "" }, "identifier5": { "maxLength": 250, "minLength": 0, "type": "string", "description": "", "nullable": true, "example": "" } }, "additionalProperties": false, "description": "Recipient identifier data in P2P. Can be used for specifying invoice recipient groups. Note: User recipient identifiers in P2P are overridden with values received through API. When no values are specified in API, the fields are emptied in P2P." }, "UserResponse": { "type": "object", "properties": { "users": { "type": "array", "items": { "$ref": "#/components/schemas/UserEntity" }, "nullable": true } }, "additionalProperties": false }, "UserResponseInternal": { "type": "object", "properties": { "users": { "type": "array", "items": { "$ref": "#/components/schemas/UserEntityInternal" }, "nullable": true } }, "additionalProperties": false }, "VendorAdditionalFieldEntity": { "required": [ "name", "value" ], "type": "object", "properties": { "name": { "maxLength": 25, "minLength": 1, "type": "string", "description": "Name of Supplier additional data key field.", "example": "TaxRegistrationValidUntil" }, "value": { "maxLength": 250, "minLength": 1, "type": "string", "description": "Value for key field specified above.", "example": "2021-06-30\"" }, "groupName": { "maxLength": 500, "minLength": 0, "type": "string", "description": "Group name. Not used in P2P.", "nullable": true } }, "additionalProperties": false }, "VendorAddressEntity": { "required": [ "externalCode", "name" ], "type": "object", "properties": { "externalCode": { "maxLength": 36, "minLength": 1, "type": "string", "description": "External code for vendor address.", "example": "d6437eef-0d71-4cb0-8a6e-7f114831479d" }, "name": { "maxLength": 200, "minLength": 1, "type": "string", "description": "Specifies the address' name for the vendor.", "example": "Delivery address" }, "description": { "maxLength": 200, "minLength": 0, "type": "string", "description": "Freetext description of the address.", "nullable": true, "example": "Default delivery addrss" }, "addressType": { "enum": [ "AdditionalAddress", "VisitingAddress", "RemittanceAddress", "DeliveryAddress", "PostalAddress", "RegistrationAddress" ], "type": "string", "description": "Specifies type of the address. Typically PostalAddress and DeliveryAddress are used with P2P. Types supported by P2P: PostalAddress, DeliveryAddress, AdditionalAddress, RemittanceAddress.", "nullable": true, "example": "DeliveryAddress" }, "addressLine1": { "maxLength": 200, "minLength": 0, "type": "string", "description": "Vendor address as free text, line 1. Use by target systems - P2P: no, Vendor manager: yes.", "nullable": true, "example": "1800 Main Street" }, "addressLine2": { "maxLength": 200, "minLength": 0, "type": "string", "description": "Vendor address as free text, line 2. Use by target systems - P2P: no, Vendor manager: yes.", "nullable": true }, "addressLine3": { "maxLength": 200, "minLength": 0, "type": "string", "description": "Vendor address as free text, line 3. Use by target systems - P2P: no, Vendor manager: yes.", "nullable": true }, "cityName": { "maxLength": 50, "minLength": 0, "type": "string", "nullable": true, "example": "Dallas" }, "postalZone": { "maxLength": 50, "minLength": 0, "type": "string", "nullable": true, "example": "75201" }, "poBox": { "maxLength": 50, "minLength": 0, "type": "string", "nullable": true, "example": "724" }, "streetName": { "maxLength": 50, "minLength": 0, "type": "string", "nullable": true, "example": "Burlington Avenue" }, "locality": { "maxLength": 50, "minLength": 0, "type": "string", "description": "Attribute to postalAddress. This field is required in UK if a similar road name exists within a post town area.", "nullable": true, "example": "Burlington" }, "countrySubEntity": { "maxLength": 50, "minLength": 0, "type": "string", "nullable": true, "example": "TX" }, "countrySubEntityDescription": { "maxLength": 50, "minLength": 0, "type": "string", "nullable": true, "example": "Texas" }, "countryId": { "maxLength": 2, "minLength": 2, "type": "string", "description": "Defines the country ID for the account. Please use 2-char ISO country codes (according to ISO-3166-1 -standard). Note: This field is not used in P2P.", "nullable": true, "example": "US" }, "default": { "type": "boolean", "description": "Is this the default address (true / false).", "nullable": true }, "additionalAddressFields": { "type": "array", "items": { "$ref": "#/components/schemas/VendorAddressPartEntity" }, "description": "Additional address fields. Use by target systems - P2P: yes, Vendor manager: no.", "nullable": true } }, "additionalProperties": false }, "VendorAddressPartEntity": { "type": "object", "properties": { "key": { "enum": [ "AdditionalField1", "AdditionalField2", "AdditionalStreetName", "BlockName", "BuildingName", "BuildingNumber", "CitySubDivisionName", "Country", "Department", "District", "Email", "Floor", "GlobalLocationNumber", "InhouseEmail", "MarkAttention", "MarkCare", "Region", "Room", "CoordinateSystemCode", "PlotIdentification", "LatitudeDegreesMeasure", "LatitudeDirectionCode", "LatitudeMinutesMeasure", "LongitudeDegreesMeasure", "LongitudeDirectionCode", "LongitudeMinutesMeasure" ], "type": "string" }, "value": { "maxLength": 200, "minLength": 0, "type": "string", "nullable": true } }, "additionalProperties": false }, "VendorBusinessDescriptionEntity": { "type": "object", "properties": { "type": { "maxLength": 50, "minLength": 0, "type": "string", "nullable": true, "example": "Active" }, "modificationDate": { "type": "string", "format": "date-time", "nullable": true, "example": "01/01/0001" }, "source": { "maxLength": 50, "minLength": 0, "type": "string", "nullable": true } }, "additionalProperties": false }, "VendorCandidateDataModel": { "type": "object", "properties": { "baswareAccountId": { "type": "string", "nullable": true }, "buvid": { "type": "string", "nullable": true } }, "additionalProperties": false }, "VendorCandidateModelEntity": { "required": [ "name" ], "type": "object", "properties": { "externalCode": { "maxLength": 36, "minLength": 0, "type": "string", "description": "Specifies a unique code to identify vendor for updates through Basware API.", "nullable": true, "example": "c6437eef-0d71-4cb0-8a6e-7f114831478d" }, "vendorCode": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Vendor code to be selected by user onto invoice. Normally the vendor code used by Customer ERP system.", "nullable": true, "example": "ADFS1254" }, "companies": { "type": "array", "items": { "$ref": "#/components/schemas/VendorCompanyEntity" }, "description": "List of company units to associate vendor to P2P organization hierarchy", "nullable": true }, "vendorParent": { "type": "string", "description": "VendorCode of parent. Not used in Basware P2P.", "nullable": true, "example": "AS12154" }, "buvid": { "maxLength": 36, "minLength": 0, "type": "string", "description": "Vendor identifier generated by Basware. Not to be included when posting data.", "nullable": true, "example": "f0b29a62-a5e0-4285-8ceb-11a92eccf212" }, "name": { "maxLength": 250, "minLength": 1, "type": "string", "description": "Vendor name.", "example": "Things and Gadgets Inc." }, "sourceSystem": { "maxLength": 36, "minLength": 0, "type": "string", "description": "Name of the source system, e.g. ERP instance", "nullable": true, "example": "SAPEUR1" }, "description": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Freetext description of vendor", "nullable": true, "example": "" }, "lastUpdated": { "type": "string", "description": "Timestamp when the record was last sent to API. Set automatically.", "format": "date-time" }, "supplierAssignedAccountId": { "maxLength": 128, "minLength": 0, "type": "string", "description": "Customer ID in vendor's system.", "nullable": true, "example": "12890" }, "eligibleForSourcing": { "type": "boolean", "description": "Specifies whether the vendor is eligible for sourcing activities. This flag can be used to mark vendors that need to be copied to an external sourcing system. Note: If your sourcing system does not support a multiple company -structure, please make sure only one company-specific instance of the each vendor has eligibleForSourcing = 'true'.", "nullable": true, "example": false }, "vendorClass": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Specifies vendor class. Can be used to determine preferred vendors in P2P Purchase. Values are determined by customer. Typical example values: A, B, C, Preferred. Note: Allowed values for vendor class need to be configured in P2P before posting data.", "nullable": true, "example": "Preferred" }, "identifiers": { "type": "array", "items": { "$ref": "#/components/schemas/VendorIdentifierEntity" }, "description": "Vendor identifiers", "nullable": true }, "addresses": { "type": "array", "items": { "$ref": "#/components/schemas/VendorAddressEntity" }, "description": "Vendor addresses", "nullable": true }, "contacts": { "type": "array", "items": { "$ref": "#/components/schemas/VendorContactEntity" }, "description": "Vendor contacts. Used in Vendor Manager. Not used in Basware P2P, except for email address -field.", "nullable": true }, "deliveryTerm": { "$ref": "#/components/schemas/VendorDeliveryTermEntity" }, "paymentMeans": { "type": "array", "items": { "$ref": "#/components/schemas/VendorPaymentMeanEntity" }, "description": "Vendor payment means", "nullable": true }, "paymentTerms": { "$ref": "#/components/schemas/VendorPaymentTermEntity" }, "orderingDetails": { "$ref": "#/components/schemas/VendorOrderingDetailsEntity" }, "processingStatus": { "$ref": "#/components/schemas/VendorProcessingStatusEntity" }, "tags": { "type": "array", "items": { "$ref": "#/components/schemas/VendorTagEntity" }, "description": "Tags are used to group the vendors. Not used in P2P.", "nullable": true }, "customFields": { "type": "array", "items": { "$ref": "#/components/schemas/VendorAdditionalFieldEntity" }, "description": "Custom fields are used to provide additional data. Posted as ‘Supplier additional data’ -fields to P2P.", "nullable": true } }, "additionalProperties": false }, "VendorCompanyEntity": { "required": [ "companyCode" ], "type": "object", "properties": { "companyCode": { "maxLength": 32, "minLength": 1, "type": "string", "description": "Specifies the organization that the vendor is mapped to.", "example": "BW00" }, "inheritToChildUnits": { "type": "boolean", "description": "Specifies whether the vendor is inherited to lower organizations.", "nullable": true } }, "additionalProperties": false }, "VendorComplianceDataEntity": { "type": "object", "properties": { "complianceType": { "$ref": "#/components/schemas/VendorComplianceTypeEntity" }, "modificationDate": { "type": "string", "format": "date-time", "nullable": true }, "source": { "maxLength": 50, "minLength": 0, "type": "string", "description": "", "nullable": true, "example": "Mastercard" } }, "additionalProperties": false }, "VendorComplianceTypeEntity": { "type": "object", "properties": { "noOfSanctions": { "maximum": 100, "minimum": 0, "type": "integer", "format": "int32", "nullable": true }, "noOfPep": { "maximum": 100, "minimum": 0, "type": "integer", "format": "int32", "nullable": true }, "noOfLawenforcement": { "maximum": 100, "minimum": 0, "type": "integer", "format": "int32", "nullable": true }, "noOfFinancialRegulator": { "maximum": 100, "minimum": 0, "type": "integer", "format": "int32", "nullable": true }, "noOfAdverseMedia": { "maximum": 100, "minimum": 0, "type": "integer", "format": "int32", "nullable": true }, "noOfInsolvency": { "maximum": 100, "minimum": 0, "type": "integer", "format": "int32", "nullable": true }, "noOfDisqualifiedDirector": { "maximum": 100, "minimum": 0, "type": "integer", "format": "int32", "nullable": true }, "noOfIdv": { "maximum": 100, "minimum": 0, "type": "integer", "format": "int32", "nullable": true } }, "additionalProperties": false }, "VendorContactEntity": { "required": [ "name" ], "type": "object", "properties": { "name": { "maxLength": 200, "minLength": 1, "type": "string", "description": "Name of the contact. Used as a key in list of contacts. Note: Max length 50 chars if vendors are imported to ScanMarket.", "example": "DeliveryContact1" }, "description": { "maxLength": 200, "minLength": 0, "type": "string", "nullable": true, "example": "Use this as a primary contact" }, "telephone": { "maxLength": 50, "minLength": 0, "type": "string", "description": "Specifies the vendor's telephone number.", "nullable": true, "example": "555-3342-454" }, "telefax": { "maxLength": 50, "minLength": 0, "type": "string", "description": "Specifies the vendor's fax number.", "nullable": true, "example": "555-3342-45412" }, "email": { "maxLength": 200, "minLength": 0, "type": "string", "description": "Specifies the vendor's email address. Field is imported to P2P.", "nullable": true, "example": "contact@vendor.com" }, "website": { "maxLength": 200, "minLength": 0, "type": "string", "description": "Specifies the vendor's web site address.", "nullable": true, "example": "www.mrSmith.com" }, "role": { "enum": [ "AdditionalContact", "PrimaryContact", "SecondaryContact" ], "type": "string" } }, "additionalProperties": false }, "VendorCreditRiskDataEntity": { "type": "object", "properties": { "creditRatingDataFlag": { "type": "boolean", "nullable": true }, "creditRating": { "maxLength": 1000, "minLength": 0, "type": "string", "nullable": true }, "modificationDate": { "type": "string", "format": "date-time", "nullable": true, "example": "01/01/0001" }, "source": { "maxLength": 50, "minLength": 0, "type": "string", "nullable": true, "example": "Mastercard" } }, "additionalProperties": false }, "VendorDeliveryTermEntity": { "required": [ "deliveryTermCode" ], "type": "object", "properties": { "deliveryTermCode": { "maxLength": 25, "minLength": 1, "type": "string", "description": "Specifies the vendor's delivery term code.", "example": "D02" }, "deliveryLocation": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Specifies delivery location to be used with delivery term selected on order sent to vendor from P2P Purchase.", "nullable": true, "example": "Office" }, "description": { "maxLength": 200, "minLength": 0, "type": "string", "description": "Default delivery term description.", "nullable": true } }, "additionalProperties": false }, "VendorEnrichedFieldsEntity": { "type": "object", "properties": { "industryCodes": { "type": "array", "items": { "$ref": "#/components/schemas/VendorIndustryCodeEntity" }, "nullable": true }, "businessDescription": { "type": "array", "items": { "$ref": "#/components/schemas/VendorBusinessDescriptionEntity" }, "nullable": true }, "creditRiskData": { "type": "array", "items": { "$ref": "#/components/schemas/VendorCreditRiskDataEntity" }, "nullable": true }, "complianceData": { "type": "array", "items": { "$ref": "#/components/schemas/VendorComplianceDataEntity" }, "nullable": true } }, "additionalProperties": false }, "VendorEntity": { "required": [ "companies", "externalCode", "name", "vendorCode" ], "type": "object", "properties": { "externalCode": { "maxLength": 36, "minLength": 1, "type": "string", "description": "Specifies a unique code to identify vendor for updates through Basware API.", "example": "c6437eef-0d71-4cb0-8a6e-7f114831478d" }, "vendorCode": { "maxLength": 25, "minLength": 1, "type": "string", "description": "Vendor code. Normally the vendor code used by Customer ERP system.", "example": "81264" }, "vendorParent": { "type": "string", "description": "VendorCode of parent. Not used in Basware P2P.", "nullable": true, "example": "AS12154" }, "buvid": { "maxLength": 36, "minLength": 0, "type": "string", "description": "Vendor identifier generated by Basware. Not to be included when posting data.", "nullable": true, "example": "f0b29a62-a5e0-4285-8ceb-11a92eccf212" }, "name": { "maxLength": 250, "minLength": 1, "type": "string", "description": "Vendor name.", "example": "Things and Gadgets Inc." }, "sourceSystem": { "maxLength": 36, "minLength": 0, "type": "string", "description": "Name of the source system, e.g. ERP instance", "nullable": true, "example": "SAPEUR1" }, "description": { "maxLength": 250, "minLength": 0, "type": "string", "description": "Freetext description of vendor", "nullable": true, "example": "" }, "lastUpdated": { "type": "string", "description": "Timestamp when the record was last sent to API. Set automatically.", "format": "date-time" }, "supplierAssignedAccountId": { "maxLength": 128, "minLength": 0, "type": "string", "description": "Customer ID in vendor's system.", "nullable": true, "example": "12890" }, "eligibleForSourcing": { "type": "boolean", "description": "Specifies whether the vendor is eligible for sourcing activities. This flag can be used to mark vendors that need to be copied to an external sourcing system. Note: If your sourcing system does not support a multiple company -structure, please make sure only one company-specific instance of the each vendor has eligibleForSourcing = 'true'.", "nullable": true, "example": false }, "vendorClass": { "maxLength": 100, "minLength": 0, "type": "string", "description": "Specifies vendor class. Can be used to determine preferred vendors in P2P Purchase. Values are determined by customer. Typical example values: A, B, C, Preferred. Note: Allowed values for vendor class need to be configured in P2P before posting data.", "nullable": true, "example": "Preferred" }, "identifiers": { "type": "array", "items": { "$ref": "#/components/schemas/VendorIdentifierEntity" }, "description": "Vendor identifiers", "nullable": true }, "addresses": { "type": "array", "items": { "$ref": "#/components/schemas/VendorAddressEntity" }, "description": "Vendor addresses", "nullable": true }, "contacts": { "type": "array", "items": { "$ref": "#/components/schemas/VendorContactEntity" }, "description": "Vendor contacts. Used in Vendor Manager. Not used in Basware P2P, except for email address -field.", "nullable": true }, "deliveryTerm": { "$ref": "#/components/schemas/VendorDeliveryTermEntity" }, "paymentMeans": { "type": "array", "items": { "$ref": "#/components/schemas/VendorPaymentMeanEntity" }, "description": "Vendor payment means", "nullable": true }, "paymentTerms": { "$ref": "#/components/schemas/VendorPaymentTermEntity" }, "orderingDetails": { "$ref": "#/components/schemas/VendorOrderingDetailsEntity" }, "processingStatus": { "$ref": "#/components/schemas/VendorProcessingStatusEntity" }, "tags": { "type": "array", "items": { "$ref": "#/components/schemas/VendorTagEntity" }, "description": "Tags are used to group the vendors. Not used in P2P.", "nullable": true }, "customFields": { "type": "array", "items": { "$ref": "#/components/schemas/VendorAdditionalFieldEntity" }, "description": "Custom fields are used to provide additional data. Posted as ‘Supplier additional data’ -fields to P2P.", "nullable": true }, "companies": { "type": "array", "items": { "$ref": "#/components/schemas/VendorCompanyEntity" }, "description": "List of company units to associate vendor to P2P organization hierarchy" } }, "additionalProperties": false }, "VendorIdentifierEntity": { "required": [ "id", "schemeId" ], "type": "object", "properties": { "id": { "maxLength": 36, "minLength": 1, "type": "string", "description": "Value of the identifier type specified by 'schemeId'.", "example": "0592542-4" }, "schemeId": { "maxLength": 32, "minLength": 1, "type": "string", "description": "Specifies identifier type. Typically used for eInvoicing address, VAT ID, local registry id, DUNS, GLN, etc. Configure available values in P2P. Available values are the supplier identifier keys configured in P2P \"identifier configuration\". For example 'PartyId' is commonly used for supplier's eInvoicing address.", "example": "PartyId" }, "defaultPartyId": { "type": "boolean", "description": "Is this the default identifier: true / false.", "nullable": true } }, "additionalProperties": false }, "VendorIndustryCodeEntity": { "type": "object", "properties": { "code": { "maxLength": 50, "minLength": 0, "type": "string", "nullable": true, "example": "C" }, "description": { "maxLength": 256, "minLength": 0, "type": "string", "nullable": true, "example": "Construction" }, "schemeId": { "maxLength": 50, "minLength": 0, "type": "string", "nullable": true, "example": "DNB" }, "schemeDescription": { "maxLength": 50, "minLength": 0, "type": "string", "nullable": true }, "modificationDate": { "type": "string", "format": "date-time", "nullable": true, "example": "01/01/0001\"" }, "source": { "maxLength": 50, "minLength": 0, "type": "string", "nullable": true } }, "additionalProperties": false }, "VendorOrderingDetailsEntity": { "type": "object", "properties": { "orderingFormat": { "enum": [ "UBL", "EHFXML21", "email", "other", "none", "BaswareNetwork" ], "type": "string", "description": "Specifies format in which orders are sent to vendor (from P2P Purchase).\r\n'UBL' = Deprecated value, will be converted to 'BaswareNetwork'.\r\n'EHFXML21' = Deprecated value, will be converted to 'BaswareNetwork'.\r\n'email' = Deliver purchase orders by email as PDF attachments or SmartOrders.\r\n'other' = Deprecated value, will be converted to 'none'.\r\n'none' = Vendor not available for purchasing process.\r\n'BaswareNetwork' = Deliver purchase orders in XML UBL2.0 format to Basware Network. \r\n\r\nNote: Since all ERP systems do not have a field for this information, P2P can be configured so that this field is maintained in P2P instead of being imported through API.", "nullable": true, "example": "none" }, "orderingMessageLanguage": { "maxLength": 10, "minLength": 0, "type": "string", "description": "Specifies language of order -message sent to vendor from P2P Purchase.", "nullable": true, "example": "en-US" }, "orderingLanguage": { "maxLength": 25, "minLength": 0, "type": "string", "description": "Specifies region-specific texts, including number- and date formats used in the order -message sent to supplier from P2P Purchase.", "nullable": true, "example": "en-US" }, "orderEmail": { "maxLength": 320, "minLength": 3, "pattern": "^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*)@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])$", "type": "string", "description": "Specifies the supplier's email address where the purchase order is sent to. Note: Since all ERP systems do not have a field for this information, P2P can be configured so that this field is maintained in P2P instead of being imported through API.", "nullable": true, "example": "orders@vendor.com" }, "orderProcessType": { "maxLength": 50, "minLength": 0, "type": "string", "description": "Name of order process. Not used in Basware P2P.", "nullable": true }, "minimumOrderAllowed": { "type": "number", "description": "Value of the minimum order allowed. Not used in Basware P2P.", "format": "double", "nullable": true }, "isTaxable": { "type": "boolean", "description": "Are purchases from this vendor taxable. Not used in Basware P2P.", "nullable": true }, "automaticallyReceiveOnInvoice": { "type": "boolean", "description": "Not used in Basware P2P.", "nullable": true }, "automaticallyReceiveOnOrder": { "type": "boolean", "description": "Not used in Basware P2P.", "nullable": true }, "hasActiveCatalog": { "type": "boolean", "description": "Not used in Basware P2P.", "nullable": true }, "createOrderAutomatically": { "type": "boolean", "description": "Not used in Basware P2P.", "nullable": true }, "deliverOrderAutomatically": { "type": "boolean", "description": "Not used in Basware P2P.", "nullable": true }, "noFreeformItems": { "type": "boolean", "description": "Not used in Basware P2P.", "nullable": true }, "sendToNetwork": { "type": "boolean", "description": "Not used in Basware P2P.", "nullable": true } }, "additionalProperties": false }, "VendorPaymentMeanEntity": { "required": [ "paymentMeansCode" ], "type": "object", "properties": { "paymentMeansCode": { "maxLength": 25, "minLength": 1, "type": "string", "description": "Specifies the payment means code.", "example": "A001" }, "description": { "maxLength": 200, "minLength": 0, "type": "string", "description": "Specifies payment means description.", "nullable": true, "example": "Payment by a pre-printed form (check)." }, "currencyCode": { "maxLength": 3, "minLength": 3, "type": "string", "description": "Specifies vendor default currency. This is used as vendor's default currency in P2P. Notes: 1) currencyCode of the payment means -block where default = 'true' is selected as the vendor's default currency in P2P. 2) This currency needs to be marked as 'active' in P2P.", "nullable": true, "example": "USD" }, "financialAccounts": { "type": "array", "items": { "$ref": "#/components/schemas/VendorfinancialAccountsEntity" }, "nullable": true }, "default": { "type": "boolean", "description": "Is this the default payment means (true / false).", "nullable": true } }, "additionalProperties": false }, "VendorPaymentTermEntity": { "required": [ "paymentTermCode" ], "type": "object", "properties": { "paymentTermCode": { "maxLength": 25, "minLength": 1, "type": "string", "description": "Specifies the vendor's payment term code", "example": "Net90" }, "description": { "maxLength": 200, "minLength": 0, "type": "string", "nullable": true, "example": "Payment 90 days after invoice date" } }, "additionalProperties": false }, "VendorProcessingStatusEntity": { "type": "object", "properties": { "active": { "type": "boolean", "description": "Is the vendor active : true / false.", "nullable": true }, "paymentDenied": { "type": "boolean", "description": "Is payment block is enabled for the vendor: true / false.", "nullable": true, "example": false } }, "additionalProperties": false }, "VendorResponse": { "required": [ "vendorEntities" ], "type": "object", "properties": { "vendorEntities": { "type": "array", "items": { "$ref": "#/components/schemas/VendorEntity" } } }, "additionalProperties": false }, "VendorTagEntity": { "required": [ "name", "value" ], "type": "object", "properties": { "name": { "maxLength": 50, "minLength": 1, "type": "string", "description": "Name of the tag. Used as key in this array." }, "value": { "maxLength": 250, "minLength": 1, "type": "string" }, "tagGroup": { "maxLength": 50, "minLength": 0, "type": "string", "nullable": true } }, "additionalProperties": false }, "VendorfinancialAccountsEntity": { "type": "object", "properties": { "financialInstitution": { "$ref": "#/components/schemas/FinancialInstitutionEntity" }, "financialAccountIdentifiers": { "type": "array", "items": { "$ref": "#/components/schemas/FinancialAccountIdentifierEntity" }, "nullable": true } }, "additionalProperties": false } }, "securitySchemes": { "Bearer": { "type": "http", "description": "Please insert basic authentication credentials into fields", "scheme": "basic" }, "oauth2authentication": { "type": "oauth2", "description": "Oauth2 client credentials flow.", "flows": { "clientCredentials": { "tokenUrl": "https://api.basware.com/v1/tokens", "scopes": { "accountingDocuments.read": "GET accountingDocuments", "accountingDocuments.write": "POST/PATCH accountingDocuments", "accountingDocuments.delete": "DELETE accountingDocuments", "accounts.read": "GET accounts", "accounts.write": "POST/PATCH accounts", "accounts.delete": "DELETE accounts", "advancedPermissions.read": "GET advancedPermissions", "advancedPermissions.write": "POST/PATCH advancedPermissions", "advancedPermissions.delete": "DELETE advancedPermissions", "advancedValidations.read": "GET advancedValidations", "advancedValidations.write": "POST/PATCH advancedValidations", "advancedValidations.delete": "DELETE advancedValidations", "applicationGroups.read": "GET applicationGroups", "applicationGroups.write": "POST/PATCH applicationGroups", "companies.read": "GET companies", "companies.write": "POST/PATCH companies", "contracts.delete": "DELETE contracts", "contracts.read": "GET contracts", "contracts.write": "POST/PATCH contracts", "costCenters.read": "GET costCenters", "costCenters.write": "POST/PATCH costCenters", "costCenters.delete": "DELETE costCenters", "errorFeedbacks.read": "GET errorFeedbacks", "errorFeedbacks.write": "POST/PATCH errorFeedbacks", "errorFeedbacks.delete": "DELETE errorFeedbacks", "exchangeRates.read": "GET exchangeRates", "exchangeRates.write": "POST/PATCH exchangeRates", "exchangeRates.delete": "DELETE exchangeRates", "exportedContracts.read": "GET exportedContracts", "exportedContracts.write": "POST/PATCH exportedContracts", "exportedContracts.delete": "DELETE exportedContracts", "exportedContractSpends.read": "GET exportedContractSpends", "exportedContractSpends.write": "POST/PATCH exportedContractSpends", "exportedContractSpends.delete": "DELETE exportedContractSpends", "exportedPurchaseOrders.read": "GET exportedPurchaseOrders", "exportedPurchaseOrders.write": "POST/PATCH exportedPurchaseOrders", "exportedPurchaseOrders.delete": "DELETE exportedPurchaseOrders", "exportedPurchaseRequisitions.read": "GET exportedPurchaseRequisitions", "exportedPurchaseRequisitions.write": "POST/PATCH exportedPurchaseRequisitions", "exportedPurchaseRequisitions.delete": "DELETE exportedPurchaseRequisitions", "lists.read": "GET lists", "lists.write": "POST/PATCH lists", "lists.delete": "DELETE lists", "matchingOrders.read": "GET matchingOrders", "matchingOrders.write": "POST/PATCH matchingOrders", "matchingOrders.delete": "DELETE matchingOrders", "matchingOrderLines.read": "GET matchingOrderLines", "matchingOrderLines.write": "POST/PATCH matchingOrderLines", "matchingOrderLines.delete": "DELETE matchingOrderLines", "paymentTerms.read": "GET paymentTerms", "paymentTerms.write": "POST/PATCH paymentTerms", "paymentTerms.delete": "DELETE paymentTerms", "projects.read": "GET projects", "projects.write": "POST/PATCH projects", "projects.delete": "DELETE projects", "purchaseOrders.read": "GET purchaseOrders", "purchaseOrders.write": "POST/PATCH purchaseOrders", "purchaseOrders.delete": "DELETE purchaseOrders", "purchaseRequisitions.read": "GET purchaseRequisitions", "purchaseRequisitions.write": "POST/PATCH purchaseRequisitions", "purchaseRequisitions.delete": "DELETE purchaseRequisitions", "purchaseGoodsReceipts.read": "GET purchaseGoodsReceipts", "purchaseGoodsReceipts.write": "POST/PATCH purchaseGoodsReceipts", "purchaseGoodsReceipts.delete": "DELETE purchaseGoodsReceipts", "requestStatus.read": "GET requestStatus", "requestStatus.write": "POST/PATCH requestStatus", "subscriptions.read": "GET subscriptions", "subscriptions.write": "POST/PATCH subscriptions", "subscriptions.delete": "DELETE subscriptions", "tasks.read": "GET tasks", "taskStatus.read": "GET taskStatus", "taxCodes.read": "GET taxCodes", "taxCodes.write": "POST/PATCH taxCodes", "taxCodes.delete": "DELETE taxCodes", "users.read": "GET users", "users.write": "POST/PATCH users", "users.delete": "DELETE users", "vendors.read": "GET vendors", "vendors.write": "POST/PATCH vendors", "vendors.delete": "DELETE vendors" } } } } } }, "security": [ { "Bearer": [ ] }, { "oauth2authentication": [ ] } ] }