openapi: 3.2.0 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. version: v1 servers: - url: '' security: - Bearer: [] - oauth2authentication: [] tags: - name: Purchase Requisitions paths: /v1/purchaseRequisitions: get: tags: - Purchase Requisitions 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' operationId: getV1PurchaseRequisitions x-operation-id-source: derived post: tags: - Purchase Requisitions summary: Creates new purchase requisition(s). description: 'Notes: 1. Any referenced vendors, users, etc. need to exist in P2P when the purchase requisition is imported. 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. Please see section "Usage scenario 4: Import and export procurement data" for details on implementing this API. Check out also the example JSONs using a minimal feasible set of fields 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' operationId: postV1PurchaseRequisitions x-operation-id-source: derived delete: tags: - Purchase Requisitions 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. Deletion 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.\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' operationId: deleteV1PurchaseRequisitions x-operation-id-source: derived /v1/purchaseRequisitions/{externalCode}: get: tags: - Purchase Requisitions 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' operationId: getV1PurchaseRequisitionsByExternalCode x-operation-id-source: derived components: schemas: 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 - 'null' description: "Code for the item's purchasing category. The code must match a valid, active purchasing category for the organization. \nIf invalid, the field will be emptied during import." example: '6200' supplierCode: maxLength: 32 minLength: 0 type: - string - 'null' description: "A code to identify the supplier. The code must match a valid supplier for the organization, or it will be emptied during import. \nIf the purchase order is a self-service order and the supplier is invalid, the import will fail." example: '10280' supplierName: maxLength: 255 minLength: 0 type: - string - 'null' description: Supplier name. example: ACME IT services and suppliers contractNumber: maxLength: 255 minLength: 0 type: - string - 'null' description: Contract number. example: '' buyerProductCode: maxLength: 250 minLength: 0 type: - string - 'null' description: A code that identifies purchased items for internal reporting and communication. example: '38172105' supplierProductName: maxLength: 250 minLength: 0 type: - string - 'null' description: Supplier product name. example: Developer laptop, 15inch supplierProductCode: maxLength: 50 minLength: 0 type: - string - 'null' description: Supplier product code. example: 00494233 manufacturerProductCode: maxLength: 255 minLength: 0 type: - string - 'null' 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. example: ManufacturerProductCode description: maxLength: 2000 minLength: 0 type: - string - 'null' description: Description. example: '' leadTime: maxLength: 255 minLength: 0 type: - string - 'null' description: Specifies how soon after receiving order the supplier usually is able to deliver the goods. Informative field. example: '' desiredDeliveryDate: type: - string - 'null' description: Desired date the goods are to be delivered. format: date-time example: '2020-01-08T00:00:00' deliveryTerm: maxLength: 100 minLength: 0 type: - string - 'null' description: Identifier for the agreed delivery term for the item. If empty, supplier's delivery term is used. example: '' allowPartialDeliveries: type: - boolean - 'null' description: Indicates if the partial delivery of goods is allowed. If empty, defaults to false. example: false paymentTermCode: maxLength: 255 minLength: 0 type: - string - 'null' description: "Identifier for the agreed payment term to be used when supplier charges the customer. \nIf empty, defaults to the supplier's payment term." example: NT60 paymentTermName: maxLength: 2000 minLength: 0 type: - string - 'null' description: Name of the payment term. example: 60 days net additionalInfo: maxLength: 2000 minLength: 0 type: - string - 'null' description: Additional information. example: '' receiveAutomatically: type: - boolean - 'null' description: Indicates if the goods can be automatically received by Basware P2P on behalf of the user. If empty, defaults to false. example: false plant: maxLength: 100 minLength: 0 type: - string - 'null' description: Plant. example: '' storageLocation: maxLength: 100 minLength: 0 type: - string - 'null' description: Storage location. example: '' unspsc: maxLength: 64 minLength: 0 type: - string - 'null' description: "The United Nations Standard Products and Services Code, a unique 8-digit number used to identify trade items, products, and services. \nThe value can also be used to match order lines to invoice lines. If empty, resolved by Basware P2P using the item's categoryCode." example: '43211578' grNote: maxLength: 100 minLength: 0 type: - string - 'null' description: Note for receiving goods. example: '' lineDataDate1: type: - string - 'null' 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 lineDataDate2: type: - string - 'null' format: date-time lineDataDate3: type: - string - 'null' format: date-time lineDataDate4: type: - string - 'null' format: date-time lineDataDate5: type: - string - 'null' format: date-time lineDataNum1: type: - number - 'null' 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 lineDataNum2: type: - number - 'null' format: double lineDataNum3: type: - number - 'null' format: double lineDataNum4: type: - number - 'null' format: double lineDataNum5: type: - number - 'null' format: double lineDataText1: maxLength: 250 minLength: 0 type: - string - 'null' 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. example: '' lineDataText2: maxLength: 250 minLength: 0 type: - string - 'null' example: '' lineDataText3: maxLength: 250 minLength: 0 type: - string - 'null' example: '' lineDataText4: maxLength: 250 minLength: 0 type: - string - 'null' example: '' lineDataText5: maxLength: 250 minLength: 0 type: - string - 'null' example: '' quantity: type: - number - 'null' description: Defines how many items a customer wants to purchase. The quantity must contain a positive value. format: double example: 1 quantityUnitCode: maxLength: 10 minLength: 0 type: - string - 'null' description: Quantity unit code. example: PCS quantityUnitName: maxLength: 250 minLength: 0 type: - string - 'null' description: Quantity unit name. 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 - 'null' description: Sub-unit of measure, when used. 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 - 'null' description: Price for a single unit without discount. Price type (Net / Gross) is specified in field 'priceType'. format: double example: 1050 discountPercent: maximum: 1000000000 minimum: 0 type: - number - 'null' description: Discount percent. format: double 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. \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 - 'null' description: Defines name for the tax code. If empty, Basware P2P resolves the value using the tax percent from the purchasing category. example: T25 taxJuristictionCode: maxLength: 25 minLength: 0 type: - string - 'null' description: Tax juristiction code. example: '' taxPercent: maximum: 1000000000 minimum: 0 type: - number - 'null' description: Defines the tax percent. If empty, Basware P2P resolves the value using the tax percent from the purchasing category. format: double example: 10 taxPercent2: type: - number - 'null' description: Second tax percent. Used for example for handling reverse charges on EU VAT. format: double example: 0 attachPdfToNetworkOrder: type: - boolean - 'null' description: Specifies if order is attached as pdf file when order is sent to supplier through Basware network. 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 - 'null' 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.' example: john.smith@company.com orderRecipientType: enum: - Supplier - Owner - SupplierAndOwner type: string description: 'Determines who order is sent to. -Supplier(0) : Order is sent only to supplier. -If orderingMethod is email, order is sent to the email indicated by ''supplierOrderingEmail''. -If orderingMethod is network, the order is sent through Basware network. -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. -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 - 'null' description: Email address used to override the default supplier email address, when orderRecipientType is Supplier or SupplierAndOwner. 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 - 'null' 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'. example: john.smith@company.com conversionNumerator: type: - number - 'null' description: Conversion numerator. format: double conversionDenominator: type: - number - 'null' description: Conversion denominator. format: double materialGroup: maxLength: 100 minLength: 0 type: - string - 'null' description: Material group. example: '' linePricingDate1: type: - string - 'null' 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 linePricingDate2: type: - string - 'null' format: date-time linePricingDate3: type: - string - 'null' format: date-time linePricingDate4: type: - string - 'null' format: date-time linePricingDate5: type: - string - 'null' format: date-time linePricingNum1: type: - number - 'null' 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 linePricingNum2: type: - number - 'null' format: double linePricingNum3: type: - number - 'null' format: double linePricingNum4: type: - number - 'null' format: double linePricingNum5: type: - number - 'null' format: double linePricingText1: maxLength: 250 minLength: 0 type: - string - 'null' description: LinePricingText1-5 can be used for customer-specific text fields. This data will go to ‘Pricing’ -tab of the requisition line in P2P. example: '' linePricingText2: maxLength: 250 minLength: 0 type: - string - 'null' example: '' linePricingText3: maxLength: 250 minLength: 0 type: - string - 'null' example: '' linePricingText4: maxLength: 250 minLength: 0 type: - string - 'null' example: '' linePricingText5: maxLength: 250 minLength: 0 type: - string - 'null' example: '' deliveryAddress: $ref: '#/components/schemas/DeliveryAddress' codingRows: type: - array - 'null' items: $ref: '#/components/schemas/RequisitionCodingRow' description: Each requisition line can have only one coding row. 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 - 'null' description: Defines code for the account. If empty, defaults based on item's purchasing category. example: '10017' accountName: maxLength: 2000 minLength: 0 type: - string - 'null' description: Defines name for the account. If empty, defaults based on the item's purchasing category. example: IT equipment costs costCenterCode: maxLength: 25 minLength: 0 type: - string - 'null' description: Cost center code. If empty, the requisition owner's default cost center is used. example: '23800' costCenterName: maxLength: 2000 minLength: 0 type: - string - 'null' description: Cost center name. example: Lift engine research projectCode: maxLength: 25 minLength: 0 type: - string - 'null' description: Project code. example: '' projectName: maxLength: 255 minLength: 0 type: - string - 'null' description: Project name. example: '' fixedAssetCode: maxLength: 25 minLength: 0 type: - string - 'null' description: Fixed asset code. example: '' fixedAssetName: maxLength: 250 minLength: 0 type: - string - 'null' description: Fixed asset name. example: '' fixedAssetSubCode: maxLength: 25 minLength: 0 type: - string - 'null' description: Fixed asset sub code. example: '' fixedAssetSubName: maxLength: 250 minLength: 0 type: - string - 'null' description: Fixed asset sub name. example: '' internalOrderCode: maxLength: 25 minLength: 0 type: - string - 'null' description: Internal order code. example: '' internalOrderName: maxLength: 250 minLength: 0 type: - string - 'null' description: Internal order name. example: '' profitCenterCode: maxLength: 25 minLength: 0 type: - string - 'null' description: Profit center code. example: '' profitCenterName: maxLength: 250 minLength: 0 type: - string - 'null' description: Profit center name. example: '' businessUnitCode: maxLength: 25 minLength: 0 type: - string - 'null' description: Business unit code. example: '' businessUnitName: maxLength: 250 minLength: 0 type: - string - 'null' description: Business unit name. example: '' projectSubCode: maxLength: 25 minLength: 0 type: - string - 'null' description: Project sub code. example: '' projectSubName: maxLength: 250 minLength: 0 type: - string - 'null' description: Project sub name. example: '' employeeCode: maxLength: 25 minLength: 0 type: - string - 'null' description: Employee code. If empty, defaults to requisition owner's employee code. example: '815722' employeeName: maxLength: 250 minLength: 0 type: - string - 'null' description: Employee name. If empty, defaults to requisition owner's name. example: Jim Green vehicleName: maxLength: 255 minLength: 0 type: - string - 'null' description: Vehicle name. example: '' vehicleNumber: maxLength: 25 minLength: 0 type: - string - 'null' description: Vehicle number. example: '' salesOrderCode: maxLength: 25 minLength: 0 type: - string - 'null' description: Sales order code. example: '' salesOrderName: maxLength: 250 minLength: 0 type: - string - 'null' description: Sales order name. example: '' salesOrderSubCode: maxLength: 25 minLength: 0 type: - string - 'null' description: Sales order sub code. example: '' salesOrderSubName: maxLength: 250 minLength: 0 type: - string - 'null' description: Sales order sub name. example: '' customerCode: maxLength: 25 minLength: 0 type: - string - 'null' description: Customer code. example: '' customerName: maxLength: 250 minLength: 0 type: - string - 'null' description: Customer name. example: '' accAssignmentCategoryCode: maxLength: 25 minLength: 0 type: - string - 'null' description: Account assignment category code. If empty, defaults based on the item's purchasing category. example: '' accAssignmentCategoryName: maxLength: 250 minLength: 0 type: - string - 'null' description: Account assignment category name. If empty, defaults based on the item's purchasing category. example: '' budgetCode: maxLength: 25 minLength: 0 type: - string - 'null' description: Defines a code for the budget. example: B36782 budgetName: maxLength: 250 minLength: 0 type: - string - 'null' description: Defines name for the budget. example: IT equipment 2020 serviceCode: maxLength: 25 minLength: 0 type: - string - 'null' description: Service code. example: '' serviceName: maxLength: 250 minLength: 0 type: - string - 'null' description: Service name. example: '' businessAreaCode: maxLength: 25 minLength: 0 type: - string - 'null' description: Business area code. example: '' businessAreaName: maxLength: 250 minLength: 0 type: - string - 'null' description: Business area name. example: '' workOrderCode: maxLength: 25 minLength: 0 type: - string - 'null' description: Work order code. example: '' workOrderName: maxLength: 250 minLength: 0 type: - string - 'null' description: Work order name. example: '' workOrderSubCode: maxLength: 25 minLength: 0 type: - string - 'null' description: Work order sub code. example: '' workOrderSubName: maxLength: 250 minLength: 0 type: - string - 'null' description: Work order sub name. example: '' distributionCode: maxLength: 25 minLength: 0 type: - string - 'null' description: Distribution code. example: '' distributionMode: maxLength: 250 minLength: 0 type: - string - 'null' description: Distribution mode. example: '' dimCode1: maxLength: 25 minLength: 0 type: - string - 'null' description: DimCode1-10 are often used for additional, customer-specific, coding dimensions. Specifies the dimension code. example: '236710' dimCode2: maxLength: 25 minLength: 0 type: - string - 'null' description: DimCode2 example: '' dimCode3: maxLength: 25 minLength: 0 type: - string - 'null' description: DimCode3 example: '' dimCode4: maxLength: 25 minLength: 0 type: - string - 'null' description: DimCode4 example: '' dimCode5: maxLength: 25 minLength: 0 type: - string - 'null' description: DimCode5 example: '' dimCode6: maxLength: 25 minLength: 0 type: - string - 'null' description: DimCode6 example: '' dimCode7: maxLength: 25 minLength: 0 type: - string - 'null' description: DimCode7 example: '' dimCode8: maxLength: 25 minLength: 0 type: - string - 'null' description: DimCode8 example: '' dimCode9: maxLength: 25 minLength: 0 type: - string - 'null' description: DimCode9 example: '' dimCode10: maxLength: 25 minLength: 0 type: - string - 'null' description: DimCode10 example: '' dimName1: maxLength: 250 minLength: 0 type: - string - 'null' description: DimName1-10 is used for additional, customer-specific, coding dimensions. Specifies the dimension name. example: Maple street office dimName2: maxLength: 250 minLength: 0 type: - string - 'null' description: DimName2 example: '' dimName3: maxLength: 250 minLength: 0 type: - string - 'null' description: DimName3 example: '' dimName4: maxLength: 250 minLength: 0 type: - string - 'null' description: DimName4 example: '' dimName5: maxLength: 250 minLength: 0 type: - string - 'null' description: DimName5 example: '' dimName6: maxLength: 250 minLength: 0 type: - string - 'null' description: DimName6 example: '' dimName7: maxLength: 250 minLength: 0 type: - string - 'null' description: DimName7 example: '' dimName8: maxLength: 250 minLength: 0 type: - string - 'null' description: DimName8 example: '' dimName9: maxLength: 250 minLength: 0 type: - string - 'null' description: DimName9 example: '' dimName10: maxLength: 250 minLength: 0 type: - string - 'null' description: DimName10 example: '' num1: type: - number - 'null' description: Num1-5 are custom fields in the business document. format: double num2: type: - number - 'null' description: Num2 format: double num3: type: - number - 'null' description: Num3 format: double num4: type: - number - 'null' description: Num4 format: double num5: type: - number - 'null' description: Num5 format: double text1: maxLength: 250 minLength: 0 type: - string - 'null' description: Text1-5 are custom fields in the business document. example: '' text2: maxLength: 250 minLength: 0 type: - string - 'null' description: Text2 example: '' text3: maxLength: 250 minLength: 0 type: - string - 'null' description: Text3 example: '' text4: maxLength: 250 minLength: 0 type: - string - 'null' description: Text4 example: '' text5: maxLength: 250 minLength: 0 type: - string - 'null' description: Text5 example: '' date1: type: - string - 'null' description: Date1-5 are custom fields in the business document. format: date-time date2: type: - string - 'null' description: Date2 format: date-time date3: type: - string - 'null' description: Date3 format: date-time date4: type: - string - 'null' description: Date4 format: date-time date5: type: - string - 'null' description: Date5 format: date-time additionalProperties: false ErrorEntity: type: object properties: externalCode: type: - string - 'null' description: External code of record on which error occurred (when available). 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 - 'null' description: Specific error message. example: '' info: type: - string - 'null' description: Information about type of the error. example: '' 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 - 'null' description: PO box example: '' streetName: maxLength: 250 minLength: 0 type: - string - 'null' description: Street name. example: Maple street additionalStreetName: maxLength: 250 minLength: 0 type: - string - 'null' description: Additional street name. example: '' blockName: maxLength: 250 minLength: 0 type: - string - 'null' description: Block name. example: '' buildingName: maxLength: 250 minLength: 0 type: - string - 'null' description: Building name. example: '' buildingNumber: maxLength: 250 minLength: 0 type: - string - 'null' description: Building number. example: '68' department: maxLength: 250 minLength: 0 type: - string - 'null' description: Department. example: '' floor: maxLength: 250 minLength: 0 type: - string - 'null' description: Floor. example: '' room: maxLength: 250 minLength: 0 type: - string - 'null' description: Room. example: '' postalZone: maxLength: 250 minLength: 0 type: - string - 'null' description: Postal zone. example: '02600' city: maxLength: 250 minLength: 0 type: - string - 'null' description: City. example: Toronto region: maxLength: 250 minLength: 0 type: - string - 'null' description: Region. example: '' district: maxLength: 250 minLength: 0 type: - string - 'null' description: District. example: '' countryCode: maxLength: 250 minLength: 0 type: - string - 'null' description: Country code. example: CA countryName: maxLength: 250 minLength: 0 type: - string - 'null' description: Country name. example: Canada description: maxLength: 1000 minLength: 0 type: - string - 'null' description: Description. example: '' globalLocationNumber: maxLength: 13 minLength: 0 type: - string - 'null' description: Global location number. example: '' countrySubEntity: maxLength: 50 minLength: 0 type: - string - 'null' example: TX countrySubEntityDescription: maxLength: 50 minLength: 0 type: - string - 'null' example: Texas addressId: maxLength: 2000 minLength: 0 type: - string - 'null' description: Identifier for the address. example: '1000467' addressSchemeId: maxLength: 2000 minLength: 0 type: - string - 'null' description: Can be used to specify a code that represents the agency or organization responsible for the addressID numbering. 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). Delivery 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.' 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 - 'null' description: Indicates if the requisition is automatically sent to approval process. If false, requisition is saved as draft. example: false organizationUnitCode: maxLength: 100 minLength: 0 type: - string - 'null' description: The code that identifies the buyer organization, as defined in Basware P2P Administration. Alternatively, organizationIdentifier can be used. Both cannot be used simultaneously. example: BW00 organizationIdentifier: maxLength: 50 minLength: 0 type: - string - 'null' description: A custom identifier for the buyer organization, as defined in Basware P2P Administration. Alternatively, organizationUnitCode can be used. Both cannot be used simultaneously. example: 003749272021 purchasingGroupCode: maxLength: 25 minLength: 0 type: - string - 'null' description: Purchasing Group Code. example: P3 purchasingGroupName: maxLength: 250 minLength: 0 type: - string - 'null' description: Purchasing Group Name. 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. \nStandard purchase orders typically require goods receipts.\n\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) \nand with an pre-determined maximum currency amount. Blanket orders are typically used for recurring invoices, for example ordering office cleaning \nfor one year. They can be used for ordering both services and consumable goods. Quantity amount used on the blanket order is always '1'. \nGoods receipts are not used with blanket orders." example: standard releaseOrdersRequired: type: - boolean - 'null' description: Used only if the order type is blanket to specify, if the blanket purchase order requires release orders. example: false hidePricesFromSupplier: type: - boolean - 'null' description: Specifies, if all price information is hidden from the supplier in the outgoing purchase order. 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 - 'null' description: Email address of requisition owner. example: john.smith@company.com ownerLogin: maxLength: 100 minLength: 0 type: - string - 'null' description: "Login username for the requisition owner. The user must have 'Use Basware Purchase' user right. \nUsers with Use restricted/simplified Basware Purchase user rights are invalid." example: BASWARE\\JOHNSMITH ownerExternalCode: maxLength: 36 minLength: 0 type: - string - 'null' description: ExternalCode for the requisition owner. 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 - 'null' 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 example: '' validityPeriodEndDate: type: - string - 'null' 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 example: '' desiredDeliveryDate: type: - string - 'null' description: Date when goods/services are expected to be delivered. format: date-time example: '2021-11-01T00:00:00' desiredDeliveryEndDate: type: - string - 'null' description: End date when goods/services are expected to be delivered. format: date-time example: '2021-11-31T00:00:00' deliveryInstructions: maxLength: 250 minLength: 0 type: - string - 'null' description: Delivery instructions for goods/services. example: Please deliver between 9-17. classification: maxLength: 250 minLength: 0 type: - string - 'null' description: Requisition classification. example: Internal costs headerDataDate1: type: - string - 'null' description: 'HeaderDataDate1-5: Can be used for customer-specific date fields.' format: date-time example: '2020-01-01T07:36:13.053Z' headerDataDate2: type: - string - 'null' format: date-time example: '2020-01-01T07:36:13.053Z' headerDataDate3: type: - string - 'null' format: date-time example: '2020-01-01T07:36:13.053Z' headerDataDate4: type: - string - 'null' format: date-time example: '2020-01-01T07:36:13.053Z' headerDataDate5: type: - string - 'null' format: date-time example: '2020-01-01T07:36:13.053Z' headerDataText1: maxLength: 250 minLength: 0 type: - string - 'null' description: 'HeaderDataText1-5: Can be used for customer-specific text fields.' example: '' headerDataText2: maxLength: 250 minLength: 0 type: - string - 'null' example: '' headerDataText3: maxLength: 250 minLength: 0 type: - string - 'null' example: '' headerDataText4: maxLength: 250 minLength: 0 type: - string - 'null' example: '' headerDataText5: maxLength: 250 minLength: 0 type: - string - 'null' example: '' headerDataNum1: type: - number - 'null' description: 'HeaderDataNum1-5: Can be used for customer-specific numeric fields.' format: double headerDataNum2: type: - number - 'null' format: double headerDataNum3: type: - number - 'null' format: double headerDataNum4: type: - number - 'null' format: double headerDataNum5: type: - number - 'null' format: double lastUpdated: type: string format: date-time deliveryAddress: $ref: '#/components/schemas/DeliveryAddress' lines: type: array items: $ref: '#/components/schemas/RequisitionLine' description: "Notes: \n1) The requisition must contain at least one line, and can contain up to 200 lines. \n2) When Basware P2P creates the requisition it numbers the lines internally based on their order in the JSON. \n3) All lines on the requisition must have the same currencyCode. \n4) At least one line must contain a positive Quantity value. \n5) Total price for each requisition line is calculated by Basware P2P from the quantity, unit price, and applicable taxes and discounts.\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. \n7) If there are refund lines, the requisition must have at least one non-refund line. \n8) If there are refund lines, only one order needs to result from the requisition lines." additionalProperties: false DeleteRequest: type: object properties: lastUpdated: type: - string - 'null' 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 externalCode: maxLength: 36 minLength: 0 type: - string - 'null' description: Single item can be deleted using externalCode and final status is returned immediately. additionalProperties: false PurchaseRequisitionResponse: required: - purchaseRequisitions type: object properties: purchaseRequisitions: type: array items: $ref: '#/components/schemas/PurchaseRequisitionEntity' additionalProperties: false DeleteResponse: type: object properties: statusApiLink: type: - string - 'null' taskName: type: - string - 'null' taskStatus: type: - string - 'null' additionalProperties: false ResponseEntityList: type: object properties: requestId: type: - string - 'null' description: ID of the request on which error occurred (generated by Basware API). example: fbc082a2-65a4-469c-b230-d84a252f18fc hasErrors: type: boolean description: Specifies whether the request has errors. errors: type: - array - 'null' items: $ref: '#/components/schemas/ErrorEntity' 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. 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