Return values

A word with a @-sign in front is a changing variable in the return values
Return values inside square brackets [ ] are arrays
Because of WSDL type specification some return values are in the form of an array with a message as the first item and nil/null as the second for all methods that return an array, if the method only returns a string, that will be the error message

All methods can fail with these errors:
  • ERROR: VENDOR API KEY DISABLED Software vendor has disabled the use of this vendor api key
  • 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: COULD NOT FIND USER API key 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 Maventa has completed the first time wizard
hello_world
  • “Hello world!”
country_list
  • [“OK”, [CountryParamsOut]] An array including an “OK”-string and an array of CountryParamsOut
currency_list
  • [“OK”, [CurrencyParamsOut]] An array including an “OK”-string and an array of CurrencyParamsOut
language_list
  • [“OK”, [LanguageParamsOut]] An array including an “OK”-string and an array of LanguageParamsOut
relay_operator_list
  • [“OK”, [RelayOperatorParamsOut]] An array including an “OK”-string and an array of RelayOperatorParamsOut
company_lookup
  • [“OK”, [CompanyLookupOut]] An array including an “OK”-string and an array of CompanyLookupOut which match the search string given
invoice_create
  • [“ERROR: USER DAILY INVOICE LIMIT (@limit) REACHED”, nil] User API key can have a daily limit for created invoices
  • [“ERROR: VENDOR API KEY DAILY INVOICE LIMIT (@limit) REACHED”, nil] Vendor API key can have a daily limit for created invoices
  • [“ERROR: GLOBAL DAILY INVOICE LIMIT (@limit) REACHED”, nil] If user and vendor limits are not set, global limit is used
  • [“ERROR: FILE @file NOT FOUND, INVOICE WAS NOT CREATED”, nil] An attachment was specified in the creation call but no file with that name was found
  • [“ERROR: CUSTOMER COMPANY NOT FOUND WITH MAVENTA ID ’@maventaid’”, nil] Maventa ID given for customer but no such id exists
  • [“ERROR: NO CUSTOMER INFORMATION FOUND”, nil] No customer information given (maventa_id or the whole CustomerParamsOut)
  • [“ERROR: COMPANY HAS NO POSTAL ADDRESS”, nil] Company has no postal address set
  • [“ERROR: LANGUAGE @lang IS NOT VALID”, nil] Given language is not supported
  • [“ERROR: DATE FORMAT INVALID FOR INVOICE DATE”, nil] Invalid date format
  • [“ERROR: DATE FORMAT INVALID FOR DUE DATE”, nil] Invalid date format
  • [“ERROR: DATE FORMAT INVALID FOR DELIVERY DATE”, nil] Invalid date format
  • [“ERROR: COULD NOT CREATE INVOICE”, nil] Invoice saving failed for some reason
  • [“OK: INVOICE CREATED”, @invoice.id] Everything went OK and invoice will be sent
invoice_revoke
  • ERROR: INVOICE NOT FOUND OR NO RIGHTS Given invoice_id was not found or user has no rights to it
  • ERROR: COULD NOT CREATE CREDIT NOTE Something went wrong
  • ERROR: DELIVERY FAILED (NOT ENOUGH INFORMATION OF CUSTOMER) Invoice created but sending failed, no route found to customer
  • OK: INVOICE SENT Everything went OK and invoice has been sent
invoice_list
  • [“OK”, [InvoiceParamsOut]] An array including an “OK”-string and an array of InvoiceParamsOut
  • [“ERROR: @error”, nil] An array including “ERROR” and an exception message, second array item is nil
invoice_list_inbound
  • [“OK”, [InvoiceParamsOut]] An array including an “OK”-string and an array of InvoiceParamsOut
  • [“ERROR: @error”, nil] Exception handling
invoice_show
  • [“ERROR: INVOICE NOT FOUND OR NO RIGHTS”, nil] Given invoice_id was not found or user has no rights to it
  • [“ERROR: @error”, nil, nil] Exception handling
  • [“OK”, InvoiceParamsOut, [ItemsOut]] “OK”-message, InvoiceParamsOut, array with ItemsOut
invoice_confirm
  • ERROR: INVOICE NOT FOUND OR NO RIGHTS Given invoice_id was not found or user has no rights to it
  • ERROR: COULD NOT MARK INVOICE AS PAID Could not save invoice for some reason
  • OK: INVOICE MARKED AS PAID Invoice successfully marked as paid
invoice_accept
  • 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 reason
  • OK: INVOICE ACCEPTED Invoice accepted successfully
