on ‎2020 Dec 09 11:59 AM
Hello guys
After reading the API Documentation i'm still confused about how to create Loyalty Customer.
I would like to create loyalty customer using BP data in SAP B1.
Can you give me advice?
Help others by sharing your knowledge.
AnswerRequest clarification before answering.
Hello baigalmaa
It's very easy to do. I don't know in which language you are developing, but it is basically a simple POST request to the api/internal/users endpoint.
In C#, this is what we do:
HttpRequestMessage request = new HttpRequestMessage()
{
RequestUri = new Uri(textBoxCCOM_URL.Text + "api/internal/users"),
Method = HttpMethod.Post,
Content = JsonContent.Create(
loyaltyUser,
new MediaTypeHeaderValue("application/json"),
jsonSerializerOptions)
};
The JSON returned is of the same type as the object posted, but with the generated properties added (UUID, etc.).
Hope this helps,
Joerg.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.