openapi: 3.0.2 info: title: Basware OAUTH2 authentication APIs AccountingDocuments Document Import API 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 . \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 . \n\nSee the Basware API developer site at 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: Document Import API paths: /v2/smartpdf/invoiceUpload: post: tags: - Document Import API summary: Upload Document Basic Auth description: Post upload document metadata and receive a presigned URL for uploading the document operationId: upload_document_basic_auth_v2_smartpdf_invoiceUpload_post requestBody: content: application/json: schema: $ref: '#/components/schemas/UploadRequest' required: true responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/UploadResponse' '401': description: Unauthorized content: application/json: examples: CONFIGURATION_NOT_FOUND: value: detail: Configuration not found UNAUTHORIZED_OAUTH: value: detail: OAuth authorization failed. BASWARE_CUSTOMER_ID_MISMATCH: value: detail: Basware Customer ID does not match. INVALID_JWT_TOKEN: value: detail: Invalid JWT token. NO_AUTH_METHOD_PROVIDED: value: detail: No authentication method provided. '403': description: Forbidden content: application/json: examples: FORBIDDEN: value: detail: Forbidden '400': description: Bad Request content: application/json: examples: BOTH_AUTH_METHODS_PROVIDED: value: detail: Both JWT token and Basic Auth credentials provided. '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' components: schemas: UploadResponse: properties: uploadUrl: type: string title: Uploadurl description: The AWS presigned URL that grants temporary write permission to an S3 object examples: - https://ued-dub-qa-uem-upload-api-staging.s3.amazonaws.com/apiDocuments/stenantret2022/7b22726563656976696e67456d61696c41646472657373223a2264656d6f756e69746164647265737373733334407369657064662e626173776172652e636f6d222c226e6f74696669636174696f6e456d61696c41646472657373223a2263616c696e2e666c6f72656140626173776172652e636f6d222c226964223a2230353761646635322d643365332d346363362d386466362d313531633031666661656431227d?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIAV3J4ESG27ZFAJGZS%2F20241003%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20241003T073343Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEHAaCWV1LXdlc3QtMSJFMEMCHwCLR3RhSQcQFha4r8UMivM14WKy7UJYIuPl%2BSWvjgsCIETpJgz5i6WpeaIvTCtN70b0FJPtBfn8YrDu8cL6h5TlKrgDCLn%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEQBRoMNDAyMjQyNDQxNjUzIgwmW%2Bk7DMI0nc0fs20qjAPr3aw8cBeiCu3hIUnv2wDdl8JzcBsVNOXrply9bFWYBkezCJt4g8S2oKmho%2BeIh1E4sBrRgsdT02VcfmrL1YlpAmS1qC4xsrQ7dGXvaYHIL1ft0JMdIK3hjWRFQalIUknS0o9hvyieN98CzGkw2TdefPYzBPrbEDmZiCCUpQXqVdk20ZIChOtreVivte5RvBEsg1POkd0LpiuQmJr%2Fsv4qGvBQMqecOQo6aigmLYLrRI3t1SnnqcI5Kk%2BuS6wTrP4hOvXbK3k6Ky1VKnzOzQnBlD7%2BTgxjHbgum2ywwU2FbPxtc%2BYZ31TY5hHW7EN3G55cxsUZHtjURX1CjiUaEuao1V1pfoQl1jqvN6gb%2BVa1BUKHjhWjsaiTd9JGOpYvqVUH9jXm2JGe%2F3vEeALP1tk6O6W1HWOWqLzyytqB2t6%2B6ArfJVjLIVU%2F4o5nq9udfogOp2DnOXklISoTzfSHsEyxFI7VU41y9qv4B3bajgCS%2FemvjTJzmwM9ULT0zVDNjbMm%2Bk4rml5f%2F3%2F8Socw0pH5twY6nwG%2FW61Z8y%2FcuAJAg9vsZCuQu3jAPqJGkKhzne691%2BomqOjq%2FTc3F6pSIQD0qDutUxdlfkXbomQR4oYcDa65dRueVByRvkCBMGtMpr714SRKiGDKSz7ugjNOdFMRLA9HC4do1XKjYLo75Tb5bYyY9xD9SUOKODm9c2nol0vKqbLmVBUtqiPWbM0TjcNhvQB5EGbZQVgc1fnWMwqYqCTnUQA%3D&X-Amz-Signature=a0765cbc01b82653ffe6b01d327e85487b5c0016788092a3c7d78fa99ca16c1a bumId: type: string title: Bumid description: BumId of the document examples: - a7c80578-6586-472c-ade8-e941443f0ef0 type: object required: - uploadUrl - bumId title: UploadResponse UploadRequest: properties: receivingEmailAddress: type: string format: email title: Receivingemailaddress description: Receiving email address examples: - receiver@abc.com notificationEmailAddress: type: string format: email title: Notificationemailaddress description: Notification email address examples: - sender@abc.com type: object required: - receivingEmailAddress - notificationEmailAddress title: UploadRequest ValidationError: properties: loc: items: anyOf: - type: string - type: integer type: array title: Location msg: type: string title: Message type: type: string title: Error Type input: title: Input ctx: type: object title: Context type: object required: - loc - msg - type title: ValidationError HTTPValidationError: properties: detail: items: $ref: '#/components/schemas/ValidationError' type: array title: Detail type: object title: HTTPValidationError securitySchemes: HTTPBasic: type: http scheme: basic