How to get started and get the necessary keys to set up the integration is explained in our Integration guide
You will also also find there feature specific guides for sending, receiving, companies and settings, services and networks and billing that list what API method to use for different tasks.
Endpoints
You can send AutoInvoice SOAP messages over SSL secured HTTP protocol to the endpoints below.
Note that authenticated SOAP requests are only accepted over SSL.
The AutoInvoice WSDL, which describes the AutoInvoice API in a machine-readable way, is available for
Authenticity is verified by a Personal API key, which is validated on each request to the AutoInvoice Webservice.
See API keys for more information of the keys and how to get them.
Firewall and ports
Our service operates the address:
https://autoinvoice.visma.com:443
All communication is on port 443 (over SSL). There is no firewall whitelisting required from our side, you can connect from anywhere as soon as you have the API keys.
Encoding
When interacting with AutoInvoice, AutoInvoice expects that all content is UTF-8 encoded! Any other format will result as garbage. AutoInvoice does not check or correct your input. Therefore, you must make sure that all information is sent using the correct encoding.
For invoice XML please see the XML format specific guidelines for the correct encoding. In example Finvoice is encoded as ISO 8859-15.
More info about UTF-8 from is available at utf-8.com
Response Content Type
The response indicates the response type in the HTTP Content-Type header.
Content-Type: text/xml;charset=utf-8
Date formats
All dates in AutoInvoice API are strings in YYYYMMDD-format. For example 20180425.
This format shall be used when communicating through AutoInvoice API.
Error return values
Note! A word with a @-sign in front is a changing variable in the return values.
Return values inside square brackets [ ] are arrays.
All methods can fail with these status errors:
Error
Description
ERROR: VENDOR API KEY DISABLED
Software vendor has disabled the use of this vendor api key
ERROR: USER NOT ACTIVATED
User account must be activated by visiting the activation link in the activation email
ERROR: USER HAS NO RIGHTS TO COMPANY
Current user has no rights to company with id given in company_uuid
ERROR: USER BELONGS TO MULTIPLE COMPANIES, NO COMPANY ID GIVEN
No company_uuid given
ERROR: USER NOT FOUND
API key not found
ERROR: COMPANY NOT FOUND
Given company_uuid not found
ERROR: COMPANY ACCOUNT IS LOCKED
Company’s account has been locked for some reason (e.g. too many disputes)
ERROR: COMPANY HAS NOT COMPLETED FIRST TIME WIZARD
API won’t work until the user that registered for AutoInvoice has completed the first time wizard
API methods
Updated lists of most relevant methods that are useful for new integrations. Detailed information of each method.
Most users will interact with AutoInvoice API using a SOAP toolkit tailored for their language and development environment. Different toolkits will expose the AutoInvoice API in different ways. Please refer to your specific toolkit documentation to understand how to use it. This section illustrates the AutoInvoice API SOAP operations in a toolkit-independent way by exhibiting the XML requests and responses as they appear “on the wire.”
Account configuration
Register, activate and fetch information about companies, view and set settings for a company.
Link and unlink companies to vendors. Integration guide for companies and settings
Find out if a company can receive electronic invoices through AutoInvoice or through external operators.
Send invoices successfully and get statuses. Integration guide for invoice sending
Here are details of all the recommended SOAP API methods.
b2c_issuer_agreement_order
For opening Norwegian B2C agreement for a company. Input is name and email address of a person with rights to accept such an agreement on behalf of the company.
That email address will receive the agreement by email as PDF and a link to accept the agreement with (Note! Does not require login).
ERROR: NO RIGHTS (Only admin user can order the agreement)
ERROR: signer_name or signer_email missing or invalid
ERROR: ocr_account_number is invalid
ERROR: ocr_kid_length is invalid
ERROR: ocr_reference_position syntax is invalid
ERROR: Bid check towards Nets failed
ERROR: Unexpected error
Examples
Example Ruby implementation
company_invoice_receiving
Enable/disable receiving of invoices. Read more about invoice receiving
/v1.1/api/company_invoice_receiving
Input
api_keysApiKeys
Key
Type
Description
company_uuid
string
UUID of current company
user_api_key
string
User API key
vendor_api_key
string
Partner software API key
Key
Type
Description
receive
boolean
Example API request
Output
Key
Type
Description
return
string
Example API response
Return values
Key
Type
Message
Description
return
string
OK
ERROR: USER NOT FOUND
ERROR: INVOICE RECEIVING CANNOT BE DISABLED WHEN SCAN ACCOUNT IS OPEN
ERROR: UNKNOWN ERROR
Examples
Example Ruby implementation
enable_operator
Enables operator connections that require it done separately. Currently needed for PEPPOL receiving.
/v1.1/api/enable_operator
Input
api_keysApiKeys
Key
Type
Description
company_uuid
string
UUID of current company
user_api_key
string
User API key
vendor_api_key
string
Partner software API key
operator_structOperatorStruct
Key
Type
Description
operator_id
string
Operator name/code. For peppol network use PEPPOL
enabled
boolean
Enable or disable. When set to false, will remove both invoice and credit note receiving
sender_id
string
Sender ID if needed (not needed for PEPPOL)
recipient_id
string
Recipient ID if needed (not needed for PEPPOL)
Example API request
Output
Key
Type
Description
status
string
Example API response
Return values
Key
Type
Message
Description
return
string
OK
ERROR: USER NOT FOUND
ERROR: [OPERATOR] CANNOT BE ENABLED WHILE RECEIVING INVOICES IS DISABLED
Examples
Example Ruby implementation
company_list
Used for listing all the companies user has access to.
/v1.1/api/company_list
Input
api_keysApiKeys
Key
Type
Description
company_uuid
string
UUID of current company
user_api_key
string
User API key
vendor_api_key
string
Partner software API key
Example API request
Output
returnCompanyParamsOutArray (Array of CompanyParamsOut)
Key
Type
Description
email
string
status
string
user_api_key
string
name
string
maventa_uuid
string
maventa_id
string
bid
string
id
string
country
string
Example API response
Return values
Key
Type
Message
Description
status
string
OK
ERROR: USER NOT FOUND
ERROR: UNKNOWN ERROR
Examples
Example Ruby implementation
company_lookup_with_operator
Used for finding recipient’s invoicing information from AutoInvoice, it doesn’t do any external lookups. Differs from company_lookup only by returning also operator_code inside edis value.
Search string can be company name, BID (organisation number), VAT code or e-invoice address (EDI, OVT, EAN, GLN…)
country_code
string
Limit hits to specific country. If left blank, returns hits from all countries
limit
int
Maximum number of results to return, default 20 and maximum 200
disable_vies
boolean
Disable external directory lookup fallback when no results from AutoInvoice Network. If set to false or left blank, AutoInvoice will do queries on external services if no match is found in AutoInvoice Finder, this might slow down query.
ElectronicInvoiceAddress content is two strings, ‘eia’ with the electronic invoice address and ‘operator_code’
name
string
state
string
post_code
string
post_office
string
maventa_id
string
bid
string
address1
string
country
string
address2
string
receive_invoices
boolean
Can only be true for AutoInvoice network users (e.g. maventa_id field is not blank), for all others this is always false and does not necessarily mean they cannot receive e-invoices
receive_orders
boolean
Only applies for AutoInvoice network users
Example API response
Return values
Key
Type
Message
Description
status
string
OK
ERROR: NO RESULTS
ERROR: TOO MANY RESULTS
If result set contains more than 200 hits
ERROR: SEARCH STRING BLANK OR TOO SHORT (MIN 3 CHARS)
Website of company, displayed on invoice (depending on sending format)
print_and_send_request
int
Print&Send enabled request (1=yes,0=no)
print_and_send_letter_class
integer
Print&Send mail class (1 = Priority, 0 = Economy). Only available for FI and NL companies!
print_and_send_own_pdf
boolean
Use own PDF images in Print&Send.
print_and_send_color
boolean
Print with colors in Print&Send
print_attachments
boolean
Enable printing of attachments (true = enabled, false = disabled) The inverse setting, print_attachments_disabled, is also still supported for legacy reason (only one of these parameters should be used). Note! This setting only applies for FI, NO and NL companies. Printing of attachments is by default enabled for NO and NL companies, and disabled for FI companies.
email_remind_freq
int
Frequency of email reminder’s for open invoices in days (e.g. 2)
email
string
Company email
invoice_email
string
Company invoice email (inbound invoice notifications)
errors_to_user
int
Send invoice relay errors to users or just error email? (1=yes,0=no)
error_emails
string
List of comma separated error emails to notify of invoice relay errors
List of comma separated email addresses to send reports to
name
string
Name of company, name can’t be empty and minimum lengt three(3) characters
stop_duplicates
boolean
Prevent (re)sending invoices with the same number
notify_incoming
boolean
Enable/disable email notification of incoming invoice. Will be sent to invoice email if defined, else company email
disable_email
boolean
Enable/disable sending of invoices by email notification. If this is set to true, invoices will only go out as e-invoices or by print. If the only available route for an invoice is email, the invoice will go to error state
notifications_disabled
int
Enable/disable all e-mail notifications to the company email address, (1=disable, 0=enable)
internal_receive_via_peppol
boolean
Enable/disable internal receive via Peppol. When enabled, all invoices received from companies inside the home network will be converted to EHF/ PEPPOL BIS, routed through the PEPPOL network and validated towards PEPPOL validation rules. If the invoice fails PEPPOL validation, sender will receive an error message and the invoice will not be delivered.
send_email_attachments
int
With this option we add the invoice image (as PDF) and other attachments on your invoices which get sent by email (total size max 5 megabytes, if larger, recipient is asked to download the attachments from our service using a link provided). Note! You will not get an acknowledgement of receival when sending attachments like for normal email invoices. Also note that when sending attachments the recipient’s email box might get full and then emails are not delivered.
send_invoice_email
int
With this option you can decide how the email invoice is sent out. 0 = Do not send invoice via email. 1 = send all invoice e-mails with attachments (max size 5MB). 2 = Send all invoice e-mail with invoice objections. 3 = Send all invoice e-mails with a link to download PDF. 4 = Send all invoice e-mails with attachments (max size 5MB), all PDF attachments and the invoice image merged together in a single PDF file. Note! This setting will override send_email_attachments and disable_email settings
receive_finvoice2
int
Enable/disable receiving finvoice 2.x. With this option you can make both the API and UI return Finvoice documents with version 2.0 and higher. When off, it will return version 1.3 or earlier.
Invoicing EIA (Billing information: The delivery method priority is following 1 = einvoice, 2 = email, 3 = print, if all below values are given. If company prefers Invoicing via normal post, invoicing_eia, invoicing_operator and invoicing_email should be left blank).
invoicing_operator
string
Invoicing operator
invoicing_email
string
Invoicing email address
invoicing_street_address1
string
Invoicing postal address
invoicing_street_address2
string
Invoicing additional postal address
invoicing_post_code
string
Invoicing post code
invoicing_post_office
string
Invoicing post office
billing_company_id
string
Company to be set as a billing company
message_from_sender
string
Only for Norway. Write a message to the invoice receivers that is visible in the recipients e-mail. Note! If your ERP supports their own message to receiver, the message in the ERP will overwrite this message.
b2c_fallback
string
Only for B2C NO, can be print or email
b2c_reminder
boolean
Enable/disable B2C NO reminders
contact_person
string
Contact person, email and phone are shown in the email message when invoice is sent by email
contact_email
string
Contact person, email and phone are shown in the email message when invoice is sent by email
contact_phone
string
Contact person, email and phone are shown in the email message when invoice is sent by email
scan_notification_interval
string
Supplier Activation e-mail interval (Use one of the following to activate the service: ”monthly”, ”weekly”, ”daily”, or to disable the service use something else for example ”disabled”)
scan_notification_email
string
E-mail address for Supplier Activation e-mail delivery
Example API request
Output
Key
Type
Description
return
string
Example API response
Return values
Key
Type
Message
Description
return
string
OK
Settings saved successfully
ERROR: NO RIGHTS TO CHANGE SETTINGS
Only admin user can change settings
ERROR: COULD NOT SAVE COMPANY SETTINGS
Could not save settings for unknown reason
ERROR: BILLING E-INVOICING DETAILS INCOMPLETE
E-invoicing address is incomplete: e-invoicing address (invoicing_eia) or operator (invoicing_operator) missing
ERROR: BILLING EMAIL ADDRESS INVALID
Email address is not valid
ERROR: BILLING INFORMATION INCOMPLETE
Invoicing postal address is incomplete; address, postcode or postoffice is missing
ERROR: Cannot update billing company for partner accounts
Partner account can't have billing company
ERROR: Company cannot be set as its own billing company
ERROR: Company is set as a billing company for another company
ERROR: Company is linked to an accounting office, billing company cannot be changed
ERROR: Invalid billing_company_id
ERROR: VAT NUMBER CANNOT BE SET TO BLANK
ERROR: INVOICE RECEIVING VALUE IS INVALID
ERROR: INVOICE RECEIVING CANNOT BE DISABLED WHEN SCAN ACCOUNT IS OPEN
ERROR: B2C REMINDER INVALID
Examples
Example Ruby implementation
consumer_agreement_status
Checking status of an existing consumer agreement.
Specify 1-n formats for download. If the original file being downloaded is any of the specified formats, the original file is returned. Otherwise the first format of the array is returned. Supported formats: finvoice finvoice20 finvoice30 teapps teapps30 ubl liinos svefaktura sedi ehf ehf20 vismaxml vismaxml60 e2b woodx axflow facturae bgc peppolbis20 peppolbis30 siubl siubl12 siubl20 vismaubl vismaubl30
include_metadata
boolean
Return invoice related information in the metadata. See the fields included in the metadata from the example response below
If there is no original invoice image specified, setting this to true creates a custom AutoInvoice invoice image PDF based on the invoice XML data. False by default.
Array of attachments. Contains always the invoice XML. For XML formats not supporting embedded attachments, image and attachments are returned as separate objects. For XML formats supporting embedded attachments, the original attachments are returned only embedded to the XML file. With the exception that if the generate_image_if_missing is set as true, then the image we have created will be returned as a separate attachment, and not embedded into the XML file.
Information about the invoice, that may be used for invoice handling related controls. Returned only if requested.
attachmentsFileAttachmentArray
Key
Type
Description
attachment_type
string
For invoice XML value is the XML format requested e.g. PEPPOLBIS30. For invoice image, INVOICE_IMAGE and for other attachments ATTACHMENT
filename
string
Original or service generated filename
file
base64
File contents in base64 format
metadataInvoiceDownloadMetadata
Key
Type
Description
origin
string
Source of the invoice, either EINVOICE or SCAN
original_format
string
Original XML format, value is empty if requested format is same as invoice’s original format
company_name
string
Sender company name
company_bid
string
Sender company business identifier
invoice_nr
string
reference_nr
string
sum
string
Invoice total without VAT
sum_tax
string
Invoice total including VAT (payable amount)
currency
string
date
string
date_due
string
Example API response
Return values
Key
Type
Message
Description
status
string
OK
ERROR: INVOICE NOT FOUND OR NO RIGHTS
Requested invoice doesn't exist for the company
ERROR: USER NOT FOUND
ERROR: FORMAT NOT SUPPORTED
Invoice format specified is not supported
ERROR: INVOICE NOT COMPATIBLE WITH SELECTED FORMAT
Invoice format specified is not compatible with original invoice format
ERROR: VENDOR KEY MISSING
Invalid or no vendor key provided
Examples
Example Ruby implementation
invoice_list_between_dates
Used for getting list of outbound invoices. With timestamps its possible to recheck an intervall if there’s reason to believe something was missed or need to redownload invoices.
nil => open invoices, 1 => archived invoices, 2 => all invoices, 3 => invoices in error state
Example API request
Output
returnInvoiceParamsOutCArray
Key
Type
Description
status
string
Status
id
string
Invoice db-id
state
int
Invoice state
currency
string
Currency abbrevation
invoice_nr
string
Invoice number
order_nr
string
Order number
sum
string
Total sum without tax
sum_tax
string
Total sum with tax
delivery_date
string
Delivery date, YYYYMMDD
delivery_type
string
Delivery type (e.g. mail)
reference_nr
string
Invoice reference number
date
string
Invoicing date, YYYYMMDD
date_due
string
Invoice due date, YYYYMMDD
company_interest
string
Company’s interest rate (e.g. 11.5)
company_reminder
string
Company’s reminder fee in invoices currency (e.g. 5.50)
company_paper_fee
string
Company’s paper fee, added if customer requests paper invoice (e.g. 3.25)
customer_reference
string
Reference for customer (“Viitteenne”)
company_reference
string
Reference for company (“Viitteemme”)
company_comment
string
Comment for email invoice
customer_comment
string
Customer comment (from decline invoice)
notes
string
Additional information for invoice
lang
string
Language code for invoice (e.g. ‘FI’)
customer_nr
string
Customer number
customer_name
string
Name
customer_email
string
Email
customer_bid
string
Business ID, VAT, etc
customer_contact_p
string
Contact person’s name
customer_address1
string
First line of street address
customer_address2
string
Second line of street address
customer_post_code
string
Postal code
customer_post_office
string
Postal office
customer_state
string
State
customer_country
string
Country (e.g. ‘FI’)
customer_ovt
string
EDI-code (OVT)
work_order_nr
string
Work order nr
payment_terms
string
Payment terms
Example API response
Return values
Key
Type
Message
Description
status
string
OK
ERROR: TIMESTAMP START FORMAT ERROR
ERROR: TIMESTAMP END FORMAT ERROR
Examples
Example Ruby implementation
invoice_list_ids
Used for getting a list of invoice id’s. Otherwise the same as invoice_list_between_dates and invoice_list_inbound_between_dates but a lot faster as it only returns the invoice id’s.
/v1.1/api/invoice_list_ids
Input
api_keysApiKeys
Key
Type
Description
company_uuid
string
UUID of current company
user_api_key
string
User API key
vendor_api_key
string
Partner software API key (mandatory)
Key
Type
Description
direction
string
IN or OUT
timestamp_start
string
Start time for search, format “YYYYMMDDHHMMSS”
timestamp_end
string
End time for search, format “YYYYMMDDHHMMSS”
options
string
Not yet implemented any
Example API request
Output
returnInvoiceListIdsStruct
Key
Type
Description
status
string
Status of the API call
invoice_ids
Array
Invoice DB-id
Example API response
Return values
Key
Type
Message
Description
status
string
OK
ERROR: VENDOR API KEY MISSING
ERROR: VENDOR API KEY INVALID OR DISABLED
ERROR: TIMESTAMP START FORMAT ERROR
ERROR: TIMESTAMP END FORMAT ERROR
ERROR: TIMEFRAME TOO LONG
Max one month between start and end
ERROR: INVALID DIRECTION
ERROR: USER NOT FOUND
ERROR: Unexpected error
invoice_list_inbound_between_dates
Used for getting list of inbound invoices. With timestamps its possible to recheck an intervall if there’s reason to believe something was missed or need to redownload invoices. Recommended that ‘id’ of downloaded invoices is saved locally to be able to check for duplicates.
Used for creating new invoices from existing XML invoice files or ZIP files with XML files and attachments. Additional information can be given in metadata.
If the same information is given in invoice XML, metadata will override it.
Note! Version in the JSON struct should always be 1.1
Unique ID of invoice, to be used in method inbound_invoice_show
recipient_id
string
company_uuid of recipient company
timestamp
string
Timestamp when invoice was received on account, is what is checked against with the list methods timestamps
Example API response
Return values
Key
Type
Message
Description
status
string
OK
ERROR: TIMESTAMP START FORMAT ERROR
ERROR: TIMESTAMP END FORMAT ERROR
ERROR: NO RIGHTS TO VENDOR API KEY
Examples
Example Ruby implementation
register_with_password
This method is only for partners and requires a partner software API key.
It can be used to register new companies through the API with predefined password (if given).
Method returns a RegistrationParamsOutD struct which includes the new user’s API key, the company’s UUID and e-invoice address for receiving. This information can then be automatically updated to the software’s settings so the users do not need to input API key information by themselves.
Note!
If given user (e-mail) exists, API key will not be returned for security reasons. The user will then get access to the newly created company with the same user account. In this case the password will not be updated.
Before created account can be used for sending, receiving and activating services, customer authentication must be completed and account has to be verified.
Partner must make sure the user can read and understand the
Terms of Service
Supported VAT/Business ID/Organization number types per country are
Country
Type(s)
Description and example
FI
Y-TUNNUS, VAT
Finnish Business Identity Code: 1111112-8 or VAT id: FI11111128
SE
ORGNR, SSN
Swedish Business Identity Code: 212000-0142 or social security number id: 810101-3608 or 19810101-3608
NO
ORGNR
Norwegian Business Identity Code: 111111111
DK
CVR
Danish unique identifier for a business in Denmark’s Central Business Register: DK11111114
NL
KVK
Netherlands Chamber of Commerce (KVK) number: 00006662
EE
CC, VAT
Estonian Company Code: 11111116 or VAT id: EE100591422
BE
EN
Belgian organisation number (CBE): 0111111124
bank_accountsBankAccountParamsInArray
Bank accounts are not required for registration and needed only if invoicing format does not include bank account details
Key
Type
Description
account
string
default
boolean
iban
string
swift
string
bank
string
Key
Type
Description
user_password
string
If not given, random password will be generated. Minimum length 8 characters.
Example API request
Output
returnRegistrationParamsOutD
Key
Type
Description
status
string
company_uuid
string
user_api_key
string
company_maventa_id
string
Example API response
Return values
Key
Type
Message
Description
status
string
OK
ERROR: LICENSE AGREEMENT NEEDS TO BE ACCEPTED
ERROR: COUNTRY CODE INVALID
ERROR: REGISTRATION FAILED, BID ALREADY TAKEN
ERROR: VAT CHECK FAILED
ERROR: POSTAL ADDRESS MISSING REQUIRED INFORMATION
ERROR: USER PASSWORD INVALID
ERROR: USER DETAILS MISSING REQUIRED INFORMATION
ERROR: REGISTRATION FAILED
Examples
Example Ruby implementation
authorize_companies
Taking a new account into use requires that customer authentication process has been completed.
Integrator can use their own customer authentication process or AutoInvoice process provided by Visma Sign.
To complete customer authentication process use this method.
For Finnish companies the mehtod also initiates bank network opening.
Email to send the Visma Sign request to. The person signing will be strongly authenticated and should have signing rights or power of attorney to represent the company.
company_ids
stringarray
Array of company UUIDs to authorize. Admin user needs to have access to all of the companies given.
locale
string
Locale to use on the sign invitation email, Visma Sign portal, and agreement PDF. Currently supports FI, NO, SE, EN
options
string
Used to provide proof of customer authentication process. Mandatory when partner has own customer authentication process.
Expects authorization_method key and optional require_auth key. authorization_method - free text for explaining how customer authentication was done as well as giving an identifier(s) that links to event on partners side require_auth - true to send out Visma Sign document for signing even when integrator in general uses own customer authentication E.g. '{"authorization_method":"We have documents","require_auth":"true"}'
Output
Key
Type
return
string
Return values
Key
Type
Message
Description
return
string
OK: Visma Sign document sent
Invitation to sign has been sent to email given in the call. After signing is completed in Visma Sign service company status will change to verified.
OK: @x companies authorized
Company account has been set to verfied. Account can be used to sending, reseiving and activating services. Happens only when partner has own customer authentication process in use.
ERROR: COMPANY AUTHORIZATION STATUS MISMATCH
Given company / any of the given companies is already authorized.
ERROR: VENDOR API KEY CANNOT BE BLANK
ERROR: VENDOR API KEY INVALID OR DISABLED
ERROR: EMAIL ADDRESS INVALID
ERROR: LOCALE NOT SUPPORTED
Given locale (country) is not supported
ERROR: AMOUNT OF COMPANIES TO SIGN NEEDS TO BE BETWEEN 1 to 50
ERROR: UNKNOWN ERROR
company_auth_status
To check the company authorization status which tells if company has completed customer authentication process.
In order to start sending, receiving and activating services the company_state needs to be verified.
Visma Sign request state: SENT - Auth request sent to signer but not signed yet SIGNED - Auth request signed CANCELLED - Auth request has been cancelled, e.g. because time has expired PENDING - Auth request created but not sent to signer yet ERROR - Something unexpected has happened
auth_email
string
Email address used to sent the Visma Sign request to
Invitation to sign has been sent to email given in the call. After signing is completed in Visma Sign service company status will change to verified.
OK: Company authorized
Company account has been set to verfied. Account can be used to sending, reseiving and activating services. Happens only when partner has own customer authentication process in use.
OK: No authorization requests
No signing requests have been sent for the company
ERROR: Multiple scan accounts found, please contact support
ERROR: Unexpected error, contact customer support
Examples
Example Ruby implementation
scan_account_order
Open a new scan account for your company or for updating already existing one when called again. If first time ordering is successful, returns the scan address where suppliers send their invoices (paper or email). Note! It is very important to give suppliers the full returned scanning address. Also note that you cannot open a scan account if your account has receiving e-invoices turned off.
When called again for already existing scan account, will return OK: RETURN ADDRESS UPDATED
Note! User accepts the pricing including scan minimum fee when opening the account.
Your company’s postal address. Given to scan provider so they can return mail which is not proper invoices that have been sent to scanning address (like contracts etc.)
Key
Type
Description
name
string
address1
string
either address1 or address2 mandatory
address2
string
post_code
string
mandatory
post_office
string
mandatory
state
string
country
string
mandatory
email
string
for sending notifications in error situations, mandatory
Company’s scanning address (i.e the address suppliers should use when sending invoices)
addressScanAddress
Key
Type
Description
name
string
address1
string
For sending non-invoice material that has been sent to your scanning address and cannot be sent to your return email address (e.g. packages)
address2
string
post_code
string
post_office
string
state
string
country
string
email
string
For sending non-invoice material that has been sent to your scanning address
Example API response
Return values
Key
Type
Message
Description
status
string
OK
Scan account opened, return value includes address information of the new scan account
OK: RETURN ADDRESS UPDATED
ERROR: REGISTRATION FAILED
Unexpected error, contact support
ERROR: SCAN ACCOUNT EXISTS
Company already has a scan account, you can have only one
ERROR: SCAN ACCOUNT CURRENTLY AVAILABLE FOR FINNISH, NORWEGIAN, SWEDISH, DANISH AND DUTCH COMPANIES ONLY
ERROR: RETURN ADDRESS EMPTY OR INVALID
ERROR: RECEIVING INVOICES NOT ENABLED ON ACCOUNT
ERROR: INVALID SCAN RETURN EMAIL DOMAIN
ERROR: SCAN ACCOUNT ACTIVATION FAILED MAVENTA SUPPORT WILL CONTACT YOU TO RESOLVE THE ISSUE
The scan account activation has failed and you will be contacted to help resolve the issue an activate the account.
ERROR: SCAN ACCOUNT ACTIVATION IS PENDING
The scan account is pending activation before it will be available to use.
ERROR: COMPANY DATA MISSING
In order to activate the scan account please make sure your company address information is complete (address, postal code, city, email) and you have filled in the return addresses.
ERROR: UNKNOWN ERROR
Examples
Example Ruby implementation
scan_account_show
Show company’s scanning address (i.e the address suppliers should use when sending invoices).
Note! It is very important to give suppliers the full returned scanning address.
Used querying the status and possible error message of the sent invoices.
Note! The API method has a limitation on the age of invoices it can process. If the invoice is older than 2 years, the method will not function. Additionally, if more than 1000 IDs are provided, the limit is further reduced to 3 months.
Prevent (re)sending invoices with the same number (true/false)
notify_incoming
boolean
E-mail notification of incoming invoice (true/false)
disable_email
boolean
Sending of invoices by email notification. (true/false)
notifications_disabled
int
Enable/disable all e-mail notifications to the company email address, (1=disable, 0=enable)
internal_receive_via_peppol
boolean
Internal receiving via Peppol (true/false)
send_email_attachments
int
Send the invoice image as attachment (true/false)
send_invoice_email
int
Shows which email invoice sending method is in use. 0 = Do not send invoice via email. 1 = send all invoice e-mails with attachments (max size 5MB). 2 = Send all invoice e-mail with invoice objections. 3 = Send all invoice e-mails with a link to download PDF. 4 = Send all invoice e-mails with attachments (max size 5MB), all PDF attachments and the invoice image merged together in a single PDF file. Note! This setting will override send_email_attachments and disable_email settings
receive_finvoice2
int
Receiving finvoice 2.x (1=yes,0=no)
invoice_receiving
int
Invoice receiving status, (1=enabled, 0=disabled)
invoicing_eia
string
invoicing EIA
invoicing_operator
string
invoicing operator.
invoicing_email
string
invoicing email address.
invoicing_street_address1
string
invoicing postal address.
invoicing_street_address2
string
invoicing additional postal address.
invoicing_post_code
string
invoicing post code.
invoicing_post_office
string
invoicing post office.
billing_company_id
string
Billing company id that handles the invoicing of the company
print_and_send_enabled
string
Print&Send enabled (true/false)
vat_number
string
Is the Norwegian company VAT registered, returns the VAT number
default_receive_vendor_api_key
string
Default vendor API key for receiving
default_send_vendor_api_key
string
Default vendor API key for sending
peppol_id
string
Peppol ID for the company
bank_send
string
Is the bank network connection open or not (true/false)
Message from sender that is visible in the e-mail invoices
scan_return_email
string
Email address for returned scan material if scan account exists (active or disabled)
scan_return_postal
string
Postal address for returned scan material if scan account exists (active or disabled)
b2c_fallback
string
Shows B2C NO fallback route . (print/email)
b2c_reminder
boolean
Shows if B2C NO reminders are enabled or disabled. (true/false)
contact_person
string
Shows contact person that is shown in the email message when invoice is sent by email
contact_email
string
Shows contact email that is shown in the email message when invoice is sent by email
contact_phone
string
Shows contact phone that is shown in the email message when invoice is sent by email
scan_notification_interval
string
Supplier Activation e-mail interval (Service is enabled if one of the following is returned: ”monthly”, ”weekly”, ”daily” or disabled if ”disabled”
scan_notification_email
string
E-mail address for Supplier Activation e-mail delivery
Example API response
Return values
Key
Type
Message
Description
status
string
OK
Examples
Example Ruby implementation
token_login
Returns a URL to access the web UI without needing to login.
Currently supports service parameter: FI_BANK_NETWORK_OPEN for opening Finnish bank network and COMPANY_SETTINGS for accessing setting page for given company.
ERROR: COMPANY NOT ASSIGNED TO GIVEN VENDOR API KEY
Examples
Example Ruby implementation
update_logo
Used for uploading company logo to AutoInvoice for PDF template output when PDF template is not generated in ERP. Most image formats are supported but not PDF. JPEG or PNG is preferred.
PNG with transparency is not supported.
Used for creating a new or adding an existing user to a company.
After a new user creation an activation message will be sent to the given email address. This message will also include a randomly generated password for the user.
If on the user_create_e call either of the parameters notifications_disabled or emails_disabled is set as false, the account will not be usable until the user account is activated via accessing a link in the email.
If on the user_create_e call both parameters notifications_disabled and emails_disabled are set to true, the account will be activated immediately and no email activation is required. This is the recommended process for API only integrations.
Role can be ADMIN or USER. ADMIN has access to company settings etc.
first_name
string
First name for user, mandatory
last_name
string
Last name of user, mandatory
phone
string
Phone number
notifications_disabled
boolean
If set to true, user will not receive e-mail notifications for their invoices e.g. when receiver accepts invoice etc. (only applies inside AutoInvoice network)
emails_disabled
boolean
If set to true, user will not receive any e-mail notifications e.g. invoice send errors and such.
Example API request
Output
Key
Type
Description
return
string
Example API response
Return values
Key
Type
Message
Description
return
string
OK: USER ADDED
When an existing user added to the company. The API key is not returned here for security reasons
36 char uuid
API key for a new user
ERROR: NO RIGHTS TO ADD USERS
Only admin user can add new users
ERROR: @errormessage
Error message with validation errors for the user
Examples
Example Ruby implementation
user_delete
Used for deleting user from your company account. You cannot delete your own account.
/v1.1/api/user_delete
Input
api_keysApiKeys
Key
Type
Description
company_uuid
string
UUID of current company
user_api_key
string
User API key
vendor_api_key
string
Partner software API key
Key
Type
Description
id
string
Example API request
Output
Key
Type
Description
return
string
Example API response
Return values
Key
Type
Message
Description
status
string
OK: USER DELETED FROM COMPANY
User deleted successfully
ERROR: NO RIGHTS TO USER
Only an admin can delete users
ERROR: USER NOT FOUND
User with given user_id was not found
ERROR: CANNOT DELETE YOURSELF
User cannot delete himself
ERROR: COULD NOT DELETE USER
User could not be deleted for somea reason
Examples
Example Ruby implementation
user_list
Used for listing your company’s users.
/v1.1/api/user_list
Input
api_keysApiKeys
Key
Type
Description
company_uuid
string
UUID of current company
user_api_key
string
User API key
vendor_api_key
string
Partner software API key
Example API request
Output
returnUserParamsOutArray (Array of UserParamsOut)
Key
Type
Description
status
string
email
string
user_role
string
first_name
string
last_name
string
phone
string
id
string
Example API response
Return values
Key
Type
Message
Description
status
string
OK
ERROR: UNKNOWN ERROR
Examples
Example Ruby implementation
user_show
Used for showing information about a specific user.
/v1.1/api/user_show
Input
api_keysApiKeys
Key
Type
Description
company_uuid
string
UUID of current company
user_api_key
string
User API key
vendor_api_key
string
Partner software API key
Key
Type
Description
id
string
Optional. Id of the user whuich information to return. If parameter is not given, information of the authenticating user will be returned
Example API request
Output
returnUserParamsOut
Key
Type
Description
status
string
email
string
user_role
string
first_name
string
last_name
string
phone
string
id
string
Example API response
Return values
Key
Type
Message
Description
status
string
OK
ERROR: NO RIGHTS TO USER
ERROR: UNKNOWN ERROR
Examples
Example Ruby implementation
user_update_e
Used for updating users details on your company account. You cannot update a user’s email address through the API.
/v1.1/api/user_update_e
Input
api_keysApiKeys
Key
Type
Description
company_uuid
string
UUID of current company
user_api_key
string
User API key
vendor_api_key
string
Partner software API key
Key
Type
Description
id
string
user_paramsUserParamsIn
Key
Type
Description
email
string
user_role
string
first_name
string
last_name
string
phone
string
notifications_disabled
boolean
If set to true, user will not receive e-mail notifications for their invoices e.g. when receiver accepts invoice etc. (only applies inside AutoInvoice network)
emails_disabled
boolean
If set to false, user will not receive any e-mail notifications e.g. invoice send errors and such.
Example API request
Output
Key
Type
Description
return
string
Example API response
Return values
Key
Type
Message
Description
return
string
OK: USER SAVED
User updated successfully
ERROR: USER COULD NOT BE SAVEDS
User could not be saved for some reason
ERROR: NO RIGHTS TO USER
Only the user in question or an admin can update user information
ERROR: USER NOT FOUND
User with given user_id was not found
Examples
Example Ruby implementation
vendor_consumer_agreements_query
Checking status of existing agremeents by query for all companies under given vendor_api_key.
One of REQUEST_SENT, NEW, ACCEPTED, ACTIVE, DELETED, REJECTED, ERROR
name
string
phone
string
email
string
reference_nr
string
customer_nr
string
Example API response
Return values
Key
Type
Message
Description
status
string
OK
ERROR: Timestamp format error
ERROR: No rights to vendor API key
ERROR: Unexpected error
Examples
Example Ruby implementation
postal_address_create
Used for adding a postal address for the company.
/v1.1/api/postal_address_create
Input
api_keysApiKeys
Key
Type
Description
company_uuid
string
UUID of current company
user_api_key
string
User API key
vendor_api_key
string
Partner software API key
company_postalPostalAddressParamsIn
Key
Type
Description
default
boolean
company_name
string
lang
string
state
string
post_code
string
post_office
string
phone
string
address1
string
gsm
string
address2
string
country
string
city
string
fax
string
Example API request
Output
Key
Type
Description
return
string
Example API response
Return values
Key
Type
Message
Description
status
string
OK: POSTAL ADDRESS SAVED
Postal address created successfully
ERROR: @errormessage
Error message with validation errors for the postal address
ERROR: COMPANY ALREADY HAS ADDRESS INFORMATION FOR @country / @lang
Company can only have one postal address for each country and language pair
ERROR: COUNTRY CODE INVALID
Given country code does not exist or is not supported
Examples
Example Ruby implementation
postal_address_list
Used for listing all the company’s postal addresses.
/v1.1/api/postal_address_list
Input
api_keysApiKeys
Key
Type
Description
company_uuid
string
UUID of current company
user_api_key
string
User API key
vendor_api_key
string
Partner software API key
Example API request
Output
returnPostalAddressParamsOutArray (Array of PostalAddressParamsOut)
Key
Type
Description
status
string
default
boolean
lang
string
state
string
post_code
string
phone
string
post_office
string
address1
string
gsm
string
city
string
country
string
id
string
address2
string
fax
string
Example API response
Return values
Key
Type
Message
Description
status
string
OK
ERROR: UNKNOWN ERROR
Examples
Example Ruby implementation
postal_address_show
Used displaying information for a specific postal address.
/v1.1/api/postal_address_show
Input
api_keysApiKeys
Key
Type
Description
company_uuid
string
UUID of current company
user_api_key
string
User API key
vendor_api_key
string
Partner software API key
Key
Type
Description
id
string
ID of the postal address to show. Postal address IDs can be fetched with the postal_address_list method.
Example API request
Output
returnPostalAddressParamsOut
Key
Type
Description
status
string
default
boolean
lang
string
state
string
post_code
string
phone
string
post_office
string
address1
string
gsm
string
city
string
country
string
id
string
address2
string
fax
string
Example API response
Return values
Key
Type
Message
Description
status
string
OK
ERROR: POSTAL ADDRESS NOT FOUND OR NO RIGHTS
ERROR: UNKNOWN ERROR
Examples
Example Ruby implementation
postal_address_update
Used for updating an existing postal address.
/v1.1/api/postal_address_update
Input
api_keysApiKeys
Key
Type
Description
company_uuid
string
UUID of current company
user_api_key
string
User API key
vendor_api_key
string
Partner software API key
Key
Type
Description
id
string
ID of the postal address to update. If set to nil, will default to the default address. Postal address IDs can be fetched with the postal_address_list method.
company_postalPostalAddressParamsIn
Key
Type
Description
default
boolean
company_name
string
lang
string
state
string
post_code
string
post_office
string
phone
string
address1
string
gsm
string
address2
string
country
string
city
string
fax
string
Example API request
Output
Key
Type
Description
return
string
Example API response
Return values
Key
Type
Message
Description
status
string
OK: POSTAL ADDRESS SAVED
Postal address updated successfully
ERROR: POSTAL ADDRESS NOT FOUND OR NO RIGHTS
Given postal_address_id not found for current company
ERROR: COUNTRY CODE INVALID
Given country code does not exist or is not supported
ERROR: COMPANY ALREADY HAS ADDRESS INFORMATION FOR @country / @lang
Company can only have one postal address for each country and language pair
ERROR: @errormessage
Error message with validation errors for the postal address
Examples
Example Ruby implementation
postal_address_delete
Used for deleting postal address.
/v1.1/api/postal_address_delete
Input
api_keysApiKeys
Key
Type
Description
company_uuid
string
UUID of current company
user_api_key
string
User API key
vendor_api_key
string
Partner software API key
Key
Type
Description
id
string
Example API request
Output
Key
Type
Description
return
string
Example API response
Return values
Key
Type
Message
Description
status
string
OK: POSTAL ADDRESS DELETED
Postal address deleted successfully
ERROR: COULD NOT DELETE POSTAL ADDRESS
Postal address could not be deleted
ERROR: POSTAL ADDRESS NOT FOUND OR NO RIGHTS
Given postal_address_id not found for current company
Examples
Example Ruby implementation
message_send
Used for sending SI-messages for B2C Finland. Returns OK and new message ID or ERROR.
Note! Message needs to be XSD scheme valid and complete and it will get send to bank as it is so we do not make any additions or conversion to it.
For SI message our system shows OK immediately when the message has been sent OK. Between the banks B2C messages can travel with delay up to 1-4 banking days so keep in mind that possible error messages can arrive even after a week to AutoInvoice. If the message fails on the bank side you will get an error. If the message is ok, no separate message will be sent.
36 character UUID of new SI-message if successfully created
Return values
Key
Type
Message
Description
return
string
OK
ERROR: DUPLICATE MESSAGEID
Given message id is duplicate
ERROR: ONLY ONE MESSAGE PER FILE ALLOWED
ERROR: SOAP HEADER MISSING
ERROR: USER NOT FOUND
ERROR: COMPANY BANK CONNECTION NOT ACTIVE
ERROR: INVALID SENDER INTERMEDIATOR
ERROR: MESSAGE NOT FOUND OR NO RIGHTS
message_status
message_status method is used for getting the status of the sent SI-message (uses the UUID from the message_send method).
In case SI message ends up in the error state in the sending bank side (which in our case is Danske Bank), error_message_list only returns SI message status as ERROR and won’t return any error reasons.
Used for listing error messages based on given timestamps. Returns status and a table that contains “id” and “original_id” (refers to the message UUID).
Method for forwarding specific invoices for debt collection (COLLECTION) or to outsource reminder sending (NOTICE) for invoices that have past the due date. Reminders are sent and debt collection is handled by our partner Visma Duetto (Visma Financial Solutions Oy). Note! This service is only available for Finnish companies.
When forwarding invoices to Visma Duetto for the first time you will get an email sent to your company email address to register as Visma Duetto customer and to confirm your assignments.
Note! If an invoice is sent to Duetto using parameter NOTICE, the receiver will be reminded, after which the invoice will automatically go to collection if not paid. So there is no possibility to only outsource reminder sending.
Soon out! If you want to outsource the whole receivables management we highly recommend you to check out our new Receivables management service done in a collaboration with Visma Financial Solutions Oy!
/v1.1/api/collection_send
Input
api_keysApiKeys
Key
Type
Description
company_uuid
string
UUID of current company
user_api_key
string
User API key
vendor_api_key
string
Partner software API key
Key
Type
Description
invoices
StringArray
Array of string, containing invoice id’s for collection/notice
collection_type
string
collection or notice (reminder)
Output
returnCollectionResponseArray (array of CollectionResponse)
Key
Type
Description
status
string
OK for those invoice sent successfully to Visma Duetto. ERROR and reason for the failed ones, e.g. ERROR: NOT EXPIRED
invoice_id
string
Return values
Key
Type
Message
Description
status
string
OK
ERROR: COLLECTION TYPE MUST BE COLLECTION OR NOTICE
ERROR: NO INVOICES FOUND
ERROR: SERVICE NOT ACTIVE
ERROR: UNKNOWN ERROR
Examples
Example Ruby implementation
register_duetto_payment
Notice! This API method will be removed soon as the Duetto service has been discontinued and replaced by Reskontravahti service.
Method for informing direct payments to your company’s account for those invoices that have been forwarded to Visma Duetto for debt collection (see method collection_send).
Note! To be able to use this method there is a need for a manual account configurations from our end. Please contact sales@maventa.com.
/v1.1/api/register_duetto_payment
Input
api_keysApiKeys
Key
Type
Description
company_uuid
string
UUID of current company
user_api_key
string
User API key
vendor_api_key
string
Partner software API key
duetto_payment_structDuettoPaymentStruct
Key
Type
Description
payee_identification_number
string
Optional “9876543-2”
reference_number
string
Optional but recommended “1122334455”
invoicee_name
string
Mandatory “Asiakas yritys Oy”
invoicee_ytunnus
string
Mandatory “123456-9”
payee_name
string
Mandatory “Yritys maksaja Oy”
payment_day
string
Mandatory “05.04.2017” (4.4.2015 or 04.04.2015, future/past)
paid_amount
string
Mandatory “400,12”
invoice_number
string
Mandatory “1234”
Output
Key
Type
Description
status
string
Return values
Key
Type
Message
Description
return
string
OK
ERROR: USER NOT FOUND
ERROR: VENDOR API KEY CANNOT BE BLANK
ERROR: NO RIGHTS TO USE THIS API
Contact sales@maventa.com
Examples
Example Ruby implementation
atg_mandate_list
This method is used for listing changes to consumer mandates. Returns all changes after given timestamp.
1 - consumer wants to be notified of avtalegiro sends, 0 - consumer does not want notification
status
integer
1 - active, 0 - inactive
updated_timestamp
string
Return values
Key
Type
Message
Description
status
string
OK
ERROR: Timestamp format error
ERROR: Unexpected error
ERROR: No rights to settings
atg_agreement_configure
This method is used after setting up Avtalegiro agreement with the bank to inform AutoInvoice about the settings used so that changes to consumer mandates can be imported and used in routing.
Same account number than in the Avtalegiro agreement
kid_length
integer
Same kid length than in the Avtalegiro agreement
reference_position
string
Same reference position than in the Avtalegiro agreement. Example ‘1-6’
payment_type_position
string
Same payment type position number than in the Avtalegiro agreement. Example ‘1-6’
options
string
Can be used to disable print and/or email notifications when sending Avtalegiro without efaktura agreement. JSON format with keys ‘notif_print’ and ‘notif_email’ either true or false. Defaults to both true if not given. Example {“notif_print”:false,”notif_email”:true}
Output
Key
Type
Description
return
string
Return values
Key
Type
Message
return
string
OK
ERROR: Invalid payment_type_position
ERROR: Invalid reference_position
ERROR: Invalid kid_length
ERROR: Invalid account_number
ERROR: OPTIONS PARAMETER FORMAT IS INVALID
ERROR: UNKNOWN ERROR
Old methods
Older, deprecated methods, which are used by older integrations.
See start of API methods for updated lists of relevant methods for new integration.
company_lookup
Used for finding recipient’s invoicing information.
Search string can be company name, BID (organisation number), VAT code or e-invoice address (EDI, OVT, EAN, GLN…)
country_code
string
Limit hits to specific country. If left blank, returns hits from all countries
limit
int
Maximum number of results to return, default 20 and maximum 200
disable_vies
boolean
Disable external directory lookup fallback when no results from AutoInvoice Network. If set to false or left blank, AutoInvoice will do queries on external services if no match is found in AutoInvoice Finder, this might slow down query.
Example API request
Output
company_lookupResponseCompanyLookupOutDArray
Key
Type
Description
status
string
edis
StringArray
name
string
state
string
post_code
string
post_office
string
maventa_id
string
bid
string
address1
string
country
string
address2
string
receive_invoices
boolean
Can only be true for AutoInvoice network users (e.g. maventa_id field is not blank), for all others this is always false and does not necessarily mean they cannot receive e-invoices
receive_orders
boolean
Only applies for AutoInvoice network users
Example API response
Return values
Key
Type
Message
Description
status
string
OK
ERROR: NO RESULTS
ERROR: TOO MANY RESULTS
If result set contains more than 200 hits
ERROR: SEARCH STRING BLANK OR TOO SHORT (MIN 3 CHARS)
List of comma separated email addresses to send reports to
name
string
Name of company
bid
string
Business ID, VAT, organization number etc.
country
string
Country of company
stop_duplicates
boolean
Prevent (re)sending invoices with the same number
Example API request
Output
Key
Type
Description
return
string
Example API response
Return values
Key
Type
Message
Description
status
string
OK: SETTINGS SAVED
Settings saved successfully
ERROR: COULD NOT SAVE SETTINGS
Could not save settings for some reason
ERROR: NO RIGHTS TO CHANGE SETTINGS
Only admin user can change settings
Examples
Example Ruby implementation
get_invoice_id
Find invoice unique ID for given invoice number. Only works for unique hits per company.
/v1.1/api/get_invoice_id
Input
api_keysApiKeys
Key
Type
Description
company_uuid
string
UUID of current company
user_api_key
string
User API key
vendor_api_key
string
Partner software API key
Key
Type
Description
invoice_number
string
Example API request
Output
Key
Type
Description
return
string
Example API response
Return values
Key
Type
Message
Description
return
string
INVOICE ID
36 character UUID
ERROR: NO INVOICE NUMBER GIVEN
ERROR: NO INVOICE FOUND
ERROR: MULTIPLE INVOICES FOUND WITH NUMBER #{invoice_number}
Examples
Example Ruby implementation
get_invoice_image_as_format
Returns given invoice’s invoice image in specified format (normally PDF). Currently only supports TIFF.
/v1.1/api/get_invoice_image_as_format
Input
api_keysApiKeys
Key
Type
Description
company_uuid
string
UUID of current company
user_api_key
string
User API key
vendor_api_key
string
Partner software API key
Key
Type
Description
invoice_id
string
Invoice UUID
image_format
string
Format, currently only TIFF
Example API request
Output
Key
Type
Description
Example API response
Examples
Example Ruby implementation
inbound_invoice_show
Used for getting information about a specific inbound invoice.
/v1.1/api/inbound_invoice_show
Input
api_keysApiKeys
Key
Type
Description
company_uuid
string
UUID of current company
user_api_key
string
User API key
vendor_api_key
string
Partner software API key
Key
Type
Description
id
string
invoice id
include_files
boolean
download invoice image and attachments
xmlformat
string
Specify with exclamation mark to exclude invoice items from the response. Supported invoice formats: finvoice finvoice2 finvoice30 teapps teapps30 ebis ubl liinos svefaktura sedi ehf vismaxml vismaxml60 e2b woodx facturae bgc ubl peppolbis20 siubl11 siubl20
It is possible to get only the API-struct, meaning the invoice’s information not in any spcecific format by passing nil/empty/null as xmlformat. Do not pass it as a string.
Invoiced quantity, dot as decimal separator, e.g. 1.50
price
string
Unit price, dot as decimal separator, e.g. ‘123.45’
tax
double
VAT percentage, dot as decimal separator, e.g. 24.0 is 24%
sum
string
VAT exclusive sum of the row, dot as decimal separator, e.g. ‘162.03’
sum_tax
string
VAT inclusive sum of the row, dot as decimal separator, e.g. ‘200.92’
item_code
string
Item code
definition
string
Additional definition for item (free text)
position
int
Position in item list
unit_type
string
Unit of item, e.g. ‘km’ or ‘h’
discount
double
Discount percentage, dot as decimal separator, e.g. 12.5 is 12.5%
attachmentsFileAttachmentArray
Key
Type
Description
attachment_type
string
filename
string
file
base64
accountsInvoiceAccountParamsOutArray
Key
Type
Description
status
string
account
string
iban
string
bank
string
swift
string
Example API response
Return values
Key
Type
Message
Description
status
string
OK
ERROR: INVOICE NOT FOUND OR NO RIGHTS
ERROR: FORMAT NOT SUPPORTED
Invoice format specified is not supported
ERROR: INVOICE NOT COMPATIBLE WITH SELECTED FORMAT
Conversion to reqeusted format is not supported
ERROR: FORMAT IS NO LONGER SUPPORTED
Format that was requested is not supported anymore. Please pick another format.
ERROR: XML GENERATION FAILED
ERROR: USER NOT FOUND
Examples
Example Ruby implementation
invoice_accept
Used for accepting incoming invoice. This means that the invoice and the contents seems to be legit according to an agreement. The acceptance sends a notification to the invoice sender so they know you have received the invoice.
Note! Only inside AutoInvoice network.
/v1.1/api/invoice_accept
Input
api_keysApiKeys
Key
Type
Description
company_uuid
string
UUID of current company
user_api_key
string
User API key
vendor_api_key
string
Partner software API key
Key
Type
Description
id
string
Invoice id
Example API request
Output
Key
Type
Description
return
string
Example API response
Return values
Key
Type
Message
Description
return
string
OK: INVOICE ACCEPTED
Invoice accepted successfully
ERROR: INVOICE NOT FOUND OR NO RIGHTS
Given invoice_id was not found or user has no rights to it
ERROR: INVOICE STATE DOES NOT ALLOW ACCEPTANCE
Invoice state is not “SENT” which is the only state from which - invoice can be accepted
ERROR: COULD NOT ACCEPT INVOICE
Could not save invoice for some other reason
Examples
Example Ruby implementation
invoice_confirm
Used for marking an outbound invoice as paid, meaning you have received payment and want to archive the invoice.
/v1.1/api/invoice_confirm
Input
api_keysApiKeys
Key
Type
Description
company_uuid
string
UUID of current company
user_api_key
string
User API key
vendor_api_key
string
Partner software API key
Key
Type
Description
id
string
payment_date
string
Date when payment was made (format: 20180319)
Example API request
Output
Key
Type
Description
return
string
Example API response
Return values
Key
Type
Message
Description
return
string
OK: INVOICE MARKED AS PAID
Invoice successfully marked as paid
ERROR: COULD NOT MARK INVOICE AS PAID
Could not save invoice for some other reason
ERROR: INVOICE NOT FOUND OR NO RIGHTS
Given invoice_id was not found or user has no rights to it
Used for creating new invoices.
Note! If you want to create a credit note, provide all the sums as negative, because there is no separate parameter for the invoice type.
/v1.1/api/invoice_create
Input
invoice_paramsInvoiceParamsInC
Key
Type
Description
customer_maventa_id
string
Customer Maventa ID
currency
string
Currency abbrevation
invoice_nr
string
Invoice number
order_nr
string
Company’s order number (seller). If also customer (buyer) order number is needed both values can be given separated with | character (”company_order_nr | customer_order_number”)
sum
string
Total sum without tax
sum_tax
string
Total sum with tax
delivery_date
string
Delivery date, YYYYMMDD
delivery_type
string
Delivery type (e.g. mail)
reference_nr
string
Invoice reference number
date
string
Invoicing date, YYYYMMDD
date_due
string
Invoice due date, YYYYMMDD
company_interest
string
Company’s interest rate (e.g. 11.5)
company_reminder
string
Company’s reminder fee in invoices currency (e.g. 5.50)
company_paper_fee
string
Company’s paper fee, added if customer requests paper invoice (e.g. 3.25)
customer_reference
string
Reference for customer (“Viitteenne”)
company_reference
string
Reference for company (“Viitteemme”)
company_comment
string
Comment for email invoice
notes
string
Additional information for invoice
company_website
string
Company’s website, shown on PDF invoice
lang
string
Language code for invoice (Allowed values are FI, SE, EN, NO, DK, NL)
require_sign
bool
Require signing before send
work_order_nr
string
Work order nr
payment_terms
string
Payment terms
data
string
JSON input for extra parameters. Currently supports key payment_instruction_identifier needed for Finnish B2C invoicing
Only letters, numbers, underscore and dot are allowed in file names
ERROR: INVALID FILE ATTACHMENT ATTACHMENT_TYPE
Currently allowed ATTACHMENT_TYPEs are: “ATTACHMENT”, “INVOICE_IMAGE”, “FINVOICE”, “TEAPPS”
ERROR: COMPANY HAS NO POSTAL ADDRESS AND NO ADDRESS GIVEN
Company has no postal address set or given in request
ERROR: COULD NOT CREATE INVOICE
Invoice saving failed for some reason, please contact support with timestamp of request
ERROR: AN ITEM IS NOT VALID
An item does not have all required values (subject, price, amount, tax, sum, sum_tax)
ERROR: NO ITEMS FOUND
No items in items array, invoice needs at least one item
ERROR: DATE FORMAT INVALID FOR DELIVERY DATE
Invalid date format
ERROR: DATE FORMAT INVALID FOR DUE DATE
Invalid date format
ERROR: DATE FORMAT INVALID FOR INVOICE DATE
Invalid date format
ERROR: LANGUAGE @lang IS NOT VALID
Given language is not supported
ERROR: COMPANY HAS NO POSTAL ADDRESS
Company has no postal address set
ERROR: UNKNOWN ERROR
Something unexpected happened, please contact support with timestamp of request
ERROR: CUSTOMER COUNTRY CODE INVALID
Country code given in customer information is nit supported
ERROR: NO CUSTOMER INFORMATION FOUND
No customer information given (maventa_id or the whole CustomerParamsOut)
ERROR: CUSTOMER COMPANY NOT FOUND WITH MAVENTA ID _@maventaid_
Maventa ID given for customer but no such id exists
ERROR: FILE @file NOT FOUND, INVOICE WAS NOT CREATED
An attachment was specified in the creation call but no file with that name was found
Examples
Example Ruby implementation
invoice_decline
Used for declining incoming invoice in cases where they contain an error. Note! Will automatically notify sender of decline only inside AutoInvoice network.
/v1.1/api/invoice_decline
Input
api_keysApiKeys
Key
Type
Description
company_uuid
string
UUID of current company
user_api_key
string
User API key
vendor_api_key
string
Partner software API key
Key
Type
Description
id
string
message
string
Example API request
Output
Key
Type
Description
return
string
Example API response
Return values
Key
Type
Message
Description
return
string
OK: INVOICE DECLINED
Invoice declined successfully
ERROR: COULD NOT DECLINE INVOICE
Could not save invoice for some other reason
ERROR: INVOICE STATE DOES NOT ALLOW ACCEPTANCE
Invoice state is not _SENT_ which is the only state from which invoice can be declined
ERROR: INVOICE NOT FOUND OR NO RIGHTS
Given _invoice_id_ was not found or user has no rights to it
Examples
Example Ruby implementation
invoice_dispute
Used for disputing an invoice. This means that you consider the invoice to be fraudulent and is not the same as just declining an invoice that has something wrong! AutoInvoice administrator will get notified and actions will be taken against sender if deemed necessary.
/v1.1/api/invoice_dispute
Input
api_keysApiKeys
Key
Type
Description
company_uuid
string
UUID of current company
user_api_key
string
User API key
vendor_api_key
string
Partner software API key
Key
Type
Description
id
string
message
string
Message for sender about the dispute
Example API request
Output
Key
Type
Description
return
string
Example API response
Return values
Key
Type
Message
Description
return
string
OK: INVOICE DISPUTED
Invoice disputed successfully
ERROR: COULD NOT DISPUTE INVOICE
Could not save invoice for some reason
ERROR: INVOICE STATE DOES NOT ALLOW ACCEPTANCE
Invoice state is not “SENT” which is the only state from which invoice can be disputed
ERROR: INVOICE NOT FOUND OR NO RIGHTS
Given invoice_id was not found or user has no rights to it
Examples
Example Ruby implementation
invoice_put_file
Used for creating new invoices from existing XML invoice files or ZIP files with XML files and attachments.
Allowed characters [A-z0-9_.-] (no spaces or other special characters allowed)
file
base64
Example API request
Output
returnFileStatusArray
Key
Type
Description
status
string
filehash
string
filename
string
Example API response
Return values
Key
Type
Message
Description
status
string
OK: INVOICE CREATED
OK: INVOICE CREATED SUCCESSFULLY
ERROR: NO INVOICE FILE FOUND
ERROR: FILENAME CONTAINS INVALID CHARACTERS
ERROR: INVALID FILENAME
ERROR: INVALID FILETYPE
ERROR: FILE #{current_file} IS EMPTY
ERROR: INVALID ZIP FILE
ERROR: UNKNOWN ERROR
Examples
Example Ruby implementation
invoice_put_finvoice
Used for creating new invoices from existing Finvoice XML files or ZIP files with Finvoice XML files and attachments.
Since Finvoice XML does not have support for attachment, the method is very strictly defined so that only one XML is allowed per request and all other files are considered attachments. If a PDF document with the same filename as the XML file exists, it is used as invoice image.
36 character UUID of new invoice if successfully created
Example API response
Return values
Key
Type
Message
Description
status
string
OK: INVOICE CREATED SUCCESSFULLY
ERROR: UNSUPPORTED XML FORMAT
ERROR: FILE OR FILENAME BLANK
ERROR: FILENAME CONTAINS INVALID CHARACTERS
ERROR: FILENAME INSIDE ZIP CONTAINS INVALID CHARACTERS OR IS INVALID TYPE
ERROR: INVALID ZIP FILE
ERROR: COULD NOT SAVE FILES TO DISK
ERROR: FILENAME CONTAINS INVALID CHARACTERS OR IS INVALID TYPE
ERROR: FILE IS EMPTY
ERROR: NO XML FILE OR MORE THAN ONE FOUND
ERROR: UNKNOWN ERROR
Examples
Example Ruby implementation
invoice_show_original_xml
Used for getting the original XML file for a specified received (inbound) or sent (outbound) invoice.
/v1.1/api/invoice_show_original_xml
Input
api_keysApiKeys
Key
Type
Description
company_uuid
string
UUID of current company
user_api_key
string
User API key
vendor_api_key
string
Partner software API key
Key
Type
Description
id
string
Example API request
Output
returnFileOut
Key
Type
Description
status
string
format
string
file
base64
Example API response
Return values
Key
Type
Message
Description
status
string
OK
ERROR: INVOICE NOT FOUND OR NO RIGHTS
ERROR: NO XML FILE FOUND
ERROR: FILE NOT AVAILABLE
Examples
Example Ruby implementation
list_company_actions
List all actions for given company after given timestamp. This is used to query all company’s new actions in one request.
The output lists new actions since given timestamp and that information can then be used to for example download all new incoming invoices.
/v1.1/api/list_company_actions
Input
api_keysApiKeys
Key
Type
Description
company_uuid
string
UUID of current company
user_api_key
string
User API key
vendor_api_key
string
Partner software API key
Key
Type
Description
timestamp
string
format “YYYYMMDDHHMMSS”)
Example API request
Output
returnArray of CompanyActionOutput
Key
Type
Description
status
string
company_id
string
36 character UUID of company
incoming_invoices
Array of string
Array of ids for new incoming invoices
invoice_errors
Array of string
Array of ids for invoices with new errors
incoming_orders
Array of string
Array of ids for new incoming orders
Example API response
Return values
Key
Type
Message
Description
status
string
OK
ERROR: TIMESTAMP FORMAT ERROR
Examples
Example Ruby implementation
list_vendor_actions
List all actions for given vendor API key after given timestamp. This is used to batch query all partner’s user companies’ actions in one request.
The output lists new actions since given timestamp per company and that information can then be used to for example download all new incoming invoices.
DEPRECATED!
Was used for getting a list of all transactions from given software between given dates.
user_create
Used for adding a new user to your company.
An activation message will be sent to the given email address. The message will also include a randomly generated password for the user. The new account cannot be used until activation is done.
Returns string which contains the new user’s API key or an ERROR message.
This method is outdated. We recommend to use user_create_e.
/v1.1/api/user_create
Input
api_keysApiKeys
Key
Type
Description
company_uuid
string
UUID of current company
user_api_key
string
User API key
vendor_api_key
string
Partner software API key
user_paramsUserParamsIn
Key
Type
Description
email
string
Email address, needs to be unique
user_role
string
Role can be ADMIN or USER. ADMIN has access to company settings etc.
first_name
string
First name for user, mandatory
last_name
string
Last name of user, mandatory
phone
string
Phone number
notifications_disabled
boolean
If set to false, user will not receive e-mail notifications for their invoices e.g. when receiver accepts invoice etc. (only applies inside AutoInvoice network)
Example API request
Output
Key
Type
Description
return
string
Example API response
Return values
Key
Type
Message
Description
status
string
OK: USER SAVED
User created and activation email sent
ERROR: NO RIGHTS TO ADD USERS
Only admin user can add new users
ERROR: @errormessage
Error message with validation errors for the user
Examples
Example Ruby implementation
user_update
Used for updating users details on your company account. You cannot update a user’s email address through the API.
This method is outdated. We recommend to use user_update_e.
/v1.1/api/user_update
Input
api_keysApiKeys
Key
Type
Description
company_uuid
string
UUID of current company
user_api_key
string
User API key
vendor_api_key
string
Partner software API key
Key
Type
Description
id
string
user_paramsUserParamsIn
Key
Type
Description
email
string
first_name
string
last_name
string
phone
string
notifications_disabled
boolean
If set to true, user will not receive e-mail notifications for their invoices e.g. when receiver accepts invoice etc. (only applies inside AutoInvoice network)
Example API request
Output
Key
Type
Description
return
string
Example API response
Return values
Key
Type
Message
Description
status
string
OK: USER SAVED
User updated successfully
ERROR: USER COULD NOT BE SAVED
User could not be saved for some reason
ERROR: NO RIGHTS TO USER
Only the user in question or an admin can update user information