cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Create Loyalty Customer through API

former_member12197
Participant
0 Likes
676

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?

Accepted Solutions (1)

Accepted Solutions (1)

JoergAldinger
Active Contributor

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.

former_member12197
Participant
0 Likes

Thanks for for your reply.

Can you give me any example of JSON data sent.

And step by step guide.

I won't ask much it would be really helpful.

Thank you

JoergAldinger
Active Contributor

Hello baigalmaa

Here is an example payload:

Hope this helps,

Joerg.

former_member12197
Participant
0 Likes

Thanks for your advice.
It was really helpfull.

Answers (0)