Basware ErrorFeedbacks API

The ErrorFeedbacks API from Basware — 3 operation(s) for errorfeedbacks.

OpenAPI Specification

basware-errorfeedbacks-api-openapi.yml Raw ↑
openapi: 3.0.2
info:
  title: Basware OAUTH2 authentication APIs AccountingDocuments ErrorFeedbacks API
  description: "**Using OAUTH2.0 authentication:**\n\nGet API access token from api.basware.com/tokens\n1. Using client id and client secret, which you can obtain from Basware. \n2. Specify which APIs can be accessed by using the token e.g. Read only access to vendors API only (these are called scopes). Available scopes are listed at <https://developer.basware.com/api/p2p/manual#AccessRights>. \n3. Each token has an expiration time, until which it can be used to call APIs.\n\nWhen using OAUTH2 authentication, you need to pass the OAUTH2 authentication token when calling Basware API endpoints. Available Basware API operations are documented at <https://api.basware.com/swagger>. \n\nSee the Basware API developer site at <https://developer.basware.com/api/p2p/manual#Authentication> for more details on API authentication."
  version: 1.0.0
  x-logo:
    url: https://fastapi.tiangolo.com/img/logo-margin/logo-teal.png
tags:
- name: ErrorFeedbacks
paths:
  /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'
components:
  schemas:
    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
    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
    ErrorFeedbackResponse:
      required:
      - errorList
      type: object
      properties:
        errorList:
          type: array
          items:
            $ref: '#/components/schemas/ErrorFeedbackEntity'
      additionalProperties: false
    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
    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.
  securitySchemes:
    HTTPBasic:
      type: http
      scheme: basic