Users

Endpoint to work with the widget users.

Get current user

GET /api/internal/v1/:partner_code/users/current

Get the current customer.

Path Parameters

Name
Type
Description

partner_code

string

The partner code of the partner.

{
    data: {
        id: 1,
        first_name: "John",
        last_name: "Doe",
        title: "Ing.",
        email: "[email protected]",
        gender: 1,
        phone_number: {
            prefix: 43,
            number: 6601234567,
        },
        address: {
            country_id: 1,
            state_id: 1,
            city: "Graz",
            post_code: "8010",
            street: "Dietrichsteinplatz 10",
        },
    }
}

Create new user

POST /api/internal/v1/:partner_code/users

Create a new widget user.

Path Parameters

Name
Type
Description

partner_code

string

The partner code of the partner.

Request Body

Name
Type
Description

first_name

string

The first name of the customer.

last_name

string

The last name of the customer.

title

string

The title of the user.

email

string

The email of the user.

password

string

The password of the user.

gender

string

The gender of the user. Allowed values: 0, 1, 2 More details here: https://en.wikipedia.org/wiki/ISO/IEC_5218

phone_number.prefix

integer

The phone number prefix of the user.

phone_number.number

string

The phone number of the user.

address.country_id

integer

The country of the address.

address.state_id

integer

The state of the address.

address.city

string

The city of the address.

address.post_code

string

The post code of the address.

address.street

string

The street of the address.

Update current user

PUT /api/internal/v1/:partner_code/users/current

Path Parameters

Name
Type
Description

partner_code

string

The partner code of the partner.

Request Body

Name
Type
Description

first_name

string

The first name of the user.

last_name

string

The last name of the user.

title

string

The title of the user.

email

string

The email of the user.

gender

string

The gender of the user. Allowed values: 0, 1, 2

phone_number.prefix

integer

The phone number prefix of the user.

phone_number.number

string

The phone number of the user.

address.country_id

integer

The country of the address.

address.state_id

integer

The state of the address.

address.city

string

The city of the address.

address.post_code

string

The post code of the address.

address.street

string

The street of the address.

{
    data: {
        id: 1,
        first_name: "John",
        last_name: "Doe",
        title: "Ing.",
        email: "[email protected]",
        gender: 1,
        phone_number: {
            prefix: 43,
            number: 6601234567,
        },
        address: {
            country_id: 1,
            state_id: 1,
            city: "Graz",
            post_code: "8010",
            street: "Dietrichsteinplatz 10",
        },
    }
}

Update the password of the current user

PUT /api/internal/v1/:partner_code/users/current/password

Path Parameters

Name
Type
Description

partner_code

string

The partner code of the partner.

Request Body

Name
Type
Description

old_password

string

The old password of the user

new_password

string

The new password of the user.

new_password_confirmation

string

The confirmation of the new password of the user.

Last updated

Was this helpful?