My Products
Help
Sander_Feenstra
CONTRIBUTOR *

Branch '1 ' cannot be found in the system

by Sander_Feenstra

Hello There,

 

I'm try'ing to post a customer invoice but received a 400 - bad request with the message:

Error: Inserting 'Sales invoice/note' record raised at least one error. Please review the errors. Error: Branch '1 ' cannot be found in the system.

 

The invoice I'm trying to create must be made for branch "4"  so I don't understand the complaint about branch 1.  

 

See my request below.

 

Any idea? 

 

Error requesting: POST "https://integration.visma.net/API/controller/api/v2/customerinvoice"
HTTP error: 400 - Bad Request
message: Error: Inserting  'Sales invoice/note' record raised at least one error. Please review the errors.
Error: Branch '1         ' cannot be found in the system.


Body: {
  "branchNumber": {
    "value": "4"
  },
  "overrideNumberSeries": {
    "value": true
  },
  "referenceNumber": {
    "value": "9999999"
  },
  "customerNumber": {
    "value": "21827"
  },
  "documentDate": {
    "value": "2024-02-20T00:00:00"
  },
  "creditTermsId": {
    "value": "30"
  },
  "documentDueDate": {
    "value": "2024-03-21T00:00:00"
  },
  "currencyId": {
    "value": "EUR"
  },
  "externalReference": {
    "value": "9999999"
  },
  "paymentReference": {
    "value": "9999999"
  },
  "hold": {
    "value": false
  },
  "postPeriod": {
    "value": "022024"
  },
  "dontPrint": {
    "value": true
  },
  "dontEmail": {
    "value": true
  },
  "invoiceLines": [
    {
      "operation": "insert",
      "lineNumber": {
        "value": 1
      },
      "description": {
        "value": "21827 9999999"
      },
      "quantity": {
        "value": null
      },
      "manualAmountInCurrency": {
        "value": 518.4900
      },
      "accountNumber": {
        "value": "8110"
      },
      "vatCodeId": {
        "value": "1"
      },
      "subaccount": []
    }
  ],
  "taxDetailLines": []
}

 

Best regards,

Sander

 

6 REPLIES 6
Sandra Anté
VISMA

by Sandra Anté

Hi again,

The problem might occur because it is a new customer. We recommend to wait until tomorrow and then try again. 
If it is still not working we'll start by solving the problem in the UI.

Kind regards
Sandra

Sandra Anté
VISMA

by Sandra Anté

Hi Sander,

How do you authenticate? Have you implemented the new authentication method with Connect and in that case is it Service or Interactive?

Is it a new customer and are there other customers who get the same error?

Thank you!

Kind regards
Sandra Anté

Sander_Feenstra
CONTRIBUTOR *

Hi Sandra,

 

Yeah I implemented the new auth method using the interactive API.

It's a new customer for which I'll try to post the first invoice using the API.

In my ISV test environment I did not get this message, but there I have only one branch with number "1"

 

Additionally when I click the option "Create new invoice" in the front-end.

I immediately receive the error:

 

Sander_Feenstra_0-1708950254860.png

It means something like:  "An error occured  when processing your request, a report has been sent to support.

Please try again later, thanks for your understanding"

(Sorry I didn't try this before)

 

I looks like some roles a missing on my user now, what do you say?

 

Kind regards,

Sander

Accepted solution
Sandra Anté
VISMA

Hi Sander,

Has this issue been solved for you?

If not, please contact the ERP Support since the error occurs in the UI.

Kind regards
Sandra Anté

Sander_Feenstra
CONTRIBUTOR *

Hi Anté,

 

My customer is try'ing to identify this problem together with their reseller.

For now let's close this issue.

 

Best regards,

Sander

ExactGebruiker
CONTRIBUTOR ***

Hi,

 

Not an expert on this, but I am guessing it has something to do with the customer settings. Is this error also happening with other customers?

 

Izan