Basware · Schema

Open Vault API

**Using Basware Vault APIs** 1. Prepare a document that will be archived by zipping all the document related files into a single ZIP file. 2. POST the document metadata first. This will return a pre-signed URL as well as a document identifier (bumId). 3. PUT the ZIP file to the URL received in step 1. Note: This PUT operation requires no authentication as it is using a pre-signed URL. 4. GET the status of the uploaded document using the bumId identifier received in step 2 (optional). The pre-signed URL is valid for 15 minutes. When the ZIP file is uploaded with 200 OK response, the file is in queue to be archived.

E-InvoicingPurchase-to-PayAccounts PayableProcurementElectronic InvoicingFinance AutomationB2B Payments
View JSON Schema on GitHub

JSON Schema

basware-vault-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://developer.basware.com/schemas/vault",
  "title": "Open Vault API",
  "description": "**Using Basware Vault APIs**\n1. Prepare a document that will be archived by zipping all the document related files into a single ZIP file.\n2. POST the document metadata first. This will return a pre-signed URL as well as a document identifier (bumId).\n3. PUT the ZIP file to the URL received in step 1. Note: This PUT operation requires no authentication as it is using a pre-signed URL.\n4. GET the status of the uploaded document using the bumId identifier received in step 2 (optional).\nThe pre-signed URL is valid for 15 minutes. When the ZIP file is uploaded with 200 OK response, the file is in queue to be archived.",
  "$defs": {
    "ArchivedDocument": {
      "type": "object",
      "required": [
        "clientUUID",
        "documentId",
        "documentDate",
        "documentType"
      ],
      "properties": {
        "clientUUID": {
          "type": "string",
          "maxLength": 100,
          "description": "Document identifier created by client. Unique ID in client's namespace. It is returned in the response as a correlation ID. Not to be confused with the documentId (eg invoice number).",
          "example": "10d96d73-ff7f-49a7-8e8f-a6c7359f4939"
        },
        "documentType": {
          "type": "string",
          "description": "Specifies document type. Either Invoice, CreditNote, InvoiceSelfBilled or CreditNoteSelfBilled.",
          "pattern": "Invoice|CreditNote|InvoiceSelfBilled|CreditNoteSelfBilled",
          "example": "Invoice"
        },
        "senderName": {
          "type": "string",
          "maxLength": 150,
          "description": "Name of the document sender. For invoice, supplier name.",
          "example": "Newey & Eyre (UK) Ltd"
        },
        "senderIds": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Array of IDs identifying the sender. Total size of the array should not exceed: 300 chars",
          "example": [
            "S1001",
            "S1002",
            "S1003"
          ]
        },
        "recipientName": {
          "type": "string",
          "maxLength": 150,
          "description": "Name of the document recipient. For invoice, receiving company's name.",
          "example": "Acme Inc."
        },
        "recipientIds": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Array of IDs identifying the recipient. Total size of the array should not exceed: 300 chars",
          "example": [
            "R1001",
            "R1002",
            "R1003"
          ]
        },
        "tradingPartner": {
          "type": "string",
          "maxLength": 150,
          "description": "Name of the document recipient or sender. For invoice, receiving company's name or supplier name.",
          "example": "Acme Inc."
        },
        "documentDate": {
          "type": "string",
          "description": "Date of the document. For invoice, normally invoice date. ISO 8601",
          "example": "2010-11-30T08:39:03+00:00"
        },
        "documentId": {
          "type": "string",
          "maxLength": 100,
          "description": "Document identifier. For invoice, normally invoice number. Is not required to be unique but this will be used in search criteria, so it helps if they are easily identifiable using a compound search (documentId + senderId).",
          "example": 10003456
        },
        "currencyCode": {
          "type": "string",
          "maxLength": 3,
          "description": "3 digit currency code of the document. ISO 4217",
          "example": "EUR"
        },
        "buyerReferenceId": {
          "type": "string",
          "maxLength": 100,
          "description": "An identifier assigned by the Buyer used for internal routing purposes.",
          "example": "[email protected]"
        },
        "buyerReferenceType": {
          "type": "string",
          "maxLength": 100,
          "description": "Type of buyerReferenceId. Freetext field. eg. email, name, VAT",
          "example": "email"
        },
        "amount": {
          "type": "number",
          "description": "Amount of document. For invoice, use net sum.",
          "example": 1600.09
        },
        "flowDirection": {
          "type": "string",
          "description": "Document flow direction. Either sending or receiving.",
          "pattern": "sending|receiving",
          "example": "sending"
        }
      }
    },
    "ArchivedDocumentResponse": {
      "type": "object",
      "properties": {
        "bumId": {
          "type": "string",
          "description": "Unique identifier of the document. Issued by Basware",
          "example": "46aa4caf-b373-11ed-bbfc-cfd535abf178"
        },
        "documentId": {
          "type": "string",
          "description": "Document identifier. For invoice, normally invoice number.",
          "example": 10003456
        },
        "clientUUID": {
          "type": "string",
          "description": "Unique identifier as passed on the request for correlation",
          "example": "10d96d73-ff7f-49a7-8e8f-a6c7359f4939"
        },
        "archiveFileURL": {
          "$ref": "#/definitions/ArchiveFileURL"
        }
      }
    },
    "ArchivedDocumentStatusResponse": {
      "type": "object",
      "properties": {
        "bumId": {
          "type": "string",
          "description": "Identifier of the archived document.",
          "example": "46aa4caf-b373-11ed-bbfc-cfd535abf178"
        },
        "documentId": {
          "type": "string",
          "description": "Document identifier. For invoice, normally invoice number.",
          "example": 10003456
        },
        "clientUUID": {
          "type": "string",
          "description": "Unique identifier as passed on the request for correlation",
          "example": "10d96d73-ff7f-49a7-8e8f-a6c7359f4939"
        },
        "lastUpdated": {
          "type": "string",
          "description": "Date and time of the last status update.",
          "example": "2023-02-23T08:39:03+00:00"
        },
        "status": {
          "type": "string",
          "pattern": "WaitingForPackageUpload|ArchivingInProgress|ArchivingSuccessful|ArchivingFailed",
          "description": "Status of document archiving.",
          "example": "ArchivingInProgress"
        },
        "message": {
          "type": "string",
          "description": "Additional status message in exception cases. For example if file is not found in staging area in 15 minutes.",
          "example": ""
        }
      }
    },
    "ArchiveFileURL": {
      "type": "object",
      "properties": {
        "url": {
          "type": "string",
          "example": "https://cipreprod-archivewarm-openapistagings3bucket-503ac9e65ad1.s3.eu-west-1.amazonaws.com/70944116/otlwif/2023/03/03/CZ/U6/46aa4caf-b373-11ed-bbfc-cfd535abf178.zip?X-Amz-Security-Token=IQoJb3JpZ2luX2VjEFUaCWV1LXdlc3QtMSJHMEUCIQDCIc4zFGqvfPoixMy5L55YwXQi94j28XXbOIQ4nUjVcQIgAQ6soIBTE5Oq3wtl1%2BrrgssIz2mNzsvt9UxN3iiijZ8q3AMI7f%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FARADGgw0OTM3NjA2MDY4MzAiDGI%2BalWWdyGDfGbq9yqwA%2BGAbXcyOWHLDPDiTdA7F9LVMm5OkNd1OTAwr0VbizgBgD8XYrf0qn6F4cyCNJEw20RqkfhgRUq2LXtMsBAd%2Fx2hwp2qqARdcpFA0thltLxlFIUT2wc03wmnsLrmo7oJUAKfZ6qrH5zK9JKG6fZtjdX9F6uC2TAa16o4vIVMLwrWs3VblSPoU4R5OpPetN7SMCmTiUW%2Fwa%2B2P4OhsWoceKS2H2xxtrnOHFr0bLAl7pXPhmNFh%2F5R2X4X9eFuPMsbEwn0sOVoAAMDJwaok%2Ffi8XwjP8g69bb4Q78txhgc21I9mY3Jm4aO7kvtpx28taczXRCIYnrgkuFbuZSc4MSg3YfEgSdZNLz63KekmOlgYhohvqqopgnZ5c3UURcV%2FjrLlTkg405u56SI%2BOtM7fXl6JC90B7n%2Ffb84LlzCSXbWVjcCBPOXFDYIQdMpzbXyIJPUBx75wIATmV7CKzgg%2FO%2FXlcZ8%2FWC3FJEe0oefsqFa4ifkW9d83ZKrzZXSr2MS3zW22Y8Sh9hOx%2FsMhJnpwY5hzP6K3SIRxnHyqc7rTswWLPBgPSvbpwLzVA9mYlyEf0przCKsN2fBjqeAT7tYKT1IaaGkB0t2X9CNMf2hbtJgyHrYQNS8%2FJ1KVwSahHS3YMuY88ZiGPZnqNdqep8xVUeO1t2tPA7QymHiuz5SYVA2y0Ifaf%2Bs0MKBZwjnFAyXy%2BZQkpkvUFzl20EhOTAYSbjvi%2FAocaKyGiLTdxliZVsnBP8mq0sEIz7rGIOZzWObOfk69qD4nYgis9mrldJHL2Z1DeM9fYyuIBo&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20230223T121201Z&X-Amz-SignedHeaders=host&X-Amz-Expires=900&X-Amz-Credential=ASIAXF5TM6JXFF7XYS77%2F20230223%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Signature=5a824dab54b0d325862d0e036b702fcab8d98e5542ba93e2da67239b72b19a33"
        }
      }
    },
    "IndexDocumentResponse": {
      "type": "object",
      "properties": {
        "amount": {
          "type": "string",
          "description": "Amount of document. For invoice, use net sum.",
          "example": 1600.09
        },
        "archiveDate": {
          "type": "string",
          "description": "Archive date of the document. ISO 8601",
          "example": "2010-11-30T08:39:03+00:00"
        },
        "archiveId": {
          "type": "string",
          "example": "35d8d778-98fc-4f49-b3e9-9bfd7f92372d"
        },
        "bumid": {
          "type": "string",
          "example": "46aa4caf-b373-11ed-bbfc-cfd535abf178"
        },
        "buyerReferenceId": {
          "type": "string",
          "maxLength": 100,
          "description": "An identifier assigned by the Buyer used for internal routing purposes.",
          "example": "[email protected]"
        },
        "buyerReferenceType": {
          "type": "string",
          "maxLength": 100,
          "description": "Type of buyerReferenceId. Freetext field. eg. email, name, VAT",
          "example": "email"
        },
        "currencyCode": {
          "type": "string",
          "maxLength": 3,
          "description": "3 digit currency code of the document. ISO 4217",
          "example": "EUR"
        },
        "documentDate": {
          "type": "string",
          "description": "Date of the document. For invoice, normally invoice date. ISO 8601",
          "example": "2010-11-30T08:39:03+00:00"
        },
        "documentId": {
          "type": "string",
          "maxLength": 100,
          "description": "Document identifier. For invoice, normally invoice number. Is not required to be unique but this will be used in search criteria, so it helps if they are easily identifiable using a compound search (documentId + senderId).",
          "example": 10003456
        },
        "documentType": {
          "type": "string",
          "description": "Specifies document type. Either Invoice, CreditNote, InvoiceSelfBilled or CreditNoteSelfBilled.",
          "pattern": "Invoice|CreditNote|InvoiceSelfBilled|CreditNoteSelfBilled",
          "example": "Invoice"
        },
        "recipientIds": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Array of IDs identifying the recipient. Total size of the array should not exceed: 300 chars",
          "example": [
            "R1001",
            "R1002",
            "R1003"
          ]
        },
        "recipientName": {
          "type": "string",
          "maxLength": 150,
          "description": "Name of the document recipient. For invoice, receiving company's name.",
          "example": "Acme Inc."
        },
        "senderIds": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Array of IDs identifying the sender. Total size of the array should not exceed: 300 chars",
          "example": [
            "S1001",
            "S1002",
            "S1003"
          ]
        },
        "senderName": {
          "type": "string",
          "maxLength": 150,
          "description": "Name of the document sender. For invoice, supplier name.",
          "example": "Newey & Eyre (UK) Ltd"
        },
        "tradingPartner": {
          "type": "string",
          "maxLength": 150,
          "description": "Name of the document recipient or sender. For invoice, receiving company's name or supplier name.",
          "example": "Acme Inc."
        }
      }
    }
  }
}