Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validation error for organizationNumber on POST customer (non Norwegian country) #13

Closed
ErlendSB opened this issue Jan 17, 2020 · 2 comments

Comments

@ErlendSB
Copy link

POST /customer

{
	    "name": "SWEDEN customer",
	    "postalAddress": {
	    	"country": {
		    	"id":191
	    	}
	    },
	    "physicalAddress": {
	    	"country": {
		    	"id":191
	    	}
	    },
	    "organizationNumber": "212121-1212"
 }

Response error:

{
  "status": 422,
  "code": 18000,
  "message": "Validation failed.",
  "link": "https://www.tripletex.no/tripletex-api-2-0/",
  "developerMessage": null,
  "validationMessages": [
    {
      "field": "organizationNumber",
      "message": "The organization number must consist of 9 numbers and cannot have any spaces.",
      "path": null,
      "rootId": null
    }
  ],
  "requestId": "1111-1111-111-11111"
}

Creating the customer via the UI works as expected (when selecting Sweden as country)

@jrtm
Copy link
Contributor

jrtm commented Jan 17, 2020

Hi! Thanks for the report. We're looking into this and will get back to you as soon as possible. It looks like there might be a bug somewhere in the validation code.

@andreasrosdal
Copy link
Contributor

This has been fixed now. @ErlendSB can you please verify that the problem has been solved for you also?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants