Introduction
Basware Network REST API is your doorway to interacting with a network of over a million business users all over the globe. With our REST API, you can:
- Deliver and receive business documents
- Follow the life cycle of business documents by sending and receiving notifications
- Send and receive files related to business documents
You will find detailed descriptions of each of our APIs in this section along with code examples. To get step by step instructions on some of the most commonly used features, have a look at our Guides section.
Business document flows
Sending invoices
The following diagram shows how to send invoices with attachments. Note that the similar flow also applies to credit notes.
Receiving invoices
The following diagram shows how to receive invoices. Note that the similar flow also applies to credit notes.
Confirming received documents
Delivery of the received invoices and other business document can be confirmed.
If you are part of the delivery process (typically an operator on the behalf of the customer), you must send one of the following notifications:
- TechnicalAccept with actionCode
Delivered
or - TechnicalReject with actioncode
Undelivered
In addition, you can send business confirmation of the received business documents. Business confirmation has to be agreed upon with the sender. The following notifications can be sent for business confirmations:
- BusinessAccept with actionCode
DocumentAccepted
or - BusinessReject with actionCode
DocumentRejected
The following diagram shows how to confirm received business documents.
Upload invoices to Basware value added services
The following diagram shows you how you can upload invoices to Basware Network. You only need to upload invoices in the following scenario:
- You want to use Basware's value added services and
- You have not sent or received invoices through Basware Network.
Topics
Default formats
JSON is the default data format used by Basware Network REST APIs.
Basware Network REST APIs use UTF-8 character encoding by default. If other encodings are must be used as part of transfers, they will be wrapped in a Base64 encoded data fields.
HTTP headers (both HTTP and MIME) must only contain US-ASCII characters. This affects also the file names which are sent in the headers when uploading file using File API.
Authentication
Basware Network REST API uses basic HTTP authentication to authenticate API clients.
All communication is secured by using the HTTPS protocol (HTTP over SSL). You must make all API requests over HTTPS. API requests made without authentication will fail.
Unique identifiers
A universally unique identifier (UUID) is commonly used in REST API interfaces for identifiers.
For example, each business document has a unique identifier (Basware Unique Message Identifier, BUMID) which must follow the UUID format. BUMID must be given in lowercase format.
Similarly, each request sent to REST API has a unique request identifier X-BW-REQUEST-ID which uses the UUID format.
Document routing
When you send business documents using the Basware Network REST API, you must identify the recipient’s address. The recipient's electronic delivery address is called an endpoint.
Note that the recipient chooses which endpoint(s) they want to use to receive business documents. Large corporations that have multiple automated workflows may use different endpoints to identify the workflow.
Endpoints are published in Basware Network's business directory. The business directory is accessible to registered Basware Network users. The business directory extends to some interoperators.
Recipient endpoints
An endpoint consists of the following fields:
id
– an identifier of the recipient, typically a string or a number derived from a registry number. For example, a VAT number or an email addressschemeId
– identifies the type of the electronic addressid
. For example,VAT
orISO6523-ACTORID-UPIS
identify the address format
The following rules apply when determining the endpoint:
- You should always use the endpoint given by the recipient (the field
id
). - If
schemeId
is not known,id
should be a globally unique value such as“ISO6523-ACTORID-UPIS”
.
The endpoint's scheme identifiers are grouped to the following categories:
- Recommended, globally unique identifiers - Recommended, as they can be used without scheme identifiers and still be guaranteed to be globally unique.
- Standardized organization identifier (with optional schemeId
ISO6523-ACTORID-UPIS
) - VAT number (with optional schemeId
VAT
for organizations in the EU) - Email address (with optional schemeId
EMAIL-RFC2822
)
- Standardized organization identifier (with optional schemeId
- Commercial and common identifiers - Supported, but is recommended to use with ISO6523 prefix. Alternatively they can be used with scheme identifier to improve recipient matching
- IBAN
- DUNS
- GLN
- Local tax identifiers and national trade registry identifiers - Supported, but is recommended to use with ISO6523 prefix. Alternatively they can be used with scheme identifier to improve recipient matching
- FI:ORGNR
- ...
- Custom corporate identifiers - Supported. They can be used with scheme identifier to improve recipient matching
- UNKNOWN
The following table lists the most common endpoints’ scheme identifiers:
Endpoint schemeId | Description | Example of endpoint |
---|---|---|
Recommended, globally unique scheme identifiers | ||
“ISO6523-ACTORID-UPIS” | Electronic eInvoicing address which follows country specific format. | "003701018798" |
“ISO6523-ACTORID-UPIS” | PEPPOL endpoint which includes four-digit identifier followed by colon : and the actual endpoint. | "0088:5060407170008" |
"VAT" | European VAT number. For more information about VAT, see European country specific VAT number format (see especially question Q11) and VAT format validator. | "FI12345678" |
"EMAIL-RFC2822" | Email address | "[email protected]" |
Commercial and common scheme identifiers | ||
"IBAN" | International Bank Account Number, without space characters | "BE11143061182348" |
"DUNS" | The Data Universal Numbering System, (DUNS or D-U-N-S) number. The value must contain 9 digits. | "123456789" |
"GLN" | The Global Location Number (GS1) is a unique identifier for locations. The value must contain 13 digits. | "1568784515459" |
Local tax identifiers and national trade registry identifiers (few selected ones below) | ||
"FI:ORGNR" "FR:ORGNR" etc. | National register number. The scheme identifier consists of a two-letter country identifier (ISO-3166-1 alpha 2) and 'ORGNR'. This endpoint value must contain numbers only. | "12345678" (Finland) |
Note! There are non-EU countries that have VAT numbers. For Norway, the schemeId is NO:VAT.
Party identifications
Each party in the business document needs to have a valid party identification. Party refers for example to the following elements in the business document:
accountingCustomerParty
accountingSupplierParty
The following table lists examples for local tax identifiers and national trade registry identifiers:
schemeId | Common name | Common format | Registry holder + registry links |
---|---|---|---|
FI:ORGNR | Y-tunnus | 1234567-8 | Agency: PRH – YTJ / PRH / Virre-tietopalvelu |
DE:ORGNR | Steuernummer | 123/123/12345 | Agency: Regional “Bundesland” specific tax office, each of the 16 states in Germany have their own. |
SE:ORGNR | Organisationsnummer | 1234567890 | Agency: Bolagsverket |
FR:ORGNR | SIREN numéro | 123 456 789 | Agency: Insee |
AT:ORGNR | Firmenbuchnummer | 123456 x | Agency: Das Firmenbuch |
BE:ORGNR | Ondernemingsnummer | 0123456789 | Agency: Kruispuntbank van Ondernemingen (KBO) - Banque-Carrefour des Entreprises (BCE) |
DK:ORGNR | CVR | 12345678 | Agency: Det Centrale Virksomhedsregister (CVR) |
NL:ORGNR | KvK Nummer | 12345678 | Agency: Kamer van Koophandel (KvK). Search KvK numbers (in Dutch) |
NO:ORGNR | Organisasjonsnummer | 123456789 | Agency: Enhetsregisteret ved Brønnøysundregistrene |
NO:VAT | VAT number in Norway | NO123456789MVA | |
TIN | Tax Identification Number in the United States, ITIN (Individual Taxpayer Identification Number) with optional 'US' country prefix | 956-87-8456 US956-87-8456 | Agency: Internal Revenue Service (IRS) |
Note! There is a separate trade registry in Germany, but Basware has chosen to use the tax number, which is different from the trade registry number. It’s more common to use the Steuernummer than the trade registry number, especially in the context of invoicing.
This is an explicit choice that Basware has made, but it may not be self explanatory by referring to a “local registry number” alone. Note that the common format varies between the German states, even though all call it a Steuernummer. Steuernummer is clearly understood across Germany.
Release notes
Release notes
Invoice API v3 - Summary of changes
- Invoice API v3 handles now both invoice and credit note document types. Invoice API V2 and CreditNote V2 are combined into one Invoice API V3. This means that CreditNote API will no longer be required for API v3.
- Invoice API v3 handles also Payment Receipt document types. Payment Receipts are used during invoicing in Mexico.
- Invoice API v3 has structural changes
- Field names changes from
invoiceLines
andcreditNoteLines
in API v2 todocumentLines
in v3. - The array
description
indocumentLines
has been changed from array of string to fully qualified JSON element. - Field name changes in
allowanceCharges
.
- Field names changes from
- New optional fields have been added to Invoice API v3.
API v1 and API v2 continues to be available for use.
Invoice API v3 - Structural changes
Invoice API v3 handles also credit note as the document type
Invoice API v3 handles now both invoice and credit note document types. Invoice API V2 and CreditNote V2 are combined into one Invoice API V3. This means that a separate CreditNote API is no longer required for API v3.
The field documentType
has been added as a mandatory element to Invoice API. The valid values for documentType
are:
Invoice
CreditNote
PaymentReceipt
Field names changed from creditNoteLines
in CreditNote API v2 to documentLines
in Invoice API v3
The creditNoteLines
field in the data
element in CreditNote v2 has been renamed to documentLines
in v3. These changes affect the following elements:
data.creditNoteLines
->data.documentLines
Field name changes for description
in document lines
The array 'description' in documentLines
has been changed from array of strings to fully qualified JSON element. This allows easier handling of description field as normal JSON field. This change affects the following element:
data.documentLines.description
->data.documentLines.descriptions.description
Field name changes in allowanceCharges
The changeIndicator
field in the allowanceCharges
element in v2 has been renamed to chargeIndicator
in v3 to correct the spelling. These changes affect the following elements:
data.allowanceCharges.changeIndicator
->data.allowanceCharges.chargeIndicator
data.documentLines.allowanceCharges.changeIndicator
->data.documentLines.allowanceCharges.chargeIndicator
Invoice API v3 - New features
New document type PaymentReceipt
supported for Mexican invoicing
- Invoice API v3 handles also Payment Receipt document types. Payment Receipts are used during invoicing in Mexico.
New optional partyLegalEntities
array for party element in Invoice
Added the following optional fields to
data.<party>.partyLegalEntities[n].registrationName
data.<party>.partyLegalEntities[n].companyIdentifier.id
data.<party>.partyLegalEntities[n].companyIdentifier.schemeId
The new element partyLegalEntities
is available in the following party elements:
data.accountingCustomerParty.partyLegalEntities
data.accountingSupplierParty.partyLegalEntities
data.buyerCustomerParty.partyLegalEntities
data.sellerSupplierParty.partyLegalEntities
data.deliveryParty.partyLegalEntities
New optional deliveryNoteReference
element in Invoice
Added the following optional fields to data.delivery
element:
data.delivery.deliveryNoteReference.id
data.delivery.deliveryNoteReference.schemeId
New optional supplierAssignedAccountId
element to accountingCustomerParty
in Invoice
Added the following optional field to accountingCustomerParty
element:
data.accountingCustomerParty.supplierAssignedAccountId
New optional customerAssignedAccountId
element to accountingCustomerParty
and accountingSupplierParty
in Invoice
Added the following optional field to accountingCustomerParty
and accountingSupplierParty
elements:
data.accountingCustomerParty.customerAssignedAccountId
data.accountingSupplierParty.customerAssignedAccountId
New optional orderReference.issueDate
element in Invoice
Added the following optional field to orderReference
element:
data.orderReference.issueDate
New optional invoicePeriod
element in Invoice
Added the following invoicePeriod
element:
data.invoicePeriod.startDate
data.invoicePeriod.endDate
New optional taxExchangeRate
element in Invoice
Added the following taxExchangeRate
element:
data.taxExchangeRate.exchangeRate
data.taxExchangeRate.targetCurrencyCode
New optional roundingAmount
element to taxTotal
in Invoice
Added the following roundingAmount
element:
data.taxTotal.roundingAmount
New optional note
element in party
elements in Invoice
Added the following note
to party elements:
data.accountingCustomerParty.note
data.accountingSupplierParty.note
data.buyerCustomerParty.note
data.sellerSupplierParty.note
data.deliveryParty.note
New optional note
element to documentLines
in Invoice
Added the following optional field to documentLines
element:
data.documentLines.note
New optional promisedDeliveryPeriod
element to documentLines
in Invoice
Added optional promisedDeliveryPeriod
element to documentLines.delivery
element:
data.documentLines.delivery.promisedDeliveryPeriod.startDate
data.documentLines.delivery.promisedDeliveryPeriod.endDate
New optional buyersItem
element to documentLines
in Invoice
Added the following optional fields to documentLines
element:
data.documentLines.item.buyersItem.id
data.documentLines.item.buyersItem.schemeId
New optional additionalItemProperties
array element to documentLines
in Invoice
Added the following optional fields to documentLines
element:
data.documentLines.additionalItemProperties.name
data.documentLines.additionalItemProperties.value
New optional deliveryAddress
element to documentLines
in Invoice
Added the following optional element to documentLines
element:
data.documentLines.delivery.deliveryAddress
The deliveryAddress
element includes all the same fields as data.<party>.address
element, for example:
data.documentLines.delivery.deliveryAddress.addressLine
data.documentLines.delivery.deliveryAddress.addressLine2
data.documentLines.delivery.deliveryAddress.cityName
- etc.
New optional taxCategories
element to allowanceCharges
in Invoice
Added the following optional fields to data.allowanceCharges
element:
- data.allowanceCharges.taxCategories.id
- data.allowanceCharges.taxCategories.percent
- data.allowanceCharges.taxCategories.taxExemptionReasonCode
- data.allowanceCharges.taxCategories.taxExemptionReason
- data.allowanceCharges.taxCategories.schemeId
Added the following optional fields to documentLines.allowanceCharges
element:
- data.documentLines.allowanceCharges.taxCategories.id
- data.documentLines.allowanceCharges.taxCategories.percent
- data.documentLines.allowanceCharges.taxCategories.taxExemptionReasonCode
- data.documentLines.allowanceCharges.taxCategories.taxExemptionReason
- data.documentLines.allowanceCharges.taxCategories.schemeId
API v2 - Summary of changes
- Requests are validated in a stricter manner according to JSON schemas.
- API v2 has structural changes to improve readability
- Fields having array content have been renamed to reflect this (for example the array field name
invoiceLine
has been changed toinvoiceLines
) - Mandatory checks have been added to improve invoice quality (for example the field
documentCurrencyCode
is now mandatory)
- Fields having array content have been renamed to reflect this (for example the array field name
- New optional fields have been added to Invoice API and Credit Note API
- Support for
base64
has been added to File API. - UTF-8 encoding is enforced. If your API client does not support UTF-8 by default, include the following UTF-8 charset in the header of POST methods:
Content-Type: application/json; charset=utf-8
API v2 continues to be available for use. The documentation can be accessed from API v2 Reference.
API v2 for Invoice and Credit Note API - Structural changes
The field documentCurrencyCode changed from optional to mandatory in Invoice and Credit Note
- Changed the field
documentCurrencyCode
from optional to mandatory in POST /invoices and POST /creditNotes
Field name changed for partyIdentifications
in Invoice and Credit Note
The partyIdentification
array field in the party
element in v1 has been renamed to partyIdentifications
in v2 to better reflect the array content. These changes affect the following elements:
data.accountingCustomerParty.partyIdentifications
data.accountingSupplierParty.partyIdentifications
data.deliveryParty.partyIdentifications
Field names changed from singular form to plural form in Invoice and Credit Note
The following array fields file line items in v1 has been renamed in v2 to better reflect the array content. These changes affect the following elements:
data.invoiceLine
->data.invoiceLines
(Invoice API only)data.invoiceLine.taxTotal
todata.invoiceLines.taxTotals
(Invoice API only)data.creditNoteLine
todata.creditNoteLines
(CreditNote API only)data.creditNoteLine.taxTotal
todata.creditNoteLines.taxTotals
(CreditNote API only)
Similar renaming has been done for tax total elements:
taxTotal.taxSubTotal
totaxTotals.taxSubtotals
(note also corrected spelling for subtotals)invoiceLine.taxTotal.taxSubTotal
toinvoiceLines.taxTotals.taxSubtotals
(note also corrected spelling for subtotals)creditNoteLine.taxTotal.taxSubTotal
tocreditNoteLines.taxTotals.taxSubtotals
(note also corrected spelling for subtotals)
Similar renaming has been done for financial account elements:
paymentMeans.financialAccount
topaymentMeans.financialAccounts
Field name changed for contractDocumentReference
in Invoice and Credit Note
The contractDocumentReference
field in the data
element in v1 has been renamed to contractDocumentReferences
in v2 to support multiple references and changed to an array. These changes affect the following element:
data.contractDocumentReference
todata.contractDocumentReferences
(array field)
Field name changed for externalDocumentIdentifier
in Invoice and Credit Note
Invoice identifier field provided by invoice issuer has been renamed:
data.id
->data.externalDocumentIdentifier.id
data.idSchemeId
-->data.externalDocumentIdentifier.schemeid
Content changed for allowanceCharges
in Invoice and Credit Note
The allowanceCharge
field in v1 has been changed to allowanceCharges
array in v2 to better reflect the array content. The fields in allowanceCharges
are also changed to allow different types of allowance charges. These changes affect the following elements:
data.allowanceCharge
->data.allowanceCharges
(change to array, field changes)data.invoiceLines.allowanceCharge
->data.invoiceLines.allowanceCharges
(change to array, field changes) (Invoice API)data.creditNoteLines.allowanceCharge
->data.creditNoteLines.allowanceCharges
(change to array, field changes) (CreditNote API)
New 'processingPreference' element in Invoice and Credit Note
Added endpoint outside "data" to new "processingPreference" element (applied to POST methods only)
- sentTo (endpoint) MANDATORY
- receiveFrom (endpoint) MANDATORY
- replyTo (endpoint) OPTIONAL
- sendToServiceProvider (endpoint) OPTIONAL
- printingPreference OPTIONAL
- recipientNotificationPreference OPTIONAL
- isConsumerRecipient OPTIONAL
Note! Endpoint still exists for accountingCustomerParty
for backwards compatilibity reasons. It is still recommended to provide endpoint in `accountingCustomerParty
element.
More details about the endpoint values are available in Topics / Recipient endpoints.
Field deliveryChannelPreference
changed to printingPreference
Changed the field deliveryChannelPreference
to processingPreference
deliveryChannelPreference
->processingPreference.printingPreference
The values for printingPreference
are the following:
PrintingAllowed
PrintingAlways
NoPrinting
Field serviceProviderId
changed to operator
Changed the intermediate service provider field serviceProviderId
to operator
serviceProviderId
->processingPreference.operator
API v2 for Invoice and Credit Note API - New features
New optional buyerCustomerParty
and sellerSupplierParty
elements in Invoice and CreditNote
Added the following optional fields to have more party elements for business document:
data.buyerCustomerParty
data.sellerSupplierParty
New optional taxCategory
element in Invoice and Credit Note
Added optional element data.taxSubtotals.taxCategory
. This element has been added to both data element and line items:
data.taxTotals.taxSubtotals.taxCategory
invoiceLines.taxTotals.taxSubtotals.taxCategory
creditNoteLines.taxTotals.taxSubtotals.taxCategory
New optional addressLine3
element in Invoice and Credit Note
Added optional field addressLine3
to postalAddress
element in the party:
data.accountingSupplierParty.postalAddress.addressLine3
data.accountingCustomerParty.postalAddress.addressLine3
data.buyerCustomerParty.postalAddress.addressLine3
data.sellerSupplierParty.postalAddress.addressLine3
data.deliveryParty.postalAddress.addressLine3
New optional isIssuedAgainstOrder
element in Invoice and Credit Note
Added optional, boolean field to indicate whether the invoice has been issued
data.isIssuedAgainstOrder
New optional customFields
element in Invoice and Credit Note
Custom fields will have only effect if both the sending and receiving parties agree on the specific custom field names. Basware must be notified beforehand about the custom field usage.
- Added an array field 'customFields' to data element
data.customFields
- Added an array field 'customFields' to line item:
data.invoiceLines.customFields
(Invoice API)data.creditNoteLines.customFields
(CreditNote API)
New optional paymentReferenceMessage
element in Invoice and Credit Note
- Added field
paymentReferenceMessage
topaymentMeans
to data elementdata.paymentMeans.paymentReferenceMessage
- This field is a free text describing the payment
Remove 'internalId' and 'amountUninvoiced' fields from Invoice and Credit Note
- Removed fields 'internalId' and 'amountUninvoiced' from business document lines:
- 'data.invoiceLines.internalId'
- 'data.creditNoteLines.internalId'
- 'data.invoiceLines.quantity.amountUninvoiced'
- 'data.creditNoteLines.quantity.amountUninvoiced'
Remove billingReference
from Invoice
- Removed the field
billingReference
from Invoice API
Remove version
from Invoice and Credit Note
- Removed the field
version
from GET /invoices and GET /creditNotes
GET /invoices and /creditNotes returns origin
in the response
- Added optional
origin
field to GET methods to return details about the document origin such as source channel (electronic mail, postal mail etc.)
GET /invoices and /creditNotes returns bumId
in the response
- Added field
bumId
to business documents in GET methods as a mandatory fields. The field is included in the root of the document.
Upload invoices feature for Invoice
- POST /invoices/{bumId} method has an optional 'action' parameter to upload invoices to Basware Network without invoice delivery. Possible values for 'action' are 'startDelivery' (default) and 'store'.
- You only need to upload invoices in the following scenario:
- You want to use Basware’s value added services and
- You have not sent or received invoices through Basware Network.
API v2 for File
Support for base64 encoding has been added to File API
File API support by default binary upload and download. Support for base64 has been added to both File API v1 and File API v2.
base64 in POST method
- If the
Content-Transfer-Encoding
header in the file content part of the mixed-multipart message is set to base64 then the content of the file is expected to be base64 encoded.
base64 in GET method
- If the GET request header
X-BW-Accept-Encoding
containsbase64
then the response will be return with the body base64 encoded.
File API returns response header fields
- Added two fields to response header in File API:
- X-BW-BUM-ID - Business document identifier
- X-BW-FILE-TYPE - File type can have imageFile, attachmentFile or dataFile
2016-09-21 New fields added to Invoices and Credit Notes v1
New fields to postalAddress in Invoice and Credit Note
- Added
locality
attribute to postalAddress in party element. This field is required in UK if a similar road name exists within a post town area. - Added
addressLine2
attribute to postalAddress in party element. This field is the second address line.
New fields to paymentMeans in Invoice and Credit Note
- Added the following fields to denote virtual bank bar code. Virtual bar code can be added to the business document that should be printed.
paymentMeans.financialAccount.accounting.virtualBankBarcode.id
. This is the actual bank bar code value.paymentMeans.financialAccount.accounting.virtualBankBarcode.schemeId
. This is typically country code according to ISO3166-1 alpha-2. Possible values:FI
.
New fields to paymentIdentifier in Invoice and Credit Note
- Added
paymentMeans.paymentIdentifier.schemeId
to paymentMeans. This is a scheme which identifies the type of payment identifier. Possible values areSPY
,ISO
.
2016-09-21 API for Notifications v1.1 released
GET /notifications
- Added
links
attribute which contains HATEOAS type URI addresses. - Added
documentType
.
POST /notifications
- Added optional
documentType
.
API versioning
Basware Network API has two types of versions
- Major version: Requires normally changes by the API client.
- Minor version: No mandatory changes are normally required by the API client. See detailed minor version rules below.
Your application using Basware Network API should be flexible enough to handle backwards compatible changes:
- Fields in the JSON response are not guaranteed to be returned in a specific order (JSON is by definition an object of unordered key/value mappings).
Major version
The endpoint for major version has the format https://api.basware.com/v1
.
Major version can include one or more of the following changes:
- Adding new mandatory request fields
- Removing an existing field
- Modifying an existing attribute, for example changing an attribute to be an array of attributes
- Changes in the request validation, for example adding enumeration validation
- Other changes in the supporting functionality
Minor version
The endpoint for minor version has the format like https://api.basware.com/v1.1
.
You can update to higher minor versions without code changes as long as your API usage can handle the mappings. There is no mandatory requirement to update to the higher minor version.
Minor version can include one or more of the following changes:
- Adding optional fields to the request of an existing endpoint
- Adding new optional or mandatory fields to the response of an existing endpoint
Error codes
Basware Network REST API uses HTTP response codes to indicate the success or the failure of an API request. In general, REST API returns the following HTTP response codes:
- 20x - Successful response
- 40x - The error was caused by faulty information sent to Basware Network
- 50x - The error was caused by a processing issue in Basware Network
In addition, the response may include additional details about the error situation. The following fields will appear in the error response:
- Id: Unique identifier for the error message
- Type: The error response type. This can be one of the following values: BUSINESS, VALIDATION, TECHNICAL, SECURITY
- Code: The error code
- Message: Human readable error message that explains the cause for the error situation.
- Info: Action to take in order to recover from the error situation
Error response type indicates the type of the error situation:
- BUSINESS: The API request has failed due to business related issue.
- VALIDATION: The API request has failed due to invalid values in the request.
- TECHNICAL: The API request failed because of a technical error in Basware Network.
- SECURITY: The API request failed because of a security violation.
Business error codes
Type | Code | Action to solve the error situation |
---|---|---|
BUSINESS | Error.001.0001 | Receiver organization does not exist in Basware Network, or registration is not available for receiver organization. No action needed from API caller. Basware Support will take action to solve the issue. |
BUSINESS | Error.001.0012 | The API client requests a service which requires that the service is enabled in Basware Network. For example, in order to use Notification API, notifications must be enabled in Basware Network. |
Validation error codes
Type | Code | Action to solve the error situation |
---|---|---|
VALIDATION | Error.003.0001 | The API client requests a business document using a BUMID (business document identifier) that cannot be found from Basware Network. Verify that BUMID references a valid business document. |
VALIDATION | Error.003.0020 | The file type of an attachment that the API client has sent is invalid. Valid file type for attachments are: 'imageFile', 'attachmentFile' and 'dataFile'. Verify that a valid file type is used in the REST API request. |
VALIDATION | Error.003.0038 | The API client requests to create a new business document using a BUMID (business document identifier) that already exists. Verify that the BUMID is unique. |
VALIDATION | Error.004.0002 | Required field is missing from the request sent by the API client, or a field in the request does not match the expected pattern. For example, a date is given in a false format. Verify that a valid request format is used in the REST API request. |
VALIDATION | Error.004.0003 | The format of the BUMID that the API consumer has given is invalid. The supported pattern of the BUMID is: [0-9a-f]{8}- [0-9a-f]{4}-[1-5][0-9a-f] {3}-[89ab][0-9a-f]{3}- [0-9a-f]{12}. Verify that a valid BUMID is referenced in the REST API request. |
VALIDATION | Error.004.0004 | The request that the API client has sent is not in valid JSON format, or a required field like X-BW-REQUEST-ID has incorrect format or is missing from the request. Verify that a valid request format is used in the REST API request. |
VALIDATION | Error.004.0005 | The API client is trying to upload an unsupported file type. Basware Network supports the following file types: CSV, DOC, DOCX, HTM, HTML, JPEG, JPG, ODT, PDF, PNG, PPT, PPTX, RTF, TIF, TIFF, TXT, XLS, XLSX, XML, ZIP. Verify that a valid file type is used in the REST API request. |
VALIDATION | Error.004.0012 | The API client is trying to upload a too large a file to Basware Network. |
VALIDATION | Error.004.0013 | Party identification is not valid. Verify that scheme identifier is valid and the actual identifier follows the pattern expected by the scheme. |
VALIDATION | Error.004.0014 | IBAN format is not valid. Verify that the content is valid and follows the expected pattern. |
Technical error codes
Type | Code | Action to solve the error situation |
---|---|---|
TECHNICAL | Error.001.0006 | Basware Network has encountered an unexpected system error. No action needed from API caller. Basware Support will take action to solve the issue. |
TECHNICAL | Error.001.0010 | Basware Network has encountered a technical error. No action needed from API caller. Basware Support will take action to solve the issue. |
TECHNICAL | Error.003.0032 | The API client tries to download or upload a business document attachment, but the operation fails due to a technical error on the Basware Network side. No action needed from API caller. Basware Support will take action to solve the issue. |
Security error codes
Type | Code | Action to solve the error situation |
---|---|---|
SECURITY | Error.002.0004 | The API client tries to upload a business document attachment, but the operation fails due to a security violation. For example, the attachment may contain a virus. Make sure that the contents of the business document attachment meets the security requirements. |
Notification details
Basware Network communicates changes in business documents' statuses and possible errors related to business document delivery using notifications. You can receive notification from Basware Network using the Notification API.
The responseCode
field tells you the the delivery status of a business document:
- BusinessAccept: The recipient has accepted the business document.
- BusinessReject: The recipient has rejected the business document.
- BusinessInformation: A business process action has been taken for the business document, for example "the invoice has been paid".
- TechnicalAccept: The business document has been accepted for processing in the Basware Network.
- TechnicalReject: The business document has been rejected because Basware Network was unable to deliver the business document.
- TechnicalInformation: Basware Network encountered a temporary delivery failure. The service will automatically retry to deliver the document. No action is required from your side.
The actionCode
field provides you with more detailed information about a business document's processing status. Notification is a combination of responseCode
and actionCode
fields.
The following tables describe the cases in which Basware Network will post a notification posted to you.
Clients that send business documents
The following table includes notifications which clients that send business documents can fetch.
Response Code | Action Code | The reason behind the action code |
---|---|---|
TechnicalAccept | Delivered | The business document has been delivered to the recipient. This is a final status with a time reservation; some interoperability channels may return a rejection after several days. |
TechnicalAccept | ReceivedForProcessing | Basware Network has received the business document for processing. This is a temporary status. |
TechnicalInformation | DeliveryDelayed | A temporary delivery failure has occurred. Basware Network will automatically retry the delivery. No action is required from your side. This is a temporary status. |
TechnicalReject | Undelivered | The business document cannot be delivered to the recipient. This is a final status. |
TechnicalReject | InvalidContent | The business document has been rejected because its content invalid. This can be caused by, for example, if the bank reference number user on the business document is in invalid format. This action code is also used if the service encounters PEPPOL validation errors. |
BusinessAccept | DocumentAccepted | The recipient has accepted the business document. Note: This notification applies to invoices and credit notes. |
BusinessReject | DocumentRejected | The recipient has rejected the business document. Note: This notification applies to invoices and credit notes. |
Clients that receive business documents
The following table includes notifications which clients that receive business documents can fetch.
Response Code | Action Code | The reason behind the action code | Can be sent by API client? |
---|---|---|---|
TechnicalInformation | Received | The recipient has received the business document. | No |
TechnicalAccept | Delivered | The recipient has received the business document, and confirmed the receipt. This notification can be sent only if the recipient is part of the delivery process and needs to provide additional details. | Yes |
TechnicalReject | Undelivered | The recipient has received the business document, and rejected the business document. This notification can be sent if recipient is part of the delivery process. | Yes |
TechnicalReject | InvalidContent | The business document has been rejected because its content invalid. This can be caused by, for example, if the bank reference number user on the business document is in invalid format. This action code is also used if the service encounters PEPPOL validation errors. | Yes |
BusinessAccept | DocumentAccepted | The recipient has accepted the business document. Note: This notification applies to invoices and credit notes. |
Yes |
BusinessReject | DocumentRejected | The recipient has rejected the business document. Note: This notification applies to invoices and credit notes. |
Yes |
Clients that use Basware value added services
The following table includes notifications which clients that use Basware value added services can fetch.
Response Code | Action Code | The reason behind the action code |
---|---|---|
BusinessInformation | EligibleForEarlyPayment | The invoice is eligible for early payment. Note: This notification applies to Basware value added services. |
BusinessInformation | NotEligibleForEarlyPayment | The invoice is not eligible for early payment. Note: This notification applies to Basware value added services. |
BusinessAccept | RequestForEarlyPayment | The supplier requests invoice to be paid. Note: This notification applies to Basware value added services. |
BusinessAccept | ReadyForPayment | The invoice is ready for payment. |
BusinessInformation | DiscountCreditNoteAvailable | A discount credit note is available for download. Note: This notification applies to customers who have opted for API delivery of Basware Discount Credit Notes. |
BusinessInformation | Paid | Recipient has initiated the bank payment. Note: This notification applies to invoices and credit notes. |
BusinessInformation | TransferredToPayment | Business document has been moved to payment processing by the recipient. Note: This notification applies to invoices and credit notes. |
BusinessInformation | PaymentInitiated | Business document has been moved to payment processing by the recipient. Note: This notification applies to invoices and credit notes. |
Parameter: additionalActionProperties
Notification for some action codes can contain additional properties, which will be included in the additionalActionProperties
element. All the additional properties are optional.
Action code | Property name of additional action | Property value of additional action | Remarks |
---|---|---|---|
Delivered | DeliveryMeansCode | ElectronicDelivery, EmailDelivery or MailDelivery | Notifications can include the delivery channel of a business document to help estimate the delivery time. However, this information cannot be used for billing purposes. |
InvalidContent or Delivered | ValidationFileReference | <file reference> | Notifications can include a reference to a validation file. The validation file will contain more information about why the business document's validation failed. The validation file can be retrieved using the GET /files/{fileReference} method. Currently, the API only returns results from PEPPOL validation. The validation file can also be returned in successful cases, where the business document's actionCode is Delivered. Currently, the API only returns results from PEPPOL validation. |
API for Notifications v1.1
Notifications
API client sends and fetches a list of notifications related to a business document. Each notification is linked to an event in the business document's lifecycle. Basware Network raises events as it processes the business document.
If you send or receive business documents, you can notify Basware Network about a change in a business document’s status. If you send business documents, you can fetch notifications about the business documents that you have sent.
POST
POST /notifications HTTP/1.1
Accept: application/json
Authorization: Basic dXMlbjp1c2Vy
X-BW-REQUEST-ID: 1204edd0-ff8d-11e4-a322-1697f925ec7b
Request example
{
"bumid" : "7de91997-70de-51b8-84e1-41cc473eeee7",
"documentType": "Invoice",
"acknowledgementId" : "7de91997-70de-51b8-84e1-41cc473ebeef",
"responseCode" : "TechnicalAccept",
"responseType" : "BCN:responsecode-v1",
"actionCode" : "Delivered",
"actionType" : "BCN:actioncode-v1",
"notificationCreated" : "1334578485000",
"description" : "The business document has been delivered to the recipient"
}
Request schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Notification",
"type": "object",
"properties": {
"bumid": {
"description": "Unique UUID for business document",
"type": "string",
"pattern" : "^([0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})$"
},
"documentType": {
"description": "Document type the notification relates to. Possible values: Invoice|CreditNode|Order|Catalogue",
"type": "string"
},
"acknowledgementId": {
"description": "Acknowledgement identifier. Format is UUID",
"type": "string",
"pattern" : "^([0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})$"
},
"responseCode": {
"description": "Response code. Possible codes: TechnicalAccept|TechnicalReject|TechnicalInformation|BusinessAccept|BusinessReject|BusinessInformation",
"type": "string",
"default": "TechnicalAccept"
},
"responseType": {
"description": "Type for response code. Possible values: BCN:responsecode-v1",
"type": "string",
"default": "BCN:responsecode-v1"
},
"actionType": {
"description": "Type for action code. Possible values: BCN:actioncode-v1",
"type": "string",
"default": "BCN:actioncode-v1"
},
"actionCode": {
"description": "Action code. Possible values are described in Notification details",
"type": "string",
"default": "Delivered"
},
"additionalActionProperties": {
"description": "Additional properties for the notification",
"type": "array",
"items" : {
"type" : "object",
"properties" : {
"name" : {
"type" : "string",
"description" : "Type of the additional information related to actionCode"
},
"value" : {
"type" : "string",
"description" : "The actual value for the additional information"
}
}
}
},
"notificationCreated": {
"description": "Notification creation time. The format is Unix time (Epoch time) with millisecond accuracy",
"type": "string"
},
"description": {
"description": "Description for the notification",
"type": "string"
}
},
"required":[
"bumid",
"responseCode",
"notificationCreated"
],
"additionalProperties": false
}
You can notify Basware Network about a change in a business document's status by using the POST notification method.
Request URI
https://api.basware.com/v1.1/notifications
Request Headers
Param Name | Required | Example | Description |
---|---|---|---|
Content-Type | true | application/json | Specifies media types which are acceptable for the request. Value application/json is supported. |
Accept | false | application/json | Specifies media types which are acceptable for the response. Value application/json is supported. |
X-BW-REQUEST-ID | false | 7fc7d038-4306-4fc5-89c3-7ac8a12a30d0 | Client generated UUID value for identifying request-response flow. Disclaimer. This value is highly recommended to be included. Production support for this request is not possible if this value is missing. |
Responses
Response code | Description |
---|---|
201 | The request has been fulfilled and resulted in a new resource being created. |
400 | Bad Request. The server cannot or will not process the request. Bad request due to invalid request syntax or invalid request message framing. |
401 | Unauthorized. The request has not been serviced, the request is unauthorized as it lacks valid authentication credentials (UserName/Password). |
403 | Forbidden. The server understood the request, but is refusing to fulfill it. |
415 | Unsupported Media Type. The server is refusing to service the request because the payload is in a format not supported. |
GET
GET /notifications HTTP/1.1
Accept: application/json
Authorization: Basic dXMlbjp1c2Vy
X-BW-REQUEST-ID: 1204edd0-ff8d-11e4-a322-1697f925ec7b
Response code 200 - The request has been completed successfully.
Response example for the response code above
{
"hasMoreItems": false,
"notifications": [
{
"bumid": "7de91997-70de-51b8-84e1-41cc473eeee7",
"documentType": "Invoice",
"acknowledgementId": "7de91997-70de-51b8-84e1-41cc473ebeef",
"responseCode": "TechnicalAccept",
"responseType": "BCN:responsecode-v1",
"actionCode": "Delivered",
"actionType": "BCN:actioncode-v1",
"additionalActionProperties": [
{
"name": "DeliveryMeansCode",
"value": "ElectronicDelivery"
}
],
"notificationCreated": "1334578485000",
"description": "Document delivered successfully",
"links": [
{
"rel": "businessDocument",
"href": "https://api.basware.com/v1/invoices/7de91997-70de-51b8-84e1-41cc473eeee7",
"method": "GET"
},
{
"rel": "notification",
"href": "https://api.basware.com/v1.1/notifications/7de91997-70de-51b8-84e1-41cc473ebeef",
"method": "DELETE"
}
]
},
{
"bumid": "19757736-6ddb-47d3-8d35-79b3eb18c20a",
"documentType": "Invoice",
"acknowledgementId": "78a25143-68de-5131-a4e2-56756756eeee",
"responseCode": "BusinessReject",
"responseType": "BCN:responsecode-v1",
"actionCode": "RepaymentFailed",
"actionType": "BCN:actioncode-v1",
"notificationCreated": "1334578587000",
"description": "Repayment has failed",
"links": [
{
"rel": "businessDocument",
"href": "https://api.basware.com/v1.1/invoices/19757736-6ddb-47d3-8d35-79b3eb18c20a",
"method": "GET"
},
{
"rel": "notification",
"href": "https://api.basware.com/v1.1/notifications/78a25143-68de-5131-a4e2-56756756eeee",
"method": "DELETE"
}
]
}
]
}
Response schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Notifications",
"type": "object",
"description": "Notifications are related to business document",
"properties": {
"hasMoreItems": {
"type": "boolean",
"description": "Indicates whether there are additional notifications to return"
},
"notifications": {
"type": "array",
"items": {
"type": "object",
"properties": {
"bumid": {
"description": "Unique UUID for business document",
"type": "string",
"pattern" : "^([0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})$"
},
"documentType": {
"description": "Document type the notification relates to. Possible values: Invoice|CreditNode|Order|OrderCancellation|OrderChange|Catalogue",
"type": "string",
"default": "Invoice"
},
"acknowledgementId": {
"description": "Acknowledgement identifier. Format is UUID",
"type": "string",
"pattern" : "^([0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})$"
},
"responseCode": {
"description": "Response code. Possible codes: TechnicalAccept|TechnicalReject|TechnicalInformation|BusinessAccept|BusinessReject|BusinessInformation",
"type": "string",
"default": "TechnicalAccept"
},
"responseType": {
"description": "Type for response code. Possible values: BCN:responsecode-v1",
"type": "string",
"default": "BCN:responsecode-v1"
},
"actionType": {
"description": "Type for action code. Possible values: BCN:actioncode-v1",
"type": "string",
"default": "BCN:actioncode-v1"
},
"actionCode": {
"description": "Action code. Possible values described in Notification details",
"type": "string",
"default": "Delivered"
},
"additionalActionProperties": {
"description": "Additional properties for the notification",
"type": "array",
"items" : {
"type" : "object",
"properties" : {
"name" : {
"type" : "string",
"description" : "Type of the additional information related to actionCode"
},
"value" : {
"type" : "string",
"description" : "The actual value for the additional information"
}
}
}
},
"notificationCreated": {
"description": "Notification creation time. The format is Unix time (Epoch time) with millisecond accuracy",
"type": "string"
},
"description": {
"description": "Description for the notification",
"type": "string"
},
"links": {
"type": "array",
"description": "Links related to the notification",
"items": {
"type": "object",
"description": "Links related to the notification",
"properties": {
"rel": {
"type": "string",
"description": "Relation type for the URL in question. Possible values are notification (default), validationFile or businessDocument.",
"default": "notification"
},
"href": {
"type": "string",
"description": "Link between the completed call and a future call. The URI is a fully formed URI, which needs also the method field"
},
"method": {
"type": "string",
"enum": ["GET", "POST", "DELETE"],
"description": "HTTP methods required to interact with the provided URL",
"default": "GET"
}
}
}
}
},
"additionalProperties": false,
"required": [
"bumid",
"documentType",
"acknowledgementId",
"responseCode",
"actionCode",
"notificationCreated"
]
}
}
},
"required":[
"hasMoreItems",
"notifications"
],
"additionalProperties": false
}
Response code 400 - Bad Request. The server cannot or will not process the request. Request failed due to invalid request syntax or invalid request message framing.
Response example for the response code above
{
"error": {
"id": "c842c9c3-75e5-4c32-ae3f-c1fe250fc186",
"type": "VALIDATION",
"message": "Business document identifier bumId does not match the pattern :[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}",
"code": "Error.004.0003",
"info": "Contact Basware Support http://www.basware.com/contact and provide them with the error ID and the error code you encountered. Basware support will investigate the cause of the error."
}
}
You can fetch a list of notifications related to a business document using the GET notification method.
When you fetch notifications, note that you must acknowledge each notification by deleting it with the DELETE notification method. If the notification is not acknowledged, it will appear again when fetching the notifications the next time. Each notification has a unique acknowledgement identifier (acknowledgementId) that you can use to identify the notification.
Request URI
https://api.basware.com/v1.1/notifications
Request Headers
Param Name | Required | Example | Description |
---|---|---|---|
Accept | false | application/json | Specifies media types which are acceptable for the response. Value application/json is supported. |
X-BW-REQUEST-ID | false | 7fc7d038-4306-4fc5-89c3-7ac8a12a30d0 | Client generated UUID value for identifying request-response flow. Disclaimer. This value is highly recommended to be included. Production support for this request is not possible if this value is missing. |
Query Parameters
Param Name | Required | Example | Description |
---|---|---|---|
documentType | false | Invoice | Type of documents to fetch notifications for. This parameter can be used to restrict the notification search to a particular document type. Possible values are Invoice, CreditNode, Order, OrderCancellation, OrderChange, Catalogue. |
page | true | 1 | A cursor for pagination. The first request must have value 1. If the response indicated that there are additional notifications to fetch, the subsequent GET method should use value 2. |
pageSize | true | 50 | A limit for the number of items to be returned during one request. Limit can range between 1 and 5000 items. |
Responses
Response code | Description |
---|---|
200 | The request has been completed successfully. |
400 | Bad Request. The server cannot or will not process the request. Request failed due to invalid request syntax or invalid request message framing. |
401 | Unauthorized. The request has not been serviced, the request is unauthorized as it lacks valid authentication credentials (UserName/Password). |
403 | Forbidden. The server understood the request, but is refusing to fulfill it. |
415 | Unsupported Media Type. The server is refusing to service the request because the payload is in a format not supported. |
500 | Internal Server Error. The server encountered an unexpected condition, which prevented it from fulfilling the request. |
DELETE
DELETE /notifications/{id} HTTP/1.1
Accept: application/json
Authorization: Basic dXMlbjp1c2Vy
X-BW-REQUEST-ID: 1204edd0-ff8d-11e4-a322-1697f925ec7b
Use the DELETE notification method to delete notifications related to a business document. Note that you must acknowledge each notification that you receive by deleting it. If the notification is not acknowledged, it will appear again when fetching the notifications the next time.
Request URI
https://api.basware.com/v1.1/notifications/{id}
URI Parameters
Param Name | Type | Required | Example | Description |
---|---|---|---|---|
id | string | true | ee52202e-680e-4e55-b8a4-0d9daa7c3ee0 | Identifier of the notification to be acknowledged. |
Request Headers
Param Name | Required | Example | Description |
---|---|---|---|
Accept | false | application/json | Specifies media types which are acceptable for the response. Value application/json is supported. |
X-BW-REQUEST-ID | false | 7fc7d038-4306-4fc5-89c3-7ac8a12a30d0 | Client generated UUID value for identifying request-response flow. Disclaimer. This value is highly recommended to be included. Production support for this request is not possible if this value is missing. |
Responses
Response code | Description |
---|---|
200 | The notification has been acknowledged successfully. |
401 | Unauthorized. The request has not been serviced, the request is unauthorized as it lacks valid authentication credentials (UserName/Password). |
403 | Forbidden. The server understood the request, but is refusing to fulfill it. |
404 | Resource could not be found. The server has not found anything matching the request URI. |
API for Notifications v2
Notifications
API client sends and fetches a list of notifications related to a business document. Each notification is linked to an event in the business document's lifecycle. Basware Network raises events as it processes the business document.
If you send or receive business documents, you can notify Basware Network about a change in a business document’s status. If you send business documents, you can fetch notifications about the business documents that you have sent.
POST
POST /notifications HTTP/1.1
Accept: application/json
Authorization: Basic dXMlbjp1c2Vy
X-BW-REQUEST-ID: 1204edd0-ff8d-11e4-a322-1697f925ec7b
Request example
{
"resourceId" : "7de91997-70de-51b8-84e1-41cc473eeee7",
"notificationType": "BusinessDocument",
"resourceType": "Invoice",
"responseType" : "BCN:responsecode-v1",
"responseCode" : "TechnicalAccept",
"actionType" : "BCN:actioncode-v1",
"actionCode" : "Delivered",
"notificationCreated" : "1334578485000",
"description" : "The business document has been delivered to the recipient"
}
Request schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Notification",
"type": "object",
"properties": {
"resourceId": {
"description": "Unique UUID for the resource. For business document the identifier refers to bumId. For trading partner the identifier refers to vendor identifier",
"type": "string",
"pattern" : "^([0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})$"
},
"notificationType": {
"description": "Notification type the notification relates to. Possible values: BusinessDocument",
"type": "string"
},
"resourceType": {
"description": "Resource type the notification relates to. Possible values for BusinessDocument: Invoice|CreditNode|Order|Catalogue. Possible values for TradingPartner: Vendor.",
"type": "string"
},
"responseCode": {
"description": "Response code. Possible codes: TechnicalAccept|TechnicalReject|TechnicalInformation|BusinessAccept|BusinessReject|BusinessInformation",
"type": "string"
},
"responseType": {
"description": "Type for response code. Possible values: BCN:responsecode-v1",
"type": "string",
"default": "BCN:responsecode-v1"
},
"actionType": {
"description": "Type for action code. Possible values: BCN:actioncode-v1",
"type": "string",
"default": "BCN:actioncode-v1"
},
"actionCode": {
"description": "Action code. Possible values are described in Notification details",
"type": "string"
},
"additionalActionProperties": {
"description": "Additional properties for the notification",
"type": "array",
"items" : {
"type" : "object",
"properties" : {
"name" : {
"type" : "string",
"description" : "Type of the additional information related to actionCode"
},
"value" : {
"type" : "string",
"description" : "The actual value for the additional information"
}
}
}
},
"notificationCreated": {
"description": "Notification creation time. The format is Unix time (Epoch time) with millisecond accuracy",
"type": "string",
"pattern": "^d{13}$"
},
"description": {
"description": "Description for the notification",
"type": "string"
},
"detailedDescription": {
"description": "Detailed description for the notification",
"type": "string"
}
},
"required": [
"resourceId",
"notificationType",
"resourceType",
"responseCode",
"actionCode",
"notificationCreated",
"description"
],
"additionalProperties": false
}
You can notify Basware Network about a change in a business document's status by using the POST notification method.
Request URI
https://api.basware.com/v2/notifications
Request Headers
Param Name | Required | Example | Description |
---|---|---|---|
Content-Type | true | application/json | Specifies media types which are acceptable for the request. Value application/json is supported. |
Accept | false | application/json | Specifies media types which are acceptable for the response. Value application/json is supported. |
X-BW-REQUEST-ID | false | 7fc7d038-4306-4fc5-89c3-7ac8a12a30d0 | Client generated UUID value for identifying request-response flow. Disclaimer. This value is highly recommended to be included. Production support for this request is not possible if this value is missing. |
Responses
Response code | Description |
---|---|
201 | The request has been fulfilled and resulted in a new resource being created. |
400 | Bad Request. The server cannot or will not process the request. Bad request due to invalid request syntax or invalid request message framing. |
401 | Unauthorized. The request has not been serviced, the request is unauthorized as it lacks valid authentication credentials (UserName/Password). |
403 | Forbidden. The server understood the request, but is refusing to fulfill it. |
404 | Resource could not be found. The server has not found anything matching the request URI. |
415 | Unsupported Media Type. The server is refusing to service the request because the payload is in a format not supported. |
GET
GET /notifications HTTP/1.1
Accept: application/json
Authorization: Basic dXMlbjp1c2Vy
X-BW-REQUEST-ID: 1204edd0-ff8d-11e4-a322-1697f925ec7b
Response code 200 - The request has been completed successfully.
Response example for the response code above
{
"hasMoreItems": false,
"notifications": [
{
"resourceId": "7de91997-70de-51b8-84e1-41cc473eeee7",
"notificationType": "BusinessDocument",
"resourceType": "Invoice",
"acknowledgementId": "7de91997-70de-51b8-84e1-41cc473ebeef",
"responseCode": "TechnicalAccept",
"responseType": "BCN:responsecode-v1",
"actionCode": "Delivered",
"actionType": "BCN:actioncode-v1",
"additionalActionProperties": [
{
"name": "DeliveryMeansCode",
"value": "ElectronicDelivery"
}
],
"notificationCreated": "1334578485000",
"description": "Document delivered successfully",
"detailedDescription": "Document delivered",
"links": [
{
"rel": "businessDocument",
"href": "https://api.basware.com/v2/invoices/7de91997-70de-51b8-84e1-41cc473eeee7",
"method": "GET"
},
{
"rel": "notification",
"href": "https://api.basware.com/v2/notifications/7de91997-70de-51b8-84e1-41cc473ebeef",
"method": "DELETE"
}
]
},
{
"resourceId": "19757736-6ddb-47d3-8d35-79b3eb18c20a",
"notificationType": "BusinessDocument",
"resourceType": "Invoice",
"acknowledgementId": "78a25143-68de-5131-a4e2-56756756eeee",
"responseCode": "BusinessReject",
"responseType": "BCN:responsecode-v1",
"actionCode": "RepaymentFailed",
"actionType": "BCN:actioncode-v1",
"notificationCreated": "1334578587000",
"description": "Repayment has failed",
"links": [
{
"rel": "businessDocument",
"href": "https://api.basware.com/v2/invoices/19757736-6ddb-47d3-8d35-79b3eb18c20a",
"method": "GET"
},
{
"rel": "notification",
"href": "https://api.basware.com/v2/notifications/78a25143-68de-5131-a4e2-56756756eeee",
"method": "DELETE"
}
]
}
]
}
Response schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Notifications",
"type": "object",
"description": "Notifications are related to business document",
"properties": {
"hasMoreItems": {
"type": "boolean",
"description": "Indicates whether there are additional notifications to return"
},
"notifications": {
"type": "array",
"items": {
"type": "object",
"properties": {
"resourceId": {
"description": "Unique UUID for the resource. For business document the identifier refers to bumId. For trading partner the identifier refers to vendor identifier",
"type": "string",
"pattern" : "^([0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})$"
},
"notificationType": {
"description": "Notification type the notification relates to. Possible values: BusinessDocument|TradingPartner",
"type": "string"
},
"resourceType": {
"description": "Resource type the notification relates to. Possible values for BusinessDocument: Invoice|CreditNode|Order|Catalogue. Possible values for TradingPartner: Vendor.",
"type": "string"
},
"acknowledgementId": {
"description": "Acknowledgement identifier. Format is UUID",
"type": "string",
"pattern" : "^([0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})$"
},
"responseCode": {
"description": "Response code. Possible codes: TechnicalAccept|TechnicalReject|TechnicalInformation|BusinessAccept|BusinessReject|BusinessInformation",
"type": "string",
"default": "TechnicalAccept"
},
"responseType": {
"description": "Type for response code. Possible values: BCN:responsecode-v1",
"type": "string",
"default": "BCN:responsecode-v1"
},
"actionType": {
"description": "Type for action code. Possible values: BCN:actioncode-v1",
"type": "string",
"default": "BCN:actioncode-v1"
},
"actionCode": {
"description": "Action code. Possible values described in Notification details",
"type": "string",
"default": "Delivered"
},
"additionalActionProperties": {
"description": "Additional properties for the notification",
"type": "array",
"items" : {
"type" : "object",
"properties" : {
"name" : {
"type" : "string",
"description" : "Type of the additional information related to actionCode"
},
"value" : {
"type" : "string",
"description" : "The actual value for the additional information"
}
}
}
},
"notificationCreated": {
"description": "Notification creation time. The format is Unix time (Epoch time) with millisecond accuracy",
"type": "string",
"pattern": "^d{13}$"
},
"description": {
"description": "Description for the notification",
"type": "string"
},
"detailedDescription": {
"description": "Detailed description for the notification",
"type": "string"
},
"links": {
"type": "array",
"description": "Links related to the notification",
"items": {
"type": "object",
"description": "Links related to the notification",
"properties": {
"rel": {
"type": "string",
"description": "Relation type for the URL in question. Possible values are notification (default), validationFile or businessDocument.",
"default": "notification"
},
"href": {
"type": "string",
"description": "Link between the completed call and a future call. The URI is a fully formed URI, which needs also the method field"
},
"method": {
"type": "string",
"enum": ["GET", "POST", "DELETE"],
"description": "HTTP methods required to interact with the provided URL",
"default": "GET"
}
}
}
}
},
"additionalProperties": false,
"required": [
"resourceId",
"notificationType",
"resourceType",
"acknowledgementId",
"responseCode",
"actionCode",
"notificationCreated"
]
}
}
},
"required":[
"hasMoreItems",
"notifications"
],
"additionalProperties": false
}
Response code 400 - Bad Request. The server cannot or will not process the request. Request failed due to invalid request syntax or invalid request message framing.
Response example for the response code above
{
"error": {
"id": "c842c9c3-75e5-4c32-ae3f-c1fe250fc186",
"type": "VALIDATION",
"message": "Business document identifier bumId does not match the pattern :[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}",
"code": "Error.004.0003",
"info": "Contact Basware Support http://www.basware.com/contact and provide them with the error ID and the error code you encountered. Basware support will investigate the cause of the error."
}
}
You can fetch a list of notifications related to a business document using the GET notification method.
When you fetch notifications, note that you must acknowledge each notification by deleting it with the DELETE notification method. If the notification is not acknowledged, it will appear again when fetching the notifications the next time. Each notification has a unique acknowledgement identifier (acknowledgementId) that you can use to identify the notification.
Request URI
https://api.basware.com/v2/notifications
Request Headers
Param Name | Required | Example | Description |
---|---|---|---|
Accept | false | application/json | Specifies media types which are acceptable for the response. Value application/json is supported. |
X-BW-REQUEST-ID | false | 7fc7d038-4306-4fc5-89c3-7ac8a12a30d0 | Client generated UUID value for identifying request-response flow. Disclaimer. This value is highly recommended to be included. Production support for this request is not possible if this value is missing. |
Query Parameters
Param Name | Required | Example | Description |
---|---|---|---|
documentType | false | Invoice | Type of documents to fetch notifications for. This parameter can be used to restrict the notification search to a particular document type. Possible values are Invoice, CreditNode, Order, OrderCancellation, OrderChange, Catalogue. |
page | true | 1 | A cursor for pagination. The first request must have value 1. If the response indicated that there are additional notifications to fetch, the subsequent GET method should use value 2. |
pageSize | true | 50 | A limit for the number of items to be returned during one request. Limit can range between 1 and 5000 items. |
Responses
Response code | Description |
---|---|
200 | The request has been completed successfully. |
400 | Bad Request. The server cannot or will not process the request. Request failed due to invalid request syntax or invalid request message framing. |
401 | Unauthorized. The request has not been serviced, the request is unauthorized as it lacks valid authentication credentials (UserName/Password). |
403 | Forbidden. The server understood the request, but is refusing to fulfill it. |
404 | Resource could not be found. The server has not found anything matching the request URI. |
415 | Unsupported Media Type. The server is refusing to service the request because the payload is in a format not supported. |
500 | Internal Server Error. The server encountered an unexpected condition, which prevented it from fulfilling the request. |
DELETE
DELETE /notifications/{id} HTTP/1.1
Accept: application/json
Authorization: Basic dXMlbjp1c2Vy
X-BW-REQUEST-ID: 1204edd0-ff8d-11e4-a322-1697f925ec7b
Use the DELETE notification method to delete notifications related to a business document. Note that you must acknowledge each notification that you receive by deleting it. If the notification is not acknowledged, it will appear again when fetching the notifications the next time.
Request URI
https://api.basware.com/v2/notifications/{id}
URI Parameters
Param Name | Type | Required | Example | Description |
---|---|---|---|---|
id | string | true | ee52202e-680e-4e55-b8a4-0d9daa7c3ee0 | Identifier of the notification to be acknowledged. |
Request Headers
Param Name | Required | Example | Description |
---|---|---|---|
Accept | false | application/json | Specifies media types which are acceptable for the response. Value application/json is supported. |
X-BW-REQUEST-ID | false | 7fc7d038-4306-4fc5-89c3-7ac8a12a30d0 | Client generated UUID value for identifying request-response flow. Disclaimer. This value is highly recommended to be included. Production support for this request is not possible if this value is missing. |
Responses
Response code | Description |
---|---|
200 | The notification has been acknowledged successfully. |
401 | Unauthorized. The request has not been serviced, the request is unauthorized as it lacks valid authentication credentials (UserName/Password). |
403 | Forbidden. The server understood the request, but is refusing to fulfill it. |
404 | Resource could not be found. The server has not found anything matching the request URI. |
API for Invoices v3
Invoices
The Invoice API lets you send invoices through Basware Network to a recipient.
Invoice API supports several invoice like documents, such as Invoice and CreditNote.
If you need to add attachments to your business document, you can deliver those, too, using the File API. The Files API returns a file identifier (fileId) for each file that you send. You can use this identifier to link the business document sent using the Invoice API to the files delivered using the File API.
GET
GET /invoices/{bumId} HTTP/1.1
Accept: application/json
Authorization: Basic dXMlbjp1c2Vy
X-BW-REQUEST-ID: 1204edd0-ff8d-11e4-a322-1697f925ec7b
Response code 200 - The request has been completed successfully.
Response example for the response code above
{
"bumId": "c6d7067f-eb67-4289-89ec-819446078a3a",
"documentType": "Invoice",
"fileRefs": [
{
"refId": "539a78446842ed4025464947d",
"fileType": "imageFile"
},
{
"refId": "539a785684edd4025415947d",
"fileType": "attachmentFile"
}
],
"links": [
{
"rel": "file",
"href": "https://api.basware.com/v2/files/539a78446842ed4025464947d",
"method": "GET"
},
{
"rel": "file",
"href": "https://api.basware.com/v2/files/539a785684edd4025415947d",
"method": "GET"
}
],
"origin": {
"source": "SendingCustomer",
"sourceContentCategory": "StructuredData",
"sourceChannelCategory": "Electronic",
"processQualityIndicators": [
"ContentValidation",
"StructuralValidation"
]
},
"data": {
"externalDocumentIdentifier": {
"id": "56328230"
},
"accountingCustomerParty": {
"endpoint": {
"id": "0037059254248888",
"schemeId": "ISO6523-ACTORID-UPIS"
},
"partyIdentifications": [
{
"id": "05925424",
"schemeId": "FI:ORGNR"
}
],
"partyName": "Basware REST API Test Recipient",
"postalAddress": {
"addressLine": "Linnoitustie 2",
"cityName": "Espoo",
"postalZone": "02600",
"countryId": "FI"
}
},
"accountingSupplierParty": {
"endpoint": {
"id": "114823943023440",
"schemeId": "ISO6523-ACTORID-UPIS"
},
"partyName": "Acme Supplier Inc.",
"postalAddress": {
"addressLine": "1800 Main Street",
"cityName": "Dallas",
"countryId": "US",
"countrySubentity": "TX",
"postalZone": "75201"
}
},
"deliveryParty": {
"partyName": "Parcels United",
"postalAddress": {
"addressLine": "1 Back Lane",
"locality": "Clayton West",
"cityName": "HUDDERSFIELD",
"postalZone": "HD8 9PP",
"countryId": "UK"
}
},
"buyerReference": {
"id": "PO-15653345"
},
"documentCurrencyCode": "EUR",
"documentLines": [
{
"id": "1",
"item": {
"descriptions": [
{
"description":"Basic High-Speed HDMI Cable - 25 Feet"
},
{
"description":"Supports Ethernet, 3D, 4K and Audio Return"
}
],
"name": "High-Speed HDMI Cable",
"sellersItem": {
"id": "B-341"
},
"taxPercent": 10
},
"lineExtension": {
"amount": 72,
"currencyId": "EUR"
},
"quantity": {
"amount": 2,
"unitCode": "PCE"
},
"taxTotals": [
{
"amount": 17.28,
"currencyId": "EUR",
"taxSubtotals": [
{
"amount": 17.28,
"currencyId": "EUR",
"percent": 24
}
],
"transactionCurrencyTax": {
"amount": 0.9
}
}
]
},
{
"id": "2",
"item": {
"sellersItem": {
"id": "A-532"
},
"taxPercent": 10
},
"lineExtension": {
"amount": 23.1,
"currencyId": "EUR"
},
"quantity": {
"amount": 1,
"unitCode": "PCE"
},
"taxTotals": [
{
"amount": 5.54,
"currencyId": "EUR",
"taxSubtotals": [
{
"amount": 5.54,
"currencyId": "EUR",
"percent": 24
}
],
"transactionCurrencyTax": {
"amount": 0.9
}
}
]
}
],
"issueDate": "2017-05-15",
"legalMonetaryTotal": {
"payableAmount": {
"amount": 462.8,
"currencyId": "EUR"
}
},
"paymentMeans": {
"financialAccounts": [
{
"financialInstitutionName": "Nordea Bank AB",
"financialInstitutionId": "NDEAFIHH",
"ids": [
{
"id": "FI2112345600000785",
"schemeId": "IBAN"
}
]
}
],
"paymentDueDate": "2017-06-01",
"paymentIdentifier": {
"id": "63156783578924",
"schemeId": "SPY"
},
"paymentMeansCode": "31"
},
"taxTotal": {
"amount": 89.56,
"currencyId": "EUR",
"taxSubtotals": [
{
"amount": 89.56,
"currencyId": "EUR",
"percent": 24,
"taxableAmount": 373.24
}
]
}
}
}
Response schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Schema for GET /invoices",
"description": "Invoice is a business document which can contain attachments.",
"type": "object",
"additionalProperties": false,
"properties": {
"bumId": {
"description": "Identifies the business document (Basware Unique Message Identifier). It is an unique identifier (UUID) that can be used by external systems to identify a business document.",
"pattern" : "^([0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})$"
},
"documentType": {
"type": "string",
"enum": ["Invoice", "CreditNote", "PaymentReceipt"],
"description": "Indicates the business document type. Possible values are Invoice, CreditNote and PaymentReceipt."
},
"fileRefs": {
"items" : {
"type" : "object",
"additionalProperties" : false,
"properties" : {
"refId" : {
"type" : "string",
"description" : "Unique file identifier received after storing file into Basware Network."
},
"fileType" : {
"type" : "string",
"description" : "File type. Possible values are imageFile, attachmentFile and dataFile."
}
},
"required" : [ "refId", "fileType" ]
}
},
"links": {
"items" : {
"type" : "object",
"description" : "Links related to the business document",
"properties" : {
"rel" : {
"type" : "string",
"description" : "Relation type for the URL in question. Possible values are file.",
"default" : "file"
},
"href" : {
"type" : "string",
"description" : "Link between the completed call and a future call. The URI is a fully formed URI, which needs also the method field"
},
"method" : {
"type" : "string",
"enum" : [ "GET", "POST" ],
"description" : "HTTP methods required to interact with the provided URL",
"default" : "GET"
}
}
}
},
"origin": {
"additionalProperties" : false,
"properties" : {
"source" : {
"type" : "string",
"description" : "The originating source of the document. Possible values: SendingCustomer, ReceivingCustomer, ServiceProvider"
},
"sourceContentCategory" : {
"type" : "string",
"description" : "Indicates the source content. If the content is structured data, the data quality is higher. Possible values: Image, StructuredData, UnstructuredData"
},
"sourceChannelCategory" : {
"type" : "string",
"description" : "Indicates the source channel of the business document. Possible values: PostalMail, ElectronicMail, Electronic"
},
"processQualityIndicators" : {
"type" : "array",
"description" : "The quality phases the document has gone through",
"items" : {
"type" : "string",
"description" : "Possible values: HumanSelfValidation, HumanValidation, StructuralValidation, ContentValidation"
}
}
}
},
"data": {
"additionalProperties" : false,
"properties" : {
"externalDocumentIdentifier" : {
"description" : "External system identifier of the business document. Serial number that is issued once only by invoice issuer to identify the invoice.",
"properties" : {
"id" : {
"type" : "string",
"description" : "Identifies the value."
},
"schemeId" : {
"type" : "string",
"description" : "Identifies the namespace of the id."
}
},
"required" : [ "id" ],
"additionalProperties" : false
},
"issueDate" : {
"description" : "The date when the invoice was issued. Valid values must be 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 time zone is not known, it must be left empty.",
"pattern" : "^(-?(?:[1-9][0-9]*)?[0-9]{4})-(1[0-2]|0[1-9])-(3[0-1]|0[1-9]|[1-2][0-9])(Z|[+-](?:2[0-3]|[0-1][0-9]):[0-5][0-9])?$"
},
"documentCurrencyCode" : {
"type" : "string",
"description" : "Currency presentation of the Invoice document. Valid values must be ISO 4217 Alpha format."
},
"note" : {
"type" : "string",
"description" : "Free-form text pertinent to this document, conveying information that is not contained explicitly in other structures."
},
"allowanceCharges" : {
"additionalProperties" : false,
"items" : {
"type" : "object",
"properties" : {
"chargeIndicator" : {
"type" : "boolean",
"description" : "Indicates whether the allowance charge is a charge (true) or a discount (false)."
},
"allowanceChargeReasonCode" : {
"type" : "string",
"description" : "A mutually agreed code signifying the reason for this allowance or charge. Valid values are defined in UN/ECE CEFACT Trade Facilitation Recommendation 4465 Adjustment reason description code"
},
"allowanceChargeReason" : {
"type" : "string",
"description" : "The reason for this allowance or charge."
},
"multiplierFactorNumeric" : {
"type" : "number",
"description" : "The factor applied to the base amount to calculate the allowance charge."
},
"amount" : {
"type" : "number",
"description" : "The allowance charge amount."
},
"taxCategories" : {
"type" : "array",
"description" : "External identifier of tax category.",
"items" : {
"type" : "object",
"properties" : {
"id" : {
"type" : "string",
"description" : "Identifies the tax category identifier."
},
"schemeId" : {
"type" : "string",
"description" : "Identifies the namespace of the tax category identifier."
},
"name" : {
"type" : "string",
"description" : "Tax category description."
},
"percent" : {
"type" : "number",
"description" : "Identifies the tax rate for this category, expressed as a percentage"
},
"taxExemptionReasonCode" : {
"type" : "string",
"description" : "Identifies the reason for tax being exempted, expressed as a code."
},
"taxExemptionReason" : {
"type" : "string",
"description" : "Identifies the reason for tax being exempted, expressed as text."
}
}
},
"required" : [ "id" ],
"additionalProperties" : false
}
}
},
"required" : [ "chargeIndicator", "amount" ]
},
"isIssuedAgainstOrder" : {
"type" : "boolean",
"description" : "Indicates whether the business document is issued against an order."
},
"orderReference" : {
"description" : "Order reference on the business document.",
"additionalProperties" : false,
"properties" : {
"id" : {
"type" : "string",
"description" : "Order number reference on the business document. Identifies the referenced order assigned by the buyer."
},
"schemeId" : {
"type" : "string",
"description" : "External system specific identifier of the order system identifier element. If the source business document has any matching element, it should be used."
},
"customerReference" : {
"type" : "string",
"description" : "Customer Reference Identifier (CRI) when using a purchasing card."
},
"salesOrderId" : {
"type" : "string",
"description" : "Sales order identifier."
},
"issueDate" : {
"description" : "The date on which the referenced order was issued. Valid values must be 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 time zone is not known, it must be left empty.",
"pattern" : "^(-?(?:[1-9][0-9]*)?[0-9]{4})-(1[0-2]|0[1-9])-(3[0-1]|0[1-9]|[1-2][0-9])(Z|[+-](?:2[0-3]|[0-1][0-9]):[0-5][0-9])?$"
}
},
"required" : [ "id" ]
},
"billingReference" : {
"description" : "External system identifier object for the billing entity referenced by the business document.",
"additionalProperties" : false,
"properties" : {
"id" : {
"type" : "string",
"description" : "External system identifier of the billing entity referenced by the Business Document."
},
"schemeId" : {
"type" : "string",
"description" : "External system specific identifier of the billing reference system identifier element. If the source business document has any matching element, it should be used."
}
},
"required" : [ "id" ]
},
"contractDocumentReferences" : {
"description" : "External system identifier objects for the contract referenced by the business document.",
"items" : {
"type" : "object",
"additionalProperties" : false,
"properties" : {
"id" : {
"type" : "string",
"description" : "External system identifier of the contract referenced by the Business Document (i.e. buyers contract number). Mandatory field if the customer demands that the goods or services invoiced refer to a contract number defined by the customer to which he wants to assign the Business Document. Is demanded for example in service and maintenance agreements for which there is generally no explicit order."
},
"schemeId" : {
"type" : "string",
"description" : "External system specific identifier of the contract system identifier element. If the source business document has any matching element, it should be used."
}
},
"required" : [ "id" ]
}
},
"additionalDocumentReference" : {
"description" : "A reference to an additional document associated with this document. Used for example to reference to an Invoice from Credit Note.",
"additionalProperties" : false,
"properties" : {
"id" : {
"type" : "string",
"description" : "An identifier for the referenced document (i.e. bumid)."
},
"schemeId" : {
"type" : "string",
"description" : "External system specific identifier of the invoicing system identifier element. If the source business document has any matching element, it should be used."
},
"issueDate" : {
"type" : "string",
"description" : "Date when the referenced document was issued. Valid values must be 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 time zone is not known, it must be left empty.",
"pattern" : "^(-?(?:[1-9][0-9]*)?[0-9]{4})-(1[0-2]|0[1-9])-(3[0-1]|0[1-9]|[1-2][0-9])(Z|[+-](?:2[0-3]|[0-1][0-9]):[0-5][0-9])?$"
},
"typeCode" : {
"type" : "string",
"description" : "The type of document being referenced, expressed as a code, for example to reference to an Invoice document, code is 380."
}
},
"required" : [ "id" ]
},
"accountingSupplierParty" : {
"description" : "Party that is the accountable supplier of the goods/services in the referred business document.",
"properties" : {
"endpoint" : {
"type" : "object",
"additionalProperties" : false,
"description" : "An array holding the external system identifiers of the party. Used for defining customer, supplier and delivery party data.",
"properties" : {
"id" : {
"type" : "string",
"description" : "Identifier for the endpoint. See API documentation for more details about the endpoints."
},
"schemeId" : {
"type" : "string",
"description" : "External global identifier of the id identifier element. See API documentation for more details about the endpoint scheme identifiers."
}
},
"required" : [ "id" ]
},
"partyIdentifications" : {
"type" : "array",
"description" : "An array holding the system identifiers of the party. Used for defining customer, supplier and delivery party data.",
"items" : {
"type" : "object",
"description" : "An object holding a party identification.",
"properties" : {
"id" : {
"type" : "string",
"description" : "An object holding the system identifier of the party."
},
"schemeId" : {
"type" : "string",
"description" : "Global identifier of namescheme for party identifier."
}
},
"required" : [ "id" ],
"additionalProperties" : false
}
},
"partyName" : {
"type" : "string",
"description" : "A name of the party. Used for defining supplier, customer and delivery party names."
},
"postalAddress" : {
"description" : "An object containing address information. Used for defining supplier party, customer party and delivery party address data.",
"properties" : {
"cityName" : {
"type" : "string",
"description" : "The name of the city, town or village in the postal address of the party."
},
"postalZone" : {
"type" : "string",
"description" : "The postal code of the area in the postal address of the party. The identifier for an addressable group of properties according to the relevant national postal service, such as a ZIP code or Post Code."
},
"addressLine" : {
"type" : "string",
"description" : "The address line of the postal address of the party."
},
"addressLine2" : {
"type" : "string",
"description" : "The second address line of the postal address of the party."
},
"addressLine3" : {
"type" : "string",
"description" : "The third address line of the postal address of the party."
},
"locality" : {
"type" : "string",
"description" : "Neighbourhood or district within town or city. Required in UK if a similar road name exists within a post town area."
},
"countrySubentity" : {
"type" : "string",
"description" : "The sub-entity of the area in the postal address."
},
"countryId" : {
"type" : "string",
"description" : "The country of the postal address of party. Valid values: ISO3166-1 alpha-2 values can be used."
}
},
"additionalProperties" : false
},
"partyTaxScheme" : {
"type" : "object",
"description" : "Information about taxes. Notice that only one tax scheme is used, although there could be multiple.",
"properties" : {
"company" : {
"type" : "object",
"description" : "Information about the company taxes.",
"properties" : {
"id" : {
"type" : "string",
"description" : "A tax identifier for a company. The identifier assigned for tax purposes to a party by the taxation authority."
},
"schemeId" : {
"type" : "string",
"description" : "Global identifier of the endpoint identifier element. Valid values: Country specific agency schema, example DK:CVR for Denmark."
}
},
"additionalProperties" : false
}
},
"additionalProperties" : false
},
"partyLegalEntities" : {
"type" : "array",
"description" : "An array holding the legal entities of the party. Note that currently one legal entity is supported by the API",
"items" : {
"type" : "object",
"description" : "An object holding a party legal entity.",
"properties" : {
"registrationName" : {
"type" : "string",
"description" : "Registration name of the legal entity."
},
"companyIdentifier" : {
"description" : "Global legal party identifier, including name scheme",
"properties" : {
"id" : {
"type" : "string",
"description" : "Identifies the value."
},
"schemeId" : {
"type" : "string",
"description" : "Identifies the namespace of the id."
}
},
"required" : [ "id" ],
"additionalProperties" : false
}
},
"required" : [ "registrationName", "companyIdentifier" ],
"additionalProperties" : false
}
},
"contact" : {
"type" : "object",
"description" : "An object containing information about contacts. Used for defining the company contact data",
"properties" : {
"name" : {
"type" : "string",
"description" : "A contact name of the party."
},
"telephone" : {
"type" : "string",
"description" : "A telephone number of the contact of the party."
},
"telefax" : {
"type" : "string",
"description" : "A fax number of the contact of the party."
},
"electronicMail" : {
"type" : "string",
"description" : "An email of the contact of the party."
}
},
"additionalProperties" : false
},
"supplierAssignedAccountId" : {
"type" : "string",
"description" : "Account identifier assigned by the supplier."
},
"customerAssignedAccountId" : {
"type" : "string",
"description" : "Account identifier assigned by the customer."
},
"note" : {
"type" : "string",
"description" : "Free-form description of the party not included in other fields"
}
},
"required" : [ "partyName" ],
"additionalProperties" : false
},
"accountingCustomerParty" : {
"description" : "Party that is the accountable buyer of the goods/services in the referred business document.",
"properties" : {
"endpoint" : {
"type" : "object",
"additionalProperties" : false,
"description" : "An array holding the external system identifiers of the party. Used for defining customer, supplier and delivery party data.",
"properties" : {
"id" : {
"type" : "string",
"description" : "Identifier for the endpoint. See API documentation for more details about the endpoints."
},
"schemeId" : {
"type" : "string",
"description" : "External global identifier of the id identifier element. See API documentation for more details about the endpoint scheme identifiers."
}
},
"required" : [ "id" ]
},
"partyIdentifications" : {
"type" : "array",
"description" : "An array holding the system identifiers of the party. Used for defining customer, supplier and delivery party data.",
"items" : {
"type" : "object",
"description" : "An object holding a party identification.",
"properties" : {
"id" : {
"type" : "string",
"description" : "An object holding the system identifier of the party."
},
"schemeId" : {
"type" : "string",
"description" : "Global identifier of namescheme for party identifier."
}
},
"required" : [ "id" ],
"additionalProperties" : false
}
},
"partyName" : {
"type" : "string",
"description" : "A name of the party. Used for defining supplier, customer and delivery party names."
},
"postalAddress" : {
"description" : "An object containing address information. Used for defining supplier party, customer party and delivery party address data.",
"properties" : {
"cityName" : {
"type" : "string",
"description" : "The name of the city, town or village in the postal address of the party."
},
"postalZone" : {
"type" : "string",
"description" : "The postal code of the area in the postal address of the party. The identifier for an addressable group of properties according to the relevant national postal service, such as a ZIP code or Post Code."
},
"addressLine" : {
"type" : "string",
"description" : "The address line of the postal address of the party."
},
"addressLine2" : {
"type" : "string",
"description" : "The second address line of the postal address of the party."
},
"addressLine3" : {
"type" : "string",
"description" : "The third address line of the postal address of the party."
},
"locality" : {
"type" : "string",
"description" : "Neighbourhood or district within town or city. Required in UK if a similar road name exists within a post town area."
},
"countrySubentity" : {
"type" : "string",
"description" : "The sub-entity of the area in the postal address."
},
"countryId" : {
"type" : "string",
"description" : "The country of the postal address of party. Valid values: ISO3166-1 alpha-2 values can be used."
}
},
"additionalProperties" : false
},
"partyTaxScheme" : {
"type" : "object",
"description" : "Information about taxes. Notice that only one tax scheme is used, although there could be multiple.",
"properties" : {
"company" : {
"type" : "object",
"description" : "Information about the company taxes.",
"properties" : {
"id" : {
"type" : "string",
"description" : "A tax identifier for a company. The identifier assigned for tax purposes to a party by the taxation authority."
},
"schemeId" : {
"type" : "string",
"description" : "Global identifier of the endpoint identifier element. Valid values: Country specific agency schema, example DK:CVR for Denmark."
}
},
"additionalProperties" : false
}
},
"additionalProperties" : false
},
"partyLegalEntities" : {
"type" : "array",
"description" : "An array holding the legal entities of the party. Note that currently one legal entity is supported by the API",
"items" : {
"type" : "object",
"description" : "An object holding a party legal entity.",
"properties" : {
"registrationName" : {
"type" : "string",
"description" : "Registration name of the legal entity."
},
"companyIdentifier" : {
"description" : "Global legal party identifier, including name scheme",
"properties" : {
"id" : {
"type" : "string",
"description" : "Identifies the value."
},
"schemeId" : {
"type" : "string",
"description" : "Identifies the namespace of the id."
}
},
"required" : [ "id" ],
"additionalProperties" : false
}
},
"required" : [ "registrationName", "companyIdentifier" ],
"additionalProperties" : false
}
},
"contact" : {
"type" : "object",
"description" : "An object containing information about contacts. Used for defining the company contact data",
"properties" : {
"name" : {
"type" : "string",
"description" : "A contact name of the party."
},
"telephone" : {
"type" : "string",
"description" : "A telephone number of the contact of the party."
},
"telefax" : {
"type" : "string",
"description" : "A fax number of the contact of the party."
},
"electronicMail" : {
"type" : "string",
"description" : "An email of the contact of the party."
}
},
"additionalProperties" : false
},
"supplierAssignedAccountId" : {
"type" : "string",
"description" : "Account identifier assigned by the supplier."
},
"customerAssignedAccountId" : {
"type" : "string",
"description" : "Account identifier assigned by the customer."
},
"note" : {
"type" : "string",
"description" : "Free-form description of the party not included in other fields"
}
},
"required" : [ "partyName" ],
"additionalProperties" : false
},
"buyerCustomerParty" : {
"description" : "Party that is the buyer of the goods/services in the referred business document.",
"properties" : {
"endpoint" : {
"type" : "object",
"additionalProperties" : false,
"description" : "An array holding the external system identifiers of the party. Used for defining customer, supplier and delivery party data.",
"properties" : {
"id" : {
"type" : "string",
"description" : "Identifier for the endpoint. See API documentation for more details about the endpoints."
},
"schemeId" : {
"type" : "string",
"description" : "External global identifier of the id identifier element. See API documentation for more details about the endpoint scheme identifiers."
}
},
"required" : [ "id" ]
},
"partyIdentifications" : {
"type" : "array",
"description" : "An array holding the system identifiers of the party. Used for defining customer, supplier and delivery party data.",
"items" : {
"type" : "object",
"description" : "An object holding a party identification.",
"properties" : {
"id" : {
"type" : "string",
"description" : "An object holding the system identifier of the party."
},
"schemeId" : {
"type" : "string",
"description" : "Global identifier of namescheme for party identifier."
}
},
"required" : [ "id" ],
"additionalProperties" : false
}
},
"partyName" : {
"type" : "string",
"description" : "A name of the party. Used for defining supplier, customer and delivery party names."
},
"postalAddress" : {
"description" : "An object containing address information. Used for defining supplier party, customer party and delivery party address data.",
"properties" : {
"cityName" : {
"type" : "string",
"description" : "The name of the city, town or village in the postal address of the party."
},
"postalZone" : {
"type" : "string",
"description" : "The postal code of the area in the postal address of the party. The identifier for an addressable group of properties according to the relevant national postal service, such as a ZIP code or Post Code."
},
"addressLine" : {
"type" : "string",
"description" : "The address line of the postal address of the party."
},
"addressLine2" : {
"type" : "string",
"description" : "The second address line of the postal address of the party."
},
"addressLine3" : {
"type" : "string",
"description" : "The third address line of the postal address of the party."
},
"locality" : {
"type" : "string",
"description" : "Neighbourhood or district within town or city. Required in UK if a similar road name exists within a post town area."
},
"countrySubentity" : {
"type" : "string",
"description" : "The sub-entity of the area in the postal address."
},
"countryId" : {
"type" : "string",
"description" : "The country of the postal address of party. Valid values: ISO3166-1 alpha-2 values can be used."
}
},
"additionalProperties" : false
},
"partyTaxScheme" : {
"type" : "object",
"description" : "Information about taxes. Notice that only one tax scheme is used, although there could be multiple.",
"properties" : {
"company" : {
"type" : "object",
"description" : "Information about the company taxes.",
"properties" : {
"id" : {
"type" : "string",
"description" : "A tax identifier for a company. The identifier assigned for tax purposes to a party by the taxation authority."
},
"schemeId" : {
"type" : "string",
"description" : "Global identifier of the endpoint identifier element. Valid values: Country specific agency schema, example DK:CVR for Denmark."
}
},
"additionalProperties" : false
}
},
"additionalProperties" : false
},
"partyLegalEntities" : {
"type" : "array",
"description" : "An array holding the legal entities of the party. Note that currently one legal entity is supported by the API",
"items" : {
"type" : "object",
"description" : "An object holding a party legal entity.",
"properties" : {
"registrationName" : {
"type" : "string",
"description" : "Registration name of the legal entity."
},
"companyIdentifier" : {
"description" : "Global legal party identifier, including name scheme",
"properties" : {
"id" : {
"type" : "string",
"description" : "Identifies the value."
},
"schemeId" : {
"type" : "string",
"description" : "Identifies the namespace of the id."
}
},
"required" : [ "id" ],
"additionalProperties" : false
}
},
"required" : [ "registrationName", "companyIdentifier" ],
"additionalProperties" : false
}
},
"contact" : {
"type" : "object",
"description" : "An object containing information about contacts. Used for defining the company contact data",
"properties" : {
"name" : {
"type" : "string",
"description" : "A contact name of the party."
},
"telephone" : {
"type" : "string",
"description" : "A telephone number of the contact of the party."
},
"telefax" : {
"type" : "string",
"description" : "A fax number of the contact of the party."
},
"electronicMail" : {
"type" : "string",
"description" : "An email of the contact of the party."
}
},
"additionalProperties" : false
},
"supplierAssignedAccountId" : {
"type" : "string",
"description" : "Account identifier assigned by the supplier."
},
"customerAssignedAccountId" : {
"type" : "string",
"description" : "Account identifier assigned by the customer."
},
"note" : {
"type" : "string",
"description" : "Free-form description of the party not included in other fields"
}
},
"required" : [ "partyName" ],
"additionalProperties" : false
},
"sellerSupplierParty" : {
"description" : "Party that is the supplier of the goods/services in the referred business document.",
"properties" : {
"endpoint" : {
"type" : "object",
"additionalProperties" : false,
"description" : "An array holding the external system identifiers of the party. Used for defining customer, supplier and delivery party data.",
"properties" : {
"id" : {
"type" : "string",
"description" : "Identifier for the endpoint. See API documentation for more details about the endpoints."
},
"schemeId" : {
"type" : "string",
"description" : "External global identifier of the id identifier element. See API documentation for more details about the endpoint scheme identifiers."
}
},
"required" : [ "id" ]
},
"partyIdentifications" : {
"type" : "array",
"description" : "An array holding the system identifiers of the party. Used for defining customer, supplier and delivery party data.",
"items" : {
"type" : "object",
"description" : "An object holding a party identification.",
"properties" : {
"id" : {
"type" : "string",
"description" : "An object holding the system identifier of the party."
},
"schemeId" : {
"type" : "string",
"description" : "Global identifier of namescheme for party identifier."
}
},
"required" : [ "id" ],
"additionalProperties" : false
}
},
"partyName" : {
"type" : "string",
"description" : "A name of the party. Used for defining supplier, customer and delivery party names."
},
"postalAddress" : {
"description" : "An object containing address information. Used for defining supplier party, customer party and delivery party address data.",
"properties" : {
"cityName" : {
"type" : "string",
"description" : "The name of the city, town or village in the postal address of the party."
},
"postalZone" : {
"type" : "string",
"description" : "The postal code of the area in the postal address of the party. The identifier for an addressable group of properties according to the relevant national postal service, such as a ZIP code or Post Code."
},
"addressLine" : {
"type" : "string",
"description" : "The address line of the postal address of the party."
},
"addressLine2" : {
"type" : "string",
"description" : "The second address line of the postal address of the party."
},
"addressLine3" : {
"type" : "string",
"description" : "The third address line of the postal address of the party."
},
"locality" : {
"type" : "string",
"description" : "Neighbourhood or district within town or city. Required in UK if a similar road name exists within a post town area."
},
"countrySubentity" : {
"type" : "string",
"description" : "The sub-entity of the area in the postal address."
},
"countryId" : {
"type" : "string",
"description" : "The country of the postal address of party. Valid values: ISO3166-1 alpha-2 values can be used."
}
},
"additionalProperties" : false
},
"partyTaxScheme" : {
"type" : "object",
"description" : "Information about taxes. Notice that only one tax scheme is used, although there could be multiple.",
"properties" : {
"company" : {
"type" : "object",
"description" : "Information about the company taxes.",
"properties" : {
"id" : {
"type" : "string",
"description" : "A tax identifier for a company. The identifier assigned for tax purposes to a party by the taxation authority."
},
"schemeId" : {
"type" : "string",
"description" : "Global identifier of the endpoint identifier element. Valid values: Country specific agency schema, example DK:CVR for Denmark."
}
},
"additionalProperties" : false
}
},
"additionalProperties" : false
},
"partyLegalEntities" : {
"type" : "array",
"description" : "An array holding the legal entities of the party. Note that currently one legal entity is supported by the API",
"items" : {
"type" : "object",
"description" : "An object holding a party legal entity.",
"properties" : {
"registrationName" : {
"type" : "string",
"description" : "Registration name of the legal entity."
},
"companyIdentifier" : {
"description" : "Global legal party identifier, including name scheme",
"properties" : {
"id" : {
"type" : "string",
"description" : "Identifies the value."
},
"schemeId" : {
"type" : "string",
"description" : "Identifies the namespace of the id."
}
},
"required" : [ "id" ],
"additionalProperties" : false
}
},
"required" : [ "registrationName", "companyIdentifier" ],
"additionalProperties" : false
}
},
"contact" : {
"type" : "object",
"description" : "An object containing information about contacts. Used for defining the company contact data",
"properties" : {
"name" : {
"type" : "string",
"description" : "A contact name of the party."
},
"telephone" : {
"type" : "string",
"description" : "A telephone number of the contact of the party."
},
"telefax" : {
"type" : "string",
"description" : "A fax number of the contact of the party."
},
"electronicMail" : {
"type" : "string",
"description" : "An email of the contact of the party."
}
},
"additionalProperties" : false
},
"supplierAssignedAccountId" : {
"type" : "string",
"description" : "Account identifier assigned by the supplier."
},
"customerAssignedAccountId" : {
"type" : "string",
"description" : "Account identifier assigned by the customer."
},
"note" : {
"type" : "string",
"description" : "Free-form description of the party not included in other fields"
}
},
"required" : [ "partyName" ],
"additionalProperties" : false
},
"delivery" : {
"description" : "Delivery details.",
"additionalProperties" : false,
"properties" : {
"actualDeliveryDate" : {
"type" : "string",
"description" : "Date when the goods/services are delivered. Valid values must be 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 time zone is not known, it must be left empty. ",
"pattern" : "^(-?(?:[1-9][0-9]*)?[0-9]{4})-(1[0-2]|0[1-9])-(3[0-1]|0[1-9]|[1-2][0-9])(Z|[+-](?:2[0-3]|[0-1][0-9]):[0-5][0-9])?$"
},
"deliveryNoteReference" : {
"description" : "Identifier of the delivery note document.",
"properties" : {
"id" : {
"type" : "string",
"description" : "Identifies the value."
},
"schemeId" : {
"type" : "string",
"description" : "Identifies the namespace of the id."
}
},
"required" : [ "id" ],
"additionalProperties" : false
}
}
},
"deliveryParty" : {
"description" : "Party that is responsible for the delivery of the goods/services in the referred business document.",
"properties" : {
"endpoint" : {
"type" : "object",
"additionalProperties" : false,
"description" : "An array holding the external system identifiers of the party. Used for defining customer, supplier and delivery party data.",
"properties" : {
"id" : {
"type" : "string",
"description" : "Identifier for the endpoint. See API documentation for more details about the endpoints."
},
"schemeId" : {
"type" : "string",
"description" : "External global identifier of the id identifier element. See API documentation for more details about the endpoint scheme identifiers."
}
},
"required" : [ "id" ]
},
"partyIdentifications" : {
"type" : "array",
"description" : "An array holding the system identifiers of the party. Used for defining customer, supplier and delivery party data.",
"items" : {
"type" : "object",
"description" : "An object holding a party identification.",
"properties" : {
"id" : {
"type" : "string",
"description" : "An object holding the system identifier of the party."
},
"schemeId" : {
"type" : "string",
"description" : "Global identifier of namescheme for party identifier."
}
},
"required" : [ "id" ],
"additionalProperties" : false
}
},
"partyName" : {
"type" : "string",
"description" : "A name of the party. Used for defining supplier, customer and delivery party names."
},
"postalAddress" : {
"description" : "An object containing address information. Used for defining supplier party, customer party and delivery party address data.",
"properties" : {
"cityName" : {
"type" : "string",
"description" : "The name of the city, town or village in the postal address of the party."
},
"postalZone" : {
"type" : "string",
"description" : "The postal code of the area in the postal address of the party. The identifier for an addressable group of properties according to the relevant national postal service, such as a ZIP code or Post Code."
},
"addressLine" : {
"type" : "string",
"description" : "The address line of the postal address of the party."
},
"addressLine2" : {
"type" : "string",
"description" : "The second address line of the postal address of the party."
},
"addressLine3" : {
"type" : "string",
"description" : "The third address line of the postal address of the party."
},
"locality" : {
"type" : "string",
"description" : "Neighbourhood or district within town or city. Required in UK if a similar road name exists within a post town area."
},
"countrySubentity" : {
"type" : "string",
"description" : "The sub-entity of the area in the postal address."
},
"countryId" : {
"type" : "string",
"description" : "The country of the postal address of party. Valid values: ISO3166-1 alpha-2 values can be used."
}
},
"additionalProperties" : false
},
"partyTaxScheme" : {
"type" : "object",
"description" : "Information about taxes. Notice that only one tax scheme is used, although there could be multiple.",
"properties" : {
"company" : {
"type" : "object",
"description" : "Information about the company taxes.",
"properties" : {
"id" : {
"type" : "string",
"description" : "A tax identifier for a company. The identifier assigned for tax purposes to a party by the taxation authority."
},
"schemeId" : {
"type" : "string",
"description" : "Global identifier of the endpoint identifier element. Valid values: Country specific agency schema, example DK:CVR for Denmark."
}
},
"additionalProperties" : false
}
},
"additionalProperties" : false
},
"partyLegalEntities" : {
"type" : "array",
"description" : "An array holding the legal entities of the party. Note that currently one legal entity is supported by the API",
"items" : {
"type" : "object",
"description" : "An object holding a party legal entity.",
"properties" : {
"registrationName" : {
"type" : "string",
"description" : "Registration name of the legal entity."
},
"companyIdentifier" : {
"description" : "Global legal party identifier, including name scheme",
"properties" : {
"id" : {
"type" : "string",
"description" : "Identifies the value."
},
"schemeId" : {
"type" : "string",
"description" : "Identifies the namespace of the id."
}
},
"required" : [ "id" ],
"additionalProperties" : false
}
},
"required" : [ "registrationName", "companyIdentifier" ],
"additionalProperties" : false
}
},
"contact" : {
"type" : "object",
"description" : "An object containing information about contacts. Used for defining the company contact data",
"properties" : {
"name" : {
"type" : "string",
"description" : "A contact name of the party."
},
"telephone" : {
"type" : "string",
"description" : "A telephone number of the contact of the party."
},
"telefax" : {
"type" : "string",
"description" : "A fax number of the contact of the party."
},
"electronicMail" : {
"type" : "string",
"description" : "An email of the contact of the party."
}
},
"additionalProperties" : false
},
"supplierAssignedAccountId" : {
"type" : "string",
"description" : "Account identifier assigned by the supplier."
},
"customerAssignedAccountId" : {
"type" : "string",
"description" : "Account identifier assigned by the customer."
},
"note" : {
"type" : "string",
"description" : "Free-form description of the party not included in other fields"
}
},
"required" : [ "partyName" ],
"additionalProperties" : false
},
"paymentMeans" : {
"description" : "An object holding the available payment means.",
"additionalProperties" : false,
"properties" : {
"paymentMeansCode" : {
"type" : "string",
"description" : "A code that identifies how the payment can be done. Valid values: UN/ECE 4461 code represented as string."
},
"paymentDueDate" : {
"type" : "string",
"description" : "Date when the business document is due for the payment means. Valid values must be 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 time zone is not known, it must be left empty.",
"pattern" : "^(-?(?:[1-9][0-9]*)?[0-9]{4})-(1[0-2]|0[1-9])-(3[0-1]|0[1-9]|[1-2][0-9])(Z|[+-](?:2[0-3]|[0-1][0-9]):[0-5][0-9])?$"
},
"paymentReferenceMessage" : {
"type" : "string",
"description" : "A payment reference message. This can be a free text describing the payment."
},
"paymentIdentifier" : {
"type" : "object",
"additionalProperties" : false,
"description" : "An identifier for a payment made using this means of payment.",
"properties" : {
"id" : {
"type" : "string",
"description" : "The id value of payment identifier."
},
"schemeId" : {
"type" : "string",
"description" : "Scheme which identifies the type of payment identifier. Possible values are SPY, ISO."
}
},
"required" : [ "id" ]
},
"financialAccounts" : {
"type" : "array",
"description" : "Array holding the financial account data",
"items" : {
"type" : "object",
"additionalProperties" : false,
"description" : "Object holding the financial account data",
"properties" : {
"financialInstitutionName" : {
"type" : "string",
"description" : "The name of financial institution."
},
"financialInstitutionId" : {
"type" : "string",
"description" : "Identifier of financial institution."
},
"financialInstitutionIdSchemeId" : {
"type" : "string",
"description" : "The external identifier of the financial institution id identifier element."
},
"financialInstitutionBranchId" : {
"type" : "string",
"description" : "The identifier of financial institution branch, for example 342-085. This field is typically used by institutions in Australia and New Zealand."
},
"financialInstitutionBranchSchemeId" : {
"type" : "string",
"description" : "The scheme identifier of financial institution branch. For example for an Australian institutions, possible scheme is BSB."
},
"ids" : {
"type" : "array",
"description" : "Array holding ids",
"items" : {
"type" : "object",
"additionalProperties" : false,
"description" : "Object holding identifier data",
"properties" : {
"id" : {
"type" : "string",
"description" : "Identifier."
},
"schemeId" : {
"type" : "string",
"description" : "External identifier."
}
},
"required" : [ "id" ]
}
},
"accounting" : {
"type" : "object",
"title" : "Accounting",
"description" : "Accounting related content.",
"properties" : {
"virtualBankBarcode" : {
"type" : "object",
"title" : "VirtualBankBarcode",
"description" : "Virtual bar code can be added to the business document that should be printed.",
"properties" : {
"id" : {
"type" : "string",
"title" : "Virtual bank bar code",
"description" : "Identifier of the virtual bar code. "
},
"schemeId" : {
"type" : "string",
"title" : "SchemeId for virtual bank bar code",
"description" : "Scheme identifier of the virtual bank bar code, typically country code according to ISO3166-1 alpha-2. Possible values: FI"
}
}
}
}
}
}
}
}
},
"required" : [ "paymentMeansCode" ]
},
"paymentTerms" : {
"description" : "Available payment terms.",
"additionalProperties" : false,
"properties" : {
"settlementPeriod" : {
"type" : "object",
"additionalProperties" : false,
"description" : "An object holding the settlement period dates.",
"properties" : {
"startDate" : {
"type" : "string",
"description" : "Date when the payment terms starts. Valid values must be 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 time zone is not known, it must be left empty.",
"pattern" : "^(-?(?:[1-9][0-9]*)?[0-9]{4})-(1[0-2]|0[1-9])-(3[0-1]|0[1-9]|[1-2][0-9])(Z|[+-](?:2[0-3]|[0-1][0-9]):[0-5][0-9])?$"
},
"endDate" : {
"type" : "string",
"description" : "Date when the payment terms ends. Valid values must be 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 time zone is not known, it must be left empty.",
"pattern" : "^(-?(?:[1-9][0-9]*)?[0-9]{4})-(1[0-2]|0[1-9])-(3[0-1]|0[1-9]|[1-2][0-9])(Z|[+-](?:2[0-3]|[0-1][0-9]):[0-5][0-9])?$"
}
}
},
"note" : {
"type" : "string",
"description" : "Free-form text applying to the payment terms. This field may contain notes or any other similar information that is not contained explicitly in another structure."
},
"penaltySurchargePercent" : {
"type" : "number",
"description" : "Penalty surcharge percent amount."
}
}
},
"taxTotal" : {
"description" : "Tax total details.",
"additionalProperties" : false,
"properties" : {
"currencyId" : {
"type" : "string",
"description" : "A code that identifies the currency of the total payable amount. Valid values: ISO 4217 code represented as string."
},
"amount" : {
"type" : "number",
"description" : "Total amount of the taxes. The total tax amount for particular tax scheme e.g. VAT; the sum of each of the tax subtotals for each tax category within the tax scheme."
},
"roundingAmount" : {
"type" : "number",
"description" : "Rounding amount added to the calculated tax total to produce the rounded TotalTaxAmount."
},
"taxSubtotals" : {
"items" : {
"type" : "object",
"additionalProperties" : false,
"description" : "An object holding the information about tax.",
"properties" : {
"currencyId" : {
"type" : "string",
"description" : "A code that identifies the currency of the tax subtotal. Valid values: ISO 4217 code represented as string."
},
"amount" : {
"type" : "number",
"description" : "Total amount of the taxes."
},
"percent" : {
"type" : "number",
"description" : "The tax rate for the category, expressed as a percentage."
},
"taxableAmount" : {
"type" : "number",
"description" : "Basis of the taxes. The net amount to which the tax percent (rate) is applied to calculate the tax amount."
},
"taxCategory" : {
"type" : "object",
"description" : "External identifier of tax category.",
"properties" : {
"id" : {
"type" : "string",
"description" : "Identifies the tax category identifier."
},
"schemeId" : {
"type" : "string",
"description" : "Identifies the namespace of the tax category identifier."
},
"name" : {
"type" : "string",
"description" : "Tax category description."
},
"taxExemptionReason" : {
"type" : "string",
"description" : "The reason for tax being exempted."
}
},
"required" : [ "id" ],
"additionalProperties" : false
}
},
"required" : [ "currencyId", "amount" ]
}
}
},
"required" : [ "currencyId", "amount" ]
},
"invoicePeriod" : {
"description" : "Invoice period of the business document.",
"additionalProperties" : false,
"properties" : {
"startDate" : {
"description" : "Date when the goods/services are invoiced. Valid values must be 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 time zone is not known, it must be left empty. ",
"pattern" : "^(-?(?:[1-9][0-9]*)?[0-9]{4})-(1[0-2]|0[1-9])-(3[0-1]|0[1-9]|[1-2][0-9])(Z|[+-](?:2[0-3]|[0-1][0-9]):[0-5][0-9])?$"
},
"endDate" : {
"description" : "Date when the goods/services are invoiced. Valid values must be 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 time zone is not known, it must be left empty.",
"pattern" : "^(-?(?:[1-9][0-9]*)?[0-9]{4})-(1[0-2]|0[1-9])-(3[0-1]|0[1-9]|[1-2][0-9])(Z|[+-](?:2[0-3]|[0-1][0-9]):[0-5][0-9])?$"
}
}
},
"taxExchangeRate" : {
"description" : " An association to Exchange Rate between the Document Currency and the Tax Currency.",
"additionalProperties" : false,
"properties" : {
"exchangeRate" : {
"type" : "number",
"description" : "The factor applied to the source currency to calculate the target currency."
}
}
},
"legalMonetaryTotal" : {
"description" : "Legal monetary details for total amount payable in the business document.",
"additionalProperties" : false,
"properties" : {
"lineExtensionAmount" : {
"type" : "object",
"additionalProperties" : false,
"description" : "An object holding total amount of line extensions.",
"properties" : {
"currencyId" : {
"type" : "string",
"description" : "A code that identifies the currency of the total line extension amount. Valid values: ISO 4217 code represented as string."
},
"amount" : {
"type" : "number",
"description" : "Total amount of line extensions."
}
},
"required" : [ "currencyId", "amount" ]
},
"payableAmount" : {
"type" : "object",
"additionalProperties" : false,
"description" : "An object holding total payable amount of line extensions.",
"properties" : {
"currencyId" : {
"type" : "string",
"description" : "A code that identifies the currency of the total payable amount. Valid values: ISO 4217 code represented as string."
},
"amount" : {
"type" : "number",
"description" : "The total amount to be paid."
}
},
"required" : [ "currencyId", "amount" ]
}
},
"required" : [ "payableAmount" ]
},
"buyerReference" : {
"description" : "Buyer reference in the business document.",
"additionalProperties" : false,
"properties" : {
"id" : {
"type" : "string",
"description" : "The id value of the buyer reference"
}
},
"required" : [ "id" ]
},
"customFields" : {
"description" : "Custom fields in the business document. Disclaimer! Use of a custom field assumes that the recipient can handle the custom fields. Before using custom field Basware needs to be contacted to assure the delivery of these fields. Additional changes may be incurred due to the use of these fields. There is no guarantee that the recipient can handle the specified custom fields.",
"items" : {
"type" : "object",
"description" : "Custom fields in the business document",
"additionalProperties" : false,
"properties" : {
"name" : {
"type" : "string",
"description" : "Name of the custom field",
"default" : "file"
},
"value" : {
"type" : "string",
"description" : "Value of the custom field"
},
"description" : {
"type" : "string",
"description" : "The purpose of this field"
}
},
"required" : [ "name", "value" ]
}
},
"documentLines" : {
"type" : "array",
"description" : "An array holding the document lines.",
"items" : {
"type" : "object",
"additionalProperties" : false,
"description" : "A document line",
"properties" : {
"id" : {
"type" : "string",
"description" : "External system identifier for the document line."
},
"note" : {
"type" : "string",
"description" : "Free-form text conveying information that is not contained explicitly in other structures."
},
"quantity" : {
"description" : "An object holding the quantity of the target Business Document line item.",
"additionalProperties" : false,
"properties" : {
"amount" : {
"type" : "number",
"description" : "The quantity of the target Business Document line items."
},
"unitCode" : {
"type" : "string",
"description" : "The unit code of the quantity of the target Business Document line item. Valid values: UN/ECE CEFACT Trade Facilitation Recommendation No.20 common code value represented as string."
}
}
},
"serviceIndicator" : {
"type" : "boolean",
"description" : "Flag indicating whether the line represents goods or services (true if services, false if goods)."
},
"lineExtension" : {
"description" : "The total amount for the line item, including allowance charges but net of taxes.",
"additionalProperties" : false,
"properties" : {
"currencyId" : {
"type" : "string",
"description" : "The currency of the amount."
},
"amount" : {
"type" : "number",
"description" : "The total amount for the line item, including allowance charges but net of taxes."
}
},
"required" : [ "currencyId", "amount" ]
},
"item" : {
"description" : "An object holding an Business Document line item.",
"additionalProperties" : false,
"properties" : {
"descriptions" : {
"type" : "array",
"items" : {
"type" : "object",
"additionalProperties" : false,
"description" : "Business Document line item.",
"properties" : {
"description" : {
"type" : "string",
"description" : "Business Document line item."
}
}
}
},
"name" : {
"type" : "string",
"description" : "Name of the Business Document line item. A short name optionally given to an item, such as a name from a catalogue, as distinct from a description."
},
"taxPercent" : {
"type" : "number",
"description" : "Tax amount for the item"
},
"sellersItem" : {
"type" : "object",
"additionalProperties" : false,
"description" : "Identifies the Business Document line item as it is in seller's system.",
"properties" : {
"id" : {
"type" : "string",
"description" : "Identifier of the business document line item as it is in seller's system."
},
"schemeId" : {
"type" : "string",
"description" : "System specific identifier of the seller's item identifier element. If the source business document has any matching element, it should be used."
}
},
"required" : [ "id" ]
},
"buyersItem" : {
"type" : "object",
"additionalProperties" : false,
"description" : "An object holding a identification of the Business Documents line item as it is in buyers system.",
"properties" : {
"id" : {
"type" : "string",
"description" : "Identifier of the business document line item as it is in buyer's system."
},
"schemeId" : {
"type" : "string",
"description" : "System specific identifier of the buyer's item identifier element. If the source business document has any matching element, it should be used."
}
},
"required" : [ "id" ]
}
}
},
"payment" : {
"additionalProperties" : false,
"properties" : {
"paymentDate" : {
"type" : "string",
"description" : "Payment timestamp which includes time."
},
"paymentMeansCode" : {
"type" : "string",
"description" : "Payment method."
},
"currencyCode" : {
"type" : "string",
"description" : "Currency code."
},
"exchangeRate" : {
"type" : "number",
"description" : "Exchange rate. Required, if currency code is different from MXN."
},
"amount" : {
"type" : "number",
"description" : "Total amount reported in the payment receipt."
},
"additionalReference" : {
"description" : "Reference to a payment, check or other type of payment.",
"properties" : {
"id" : {
"type" : "string",
"description" : "Identifies the value."
},
"schemeId" : {
"type" : "string",
"description" : "Identifies the namespace of the id."
}
},
"required" : [ "id" ],
"additionalProperties" : false
},
"payer" : {
"description" : "Payer details.",
"additionalProperties" : false,
"properties" : {
"financialInstitution" : {
"type" : "object",
"description" : "Financial institution for payer account details.",
"properties" : {
"taxCode" : {
"type" : "string",
"description" : "Sender tax code."
},
"name" : {
"type" : "string",
"description" : "Financial institution name."
},
"id" : {
"type" : "string",
"description" : "Identifies the financial institution."
},
"schemeId" : {
"type" : "string",
"description" : "Identifies the namespace of the financial institution."
}
}
},
"financialAccount" : {
"description" : "Financial account for payer",
"properties" : {
"id" : {
"type" : "string",
"description" : "Identifies the value."
},
"schemeId" : {
"type" : "string",
"description" : "Identifies the namespace of the id."
}
},
"required" : [ "id" ],
"additionalProperties" : false
}
}
},
"payee" : {
"description" : "Payee details.",
"additionalProperties" : false,
"properties" : {
"financialAccount" : {
"description" : "Financial account for payee",
"properties" : {
"id" : {
"type" : "string",
"description" : "Identifies the value."
},
"schemeId" : {
"type" : "string",
"description" : "Identifies the namespace of the id."
}
},
"required" : [ "id" ],
"additionalProperties" : false
}
}
},
"financialInstitutionTransactionType" : {
"type" : "string",
"description" : "Optional field for financial institution transaction type. Currently only one value supported (SPEI type of transactions)."
},
"certificateByEinvoicingAuthority" : {
"type" : "string",
"description" : "The certificate that protects the payment, as a text string in base 64 format. It is required in case the transaction type attribute contains information. This field is related to SPEI."
},
"paymentReferenceId" : {
"type" : "string",
"description" : "The original string of the payment voucher generated by the issuing entity of the beneficiary account. It is required in case the transaction type attribute contains information. This field is related to SPEI."
},
"digitalCompanyCertificate" : {
"type" : "string",
"description" : "The digital seal that is associated with the payment. This field is related to SPEI."
},
"documentReferences" : {
"description" : "Document references",
"items" : {
"type" : "object",
"additionalProperties" : false,
"properties" : {
"taxAuthorityDocumentId" : {
"type" : "string",
"description" : "The identifier of the document related to the payment. This data can be a tax identifier of the electronic invoice or the operation number of a digital document."
},
"documentSerialNumber" : {
"type" : "string",
"description" : "The series of the voucher for internal control of the taxpayer."
},
"documentId" : {
"type" : "string",
"description" : "The folio of the voucher for internal control of the taxpayer."
},
"currencyCode" : {
"type" : "string",
"description" : "The currency used in the amounts of the related document, when national currency is used or the related document does not specify the currency is MXN. Conforms to the ISO 4217 specification."
},
"exchangeRate" : {
"type" : "number",
"description" : "The exchange rate in accordance with the currency recorded in the related document. It is required when the currency of the related document is different from the currency of payment."
},
"paymentMethod" : {
"type" : "string",
"description" : "The key to the payment method that was recorded in the related document."
},
"installmentCount" : {
"type" : "integer",
"description" : "The installment number that corresponds to the payment. It is required when payment is in installments or deferred."
},
"unpaidAmount" : {
"type" : "number",
"description" : "The amount of the unpaid balance of the previous installment. It is required when payment is in installments or deferred."
},
"paidAmount" : {
"type" : "number",
"description" : "The amount paid for the related document. It is mandatory when there is more than one related document or when there is a related document and exchangeRate has a value."
},
"remainingAmount" : {
"type" : "number",
"description" : "The difference between the amount of the previous balance and the amount of the payment. It is required when payment is in installments or deferred."
}
}
},
"required" : [ "taxAuthorityDocumentId", "currencyCode", "paymentMethod" ]
}
},
"required" : [ "paymentDate", "paymentMeansCode", "currencyCode", "amount", "documentReferences" ]
},
"taxTotals" : {
"description" : "An array holding the information about the taxes.",
"items" : {
"type" : "object",
"additionalProperties" : false,
"description" : "An object holding the information about tax.",
"properties" : {
"amount" : {
"type" : "number",
"description" : "Total amount of the taxes. The total tax amount for particular tax scheme e.g. VAT; the sum of each of the tax subtotals for each tax category within the tax scheme."
},
"currencyId" : {
"type" : "string",
"description" : "A code that identifies the currency of the total payable amount. Valid values: ISO 4217 code represented as string."
},
"transactionCurrencyTax" : {
"type" : "object",
"additionalProperties" : false,
"description" : "An object holding transaction tax.",
"properties" : {
"amount" : {
"type" : "number",
"description" : "Amount of tax for the transaction."
}
},
"required" : [ "amount" ]
},
"taxSubtotals" : {
"items" : {
"type" : "object",
"additionalProperties" : false,
"description" : "An object holding the information about tax.",
"properties" : {
"currencyId" : {
"type" : "string",
"description" : "A code that identifies the currency of the tax subtotal. Valid values: ISO 4217 code represented as string."
},
"amount" : {
"type" : "number",
"description" : "Total amount of the taxes."
},
"percent" : {
"type" : "number",
"description" : "The tax rate for the category, expressed as a percentage."
},
"taxableAmount" : {
"type" : "number",
"description" : "Basis of the taxes. The net amount to which the tax percent (rate) is applied to calculate the tax amount."
},
"taxCategory" : {
"type" : "object",
"description" : "External identifier of tax category.",
"properties" : {
"id" : {
"type" : "string",
"description" : "Identifies the tax category identifier."
},
"schemeId" : {
"type" : "string",
"description" : "Identifies the namespace of the tax category identifier."
},
"name" : {
"type" : "string",
"description" : "Tax category description."
},
"taxExemptionReason" : {
"type" : "string",
"description" : "The reason for tax being exempted."
}
},
"required" : [ "id" ],
"additionalProperties" : false
}
},
"required" : [ "currencyId", "amount" ]
}
}
},
"required" : [ "amount", "currencyId" ]
}
},
"price" : {
"description" : "An object holding the information about the price of the line item.",
"additionalProperties" : false,
"properties" : {
"amount" : {
"type" : "number",
"description" : "The price of the line item."
},
"currencyId" : {
"type" : "string",
"description" : "A code that identifies the currency of the line item price. Valid values: ISO 4217 code represented as string."
}
},
"required" : [ "amount", "currencyId" ]
},
"delivery" : {
"description" : "An object holding delivery data",
"additionalProperties" : false,
"properties" : {
"actualDeliveryDate" : {
"description" : "Date when the goods/services are delivered. Valid values must be 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 time zone is not known, it must be left empty. ",
"pattern" : "^(-?(?:[1-9][0-9]*)?[0-9]{4})-(1[0-2]|0[1-9])-(3[0-1]|0[1-9]|[1-2][0-9])(Z|[+-](?:2[0-3]|[0-1][0-9]):[0-5][0-9])?$"
},
"promisedDeliveryPeriod" : {
"type" : "object",
"additionalProperties" : false,
"description" : "Promised delivery period",
"properties" : {
"startDate" : {
"description" : "Earliest date when the goods/services are promised to be delivered. Valid values must be 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 time zone is not known, it must be left empty. ",
"pattern" : "^(-?(?:[1-9][0-9]*)?[0-9]{4})-(1[0-2]|0[1-9])-(3[0-1]|0[1-9]|[1-2][0-9])(Z|[+-](?:2[0-3]|[0-1][0-9]):[0-5][0-9])?$"
},
"endDate" : {
"description" : "Latest date when the goods/services are promised to be delivered. Valid values must be 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 time zone is not known, it must be left empty.",
"pattern" : "^(-?(?:[1-9][0-9]*)?[0-9]{4})-(1[0-2]|0[1-9])-(3[0-1]|0[1-9]|[1-2][0-9])(Z|[+-](?:2[0-3]|[0-1][0-9]):[0-5][0-9])?$"
}
}
},
"deliveryAddress" : {
"description" : "An object containing address information. Used for defining delivery address party data.",
"properties" : {
"cityName" : {
"type" : "string",
"description" : "The name of the city, town or village in the postal address of the party."
},
"postalZone" : {
"type" : "string",
"description" : "The postal code of the area in the postal address of the party. The identifier for an addressable group of properties according to the relevant national postal service, such as a ZIP code or Post Code."
},
"addressLine" : {
"type" : "string",
"description" : "The address line of the postal address of the party."
},
"addressLine2" : {
"type" : "string",
"description" : "The second address line of the postal address of the party."
},
"addressLine3" : {
"type" : "string",
"description" : "The third address line of the postal address of the party."
},
"locality" : {
"type" : "string",
"description" : "Neighbourhood or district within town or city. Required in UK if a similar road name exists within a post town area."
},
"countrySubentity" : {
"type" : "string",
"description" : "The sub-entity of the area in the postal address."
},
"countryId" : {
"type" : "string",
"description" : "The country of the postal address of party. Valid values: ISO3166-1 alpha-2 values can be used."
}
},
"additionalProperties" : false
}
}
},
"orderLineReference" : {
"description" : "An object holding order line reference data",
"additionalProperties" : false,
"properties" : {
"lineId" : {
"type" : "string",
"description" : "An identifier for the referenced order line, assigned by the buyer."
},
"orderReference" : {
"type" : "string",
"description" : "A reference to the order containing the referenced order line."
}
},
"required" : [ "lineId" ]
},
"allowanceCharges" : {
"description" : "Extra payment or subtraction to Business Document, for example freight or handling fees.",
"additionalProperties" : false,
"items" : {
"type" : "object",
"properties" : {
"chargeIndicator" : {
"type" : "boolean",
"description" : "Indicates whether the allowance charge is a charge (true) or a discount (false)."
},
"allowanceChargeReasonCode" : {
"type" : "string",
"description" : "A mutually agreed code signifying the reason for this allowance or charge. Valid values are defined in UN/ECE CEFACT Trade Facilitation Recommendation 4465 Adjustment reason description code"
},
"allowanceChargeReason" : {
"type" : "string",
"description" : "The reason for this allowance or charge."
},
"multiplierFactorNumeric" : {
"type" : "number",
"description" : "The factor applied to the base amount to calculate the allowance charge."
},
"amount" : {
"type" : "number",
"description" : "The allowance charge amount."
},
"taxCategories" : {
"type" : "array",
"description" : "External identifier of tax category.",
"items" : {
"type" : "object",
"properties" : {
"id" : {
"type" : "string",
"description" : "Identifies the tax category identifier."
},
"schemeId" : {
"type" : "string",
"description" : "Identifies the namespace of the tax category identifier."
},
"name" : {
"type" : "string",
"description" : "Tax category description."
},
"percent" : {
"type" : "number",
"description" : "Identifies the tax rate for this category, expressed as a percentage"
},
"taxExemptionReasonCode" : {
"type" : "string",
"description" : "Identifies the reason for tax being exempted, expressed as a code."
},
"taxExemptionReason" : {
"type" : "string",
"description" : "Identifies the reason for tax being exempted, expressed as text."
}
}
},
"required" : [ "id" ],
"additionalProperties" : false
}
}
},
"required" : [ "chargeIndicator", "amount" ]
},
"customFields" : {
"description" : "Custom fields in the business document. Disclaimer! Use of a custom field assumes that the recipient can handle the custom fields. Before using custom field Basware needs to be contacted to assure the delivery of these fields. Additional changes may be incurred due to the use of these fields. There is no guarantee that the recipient can handle the specified custom fields.",
"items" : {
"type" : "object",
"description" : "Custom fields in the business document",
"additionalProperties" : false,
"properties" : {
"name" : {
"type" : "string",
"description" : "Name of the custom field",
"default" : "file"
},
"value" : {
"type" : "string",
"description" : "Value of the custom field"
},
"description" : {
"type" : "string",
"description" : "The purpose of this field"
}
},
"required" : [ "name", "value" ]
}
},
"additionalItemProperties" : {
"description" : "Associates the item with a set of additional properties.",
"items" : {
"type" : "object",
"additionalProperties" : false,
"properties" : {
"name" : {
"type" : "string",
"description" : "The name of the Item Property."
},
"value" : {
"type" : "string",
"description" : "The value of the Item Property"
}
},
"required" : [ "name", "value" ]
}
}
},
"required" : [ "id", "lineExtension", "item" ]
}
}
},
"required" : [ "externalDocumentIdentifier", "issueDate", "accountingSupplierParty", "accountingCustomerParty", "legalMonetaryTotal", "documentLines" ]
}
},
"required": [
"bumId",
"documentType",
"data"
]
}
Response code 400 - Bad Request. The server cannot or will not process the request. Bad request due to invalid request syntax or invalid request message framing.
Response example for the response code above
{
"error": {
"id": "c842c9c3-75e5-4c32-ae3f-c1fe250fc186",
"type": "VALIDATION",
"message": "Business document identifier bumId does not match the pattern :[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}",
"code": "Error.004.0003",
"info": "Contact Basware Support http://www.basware.com/contact and provide them with the error ID and the error code you encountered. Basware support will investigate the cause of the error."
}
}
Response code 500 - Internal Server Error. The server encountered an unexpected condition, which prevented it from fulfilling the request.
Response example for the response code above
{
"error": {
"id": "a312a9b3-35e5-1a32-be3f-a5fe250fc121",
"type": "TECHNICAL",
"message": "BCN encountered an unexpected system error",
"code": "Error.001.0006",
"info": "Contact Basware Support http://www.basware.com/contact and provide them with the error ID and the error code you encountered. Basware support will investigate the cause of the error."
}
}
You can retrieve the invoice contents using GET /invoices method. Basware Unique Message Identifier (bumId) defines which invoice you want to retrieve.
Request URI
https://api.basware.com/v3/invoices/{bumId}
URI Parameters
Param Name | Type | Required | Example | Description |
---|---|---|---|---|
bumId | string | true | 6741ecc7-848a-443c-83ad-ea95e4df06fa | Unique UUID for invoice |
Request Headers
Param Name | Required | Example | Description |
---|---|---|---|
Accept | false | application/json | Specifies media types which are acceptable for the response. Value application/json is supported. |
X-BW-REQUEST-ID | false | 7fc7d038-4306-4fc5-89c3-7ac8a12a30d0 | Client generated UUID value for identifying request-response flow. Disclaimer. This value is highly recommended to be included. Production support for this request is not possible if this value is missing. |
Responses
Response code | Description |
---|---|
200 | The request has been completed successfully. |
400 | Bad Request. The server cannot or will not process the request. Bad request due to invalid request syntax or invalid request message framing. |
401 | Unauthorized. The request has not been serviced, the request is unauthorized as it lacks valid authentication credentials (UserName/Password). |
403 | Forbidden. The server understood the request, but is refusing to fulfill it. |
500 | Internal Server Error. The server encountered an unexpected condition, which prevented it from fulfilling the request. |
POST
POST /invoices/{bumId} HTTP/1.1
Accept: application/json
Authorization: Basic dXMlbjp1c2Vy
X-BW-REQUEST-ID: 1204edd0-ff8d-11e4-a322-1697f925ec7b
Request example
{
"clientToken": "3ee9b55f-9b08-4936-8c8c-87c7d0ae4114",
"documentType": "Invoice",
"fileRefs": [
{
"refId": "34a9a23ff33e42a6bc674f1a"
}
],
"processingPreference": {
"sendTo": {
"id": "0037059254248888",
"schemeId": "ISO6523-ACTORID-UPIS"
},
"receiveFrom": {
"id": "114823943023440",
"schemeId": "ISO6523-ACTORID-UPIS"
},
"printingPreference": "PrintingAllowed"
},
"data": {
"externalDocumentIdentifier": {
"id": "56328230"
},
"issueDate": "2017-05-01",
"documentCurrencyCode": "EUR",
"isIssuedAgainstOrder": false,
"contractDocumentReferences": [
{
"id": "147217"
}
],
"accountingSupplierParty": {
"partyName": "Acme Supplier Inc.",
"postalAddress": {
"addressLine": "1800 Main Street",
"cityName": "Dallas",
"postalZone": "75201",
"countrySubentity": "TX",
"countryId": "US"
}
},
"accountingCustomerParty": {
"endpoint": {
"id": "0037059254248888",
"schemeId": "ISO6523-ACTORID-UPIS"
},
"partyIdentifications": [
{
"id": "05925424",
"schemeId": "FI:ORGNR"
}
],
"partyName": "Basware REST API Test Recipient",
"postalAddress": {
"addressLine": "Linnoitustie 2",
"cityName": "Espoo",
"postalZone": "02600",
"countryId": "FI"
}
},
"deliveryParty": {
"partyName": "Parcels United",
"postalAddress": {
"addressLine": "1 Back Lane",
"locality": "Clayton West",
"cityName": "HUDDERSFIELD",
"postalZone": "HD8 9PP",
"countryId": "UK"
}
},
"paymentMeans": {
"financialAccounts": [
{
"financialInstitutionName": "Nordea Bank AB",
"financialInstitutionId": "NDEAFIHH",
"ids": [
{
"id": "FI2112345600000785",
"schemeId": "IBAN"
}
]
}
],
"paymentDueDate": "2017-05-15",
"paymentIdentifier": {
"id": "63156783578924",
"schemeId": "SPY"
},
"paymentMeansCode": "31"
},
"buyerReference": {
"id": "PO-1563224"
},
"taxTotal": {
"amount": 89.56,
"currencyId": "EUR",
"taxSubtotals": [
{
"taxableAmount": 373.24,
"amount": 89.56,
"currencyId": "EUR",
"percent": 24
}
]
},
"legalMonetaryTotal": {
"payableAmount": {
"amount": 462.8,
"currencyId": "EUR"
}
},
"documentLines": [
{
"id": "1",
"quantity": {
"amount": 2,
"unitCode": "PCE"
},
"lineExtension": {
"currencyId": "EUR",
"amount": 72
},
"item": {
"descriptions": [
{
"description": "Basic High-Speed HDMI Cable - 25 Feet"
},
{
"description": "Supports Ethernet, 3D, 4K and Audio Return"
}
],
"name": "High-Speed HDMI Cable",
"taxPercent": 10,
"sellersItem": {
"id": "B-341"
}
},
"taxTotals": [
{
"currencyId": "EUR",
"amount": 17.28,
"transactionCurrencyTax": {
"amount": 0.9
},
"taxSubtotals": [
{
"currencyId": "EUR",
"amount": 17.28,
"percent": 24
}
]
}
]
},
{
"id": "2",
"quantity": {
"amount": 1,
"unitCode": "PCE"
},
"lineExtension": {
"currencyId": "EUR",
"amount": 23.1
},
"item": {
"sellersItem": {
"id": "A-532"
},
"taxPercent": 10
},
"taxTotals": [
{
"currencyId": "EUR",
"amount": 5.54,
"transactionCurrencyTax": {
"amount": 0.9
},
"taxSubtotals": [
{
"currencyId": "EUR",
"amount": 5.54,
"percent": 24
}
]
}
]
}
]
}
}
Request schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Schema for POST /invoices",
"description": "Invoice is a business document which can contain attachments.",
"type": "object",
"additionalProperties": false,
"properties": {
"clientToken": {
"type": "string",
"description": "Token generated by client (uuid). Used to verify that specific Invoice is only sent and processed once, if response time-outs, retry should be executed with the same clientToken."
},
"documentType": {
"type": "string",
"enum": ["Invoice", "CreditNote", "PaymentReceipt"],
"description": "Indicates the business document type. Possible values are Invoice, CreditNote and PaymentReceipt."
},
"fileRefs": {
"type": "array",
"description": "Invoice file/attachment reference identifiers.",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"refId": {
"type": "string",
"description": "Unique file identifier received after storing file into Basware Network."
}
},
"required": [
"refId"
]
}
},
"processingPreference": {
"additionalProperties" : false,
"properties" : {
"sendTo" : {
"description" : "Identifier for the recipient endpoint. See API documentation for more details about recipient endpoints.",
"properties" : {
"id" : {
"type" : "string",
"description" : "Identifies the value."
},
"schemeId" : {
"type" : "string",
"description" : "Identifies the namespace of the id."
}
},
"required" : [ "id" ],
"additionalProperties" : false
},
"receiveFrom" : {
"description" : "Identifier for the sender endpoint.",
"properties" : {
"id" : {
"type" : "string",
"description" : "Identifies the value."
},
"schemeId" : {
"type" : "string",
"description" : "Identifies the namespace of the id."
}
},
"required" : [ "id" ],
"additionalProperties" : false
},
"replyTo" : {
"description" : "Identifier for the reply to endpoint.",
"properties" : {
"id" : {
"type" : "string",
"description" : "Identifies the value."
},
"schemeId" : {
"type" : "string",
"description" : "Identifies the namespace of the id."
}
},
"required" : [ "id" ],
"additionalProperties" : false
},
"sendToServiceProvider" : {
"type" : "string",
"description" : "Identifier for the intermediate service provider."
},
"printingPreference" : {
"type" : "string",
"enum" : [ "PrintingAllowed", "PrintingAlways", "NoPrinting" ],
"description" : "Indicates the printing preference. This optional field can be specified to allow printing delivery with PrintingAllowed or force the document to be delived by printing with PrintingAlways. If this field is not specified, delivery will be by eInvoicing. Note that this field cannot be used together with sendToServiceProvider. Only one of these two fields can be given at the same time."
},
"recipientNotificationPreference" : {
"type" : "string",
"description" : "Indicates how the recipient is notified about the business document delivery. Possible values are EmailWithLoginLink, EmailWithSecuredLink, EmailWithContent, NotificationViaThirdParty."
},
"isConsumerRecipient" : {
"type" : "boolean",
"description" : "Indicates whether the recipient is a consumer recipient."
}
},
"required" : [ "sendTo" ]
},
"data": {
"additionalProperties" : false,
"properties" : {
"externalDocumentIdentifier" : {
"description" : "External system identifier of the business document. Serial number that is issued once only by invoice issuer to identify the invoice.",
"properties" : {
"id" : {
"type" : "string",
"description" : "Identifies the value."
},
"schemeId" : {
"type" : "string",
"description" : "Identifies the namespace of the id."
}
},
"required" : [ "id" ],
"additionalProperties" : false
},
"issueDate" : {
"description" : "The date when the invoice was issued. Valid values must be 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 time zone is not known, it must be left empty.",
"pattern" : "^(-?(?:[1-9][0-9]*)?[0-9]{4})-(1[0-2]|0[1-9])-(3[0-1]|0[1-9]|[1-2][0-9])(Z|[+-](?:2[0-3]|[0-1][0-9]):[0-5][0-9])?$"
},
"documentCurrencyCode" : {
"type" : "string",
"description" : "Currency presentation of the Invoice document. Valid values must be ISO 4217 Alpha format."
},
"note" : {
"type" : "string",
"description" : "Free-form text pertinent to this document, conveying information that is not contained explicitly in other structures."
},
"allowanceCharges" : {
"additionalProperties" : false,
"items" : {
"type" : "object",
"properties" : {
"chargeIndicator" : {
"type" : "boolean",
"description" : "Indicates whether the allowance charge is a charge (true) or a discount (false)."
},
"allowanceChargeReasonCode" : {
"type" : "string",
"description" : "A mutually agreed code signifying the reason for this allowance or charge. Valid values are defined in UN/ECE CEFACT Trade Facilitation Recommendation 4465 Adjustment reason description code"
},
"allowanceChargeReason" : {
"type" : "string",
"description" : "The reason for this allowance or charge."
},
"multiplierFactorNumeric" : {
"type" : "number",
"description" : "The factor applied to the base amount to calculate the allowance charge."
},
"amount" : {
"type" : "number",
"description" : "The allowance charge amount."
},
"taxCategories" : {
"type" : "array",
"description" : "External identifier of tax category.",
"items" : {
"type" : "object",
"properties" : {
"id" : {
"type" : "string",
"description" : "Identifies the tax category identifier."
},
"schemeId" : {
"type" : "string",
"description" : "Identifies the namespace of the tax category identifier."
},
"name" : {
"type" : "string",
"description" : "Tax category description."
},
"percent" : {
"type" : "number",
"description" : "Identifies the tax rate for this category, expressed as a percentage"
},
"taxExemptionReasonCode" : {
"type" : "string",
"description" : "Identifies the reason for tax being exempted, expressed as a code."
},
"taxExemptionReason" : {
"type" : "string",
"description" : "Identifies the reason for tax being exempted, expressed as text."
}
}
},
"required" : [ "id" ],
"additionalProperties" : false
}
}
},
"required" : [ "chargeIndicator", "amount" ]
},
"isIssuedAgainstOrder" : {
"type" : "boolean",
"description" : "Indicates whether the business document is issued against an order."
},
"orderReference" : {
"description" : "Order reference on the business document.",
"additionalProperties" : false,
"properties" : {
"id" : {
"type" : "string",
"description" : "Order number reference on the business document. Identifies the referenced order assigned by the buyer."
},
"schemeId" : {
"type" : "string",
"description" : "External system specific identifier of the order system identifier element. If the source business document has any matching element, it should be used."
},
"customerReference" : {
"type" : "string",
"description" : "Customer Reference Identifier (CRI) when using a purchasing card."
},
"salesOrderId" : {
"type" : "string",
"description" : "Sales order identifier."
},
"issueDate" : {
"description" : "The date on which the referenced order was issued. Valid values must be 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 time zone is not known, it must be left empty.",
"pattern" : "^(-?(?:[1-9][0-9]*)?[0-9]{4})-(1[0-2]|0[1-9])-(3[0-1]|0[1-9]|[1-2][0-9])(Z|[+-](?:2[0-3]|[0-1][0-9]):[0-5][0-9])?$"
}
},
"required" : [ "id" ]
},
"billingReference" : {
"description" : "External system identifier object for the billing entity referenced by the business document.",
"additionalProperties" : false,
"properties" : {
"id" : {
"type" : "string",
"description" : "External system identifier of the billing entity referenced by the Business Document."
},
"schemeId" : {
"type" : "string",
"description" : "External system specific identifier of the billing reference system identifier element. If the source business document has any matching element, it should be used."
}
},
"required" : [ "id" ]
},
"contractDocumentReferences" : {
"description" : "External system identifier objects for the contract referenced by the business document.",
"items" : {
"type" : "object",
"additionalProperties" : false,
"properties" : {
"id" : {
"type" : "string",
"description" : "External system identifier of the contract referenced by the Business Document (i.e. buyers contract number). Mandatory field if the customer demands that the goods or services invoiced refer to a contract number defined by the customer to which he wants to assign the Business Document. Is demanded for example in service and maintenance agreements for which there is generally no explicit order."
},
"schemeId" : {
"type" : "string",
"description" : "External system specific identifier of the contract system identifier element. If the source business document has any matching element, it should be used."
}
},
"required" : [ "id" ]
}
},
"additionalDocumentReference" : {
"description" : "A reference to an additional document associated with this document. Used for example to reference to an Invoice from Credit Note.",
"additionalProperties" : false,
"properties" : {
"id" : {
"type" : "string",
"description" : "An identifier for the referenced document (i.e. bumid)."
},
"schemeId" : {
"type" : "string",
"description" : "External system specific identifier of the invoicing system identifier element. If the source business document has any matching element, it should be used."
},
"issueDate" : {
"type" : "string",
"description" : "Date when the referenced document was issued. Valid values must be 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 time zone is not known, it must be left empty.",
"pattern" : "^(-?(?:[1-9][0-9]*)?[0-9]{4})-(1[0-2]|0[1-9])-(3[0-1]|0[1-9]|[1-2][0-9])(Z|[+-](?:2[0-3]|[0-1][0-9]):[0-5][0-9])?$"
},
"typeCode" : {
"type" : "string",
"description" : "The type of document being referenced, expressed as a code, for example to reference to an Invoice document, code is 380."
}
},
"required" : [ "id" ]
},
"accountingSupplierParty" : {
"description" : "Party that is the accountable supplier of the goods/services in the referred business document.",
"properties" : {
"endpoint" : {
"type" : "object",
"additionalProperties" : false,
"description" : "An array holding the external system identifiers of the party. Used for defining customer, supplier and delivery party data.",
"properties" : {
"id" : {
"type" : "string",
"description" : "Identifier for the endpoint. See API documentation for more details about the endpoints."
},
"schemeId" : {
"type" : "string",
"description" : "External global identifier of the id identifier element. See API documentation for more details about the endpoint scheme identifiers."
}
},
"required" : [ "id" ]
},
"partyIdentifications" : {
"type" : "array",
"description" : "An array holding the system identifiers of the party. Used for defining customer, supplier and delivery party data.",
"items" : {
"type" : "object",
"description" : "An object holding a party identification.",
"properties" : {
"id" : {
"type" : "string",
"description" : "An object holding the system identifier of the party."
},
"schemeId" : {
"type" : "string",
"description" : "Global identifier of namescheme for party identifier."
}
},
"required" : [ "id" ],
"additionalProperties" : false
}
},
"partyName" : {
"type" : "string",
"description" : "A name of the party. Used for defining supplier, customer and delivery party names."
},
"postalAddress" : {
"description" : "An object containing address information. Used for defining supplier party, customer party and delivery party address data.",
"properties" : {
"cityName" : {
"type" : "string",
"description" : "The name of the city, town or village in the postal address of the party."
},
"postalZone" : {
"type" : "string",
"description" : "The postal code of the area in the postal address of the party. The identifier for an addressable group of properties according to the relevant national postal service, such as a ZIP code or Post Code."
},
"addressLine" : {
"type" : "string",
"description" : "The address line of the postal address of the party."
},
"addressLine2" : {
"type" : "string",
"description" : "The second address line of the postal address of the party."
},
"addressLine3" : {
"type" : "string",
"description" : "The third address line of the postal address of the party."
},
"locality" : {
"type" : "string",
"description" : "Neighbourhood or district within town or city. Required in UK if a similar road name exists within a post town area."
},
"countrySubentity" : {
"type" : "string",
"description" : "The sub-entity of the area in the postal address."
},
"countryId" : {
"type" : "string",
"description" : "The country of the postal address of party. Valid values: ISO3166-1 alpha-2 values can be used."
}
},
"additionalProperties" : false
},
"partyTaxScheme" : {
"type" : "object",
"description" : "Information about taxes. Notice that only one tax scheme is used, although there could be multiple.",
"properties" : {
"company" : {
"type" : "object",
"description" : "Information about the company taxes.",
"properties" : {
"id" : {
"type" : "string",
"description" : "A tax identifier for a company. The identifier assigned for tax purposes to a party by the taxation authority."
},
"schemeId" : {
"type" : "string",
"description" : "Global identifier of the endpoint identifier element. Valid values: Country specific agency schema, example DK:CVR for Denmark."
}
},
"additionalProperties" : false
}
},
"additionalProperties" : false
},
"partyLegalEntities" : {
"type" : "array",
"description" : "An array holding the legal entities of the party. Note that currently one legal entity is supported by the API",
"items" : {
"type" : "object",
"description" : "An object holding a party legal entity.",
"properties" : {
"registrationName" : {
"type" : "string",
"description" : "Registration name of the legal entity."
},
"companyIdentifier" : {
"description" : "Global legal party identifier, including name scheme",
"properties" : {
"id" : {
"type" : "string",
"description" : "Identifies the value."
},
"schemeId" : {
"type" : "string",
"description" : "Identifies the namespace of the id."
}
},
"required" : [ "id" ],
"additionalProperties" : false
}
},
"required" : [ "registrationName", "companyIdentifier" ],
"additionalProperties" : false
}
},
"contact" : {
"type" : "object",
"description" : "An object containing information about contacts. Used for defining the company contact data",
"properties" : {
"name" : {
"type" : "string",
"description" : "A contact name of the party."
},
"telephone" : {
"type" : "string",
"description" : "A telephone number of the contact of the party."
},
"telefax" : {
"type" : "string",
"description" : "A fax number of the contact of the party."
},
"electronicMail" : {
"type" : "string",
"description" : "An email of the contact of the party."
}
},
"additionalProperties" : false
},
"supplierAssignedAccountId" : {
"type" : "string",
"description" : "Account identifier assigned by the supplier."
},
"customerAssignedAccountId" : {
"type" : "string",
"description" : "Account identifier assigned by the customer."
},
"note" : {
"type" : "string",
"description" : "Free-form description of the party not included in other fields"
}
},
"required" : [ "partyName" ],
"additionalProperties" : false
},
"accountingCustomerParty" : {
"description" : "Party that is the accountable buyer of the goods/services in the referred business document.",
"properties" : {
"endpoint" : {
"type" : "object",
"additionalProperties" : false,
"description" : "An array holding the external system identifiers of the party. Used for defining customer, supplier and delivery party data.",
"properties" : {
"id" : {
"type" : "string",
"description" : "Identifier for the endpoint. See API documentation for more details about the endpoints."
},
"schemeId" : {
"type" : "string",
"description" : "External global identifier of the id identifier element. See API documentation for more details about the endpoint scheme identifiers."
}
},
"required" : [ "id" ]
},
"partyIdentifications" : {
"type" : "array",
"description" : "An array holding the system identifiers of the party. Used for defining customer, supplier and delivery party data.",
"items" : {
"type" : "object",
"description" : "An object holding a party identification.",
"properties" : {
"id" : {
"type" : "string",
"description" : "An object holding the system identifier of the party."
},
"schemeId" : {
"type" : "string",
"description" : "Global identifier of namescheme for party identifier."
}
},
"required" : [ "id" ],
"additionalProperties" : false
}
},
"partyName" : {
"type" : "string",
"description" : "A name of the party. Used for defining supplier, customer and delivery party names."
},
"postalAddress" : {
"description" : "An object containing address information. Used for defining supplier party, customer party and delivery party address data.",
"properties" : {
"cityName" : {
"type" : "string",
"description" : "The name of the city, town or village in the postal address of the party."
},
"postalZone" : {
"type" : "string",
"description" : "The postal code of the area in the postal address of the party. The identifier for an addressable group of properties according to the relevant national postal service, such as a ZIP code or Post Code."
},
"addressLine" : {
"type" : "string",
"description" : "The address line of the postal address of the party."
},
"addressLine2" : {
"type" : "string",
"description" : "The second address line of the postal address of the party."
},
"addressLine3" : {
"type" : "string",
"description" : "The third address line of the postal address of the party."
},
"locality" : {
"type" : "string",
"description" : "Neighbourhood or district within town or city. Required in UK if a similar road name exists within a post town area."
},
"countrySubentity" : {
"type" : "string",
"description" : "The sub-entity of the area in the postal address."
},
"countryId" : {
"type" : "string",
"description" : "The country of the postal address of party. Valid values: ISO3166-1 alpha-2 values can be used."
}
},
"additionalProperties" : false
},
"partyTaxScheme" : {
"type" : "object",
"description" : "Information about taxes. Notice that only one tax scheme is used, although there could be multiple.",
"properties" : {
"company" : {
"type" : "object",
"description" : "Information about the company taxes.",
"properties" : {
"id" : {
"type" : "string",
"description" : "A tax identifier for a company. The identifier assigned for tax purposes to a party by the taxation authority."
},
"schemeId" : {
"type" : "string",
"description" : "Global identifier of the endpoint identifier element. Valid values: Country specific agency schema, example DK:CVR for Denmark."
}
},
"additionalProperties" : false
}
},
"additionalProperties" : false
},
"partyLegalEntities" : {
"type" : "array",
"description" : "An array holding the legal entities of the party. Note that currently one legal entity is supported by the API",
"items" : {
"type" : "object",
"description" : "An object holding a party legal entity.",
"properties" : {
"registrationName" : {
"type" : "string",
"description" : "Registration name of the legal entity."
},
"companyIdentifier" : {
"description" : "Global legal party identifier, including name scheme",
"properties" : {
"id" : {
"type" : "string",
"description" : "Identifies the value."
},
"schemeId" : {
"type" : "string",
"description" : "Identifies the namespace of the id."
}
},
"required" : [ "id" ],
"additionalProperties" : false
}
},
"required" : [ "registrationName", "companyIdentifier" ],
"additionalProperties" : false
}
},
"contact" : {
"type" : "object",
"description" : "An object containing information about contacts. Used for defining the company contact data",
"properties" : {
"name" : {
"type" : "string",
"description" : "A contact name of the party."
},
"telephone" : {
"type" : "string",
"description" : "A telephone number of the contact of the party."
},
"telefax" : {
"type" : "string",
"description" : "A fax number of the contact of the party."
},
"electronicMail" : {
"type" : "string",
"description" : "An email of the contact of the party."
}
},
"additionalProperties" : false
},
"supplierAssignedAccountId" : {
"type" : "string",
"description" : "Account identifier assigned by the supplier."
},
"customerAssignedAccountId" : {
"type" : "string",
"description" : "Account identifier assigned by the customer."
},
"note" : {
"type" : "string",
"description" : "Free-form description of the party not included in other fields"
}
},
"required" : [ "partyName" ],
"additionalProperties" : false
},
"buyerCustomerParty" : {
"description" : "Party that is the buyer of the goods/services in the referred business document.",
"properties" : {
"endpoint" : {
"type" : "object",
"additionalProperties" : false,
"description" : "An array holding the external system identifiers of the party. Used for defining customer, supplier and delivery party data.",
"properties" : {
"id" : {
"type" : "string",
"description" : "Identifier for the endpoint. See API documentation for more details about the endpoints."
},
"schemeId" : {
"type" : "string",
"description" : "External global identifier of the id identifier element. See API documentation for more details about the endpoint scheme identifiers."
}
},
"required" : [ "id" ]
},
"partyIdentifications" : {
"type" : "array",
"description" : "An array holding the system identifiers of the party. Used for defining customer, supplier and delivery party data.",
"items" : {
"type" : "object",
"description" : "An object holding a party identification.",
"properties" : {
"id" : {
"type" : "string",
"description" : "An object holding the system identifier of the party."
},
"schemeId" : {
"type" : "string",
"description" : "Global identifier of namescheme for party identifier."
}
},
"required" : [ "id" ],
"additionalProperties" : false
}
},
"partyName" : {
"type" : "string",
"description" : "A name of the party. Used for defining supplier, customer and delivery party names."
},
"postalAddress" : {
"description" : "An object containing address information. Used for defining supplier party, customer party and delivery party address data.",
"properties" : {
"cityName" : {
"type" : "string",
"description" : "The name of the city, town or village in the postal address of the party."
},
"postalZone" : {
"type" : "string",
"description" : "The postal code of the area in the postal address of the party. The identifier for an addressable group of properties according to the relevant national postal service, such as a ZIP code or Post Code."
},
"addressLine" : {
"type" : "string",
"description" : "The address line of the postal address of the party."
},
"addressLine2" : {
"type" : "string",
"description" : "The second address line of the postal address of the party."
},
"addressLine3" : {
"type" : "string",
"description" : "The third address line of the postal address of the party."
},
"locality" : {
"type" : "string",
"description" : "Neighbourhood or district within town or city. Required in UK if a similar road name exists within a post town area."
},
"countrySubentity" : {
"type" : "string",
"description" : "The sub-entity of the area in the postal address."
},
"countryId" : {
"type" : "string",
"description" : "The country of the postal address of party. Valid values: ISO3166-1 alpha-2 values can be used."
}
},
"additionalProperties" : false
},
"partyTaxScheme" : {
"type" : "object",
"description" : "Information about taxes. Notice that only one tax scheme is used, although there could be multiple.",
"properties" : {
"company" : {
"type" : "object",
"description" : "Information about the company taxes.",
"properties" : {
"id" : {
"type" : "string",
"description" : "A tax identifier for a company. The identifier assigned for tax purposes to a party by the taxation authority."
},
"schemeId" : {
"type" : "string",
"description" : "Global identifier of the endpoint identifier element. Valid values: Country specific agency schema, example DK:CVR for Denmark."
}
},
"additionalProperties" : false
}
},
"additionalProperties" : false
},
"partyLegalEntities" : {
"type" : "array",
"description" : "An array holding the legal entities of the party. Note that currently one legal entity is supported by the API",
"items" : {
"type" : "object",
"description" : "An object holding a party legal entity.",
"properties" : {
"registrationName" : {
"type" : "string",
"description" : "Registration name of the legal entity."
},
"companyIdentifier" : {
"description" : "Global legal party identifier, including name scheme",
"properties" : {
"id" : {
"type" : "string",
"description" : "Identifies the value."
},
"schemeId" : {
"type" : "string",
"description" : "Identifies the namespace of the id."
}
},
"required" : [ "id" ],
"additionalProperties" : false
}
},
"required" : [ "registrationName", "companyIdentifier" ],
"additionalProperties" : false
}
},
"contact" : {
"type" : "object",
"description" : "An object containing information about contacts. Used for defining the company contact data",
"properties" : {
"name" : {
"type" : "string",
"description" : "A contact name of the party."
},
"telephone" : {
"type" : "string",
"description" : "A telephone number of the contact of the party."
},
"telefax" : {
"type" : "string",
"description" : "A fax number of the contact of the party."
},
"electronicMail" : {
"type" : "string",
"description" : "An email of the contact of the party."
}
},
"additionalProperties" : false
},
"supplierAssignedAccountId" : {
"type" : "string",
"description" : "Account identifier assigned by the supplier."
},
"customerAssignedAccountId" : {
"type" : "string",
"description" : "Account identifier assigned by the customer."
},
"note" : {
"type" : "string",
"description" : "Free-form description of the party not included in other fields"
}
},
"required" : [ "partyName" ],
"additionalProperties" : false
},
"sellerSupplierParty" : {
"description" : "Party that is the supplier of the goods/services in the referred business document.",
"properties" : {
"endpoint" : {
"type" : "object",
"additionalProperties" : false,
"description" : "An array holding the external system identifiers of the party. Used for defining customer, supplier and delivery party data.",
"properties" : {
"id" : {
"type" : "string",
"description" : "Identifier for the endpoint. See API documentation for more details about the endpoints."
},
"schemeId" : {
"type" : "string",
"description" : "External global identifier of the id identifier element. See API documentation for more details about the endpoint scheme identifiers."
}
},
"required" : [ "id" ]
},
"partyIdentifications" : {
"type" : "array",
"description" : "An array holding the system identifiers of the party. Used for defining customer, supplier and delivery party data.",
"items" : {
"type" : "object",
"description" : "An object holding a party identification.",
"properties" : {
"id" : {
"type" : "string",
"description" : "An object holding the system identifier of the party."
},
"schemeId" : {
"type" : "string",
"description" : "Global identifier of namescheme for party identifier."
}
},
"required" : [ "id" ],
"additionalProperties" : false
}
},
"partyName" : {
"type" : "string",
"description" : "A name of the party. Used for defining supplier, customer and delivery party names."
},
"postalAddress" : {
"description" : "An object containing address information. Used for defining supplier party, customer party and delivery party address data.",
"properties" : {
"cityName" : {
"type" : "string",
"description" : "The name of the city, town or village in the postal address of the party."
},
"postalZone" : {
"type" : "string",
"description" : "The postal code of the area in the postal address of the party. The identifier for an addressable group of properties according to the relevant national postal service, such as a ZIP code or Post Code."
},
"addressLine" : {
"type" : "string",
"description" : "The address line of the postal address of the party."
},
"addressLine2" : {
"type" : "string",
"description" : "The second address line of the postal address of the party."
},
"addressLine3" : {
"type" : "string",
"description" : "The third address line of the postal address of the party."
},
"locality" : {
"type" : "string",
"description" : "Neighbourhood or district within town or city. Required in UK if a similar road name exists within a post town area."
},
"countrySubentity" : {
"type" : "string",
"description" : "The sub-entity of the area in the postal address."
},
"countryId" : {
"type" : "string",
"description" : "The country of the postal address of party. Valid values: ISO3166-1 alpha-2 values can be used."
}
},
"additionalProperties" : false
},
"partyTaxScheme" : {
"type" : "object",
"description" : "Information about taxes. Notice that only one tax scheme is used, although there could be multiple.",
"properties" : {
"company" : {
"type" : "object",
"description" : "Information about the company taxes.",
"properties" : {
"id" : {
"type" : "string",
"description" : "A tax identifier for a company. The identifier assigned for tax purposes to a party by the taxation authority."
},
"schemeId" : {
"type" : "string",
"description" : "Global identifier of the endpoint identifier element. Valid values: Country specific agency schema, example DK:CVR for Denmark."
}
},
"additionalProperties" : false
}
},
"additionalProperties" : false
},
"partyLegalEntities" : {
"type" : "array",
"description" : "An array holding the legal entities of the party. Note that currently one legal entity is supported by the API",
"items" : {
"type" : "object",
"description" : "An object holding a party legal entity.",
"properties" : {
"registrationName" : {
"type" : "string",
"description" : "Registration name of the legal entity."
},
"companyIdentifier" : {
"description" : "Global legal party identifier, including name scheme",
"properties" : {
"id" : {
"type" : "string",
"description" : "Identifies the value."
},
"schemeId" : {
"type" : "string",
"description" : "Identifies the namespace of the id."
}
},
"required" : [ "id" ],
"additionalProperties" : false
}
},
"required" : [ "registrationName", "companyIdentifier" ],
"additionalProperties" : false
}
},
"contact" : {
"type" : "object",
"description" : "An object containing information about contacts. Used for defining the company contact data",
"properties" : {
"name" : {
"type" : "string",
"description" : "A contact name of the party."
},
"telephone" : {
"type" : "string",
"description" : "A telephone number of the contact of the party."
},
"telefax" : {
"type" : "string",
"description" : "A fax number of the contact of the party."
},
"electronicMail" : {
"type" : "string",
"description" : "An email of the contact of the party."
}
},
"additionalProperties" : false
},
"supplierAssignedAccountId" : {
"type" : "string",
"description" : "Account identifier assigned by the supplier."
},
"customerAssignedAccountId" : {
"type" : "string",
"description" : "Account identifier assigned by the customer."
},
"note" : {
"type" : "string",
"description" : "Free-form description of the party not included in other fields"
}
},
"required" : [ "partyName" ],
"additionalProperties" : false
},
"delivery" : {
"description" : "Delivery details.",
"additionalProperties" : false,
"properties" : {
"actualDeliveryDate" : {
"type" : "string",
"description" : "Date when the goods/services are delivered. Valid values must be 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 time zone is not known, it must be left empty. ",
"pattern" : "^(-?(?:[1-9][0-9]*)?[0-9]{4})-(1[0-2]|0[1-9])-(3[0-1]|0[1-9]|[1-2][0-9])(Z|[+-](?:2[0-3]|[0-1][0-9]):[0-5][0-9])?$"
},
"deliveryNoteReference" : {
"description" : "Identifier of the delivery note document.",
"properties" : {
"id" : {
"type" : "string",
"description" : "Identifies the value."
},
"schemeId" : {
"type" : "string",
"description" : "Identifies the namespace of the id."
}
},
"required" : [ "id" ],
"additionalProperties" : false
}
}
},
"deliveryParty" : {
"description" : "Party that is responsible for the delivery of the goods/services in the referred business document.",
"properties" : {
"endpoint" : {
"type" : "object",
"additionalProperties" : false,
"description" : "An array holding the external system identifiers of the party. Used for defining customer, supplier and delivery party data.",
"properties" : {
"id" : {
"type" : "string",
"description" : "Identifier for the endpoint. See API documentation for more details about the endpoints."
},
"schemeId" : {
"type" : "string",
"description" : "External global identifier of the id identifier element. See API documentation for more details about the endpoint scheme identifiers."
}
},
"required" : [ "id" ]
},
"partyIdentifications" : {
"type" : "array",
"description" : "An array holding the system identifiers of the party. Used for defining customer, supplier and delivery party data.",
"items" : {
"type" : "object",
"description" : "An object holding a party identification.",
"properties" : {
"id" : {
"type" : "string",
"description" : "An object holding the system identifier of the party."
},
"schemeId" : {
"type" : "string",
"description" : "Global identifier of namescheme for party identifier."
}
},
"required" : [ "id" ],
"additionalProperties" : false
}
},
"partyName" : {
"type" : "string",
"description" : "A name of the party. Used for defining supplier, customer and delivery party names."
},
"postalAddress" : {
"description" : "An object containing address information. Used for defining supplier party, customer party and delivery party address data.",
"properties" : {
"cityName" : {
"type" : "string",
"description" : "The name of the city, town or village in the postal address of the party."
},
"postalZone" : {
"type" : "string",
"description" : "The postal code of the area in the postal address of the party. The identifier for an addressable group of properties according to the relevant national postal service, such as a ZIP code or Post Code."
},
"addressLine" : {
"type" : "string",
"description" : "The address line of the postal address of the party."
},
"addressLine2" : {
"type" : "string",
"description" : "The second address line of the postal address of the party."
},
"addressLine3" : {
"type" : "string",
"description" : "The third address line of the postal address of the party."
},
"locality" : {
"type" : "string",
"description" : "Neighbourhood or district within town or city. Required in UK if a similar road name exists within a post town area."
},
"countrySubentity" : {
"type" : "string",
"description" : "The sub-entity of the area in the postal address."
},
"countryId" : {
"type" : "string",
"description" : "The country of the postal address of party. Valid values: ISO3166-1 alpha-2 values can be used."
}
},
"additionalProperties" : false
},
"partyTaxScheme" : {
"type" : "object",
"description" : "Information about taxes. Notice that only one tax scheme is used, although there could be multiple.",
"properties" : {
"company" : {
"type" : "object",
"description" : "Information about the company taxes.",
"properties" : {
"id" : {
"type" : "string",
"description" : "A tax identifier for a company. The identifier assigned for tax purposes to a party by the taxation authority."
},
"schemeId" : {
"type" : "string",
"description" : "Global identifier of the endpoint identifier element. Valid values: Country specific agency schema, example DK:CVR for Denmark."
}
},
"additionalProperties" : false
}
},
"additionalProperties" : false
},
"partyLegalEntities" : {
"type" : "array",
"description" : "An array holding the legal entities of the party. Note that currently one legal entity is supported by the API",
"items" : {
"type" : "object",
"description" : "An object holding a party legal entity.",
"properties" : {
"registrationName" : {
"type" : "string",
"description" : "Registration name of the legal entity."
},
"companyIdentifier" : {
"description" : "Global legal party identifier, including name scheme",
"properties" : {
"id" : {
"type" : "string",
"description" : "Identifies the value."
},
"schemeId" : {
"type" : "string",
"description" : "Identifies the namespace of the id."
}
},
"required" : [ "id" ],
"additionalProperties" : false
}
},
"required" : [ "registrationName", "companyIdentifier" ],
"additionalProperties" : false
}
},
"contact" : {
"type" : "object",
"description" : "An object containing information about contacts. Used for defining the company contact data",
"properties" : {
"name" : {
"type" : "string",
"description" : "A contact name of the party."
},
"telephone" : {
"type" : "string",
"description" : "A telephone number of the contact of the party."
},
"telefax" : {
"type" : "string",
"description" : "A fax number of the contact of the party."
},
"electronicMail" : {
"type" : "string",
"description" : "An email of the contact of the party."
}
},
"additionalProperties" : false
},
"supplierAssignedAccountId" : {
"type" : "string",
"description" : "Account identifier assigned by the supplier."
},
"customerAssignedAccountId" : {
"type" : "string",
"description" : "Account identifier assigned by the customer."
},
"note" : {
"type" : "string",
"description" : "Free-form description of the party not included in other fields"
}
},
"required" : [ "partyName" ],
"additionalProperties" : false
},
"paymentMeans" : {
"description" : "An object holding the available payment means.",
"additionalProperties" : false,
"properties" : {
"paymentMeansCode" : {
"type" : "string",
"description" : "A code that identifies how the payment can be done. Valid values: UN/ECE 4461 code represented as string."
},
"paymentDueDate" : {
"type" : "string",
"description" : "Date when the business document is due for the payment means. Valid values must be 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 time zone is not known, it must be left empty.",
"pattern" : "^(-?(?:[1-9][0-9]*)?[0-9]{4})-(1[0-2]|0[1-9])-(3[0-1]|0[1-9]|[1-2][0-9])(Z|[+-](?:2[0-3]|[0-1][0-9]):[0-5][0-9])?$"
},
"paymentReferenceMessage" : {
"type" : "string",
"description" : "A payment reference message. This can be a free text describing the payment."
},
"paymentIdentifier" : {
"type" : "object",
"additionalProperties" : false,
"description" : "An identifier for a payment made using this means of payment.",
"properties" : {
"id" : {
"type" : "string",
"description" : "The id value of payment identifier."
},
"schemeId" : {
"type" : "string",
"description" : "Scheme which identifies the type of payment identifier. Possible values are SPY, ISO."
}
},
"required" : [ "id" ]
},
"financialAccounts" : {
"type" : "array",
"description" : "Array holding the financial account data",
"items" : {
"type" : "object",
"additionalProperties" : false,
"description" : "Object holding the financial account data",
"properties" : {
"financialInstitutionName" : {
"type" : "string",
"description" : "The name of financial institution."
},
"financialInstitutionId" : {
"type" : "string",
"description" : "Identifier of financial institution."
},
"financialInstitutionIdSchemeId" : {
"type" : "string",
"description" : "The external identifier of the financial institution id identifier element."
},
"financialInstitutionBranchId" : {
"type" : "string",
"description" : "The identifier of financial institution branch, for example 342-085. This field is typically used by institutions in Australia and New Zealand."
},
"financialInstitutionBranchSchemeId" : {
"type" : "string",
"description" : "The scheme identifier of financial institution branch. For example for an Australian institutions, possible scheme is BSB."
},
"ids" : {
"type" : "array",
"description" : "Array holding ids",
"items" : {
"type" : "object",
"additionalProperties" : false,
"description" : "Object holding identifier data",
"properties" : {
"id" : {
"type" : "string",
"description" : "Identifier."
},
"schemeId" : {
"type" : "string",
"description" : "External identifier."
}
},
"required" : [ "id" ]
}
},
"accounting" : {
"type" : "object",
"title" : "Accounting",
"description" : "Accounting related content.",
"properties" : {
"virtualBankBarcode" : {
"type" : "object",
"title" : "VirtualBankBarcode",
"description" : "Virtual bar code can be added to the business document that should be printed.",
"properties" : {
"id" : {
"type" : "string",
"title" : "Virtual bank bar code",
"description" : "Identifier of the virtual bar code. "
},
"schemeId" : {
"type" : "string",
"title" : "SchemeId for virtual bank bar code",
"description" : "Scheme identifier of the virtual bank bar code, typically country code according to ISO3166-1 alpha-2. Possible values: FI"
}
}
}
}
}
}
}
}
},
"required" : [ "paymentMeansCode" ]
},
"paymentTerms" : {
"description" : "Available payment terms.",
"additionalProperties" : false,
"properties" : {
"settlementPeriod" : {
"type" : "object",
"additionalProperties" : false,
"description" : "An object holding the settlement period dates.",
"properties" : {
"startDate" : {
"type" : "string",
"description" : "Date when the payment terms starts. Valid values must be 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 time zone is not known, it must be left empty.",
"pattern" : "^(-?(?:[1-9][0-9]*)?[0-9]{4})-(1[0-2]|0[1-9])-(3[0-1]|0[1-9]|[1-2][0-9])(Z|[+-](?:2[0-3]|[0-1][0-9]):[0-5][0-9])?$"
},
"endDate" : {
"type" : "string",
"description" : "Date when the payment terms ends. Valid values must be 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 time zone is not known, it must be left empty.",
"pattern" : "^(-?(?:[1-9][0-9]*)?[0-9]{4})-(1[0-2]|0[1-9])-(3[0-1]|0[1-9]|[1-2][0-9])(Z|[+-](?:2[0-3]|[0-1][0-9]):[0-5][0-9])?$"
}
}
},
"note" : {
"type" : "string",
"description" : "Free-form text applying to the payment terms. This field may contain notes or any other similar information that is not contained explicitly in another structure."
},
"penaltySurchargePercent" : {
"type" : "number",
"description" : "Penalty surcharge percent amount."
}
}
},
"taxTotal" : {
"description" : "Tax total details.",
"additionalProperties" : false,
"properties" : {
"currencyId" : {
"type" : "string",
"description" : "A code that identifies the currency of the total payable amount. Valid values: ISO 4217 code represented as string."
},
"amount" : {
"type" : "number",
"description" : "Total amount of the taxes. The total tax amount for particular tax scheme e.g. VAT; the sum of each of the tax subtotals for each tax category within the tax scheme."
},
"roundingAmount" : {
"type" : "number",
"description" : "Rounding amount added to the calculated tax total to produce the rounded TotalTaxAmount."
},
"taxSubtotals" : {
"items" : {
"type" : "object",
"additionalProperties" : false,
"description" : "An object holding the information about tax.",
"properties" : {
"currencyId" : {
"type" : "string",
"description" : "A code that identifies the currency of the tax subtotal. Valid values: ISO 4217 code represented as string."
},
"amount" : {
"type" : "number",
"description" : "Total amount of the taxes."
},
"percent" : {
"type" : "number",
"description" : "The tax rate for the category, expressed as a percentage."
},
"taxableAmount" : {
"type" : "number",
"description" : "Basis of the taxes. The net amount to which the tax percent (rate) is applied to calculate the tax amount."
},
"taxCategory" : {
"type" : "object",
"description" : "External identifier of tax category.",
"properties" : {
"id" : {
"type" : "string",
"description" : "Identifies the tax category identifier."
},
"schemeId" : {
"type" : "string",
"description" : "Identifies the namespace of the tax category identifier."
},
"name" : {
"type" : "string",
"description" : "Tax category description."
},
"taxExemptionReason" : {
"type" : "string",
"description" : "The reason for tax being exempted."
}
},
"required" : [ "id" ],
"additionalProperties" : false
}
},
"required" : [ "currencyId", "amount" ]
}
}
},
"required" : [ "currencyId", "amount" ]
},
"invoicePeriod" : {
"description" : "Invoice period of the business document.",
"additionalProperties" : false,
"properties" : {
"startDate" : {
"description" : "Date when the goods/services are invoiced. Valid values must be 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 time zone is not known, it must be left empty. ",
"pattern" : "^(-?(?:[1-9][0-9]*)?[0-9]{4})-(1[0-2]|0[1-9])-(3[0-1]|0[1-9]|[1-2][0-9])(Z|[+-](?:2[0-3]|[0-1][0-9]):[0-5][0-9])?$"
},
"endDate" : {
"description" : "Date when the goods/services are invoiced. Valid values must be 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 time zone is not known, it must be left empty.",
"pattern" : "^(-?(?:[1-9][0-9]*)?[0-9]{4})-(1[0-2]|0[1-9])-(3[0-1]|0[1-9]|[1-2][0-9])(Z|[+-](?:2[0-3]|[0-1][0-9]):[0-5][0-9])?$"
}
}
},
"taxExchangeRate" : {
"description" : " An association to Exchange Rate between the Document Currency and the Tax Currency.",
"additionalProperties" : false,
"properties" : {
"exchangeRate" : {
"type" : "number",
"description" : "The factor applied to the source currency to calculate the target currency."
}
}
},
"legalMonetaryTotal" : {
"description" : "Legal monetary details for total amount payable in the business document.",
"additionalProperties" : false,
"properties" : {
"lineExtensionAmount" : {
"type" : "object",
"additionalProperties" : false,
"description" : "An object holding total amount of line extensions.",
"properties" : {
"currencyId" : {
"type" : "string",
"description" : "A code that identifies the currency of the total line extension amount. Valid values: ISO 4217 code represented as string."
},
"amount" : {
"type" : "number",
"description" : "Total amount of line extensions."
}
},
"required" : [ "currencyId", "amount" ]
},
"payableAmount" : {
"type" : "object",
"additionalProperties" : false,
"description" : "An object holding total payable amount of line extensions.",
"properties" : {
"currencyId" : {
"type" : "string",
"description" : "A code that identifies the currency of the total payable amount. Valid values: ISO 4217 code represented as string."
},
"amount" : {
"type" : "number",
"description" : "The total amount to be paid."
}
},
"required" : [ "currencyId", "amount" ]
}
},
"required" : [ "payableAmount" ]
},
"buyerReference" : {
"description" : "Buyer reference in the business document.",
"additionalProperties" : false,
"properties" : {
"id" : {
"type" : "string",
"description" : "The id value of the buyer reference"
}
},
"required" : [ "id" ]
},
"customFields" : {
"description" : "Custom fields in the business document. Disclaimer! Use of a custom field assumes that the recipient can handle the custom fields. Before using custom field Basware needs to be contacted to assure the delivery of these fields. Additional changes may be incurred due to the use of these fields. There is no guarantee that the recipient can handle the specified custom fields.",
"items" : {
"type" : "object",
"description" : "Custom fields in the business document",
"additionalProperties" : false,
"properties" : {
"name" : {
"type" : "string",
"description" : "Name of the custom field",
"default" : "file"
},
"value" : {
"type" : "string",
"description" : "Value of the custom field"
},
"description" : {
"type" : "string",
"description" : "The purpose of this field"
}
},
"required" : [ "name", "value" ]
}
},
"documentLines" : {
"type" : "array",
"description" : "An array holding the document lines.",
"items" : {
"type" : "object",
"additionalProperties" : false,
"description" : "A document line",
"properties" : {
"id" : {
"type" : "string",
"description" : "External system identifier for the document line."
},
"note" : {
"type" : "string",
"description" : "Free-form text conveying information that is not contained explicitly in other structures."
},
"quantity" : {
"description" : "An object holding the quantity of the target Business Document line item.",
"additionalProperties" : false,
"properties" : {
"amount" : {
"type" : "number",
"description" : "The quantity of the target Business Document line items."
},
"unitCode" : {
"type" : "string",
"description" : "The unit code of the quantity of the target Business Document line item. Valid values: UN/ECE CEFACT Trade Facilitation Recommendation No.20 common code value represented as string."
}
}
},
"serviceIndicator" : {
"type" : "boolean",
"description" : "Flag indicating whether the line represents goods or services (true if services, false if goods)."
},
"lineExtension" : {
"description" : "The total amount for the line item, including allowance charges but net of taxes.",
"additionalProperties" : false,
"properties" : {
"currencyId" : {
"type" : "string",
"description" : "The currency of the amount."
},
"amount" : {
"type" : "number",
"description" : "The total amount for the line item, including allowance charges but net of taxes."
}
},
"required" : [ "currencyId", "amount" ]
},
"item" : {
"description" : "An object holding an Business Document line item.",
"additionalProperties" : false,
"properties" : {
"descriptions" : {
"type" : "array",
"items" : {
"type" : "object",
"additionalProperties" : false,
"description" : "Business Document line item.",
"properties" : {
"description" : {
"type" : "string",
"description" : "Business Document line item."
}
}
}
},
"name" : {
"type" : "string",
"description" : "Name of the Business Document line item. A short name optionally given to an item, such as a name from a catalogue, as distinct from a description."
},
"taxPercent" : {
"type" : "number",
"description" : "Tax amount for the item"
},
"sellersItem" : {
"type" : "object",
"additionalProperties" : false,
"description" : "Identifies the Business Document line item as it is in seller's system.",
"properties" : {
"id" : {
"type" : "string",
"description" : "Identifier of the business document line item as it is in seller's system."
},
"schemeId" : {
"type" : "string",
"description" : "System specific identifier of the seller's item identifier element. If the source business document has any matching element, it should be used."
}
},
"required" : [ "id" ]
},
"buyersItem" : {
"type" : "object",
"additionalProperties" : false,
"description" : "An object holding a identification of the Business Documents line item as it is in buyers system.",
"properties" : {
"id" : {
"type" : "string",
"description" : "Identifier of the business document line item as it is in buyer's system."
},
"schemeId" : {
"type" : "string",
"description" : "System specific identifier of the buyer's item identifier element. If the source business document has any matching element, it should be used."
}
},
"required" : [ "id" ]
}
}
},
"payment" : {
"additionalProperties" : false,
"properties" : {
"paymentDate" : {
"type" : "string",
"description" : "Payment timestamp which includes time."
},
"paymentMeansCode" : {
"type" : "string",
"description" : "Payment method."
},
"currencyCode" : {
"type" : "string",
"description" : "Currency code."
},
"exchangeRate" : {
"type" : "number",
"description" : "Exchange rate. Required, if currency code is different from MXN."
},
"amount" : {
"type" : "number",
"description" : "Total amount reported in the payment receipt."
},
"additionalReference" : {
"description" : "Reference to a payment, check or other type of payment.",
"properties" : {
"id" : {
"type" : "string",
"description" : "Identifies the value."
},
"schemeId" : {
"type" : "string",
"description" : "Identifies the namespace of the id."
}
},
"required" : [ "id" ],
"additionalProperties" : false
},
"payer" : {
"description" : "Payer details.",
"additionalProperties" : false,
"properties" : {
"financialInstitution" : {
"type" : "object",
"description" : "Financial institution for payer account details.",
"properties" : {
"taxCode" : {
"type" : "string",
"description" : "Sender tax code."
},
"name" : {
"type" : "string",
"description" : "Financial institution name."
},
"id" : {
"type" : "string",
"description" : "Identifies the financial institution."
},
"schemeId" : {
"type" : "string",
"description" : "Identifies the namespace of the financial institution."
}
}
},
"financialAccount" : {
"description" : "Financial account for payer",
"properties" : {
"id" : {
"type" : "string",
"description" : "Identifies the value."
},
"schemeId" : {
"type" : "string",
"description" : "Identifies the namespace of the id."
}
},
"required" : [ "id" ],
"additionalProperties" : false
}
}
},
"payee" : {
"description" : "Payee details.",
"additionalProperties" : false,
"properties" : {
"financialAccount" : {
"description" : "Financial account for payee",
"properties" : {
"id" : {
"type" : "string",
"description" : "Identifies the value."
},
"schemeId" : {
"type" : "string",
"description" : "Identifies the namespace of the id."
}
},
"required" : [ "id" ],
"additionalProperties" : false
}
}
},
"financialInstitutionTransactionType" : {
"type" : "string",
"description" : "Optional field for financial institution transaction type. Currently only one value supported (SPEI type of transactions)."
},
"certificateByEinvoicingAuthority" : {
"type" : "string",
"description" : "The certificate that protects the payment, as a text string in base 64 format. It is required in case the transaction type attribute contains information. This field is related to SPEI."
},
"paymentReferenceId" : {
"type" : "string",
"description" : "The original string of the payment voucher generated by the issuing entity of the beneficiary account. It is required in case the transaction type attribute contains information. This field is related to SPEI."
},
"digitalCompanyCertificate" : {
"type" : "string",
"description" : "The digital seal that is associated with the payment. This field is related to SPEI."
},
"documentReferences" : {
"description" : "Document references",
"items" : {
"type" : "object",
"additionalProperties" : false,
"properties" : {
"taxAuthorityDocumentId" : {
"type" : "string",
"description" : "The identifier of the document related to the payment. This data can be a tax identifier of the electronic invoice or the operation number of a digital document."
},
"documentSerialNumber" : {
"type" : "string",
"description" : "The series of the voucher for internal control of the taxpayer."
},
"documentId" : {
"type" : "string",
"description" : "The folio of the voucher for internal control of the taxpayer."
},
"currencyCode" : {
"type" : "string",
"description" : "The currency used in the amounts of the related document, when national currency is used or the related document does not specify the currency is MXN. Conforms to the ISO 4217 specification."
},
"exchangeRate" : {
"type" : "number",
"description" : "The exchange rate in accordance with the currency recorded in the related document. It is required when the currency of the related document is different from the currency of payment."
},
"paymentMethod" : {
"type" : "string",
"description" : "The key to the payment method that was recorded in the related document."
},
"installmentCount" : {
"type" : "integer",
"description" : "The installment number that corresponds to the payment. It is required when payment is in installments or deferred."
},
"unpaidAmount" : {
"type" : "number",
"description" : "The amount of the unpaid balance of the previous installment. It is required when payment is in installments or deferred."
},
"paidAmount" : {
"type" : "number",
"description" : "The amount paid for the related document. It is mandatory when there is more than one related document or when there is a related document and exchangeRate has a value."
},
"remainingAmount" : {
"type" : "number",
"description" : "The difference between the amount of the previous balance and the amount of the payment. It is required when payment is in installments or deferred."
}
}
},
"required" : [ "taxAuthorityDocumentId", "currencyCode", "paymentMethod" ]
}
},
"required" : [ "paymentDate", "paymentMeansCode", "currencyCode", "amount", "documentReferences" ]
},
"taxTotals" : {
"description" : "An array holding the information about the taxes.",
"items" : {
"type" : "object",
"additionalProperties" : false,
"description" : "An object holding the information about tax.",
"properties" : {
"amount" : {
"type" : "number",
"description" : "Total amount of the taxes. The total tax amount for particular tax scheme e.g. VAT; the sum of each of the tax subtotals for each tax category within the tax scheme."
},
"currencyId" : {
"type" : "string",
"description" : "A code that identifies the currency of the total payable amount. Valid values: ISO 4217 code represented as string."
},
"transactionCurrencyTax" : {
"type" : "object",
"additionalProperties" : false,
"description" : "An object holding transaction tax.",
"properties" : {
"amount" : {
"type" : "number",
"description" : "Amount of tax for the transaction."
}
},
"required" : [ "amount" ]
},
"taxSubtotals" : {
"items" : {
"type" : "object",
"additionalProperties" : false,
"description" : "An object holding the information about tax.",
"properties" : {
"currencyId" : {
"type" : "string",
"description" : "A code that identifies the currency of the tax subtotal. Valid values: ISO 4217 code represented as string."
},
"amount" : {
"type" : "number",
"description" : "Total amount of the taxes."
},
"percent" : {
"type" : "number",
"description" : "The tax rate for the category, expressed as a percentage."
},
"taxableAmount" : {
"type" : "number",
"description" : "Basis of the taxes. The net amount to which the tax percent (rate) is applied to calculate the tax amount."
},
"taxCategory" : {
"type" : "object",
"description" : "External identifier of tax category.",
"properties" : {
"id" : {
"type" : "string",
"description" : "Identifies the tax category identifier."
},
"schemeId" : {
"type" : "string",
"description" : "Identifies the namespace of the tax category identifier."
},
"name" : {
"type" : "string",
"description" : "Tax category description."
},
"taxExemptionReason" : {
"type" : "string",
"description" : "The reason for tax being exempted."
}
},
"required" : [ "id" ],
"additionalProperties" : false
}
},
"required" : [ "currencyId", "amount" ]
}
}
},
"required" : [ "amount", "currencyId" ]
}
},
"price" : {
"description" : "An object holding the information about the price of the line item.",
"additionalProperties" : false,
"properties" : {
"amount" : {
"type" : "number",
"description" : "The price of the line item."
},
"currencyId" : {
"type" : "string",
"description" : "A code that identifies the currency of the line item price. Valid values: ISO 4217 code represented as string."
}
},
"required" : [ "amount", "currencyId" ]
},
"delivery" : {
"description" : "An object holding delivery data",
"additionalProperties" : false,
"properties" : {
"actualDeliveryDate" : {
"description" : "Date when the goods/services are delivered. Valid values must be 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 time zone is not known, it must be left empty. ",
"pattern" : "^(-?(?:[1-9][0-9]*)?[0-9]{4})-(1[0-2]|0[1-9])-(3[0-1]|0[1-9]|[1-2][0-9])(Z|[+-](?:2[0-3]|[0-1][0-9]):[0-5][0-9])?$"
},
"promisedDeliveryPeriod" : {
"type" : "object",
"additionalProperties" : false,
"description" : "Promised delivery period",
"properties" : {
"startDate" : {
"description" : "Earliest date when the goods/services are promised to be delivered. Valid values must be 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 time zone is not known, it must be left empty. ",
"pattern" : "^(-?(?:[1-9][0-9]*)?[0-9]{4})-(1[0-2]|0[1-9])-(3[0-1]|0[1-9]|[1-2][0-9])(Z|[+-](?:2[0-3]|[0-1][0-9]):[0-5][0-9])?$"
},
"endDate" : {
"description" : "Latest date when the goods/services are promised to be delivered. Valid values must be 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 time zone is not known, it must be left empty.",
"pattern" : "^(-?(?:[1-9][0-9]*)?[0-9]{4})-(1[0-2]|0[1-9])-(3[0-1]|0[1-9]|[1-2][0-9])(Z|[+-](?:2[0-3]|[0-1][0-9]):[0-5][0-9])?$"
}
}
},
"deliveryAddress" : {
"description" : "An object containing address information. Used for defining delivery address party data.",
"properties" : {
"cityName" : {
"type" : "string",
"description" : "The name of the city, town or village in the postal address of the party."
},
"postalZone" : {
"type" : "string",
"description" : "The postal code of the area in the postal address of the party. The identifier for an addressable group of properties according to the relevant national postal service, such as a ZIP code or Post Code."
},
"addressLine" : {
"type" : "string",
"description" : "The address line of the postal address of the party."
},
"addressLine2" : {
"type" : "string",
"description" : "The second address line of the postal address of the party."
},
"addressLine3" : {
"type" : "string",
"description" : "The third address line of the postal address of the party."
},
"locality" : {
"type" : "string",
"description" : "Neighbourhood or district within town or city. Required in UK if a similar road name exists within a post town area."
},
"countrySubentity" : {
"type" : "string",
"description" : "The sub-entity of the area in the postal address."
},
"countryId" : {
"type" : "string",
"description" : "The country of the postal address of party. Valid values: ISO3166-1 alpha-2 values can be used."
}
},
"additionalProperties" : false
}
}
},
"orderLineReference" : {
"description" : "An object holding order line reference data",
"additionalProperties" : false,
"properties" : {
"lineId" : {
"type" : "string",
"description" : "An identifier for the referenced order line, assigned by the buyer."
},
"orderReference" : {
"type" : "string",
"description" : "A reference to the order containing the referenced order line."
}
},
"required" : [ "lineId" ]
},
"allowanceCharges" : {
"description" : "Extra payment or subtraction to Business Document, for example freight or handling fees.",
"additionalProperties" : false,
"items" : {
"type" : "object",
"properties" : {
"chargeIndicator" : {
"type" : "boolean",
"description" : "Indicates whether the allowance charge is a charge (true) or a discount (false)."
},
"allowanceChargeReasonCode" : {
"type" : "string",
"description" : "A mutually agreed code signifying the reason for this allowance or charge. Valid values are defined in UN/ECE CEFACT Trade Facilitation Recommendation 4465 Adjustment reason description code"
},
"allowanceChargeReason" : {
"type" : "string",
"description" : "The reason for this allowance or charge."
},
"multiplierFactorNumeric" : {
"type" : "number",
"description" : "The factor applied to the base amount to calculate the allowance charge."
},
"amount" : {
"type" : "number",
"description" : "The allowance charge amount."
},
"taxCategories" : {
"type" : "array",
"description" : "External identifier of tax category.",
"items" : {
"type" : "object",
"properties" : {
"id" : {
"type" : "string",
"description" : "Identifies the tax category identifier."
},
"schemeId" : {
"type" : "string",
"description" : "Identifies the namespace of the tax category identifier."
},
"name" : {
"type" : "string",
"description" : "Tax category description."
},
"percent" : {
"type" : "number",
"description" : "Identifies the tax rate for this category, expressed as a percentage"
},
"taxExemptionReasonCode" : {
"type" : "string",
"description" : "Identifies the reason for tax being exempted, expressed as a code."
},
"taxExemptionReason" : {
"type" : "string",
"description" : "Identifies the reason for tax being exempted, expressed as text."
}
}
},
"required" : [ "id" ],
"additionalProperties" : false
}
}
},
"required" : [ "chargeIndicator", "amount" ]
},
"customFields" : {
"description" : "Custom fields in the business document. Disclaimer! Use of a custom field assumes that the recipient can handle the custom fields. Before using custom field Basware needs to be contacted to assure the delivery of these fields. Additional changes may be incurred due to the use of these fields. There is no guarantee that the recipient can handle the specified custom fields.",
"items" : {
"type" : "object",
"description" : "Custom fields in the business document",
"additionalProperties" : false,
"properties" : {
"name" : {
"type" : "string",
"description" : "Name of the custom field",
"default" : "file"
},
"value" : {
"type" : "string",
"description" : "Value of the custom field"
},
"description" : {
"type" : "string",
"description" : "The purpose of this field"
}
},
"required" : [ "name", "value" ]
}
},
"additionalItemProperties" : {
"description" : "Associates the item with a set of additional properties.",
"items" : {
"type" : "object",
"additionalProperties" : false,
"properties" : {
"name" : {
"type" : "string",
"description" : "The name of the Item Property."
},
"value" : {
"type" : "string",
"description" : "The value of the Item Property"
}
},
"required" : [ "name", "value" ]
}
}
},
"required" : [ "id", "lineExtension", "item" ]
}
}
},
"required" : [ "externalDocumentIdentifier", "issueDate", "accountingSupplierParty", "accountingCustomerParty", "legalMonetaryTotal", "documentLines" ]
}
},
"required": [
"clientToken",
"documentType",
"data"
]
}
Response code 400 - Bad Request. The server cannot or will not process the request. Bad request due to invalid request syntax or invalid request message framing.
Response example for the response code above
{
"error": {
"id": "c842c9c3-75e5-4c32-ae3f-c1fe250fc186",
"type": "VALIDATION",
"message": "Business document identifier bumId does not match the pattern :[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}",
"code": "Error.004.0003",
"info": "Contact Basware Support http://www.basware.com/contact and provide them with the error ID and the error code you encountered. Basware support will investigate the cause of the error."
}
}
Response code 500 - Internal Server Error. The server encountered an unexpected condition, which prevented it from fulfilling the request.
Response example for the response code above
{
"error": {
"id": "a312a9b3-35e5-1a32-be3f-a5fe250fc121",
"type": "TECHNICAL",
"message": "BCN encountered an unexpected system error",
"code": "Error.001.0006",
"info": "Contact Basware Support http://www.basware.com/contact and provide them with the error ID and the error code you encountered. Basware support will investigate the cause of the error."
}
}
You can send invoices to a recipient through Basware Network using the POST invoices method.
Request URI
https://api.basware.com/v3/invoices/{bumId}
URI Parameters
Param Name | Type | Required | Example | Description |
---|---|---|---|---|
bumId | string | true | 6741ecc7-848a-443c-83ad-ea95e4df06fa | Unique UUID for invoice |
Request Headers
Param Name | Required | Example | Description |
---|---|---|---|
Content-Type | true | application/json | Specifies media types which are acceptable for the request. Value application/json is supported. |
Accept | false | application/json | Specifies media types which are acceptable for the response. Value application/json is supported. |
X-BW-REQUEST-ID | false | 7fc7d038-4306-4fc5-89c3-7ac8a12a30d0 | Client generated UUID value for identifying request-response flow. Disclaimer. This value is highly recommended to be included. Production support for this request is not possible if this value is missing. |
Query Parameters
Param Name | Required | Example | Description |
---|---|---|---|
action | false | Optional parameter to define what action will be performed. The default action is to the business document will be delivered immediately. Possible values are startDelivery (default), store. |
Responses
Response code | Description |
---|---|
201 | The request has been fulfilled successfully and new resource is created on server. |
400 | Bad Request. The server cannot or will not process the request. Bad request due to invalid request syntax or invalid request message framing. |
401 | Unauthorized. The request has not been serviced, the request is unauthorized as it lacks valid authentication credentials (UserName/Password). |
403 | Forbidden. The server understood the request, but is refusing to fulfill it. |
409 | Conflict. The request could not be completed due to a conflict with the current state of the target resource. |
415 | Unsupported Media Type. The server is refusing to service the request because the payload is in an unsupported format. |
500 | Internal Server Error. The server encountered an unexpected condition, which prevented it from fulfilling the request. |
API for Credit Notes v2
CreditNotes
The Credit Note API lets you send credit notes through Basware Network to a recipient. If you need to add attachments to your credit note, you can deliver those, too, using the Files API.
GET
GET /creditNotes/{bumId} HTTP/1.1
Accept: application/json
Authorization: Basic dXMlbjp1c2Vy
X-BW-REQUEST-ID: 1204edd0-ff8d-11e4-a322-1697f925ec7b
Response code 200 - The request has been completed successfully.
Response example for the response code above
{
"bumId": "fedd8dec-af24-430e-8944-a056474816c2",
"fileRefs": [
{
"refId": "539a583684aed4025464947d",
"fileType": "imageFile"
},
{
"refId": "516a255684aed4025464947d",
"fileType": "attachmentFile"
}
],
"links": [
{
"rel": "file",
"href": "https://api.basware.com/v2/files/539a78446842ed4025464947d",
"method": "GET"
},
{
"rel": "file",
"href": "https://api.basware.com/v2/files/516a255684aed4025464947d",
"method": "GET"
}
],
"origin": {
"source": "SendingCustomer",
"sourceContentCategory": "StructuredData",
"sourceChannelCategory": "Electronic",
"processQualityIndicators": [
"ContentValidation",
"StructuralValidation"
]
},
"data": {
"externalDocumentIdentifier": {
"id": "56328230"
},
"issueDate": "2017-05-01",
"documentCurrencyCode": "EUR",
"contractDocumentReferences": [
{
"id": "147217"
}
],
"accountingSupplierParty": {
"partyName": "Acme Supplier Inc.",
"postalAddress": {
"addressLine": "1800 Main Street",
"cityName": "Dallas",
"postalZone": "75201",
"countrySubentity": "TX",
"countryId": "US"
}
},
"accountingCustomerParty": {
"partyName": "Acme Buyer N.V.",
"postalAddress": {
"addressLine": "Sint Gummarusstraat 53",
"cityName": "Antwerpen",
"postalZone": "2060",
"countryId": "BE"
}
},
"deliveryParty": {
"partyName": "Parcels United",
"postalAddress": {
"addressLine": "1 Back Lane",
"locality": "Clayton West",
"cityName": "HUDDERSFIELD",
"postalZone": "HD8 9PP",
"countryId": "UK"
}
},
"paymentMeans": {
"financialAccounts": [
{
"financialInstitutionName": "OKOYFIHH",
"ids": [
{
"id": "FI8650000110001238",
"schemeId": "IBAN"
}
]
}
],
"paymentDueDate": "2015-06-30",
"paymentIdentifier": {
"id": "63156783578924"
},
"paymentMeansCode": "31"
},
"taxTotal": {
"amount": 89.56,
"currencyId": "EUR",
"taxSubtotals": [
{
"taxableAmount": 373.24,
"amount": 89.56,
"currencyId": "EUR",
"percent": 24
}
]
},
"buyerReference": {
"id": "PO-15512324"
},
"legalMonetaryTotal": {
"payableAmount": {
"amount": 462.8,
"currencyId": "EUR"
}
},
"creditNoteLines": [
{
"id": "1",
"quantity": {
"amount": 2,
"unitCode": "PCE"
},
"lineExtension": {
"currencyId": "EUR",
"amount": 93
},
"item": {
"description": [
"Basic High-Speed HDMI Cable - 25 Feet",
"Supports Ethernet, 3D, 4K and Audio Return"
],
"name": "High-Speed HDMI Cable",
"taxPercent": 10,
"sellersItem": {
"id": "B-341"
}
},
"taxTotals": [
{
"currencyId": "EUR",
"amount": 17.28,
"transactionCurrencyTax": {
"amount": 0.9
},
"taxSubtotals": [
{
"currencyId": "EUR",
"amount": 17.28,
"percent": 24
}
]
}
]
},
{
"id": "2",
"quantity": {
"amount": 1,
"unitCode": "PCE"
},
"lineExtension": {
"currencyId": "EUR",
"amount": 23.1
},
"item": {
"sellersItem": {
"id": "A-532"
},
"taxPercent": 10
},
"taxTotals": [
{
"currencyId": "EUR",
"amount": 5.54,
"transactionCurrencyTax": {
"amount": 0.9
},
"taxSubtotals": [
{
"currencyId": "EUR",
"amount": 5.54,
"percent": 24
}
]
}
]
}
]
}
}
Response schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Schema for GET /creditNotes",
"description": "Credit note is a business document related to an invoice.",
"type": "object",
"additionalProperties": false,
"properties": {
"bumId": {
"description": "Identifies the business document (Basware Unique Message Identifier). It is an unique identifier (UUID) that can be used by external systems to identify a business document.",
"pattern" : "^([0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})$"
},
"fileRefs": {
"items" : {
"type" : "object",
"additionalProperties" : false,
"properties" : {
"refId" : {
"type" : "string",
"description" : "Unique file identifier received after storing file into Basware Network."
},
"fileType" : {
"type" : "string",
"description" : "File type. Possible values are imageFile, attachmentFile and dataFile."
}
},
"required" : [ "refId", "fileType" ]
}
},
"links": {
"items" : {
"type" : "object",
"description" : "Links related to the business document",
"properties" : {
"rel" : {
"type" : "string",
"description" : "Relation type for the URL in question. Possible values are file.",
"default" : "file"
},
"href" : {
"type" : "string",
"description" : "Link between the completed call and a future call. The URI is a fully formed URI, which needs also the method field"
},
"method" : {
"type" : "string",
"enum" : [ "GET", "POST" ],
"description" : "HTTP methods required to interact with the provided URL",
"default" : "GET"
}
}
}
},
"origin": {
"additionalProperties" : false,
"properties" : {
"source" : {
"type" : "string",
"description" : "The originating source of the document. Possible values: SendingCustomer, ReceivingCustomer, ServiceProvider"
},
"sourceContentCategory" : {
"type" : "string",
"description" : "Indicates the source content. If the content is structured data, the data quality is higher. Possible values: Image, StructuredData, UnstructuredData"
},
"sourceChannelCategory" : {
"type" : "string",
"description" : "Indicates the source channel of the business document. Possible values: PostalMail, ElectronicMail, Electronic"
},
"processQualityIndicators" : {
"type" : "array",
"description" : "The quality phases the document has gone through",
"items" : {
"type" : "string",
"description" : "Possible values: HumanSelfValidation, HumanValidation, StructuralValidation, ContentValidation"
}
}
}
},
"data": {
"type": "object",
"additionalProperties": false,
"description": "Object holding the business content of the Credit Note. Content is at some level based on Universal Business Language (UBL) standard version 2.1. It has also been extended by Basware so it is not strictly UBL.",
"properties": {
"externalDocumentIdentifier": {
"description": "External system identifier of the business document. Serial number that is issued once only by invoice issuer to identify the credit note.",
"properties" : {
"id" : {
"type" : "string",
"description" : "Identifies the value."
},
"schemeId" : {
"type" : "string",
"description" : "Identifies the namespace of the id."
}
},
"required" : [ "id" ],
"additionalProperties" : false
},
"issueDate": {
"type": "string",
"description": "The date when the Credit Note was issued. Valid values must be 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 time zone is not known, it must be left empty.",
"pattern": "^(-?(?:[1-9][0-9]*)?[0-9]{4})-(1[0-2]|0[1-9])-(3[0-1]|0[1-9]|[1-2][0-9])(Z|[+-](?:2[0-3]|[0-1][0-9]):[0-5][0-9])?$"
},
"documentCurrencyCode": {
"type": "string",
"description": "Currency presentation of the Credit Note document. Valid values must be ISO 4217 Alpha format."
},
"note": {
"type": "string",
"description": "Free-form text pertinent to this document, conveying information that is not contained explicitly in other structures."
},
"allowanceCharges": {
"additionalProperties" : false,
"items" : {
"type" : "object",
"properties" : {
"changeIndicator" : {
"type" : "boolean",
"description" : "Indicates whether the allowance charge is a charge (true) or a discount (false)."
},
"allowanceChargeReasonCode" : {
"type" : "string",
"description" : "A mutually agreed code signifying the reason for this allowance or charge. Valid values are defined in UN/ECE CEFACT Trade Facilitation Recommendation 4465 Adjustment reason description code"
},
"allowanceChargeReason" : {
"type" : "string",
"description" : "The reason for this allowance or charge."
},
"multiplierFactorNumeric" : {
"type" : "number",
"description" : "The factor applied to the base amount to calculate the allowance charge."
},
"amount" : {
"type" : "number",
"description" : "The allowance charge amount."
}
},
"required" : [ "changeIndicator", "amount" ]
}
},
"isIssuedAgainstOrder": {
"type": "boolean",
"description": "Indicates whether the business document is issued against an order."
},
"orderReference": {
"description": "Order reference on the business document.",
"additionalProperties" : false,
"properties" : {
"id" : {
"type" : "string",
"description" : "Order number reference on the business document. Identifies the referenced order assigned by the buyer."
},
"schemeId" : {
"type" : "string",
"description" : "External system specific identifier of the order system identifier element. If the source business document has any matching element, it should be used."
},
"customerReference" : {
"type" : "string",
"description" : "Customer Reference Identifier (CRI) when using a purchasing card."
},
"salesOrderId" : {
"type" : "string",
"description" : "Sales order identifier."
}
},
"required" : [ "id" ]
},
"billingReference": {
"description": "External system identifier object for the billing entity referenced by the business document.",
"additionalProperties" : false,
"properties" : {
"id" : {
"type" : "string",
"description" : "External system identifier of the billing entity referenced by the Business Document."
},
"schemeId" : {
"type" : "string",
"description" : "External system specific identifier of the billing reference system identifier element. If the source business document has any matching element, it should be used."
}
},
"required" : [ "id" ]
},
"contractDocumentReferences": {
"description": "External system identifiers for the contracts referenced by the business document.",
"items" : {
"type" : "object",
"additionalProperties" : false,
"properties" : {
"id" : {
"type" : "string",
"description" : "External system identifier of the contract referenced by the Business Document (i.e. buyers contract number). Mandatory field if the customer demands that the goods or services invoiced refer to a contract number defined by the customer to which he wants to assign the Business Document. Is demanded for example in service and maintenance agreements for which there is generally no explicit order."
},
"schemeId" : {
"type" : "string",
"description" : "External system specific identifier of the contract system identifier element. If the source business document has any matching element, it should be used."
}
},
"required" : [ "id" ]
}
},
"additionalDocumentReference": {
"description": "A reference to an additional document associated with this document. Used for example to reference to an Invoice from Credit Note.",
"additionalProperties" : false,
"properties" : {
"id" : {
"type" : "string",
"description" : "An identifier for the referenced document (i.e. bumid)."
},
"schemeId" : {
"type" : "string",
"description" : "External system specific identifier of the invoicing system identifier element. If the source business document has any matching element, it should be used."
},
"issueDate" : {
"type" : "string",
"description" : "Date when the referenced document was issued. Valid values must be 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 time zone is not known, it must be left empty.",
"pattern" : "^(-?(?:[1-9][0-9]*)?[0-9]{4})-(1[0-2]|0[1-9])-(3[0-1]|0[1-9]|[1-2][0-9])(Z|[+-](?:2[0-3]|[0-1][0-9]):[0-5][0-9])?$"
},
"typeCode" : {
"type" : "string",
"description" : "The type of document being referenced, expressed as a code, for example to reference to an Invoice document, code is 380."
}
},
"required" : [ "id" ]
},
"accountingSupplierParty": {
"description": "Party that is the accountable supplier of the goods/services in the referred business document.",
"properties" : {
"endpoint" : {
"type" : "object",
"additionalProperties" : false,
"description" : "An array holding the external system identifiers of the party. Used for defining customer, supplier and delivery party data.",
"properties" : {
"id" : {
"type" : "string",
"description" : "Identifier for the endpoint. See API documentation for more details about the endpoints."
},
"schemeId" : {
"type" : "string",
"description" : "External global identifier of the id identifier element. See API documentation for more details about the endpoint scheme identifiers."
}
},
"required" : [ "id" ]
},
"partyIdentifications" : {
"type" : "array",
"description" : "An array holding the external system identifiers of the party. Used for defining customer, supplier and delivery party data.",
"items" : {
"type" : "object",
"description" : "An object holding a party identification.",
"properties" : {
"id" : {
"type" : "string",
"description" : "An object holding the external system identifier of the party."
},
"schemeId" : {
"type" : "string",
"description" : "External global identifier of the id identifier element."
}
},
"required" : [ "id" ],
"additionalProperties" : false
}
},
"partyName" : {
"type" : "string",
"description" : "A name of the party. Used for defining supplier, customer and delivery party names."
},
"postalAddress" : {
"description" : "An object containing address information. Used for defining supplier party, customer party and delivery party address data.",
"properties" : {
"cityName" : {
"type" : "string",
"description" : "The name of the city, town or village in the postal address of the party."
},
"postalZone" : {
"type" : "string",
"description" : "The postal code of the area in the postal address of the party. The identifier for an addressable group of properties according to the relevant national postal service, such as a ZIP code or Post Code."
},
"addressLine" : {
"type" : "string",
"description" : "The address line of the postal address of the party."
},
"addressLine2" : {
"type" : "string",
"description" : "The second address line of the postal address of the party."
},
"addressLine3" : {
"type" : "string",
"description" : "The third address line of the postal address of the party."
},
"locality" : {
"type" : "string",
"description" : "Neighbourhood or district within town or city. Required in UK if a similar road name exists within a post town area."
},
"countrySubentity" : {
"type" : "string",
"description" : "The sub-entity of the area in the postal address."
},
"countryId" : {
"type" : "string",
"description" : "The country of the postal address of party. Valid values: ISO3166-1 alpha-2 values can be used."
}
},
"additionalProperties" : false
},
"partyTaxScheme" : {
"type" : "object",
"description" : "Information about taxes. Notice that only one tax scheme is used, although there could be multiple.",
"properties" : {
"company" : {
"type" : "object",
"description" : "Information about the company taxes.",
"properties" : {
"id" : {
"type" : "string",
"description" : "A tax identifier for a company. The identifier assigned for tax purposes to a party by the taxation authority."
},
"schemeId" : {
"type" : "string",
"description" : "External global identifier of the endpoint identifier element. Valid values: Country specific agency schema, example DK:CVR for Denmark."
}
},
"additionalProperties" : false
}
},
"additionalProperties" : false
},
"contact" : {
"type" : "object",
"description" : "An object containing information about contacts. Used for defining the company contact data",
"properties" : {
"name" : {
"type" : "string",
"description" : "A contact name of the party."
},
"telephone" : {
"type" : "string",
"description" : "A telephone number of the contact of the party."
},
"telefax" : {
"type" : "string",
"description" : "A fax number of the contact of the party."
},
"electronicMail" : {
"type" : "string",
"description" : "An email of the contact of the party."
}
},
"additionalProperties" : false
}
},
"required" : [ "partyName" ],
"additionalProperties" : false
},
"accountingCustomerParty": {
"description": "Party that is the accountable buyer of the goods/services in the referred business document.",
"properties" : {
"endpoint" : {
"type" : "object",
"additionalProperties" : false,
"description" : "An array holding the external system identifiers of the party. Used for defining customer, supplier and delivery party data.",
"properties" : {
"id" : {
"type" : "string",
"description" : "Identifier for the endpoint. See API documentation for more details about the endpoints."
},
"schemeId" : {
"type" : "string",
"description" : "External global identifier of the id identifier element. See API documentation for more details about the endpoint scheme identifiers."
}
},
"required" : [ "id" ]
},
"partyIdentifications" : {
"type" : "array",
"description" : "An array holding the external system identifiers of the party. Used for defining customer, supplier and delivery party data.",
"items" : {
"type" : "object",
"description" : "An object holding a party identification.",
"properties" : {
"id" : {
"type" : "string",
"description" : "An object holding the external system identifier of the party."
},
"schemeId" : {
"type" : "string",
"description" : "External global identifier of the id identifier element."
}
},
"required" : [ "id" ],
"additionalProperties" : false
}
},
"partyName" : {
"type" : "string",
"description" : "A name of the party. Used for defining supplier, customer and delivery party names."
},
"postalAddress" : {
"description" : "An object containing address information. Used for defining supplier party, customer party and delivery party address data.",
"properties" : {
"cityName" : {
"type" : "string",
"description" : "The name of the city, town or village in the postal address of the party."
},
"postalZone" : {
"type" : "string",
"description" : "The postal code of the area in the postal address of the party. The identifier for an addressable group of properties according to the relevant national postal service, such as a ZIP code or Post Code."
},
"addressLine" : {
"type" : "string",
"description" : "The address line of the postal address of the party."
},
"addressLine2" : {
"type" : "string",
"description" : "The second address line of the postal address of the party."
},
"addressLine3" : {
"type" : "string",
"description" : "The third address line of the postal address of the party."
},
"locality" : {
"type" : "string",
"description" : "Neighbourhood or district within town or city. Required in UK if a similar road name exists within a post town area."
},
"countrySubentity" : {
"type" : "string",
"description" : "The sub-entity of the area in the postal address."
},
"countryId" : {
"type" : "string",
"description" : "The country of the postal address of party. Valid values: ISO3166-1 alpha-2 values can be used."
}
},
"additionalProperties" : false
},
"partyTaxScheme" : {
"type" : "object",
"description" : "Information about taxes. Notice that only one tax scheme is used, although there could be multiple.",
"properties" : {
"company" : {
"type" : "object",
"description" : "Information about the company taxes.",
"properties" : {
"id" : {
"type" : "string",
"description" : "A tax identifier for a company. The identifier assigned for tax purposes to a party by the taxation authority."
},
"schemeId" : {
"type" : "string",
"description" : "External global identifier of the endpoint identifier element. Valid values: Country specific agency schema, example DK:CVR for Denmark."
}
},
"additionalProperties" : false
}
},
"additionalProperties" : false
},
"contact" : {
"type" : "object",
"description" : "An object containing information about contacts. Used for defining the company contact data",
"properties" : {
"name" : {
"type" : "string",
"description" : "A contact name of the party."
},
"telephone" : {
"type" : "string",
"description" : "A telephone number of the contact of the party."
},
"telefax" : {
"type" : "string",
"description" : "A fax number of the contact of the party."
},
"electronicMail" : {
"type" : "string",
"description" : "An email of the contact of the party."
}
},
"additionalProperties" : false
}
},
"required" : [ "partyName" ],
"additionalProperties" : false
},
"buyerCustomerParty": {
"description": "Party that is the buyer of the goods/services in the referred business document.",
"properties" : {
"endpoint" : {
"type" : "object"