Pinkesh
(Pinkesh)
December 6, 2018, 7:20am
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.
Pinkesh
Olga
(Olga Klimova)
December 6, 2018, 3:16pm
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”}
2 Likes
Pinkesh
(Pinkesh)
December 6, 2018, 3:55pm
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?
Thanks,
Pinkesh
josecgomez
(Jose C Gomez)
December 6, 2018, 4:00pm
4
All you need to do is add the CallSettings header like @Olga suggested and set that to the "right’ company.
Olga
(Olga Klimova)
December 6, 2018, 4:09pm
5
What postman tells you? any error?
Pinkesh
(Pinkesh)
December 6, 2018, 4:12pm
6
No, I does not give me any error but it goes to default company only.
tkoch
(Theodore Koch)
December 6, 2018, 5:27pm
7
Can you screenshot what your headers for the call look like in Postman?
1 Like
josecgomez
(Jose C Gomez)
December 6, 2018, 5:35pm
9
You are not passing in the CallSettings header we mentioned … that’s the only way to “change” companies in REST
tkoch
(Theodore Koch)
December 6, 2018, 5:44pm
10
It should be entered here, replace AAA with your company id
5 Likes
Pinkesh
(Pinkesh)
December 6, 2018, 5:49pm
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.
Pinkesh
1 Like
tkoch
(Theodore Koch)
December 6, 2018, 6:02pm
12
There is also documentation in the Epicor Help
4 Likes
Chris_Conn
(Chris Conn)
December 10, 2018, 5:31pm
13
For me on 10.2.200, I had to use this format:
csnyder1
(conrad snyder)
August 16, 2019, 3:13pm
14
The user you are using for your authorization/credentials needs to be a user in both companies in order to make the change/update.