invoice_decline
  • 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 declined
  • ERROR: COULD NOT DECLINE INVOICE Could not save invoice for some reason
  • OK: INVOICE DECLINED Invoice declined successfully
invoice_dispute
  • 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 disputed
  • ERROR: COULD NOT DISPUTE INVOICE Could not save invoice for some reason
  • OK: INVOICE DISPUTED Invoice disputed successfully
user_create
  • 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
user_update
  • ERROR: USER NOT FOUND User with given user_id was not found
  • ERROR: NO RIGHTS TO USER Only the user in question or an admin can update user information
  • ERROR: USER COULD NOT BE SAVED User could not be saved for some reason
  • OK: USER SAVED User updated successfully
user_delete
  • ERROR: USER NOT FOUND User with given user_id was not found
  • ERROR: NO RIGHTS TO USER Only an admin can delete users
  • ERROR: CANNOT DELETE YOURSELF User cannot delete himself
  • ERROR: COULD NOT DELETE USER User could not be deleted for somea reason
  • OK: USER DELETED FROM COMPANY User deleted successfully
user_list
  • [“ERROR: @error” , nil] Exception handling
  • [“OK”, [UserParamsOut]] Array with OK and an array with UserParamsOut
user_show
  • [“ERROR: USER NOT FOUND”, nil] User with given user_id was not found
  • [“ERROR: NO RIGHTS TO USER”, nil] User does not belong to current company
  • [“ERROR: @error” , nil] Exception handling
  • [“OK”, UserParamsOut] Array with OK and UserParamsOut
company_update
  • ERROR: COUNTRY CODE INVALID Given country code does not exist or is not supported
  • ERROR: @errormessage Validation errors
  • ERROR: NO RIGHTS TO CHANGE SETTINGS Only admin user can change settings
  • OK: COMPANY SAVED Company details updated successfully
company_list
  • [“ERROR: @error”, nil] Exception handling
  • [“OK”, [CompanyParamsOut]] Array with OK message and an array with CompanyParamsOut
company_show
  • [“ERROR: @error”, nil] Exception handling
  • [“OK”, CompanyParamsOut] Array with OK message and CompanyParamsOut
company_settings_show
  • [“ERROR: @error”, nil] Exception handling
  • [“OK”, CompanySettingsParams] Array with OK message and CompanySettingsParams
company_settings_update
  • ERROR: NO RIGHTS TO CHANGE SETTINGS Only admin user can change settings
  • ERROR: COULD NOT SAVE SETTINGS Could not save settings for some reason
  • OK: SETTINGS SAVED Settings saved successfully
company_fee_list
  • [“ERROR: @error”, nil] Exception handling
  • [“OK”, [CompanyFeeParamsOut]] Array with OK message and an array with CompanyFeeParamsOut
company_fee_show
  • [“ERROR: COMPANY FEE NOT FOUND OR NO RIGHTS”, nil] CompanyFee with given id does not exist for current company
  • [“ERROR: @error”, nil] Exception handling
  • [“OK”, CompanyFeeParamsOut] Array with OK message and CompanyFeeParamsOut
company_fee_create
  • ERROR: INVALID CURRENCY FOR COMPANY FEE Given currency not supported
  • ERROR: COMPANY ALREADY HAS FEE FOR CURRENCY @currency Company can only have one fee per currency
  • ERROR: @error Exception handling
  • OK: COMPANY FEE SAVED Company fee saved successfully
company_fee_update
  • ERROR: COMPANY FEE NOT FOUND OR NO RIGHTS CompanyFee with given id does not exist for current company
  • ERROR: INVALID CURRENCY FOR COMPANY FEE Given currency not supported
  • ERROR: COMPANY ALREADY HAS FEE FOR CURRENCY @currency Company can only have one fee per currency
  • ERROR: @error Exception handling
  • OK: COMPANY FEE SAVED Company fee saved successfully
company_fee_delete
  • ERROR: COMPANY FEE NOT FOUND OR NO RIGHTS CompanyFee with given id does not exist for current company
  • ERROR: COULD NOT DELETE COMPANY FEE Failed to delete company fee
  • OK: COMPANY FEE DELETED Company fee deleted successfully
bank_account_create
  • ERROR: @errormessage Error message with validation errors for the bank account
  • OK: ACCOUNT SAVED Account created successfully
bank_account_update
  • ERROR: ACCOUNT NOT FOUND OR NO RIGHTS BankAccount with given id does not exist for current company
  • ERROR: @errormessage Error message with validation errors for the bank account
  • OK: ACCOUNT SAVED Account updated successfully
