Invoice Information Service

Introduction

The Avida Invoice service provides information about the client’s invoices as well as some methods to manipulate them.
The UploadInvoicesAix is used to upload invoices.
The Postpone claim date operation makes it possible for factoring clients of Avida to postpone the claim date for an invoice. This means that any reminders not already sent will be “pushed” in the future for a specified number of dates. In the same way, the date for debt collection will also be postponed. Any invoices already in debt collection will not be affected.
The Get factoring payments report and the Get debt collection payments report will return payment on the client’s invoices for a single day from the factoring or debt collection department. Payments will be reported in the BgMax format.
The UploadAudioRecordings is used to upload audio recordings of contract agreements to Avida. Avida will store these and make the easily accessible for Avida’s staff handling the corresponding cases.
The Get factoring status report will return any status changes on the client’s invoices for a single day in XML format. Example statuses are “påminnelse” and “inkasso”.

Service overview

UploadInvoicesAix has three parameters (apart from authentication): FileContent, IsProdMode and email. If isProdMode is set to false, the invoice file will be emailed instead of being inserted into the factoring system. For some clients, Avida split so that some invoices are serviced and some purchased, the invoices will then be divided accordingly in the email being sent. A notification email will always be sent to the specified address, containing an error message if the upload failed or the number of uploaded invoices if the upload was successful.

The operation PostponeClaimDate will (apart from authentication) accept two parameters: InvoiceNo and NrOfDays which specify the invoice and the number of days the invoice’s claim date should be postponed, respectively. Answers include parameters Success and FailureMessage. If Success is false, there will be a FailureMessage. Examples of failure messages include “No such invoice exists” and “Invoice can no longer be postponed.”

The operations GetFactoringPaymentsReport, GetFactoringStatusReport and GetDebtCollectionPaymentsReport all take two parameters: forDate and format. Valid formats are BgMax for payments and XML for statuses. The answer will report any files found (one file per day) and attach the files as byte arrays. Any failures will be accompanied by a failure message.

Service specification

Service method: UploadInvoicesAix

NOTE: The parameter PartnerID in the invoice file is something you need from us. If you are not given one with the documentation, contact support and ask for one.

1) Auth: An element to authenticate the user making the service call.
2) Filecontent: A file containing the invoices.
a. Invoice Specification
b. Invoice XML example
3) IsProdMode: Boolean that determines if this is a test or real production invoices. Always call the production endpoint for this service.
4) Email: Email address used for notification and for testing.

Parameter Auth

The Auth parameter defines an authentication object for calling an Avida web service.

Sample XML

    
                    <Auth>
                        <Password>Test</Password>
                        <Username>Avida</Username>
                    </Auth>


Service method: PostponeClaimDate

1) Auth: An element to authenticate the user making the service call.
2) InvoiceNo: A file containing the invoices.
3) NrOfDays: The number of days to postpone the claim date(Max 14 days).

Parameter Auth

The Auth parameter defines an authentication object for calling an Avida web service.

Sample XML

    
                    <Auth>
                        <Password>Test</Password>
                        <Username>Avida</Username>
                    </Auth>


Parameter InvoiceNo

The InvoiceNo parameter identifies the invoice to postpone by its invoice number. It must be a single string.

Parameter NrOfDays

The NrOfDays parameter sets the number of days to postpone the claim date. It must be an integer.

Response

Specifies if the changed invoice is accepted or failed. There are three types of message: Success, Failure and Temporary Failure. Failure means it’s a permanent failure. Common causes would be that the invoice doesn’t exist or has already been closed. Temporary Failure means that underlying system being temporarily unavailable. Trying again later is likely to work. Success means, the PostponeClaimDate has been changed.

Sample XML

    
                <PostponeClaimDateResult>
                    <Message>Success</Message>
                </PostponeClaimDateResult>
    

Service method: UploadAudioRecordings

1) Auth: An element to authenticate the user making the service call.
2) Email: Email address used for notification.
3) Recordings: The audio recordings to upload. They batch can be up to about 10 at a time.
4) IsProdMode: Boolean that determines if this is a test or real production. (The only difference is that in test we don’t actually store the recordings but the upload works the same and the confirmation mail is the same). Always call the production endpoint for this service.

Parameter Auth

The Auth parameter defines an authentication object for calling an Avida web service.

Sample XML

    
                <Auth>
                    <Password>Test</Password>
                    <Username>Avida</Username>
                </Auth>


Recordings

Contains a list of elements of type AudioRecording.

AudioRecording:
1) Orgnr: Personnummer of the customer. Should be of the format YYYYMMDDXXXX (Can contain dashes and spaces but the year must be four digits)
2) Mp3AudioData: Byte-array of the mp3 file content.
3) RecordingDate: The date when the recording was made.

Service method: GetFactoringPaymentsReport

1) Auth: An element to authenticate the user making the service call.
2) ForDate: The report date (DateTime).
3) Format: The desired result format, BgMax (string). See Appendix A, GetFactoringPaymentsReport BgMax format.

