Skip to main content

Authenticate Shared User

POST 

/user

Upserts a user in the system and returns a unique `user_uid` and `x-access-token` header for authentication (that expires after 6 hours).

This is the preferred authentication method for partners sharing user information with LetMePark.

Users entered via this API are effectively "owned" by the partner entering the details, giving it further write privileges through this entry-point so it can be called multiple times for the same user, updating their details (using email as identifier - two different emails are two different users).

If a user exists but is "owned" by another partner, or by LetMePark, it will return a `409 Conflict` status and a fake `x-access-token`.

Request

Header Parameters

    x-partner-key stringrequired

    HTTP header that identifies the partner system making this call. Please contact LetMePark for your x-partner-key if you are considering user-level integration.

    Example: yNTdiOWYiLCJlbWFpbCI6InNkZXNhbGFzK3
    x-force-status integer

    An integration test header to skip normal execution and force a particular HTTP status response (ie 200, 400, 404, 500). Can be used in ALL entry points even if not explicitly mentioned.

    Example: 500

Body

required

User details

    firstname stringrequired

    Users first name

    surname stringrequired

    Users last name

    email stringrequired

    Users email address

    password stringrequired

    A password or token for this user that will not change. Ideally, a unique identifier for this user in the thirdparty system.

    phone stringrequired

    User phone number (without spaces)

    cifnif string

    User CIF/NIF (for invoicing).

    address string

    User Billing Address (for invoicing)

    number_plate string

    Number plate (UPPERCASE, without spaces)

    car_brand string

    The brand of the primary vehicle (required if sending number_plate)

    car_model string

    The model of the primary vehicle (required if sending number_plate)

    car_tag string

    Possible values: [0, C, B, ECO]

    The environmental tag for the users car (ie C)

Responses

OK

Schema
    user_uid stringrequired

    A unique identifier for this user

    x-access-token stringrequired

    An x-access-token header for authenticating this user in further API calls, can also be used as the access_token for auto-login via the website. Expires after 6 hours.

    has_payment_method booleanrequired

    If the user has a valid payment method

Loading...