bank_account_delete
  • ERROR: ACCOUNT NOT FOUND OR NO RIGHTS BankAccount with given id does not exist for current company
  • ERROR: COULD NOT DELETE ACCOUNT Could not delete account
  • OK: ACCOUNT DELETED Account deleted successfully
bank_account_list
  • [“ERROR: @error”, nil] Exception handling
  • [“OK”, [BankAccountParamsOut]] Array with OK and an array with BankAccountParamsOut
bank_account_shoW
  • [“ERROR: ACCOUNT NOT FOUND OR NO RIGHTS”, nil] BankAccount with given id does not exist for current company
  • [“ERROR: @error”, nil] Exception handling
  • [“OK”, BankAccountParamsOut] Array with OK and BankAccountParamsOut
postal_address_create
  • 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
  • OK: POSTAL ADDRESS SAVED Postal address created successfully
postal_address_update
  • 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
  • OK: POSTAL ADDRESS SAVED Postal address updated successfully
postal_address_delete
  • ERROR: POSTAL ADDRESS NOT FOUND OR NO RIGHTS Given postal_address_id not found for current company
  • ERROR: COULD NOT DELETE POSTAL ADDRESS Postal address could not be deleted
  • OK: POSTAL ADDRESS DELETED Postal address deleted successfully
postal_address_list
  • [“ERROR: @error”, nil] Exception handling
  • [“OK”, [PostalAddressParamsOut]] Array with OK and an array with PostalAddressParamsOut
postal_address_show
  • [“ERROR: POSTAL ADDRESS NOT FOUND OR NO RIGHTS”, nil] Given postal_address_id not found for current company
  • [“ERROR: @error”, nil] Exception handling
  • [“OK”, PostalAddressParamsOut] Array with OK and PostalAddressParamsOut
get_pdf
  • ERROR: INVOICE NOT FOUND Invoice not found for given invoice_id
  • ERROR: USER NOT FOUND FOR API KEY User not found for given API key
  • ERROR: COULD NOT CREATE PDF PDF creation failed for some reason
  • ERROR: USER HAS NO RIGHTS TO INVOICE Invoice does not belong to current company
  • SOAP Attachment If all goes well, return value is a SOAP Attachment with the name “invoice.pdf”
get_partner_transactions
  • ERROR: USER NOT FOUND FOR API KEY User not found for given API key
  • ERROR: VENDOR API KEY NOT FOUND @vendor_api_key Given vendor API key was not found
  • ERROR: USER HAS NO RIGHTS TO VENDOR API KEY Vendor API key does not belong to user’s company
  • SOAP Attachment If all goes well, return value is a SOAP Attachment with the name
get_files
  • ERROR: INVOICE NOT FOUND Invoice not found for given invoice_id
  • ERROR: USER NOT FOUND FOR API KEY User not found for given API key
  • ERROR: COULD NOT CREATE FILES Could not create files for some reason
  • ERROR: USER HAS NO RIGHTS TO INVOICE Invoice does not belong to current company
  • SOAP Attachment If all goes well, return value is a SOAP Attachment with the name “@invoice_nr.zip”
put_xml
  • ERROR: USER NOT FOUND FOR API KEY User not found for given API key
  • ERROR: COMPANY NOT FOUND OR NO RIGHTS User does not belong to given company_uuid
  • ERROR: NO VALID XML INVOICE FOUND File is not a valid XML invoice or is not supported
  • ERROR: FILENAME IS NOT AN XML Filename must be .xml
  • OK: INVOICE CREATED SUCCESSFULLY OK, an invoice created from the XML sent
put_zip
  • ERROR: USER NOT FOUND FOR API KEY User not found for given API key
  • ERROR: COMPANY NOT FOUND OR NO RIGHTS User does not belong to given company_uuid
  • ERROR: INVALID ZIP FILE Could not open the zip file
  • ERROR: NO VALID XML INVOICE FOUND No valid XML invoice found in zip
  • ERROR: FILE IS NOT A ZIP Filename must be .zip
  • ERROR: @error Exception handling
  • OK: INVOICE CREATED OK, at least one invoice was created
put_attachment
  • ERROR: USER NOT FOUND FOR API KEY User not found for given API key
  • ERROR: COMPANY NOT FOUND OR NO RIGHTS User does not belong to given company_uuid
  • ERROR: INVALID FILETYPE ’@filetype’ (allowed doc, xls, tif, jpg, gif, txt, xml, xsl, html, htm, pdf) Invalid filetype for attachment
  • ERROR: @error Exception handling
  • OK: FILE ’@filename’ RECEIVED File saved to company’s incoming files and can be added to an invoice

Also available in: HTML TXT