Service method: GetDebtCollectionPaymentsReport

1) Auth: An element to authenticate the user making the service call.
2) ForDate: The report date (DateTime).
3) Format: The desired result format, BgMax (string). See Appendix A, GetFactoringPaymentsReport BgMax format.

Service method: GetFactoringStatusReportByChangeNr

1) Auth: An element to authenticate the user making the service call.
2) lastSeenChangeNr: An int which controls status reports. For each call this parameter should change based on information from the response.
3) The desired result format, XML.

Response for Status

# Status Description
1 Bevakad Not used
2 Ej klar Not used
3 Inkasso Invoice sent to debt collection
4 Återköpt Invoice repurchased
5 Avskriven Invoice canceled
6 Återbetalt Not used
7 Delbetald Partially paid
8 Godkänd There is a customer ledger post with status 'KÖP'
9 Påminnelse A reminder has been generated for the Invoice
10 Krediterad Not used
11 Avvisad Not used
12 Betald Invoice fully paid
13 Delkrediterad Not used
14 Portfölj Not used

XML Response

1) ReturnedEntries: Element which tells how many status updates returned from the call. Max 2000 each call.
2) ExistingEntries: Element which tells how many status updates is left to get.
3) LastChangeNr: This elements value is used for next call. Example: The webservice is calling with lastSeenChangeNr: 1320, the return value of LastChangeNr is 4689. Value 4689 will be used in the next call. If it’s the first call ever made, lastSeenChangeNr should be “0”.

Test environment

WSDL URI
Endpoint URI

Production environment

WSDL URI
Endpoint URI

Appendix A - GetFactoringPaymentsReport BgMax format

For the general format, see the official specification from BGC: Manual (pdf)

Post type Description
15 Pos 38-45 Betalningsdag: The day the payment is booked.
20 Pos 13-37 Referens: Invoice number.
Pos 38-55 Betalningsbelopp: The payment amount.
Pos 58-69, BGC-löpnummer: BGC Internal number used to identify a payment
BGC Internal number is not used by our import.

No giro numbers are used. Post type 21, 22, 23 and 25 are unused. All the one character codes are unused.

Appendix A - GetFactoringPaymentsReport BgMax format

For the general format, see the official specification from BGC: Manual (pdf)

Startpost (transaktionskod=”01”)

Start Längd Term Beskrivning/exempel
1 2 Transaktionskod 01
3 20 Layoutnamn BGMAX
23 2 Version 01
25 20 Skrivdag/tidstämpel tex 20120324122515123000
45 1 Testmarkering P
46 25 Blanka/reserv  

Öppningspost (Transaktionskod = ”05”)

Start Längd Term Beskrivning/exempel
1 2 Transaktionskod 05
3 10 Mottagar-bankgironummer 0000000000
13 10 Används ej Blanka
23 3 Valuta SEK
26 55 Blanka/reserv

Betalningspost (Transaktionskod = ”20”)

Start Längd Term Beskrivning/exempel
1 2 Transaktionskod 20
3 10 Avsändar-bankgironummer 0000000000
13 25 Referens Fakturanummer
38 18 Betalningsbelopp Belopp i öre
56 1 Referenskod 1=Referens saknas, 3=Referens finns (Fakturanummer)
57 1 Betalningskanalkod 3
58 12 Används ej
70 1 Används ej  
71 10 Blanka/reserv

Informationspost (Transaktionskod = ”25”)

Start Längd Term Beskrivning/exempel
1 2 Transaktionskod 25
3 50 Informationstext Blanka
53 28 Reserv Transaktionstyp P, I eller R. (Kapital, Ränta eller (påminnelse)-avgift)

Namnpost (Transaktionskod = ”26”)

Start Längd Term Beskrivning/exempel
1 2 Transaktionskod 26
3 35 Betalarens namn Gäldenärens personnummer (YYMMDD-nnnn)
38 35 Extra namnfält Blanka
73 8 Blanka/reserv  

Insättningspost (Transaktionskod = ”15”)

Start Längd Term Beskrivning/exempel
1 2 Transaktionskod 15
3 35 Mottagar-bankkontonummer 00000000000000000000000000000000000
38 8 Betalningsdag YYYYMMDD
46 5 Insättningslöpnummer  
51 18 Insättningsbelopp Belopp i öre
69 3 Valuta SEK
72 8 Antal betalningar Antal poster med transaktionskod "20"
80 1 Används ej  

Slutpost (Transaktionskod = ”70”)

Start Längd Term Beskrivning/exempel
1 2 Transaktionskod 70
3 8 Antal betalningsposter Totalt antal poster med transaktionskod "20"
11 8 Används ej  
19 8 Anväds ej  
27 8 Antal insättningsposter Totalt antal poster med transaktionskod "15"
35 46 Blanka/reserv  

Contact

You can reach us on noc@avida.se


Back to Integration