Add new customer for different company using REST API


(Pinkesh) #1

Hi all,

I am trying to import new customer using REST API. I am not able to change the company name.
It takes a default company name only. Even I am passing different company name that exists but it inserted into the default company only.

Can anyone please help me.

Thanks in advance.


(Olga Klimova) #2

You cannot do it from Swagger, it does not allow switching companies, it is for test purposes only.
In the tools like PostMan you can set up CallSettings header with the value of the company you want to use, for example: {“Company”:“EPIC03”,“Plant”:“MfgSys”}

(Pinkesh) #3

Hi Olga,

Thanks for the reply. I tried using code also but unable to change. Can you please advice? What other fields must be changed to apply company change?


(Jose C Gomez) #4

All you need to do is add the CallSettings header like @Olga suggested and set that to the "right’ company.

(Olga Klimova) #5

What postman tells you? any error?

(Pinkesh) #6

No, I does not give me any error but it goes to default company only.

(Theodore Koch) #7

Can you screenshot what your headers for the call look like in Postman?

(Pinkesh) #8

(Jose C Gomez) #9

You are not passing in the CallSettings header we mentioned … that’s the only way to “change” companies in REST

(Theodore Koch) #10

It should be entered here, replace AAA with your company id

(Pinkesh) #11

@tkoch @Olga and @josecgomez,

Thanks, It works for me. I am really really very thankful. I was searching for this solution for three days.

Thanks a lot.

(Theodore Koch) #12

There is also documentation in the Epicor Help

(Chris Conn) #13

For me on 10.2.200, I had to use this format: