My Products
Help
Aarne Relander
CONTRIBUTOR *

POST /v2/customerinvoice creates multiple background jobs with same background ID

by Aarne Relander (Updated ‎07-02-2023 17:29 by Aarne Relander )

Hi,

 

We send sales invoices to Visma.net Financials through POST /controller/api/v2/customerinvoice with the erp-api-background -parameter included. This generally works well, but we've run into issues where visma.net creates multiple background jobs with the same background ID. This results in multiple sales invoices being created with the same data, and multiple callbacks being sent back to our server.

 

Below is an example where one POST to /controller/api/v2/customerinvoice created three different background jobs with the same ID. These are the logs from our server for the resulting three callbacks, note the same stateLocation URLs but different location URLs.

 

Started POST "/visma_net_invoice_callback/130237705" for 13.48.223.202 at 2023-02-07 08:41:40 +0200
  Parameters: {"id"=>"130237705", "statusCode"=>201, "stateLocation"=>"https://integration.visma.net/API/controller/api/v1/background/1f4fd7f0-fdec-4620-90ea-082d95ad1641", "location"=>"https://integration.visma.net/API/controller/api/v1/customerinvoice/113312"}
 
Started POST "/visma_net_invoice_callback/130237705" for 13.48.223.202 at 2023-02-07 08:41:42 +0200
  Parameters: {"id"=>"130237705", "statusCode"=>201, "stateLocation"=>"https://integration.visma.net/API/controller/api/v1/background/1f4fd7f0-fdec-4620-90ea-082d95ad1641", "location"=>"https://integration.visma.net/API/controller/api/v1/customerinvoice/113313"}

Started POST "/visma_net_invoice_callback/130237705" for 13.48.238.246 at 2023-02-07 08:41:42 +0200
  Parameters: {"id"=>"130237705", "statusCode"=>201, "stateLocation"=>"https://integration.visma.net/API/controller/api/v1/background/1f4fd7f0-fdec-4620-90ea-082d95ad1641", "location"=>"https://integration.visma.net/API/controller/api/v1/customerinvoice/113314"}
 
Our customer is confused and worried about the uncertain amount of invoices being generated, so any advice would be greatly appreciated.

 

 

1 REPLY 1
Yıldırım
VISMA

by Yıldırım

Hello, 

 

could you share your POST request, including headers and body ? Additionally please also send your API ClientID & Company ID to developersupport@visma.com 

 

Thanks.