LogoLogo
  • LiquidCommerce Documentation
  • πŸ”Authentication API Integration
    • Get Access Token
  • Services
    • πŸ—ΊοΈAddress API
      • Autocomplete
      • Details
    • πŸ‘₯Users API
      • Session
      • Fetch User
      • Delete User
      • Create/Update Address
      • Delete Address
      • Add Payment
      • Update Default Payment
      • Delete Payment
    • πŸ—ƒοΈCatalog API
      • Search
      • Availability
    • πŸ›’Cart API
      • Create/Update Cart
    • πŸ›οΈCheckout API
      • Prepare
      • Complete
    • πŸ“Orders API
      • Authentication
      • Get Order
  • CLOUD SDK
    • Overview
    • Methods & Usage
  • EVENTS & ERRORS
    • Overview
    • Cart Events
    • Checkout Status Codes
  • EVENT BRIDGE (WEBHOOKS)
    • Orders
  • Types
    • Loc
    • Catalog
    • Catalog Filters
    • Product
    • Cart
    • User
    • Retailer
    • Checkout
    • Order
Powered by GitBook
On this page
  • Endpoint Details
  • Headers
  • Body
  • Response Details
  • Sample Request and Response
Export as PDF
  1. Services
  2. Users API

Session

Get new session for payments management

Endpoint Details

POST /users/session

Headers

Header
Value

Content-Type

application/json

Authorization

Bearer <YOUR_ACCESS_TOKEN>

Body

Parameter
Type
Description
Required

email

string

User's email address

firstName

string

User's first name

lastName

string

User's last name

company

string

User's company name

phone

string

User's phone number in E.164 format

profileImage

string

URL of user's profile image

birthDate

string

User's birth date in YYYY-MM-DD format

id

string

Existing user identifier (for updates only), email becomes optional

Response Details

Field
Type
Description

statusCode

number

HTTP status code of the response

message

string

A brief message describing the result of the API call

metadata

Contains metadata about the API call

auth

Authentication object

data

User session

Metadata Object

User Session

Field
Type
Description

id

string

User's identifier

email

string

User's email address

firstName

string

User's first name

lastName

string

User's last name

phone

string

User's phone number

company

string

User's company

profileImage

string

URL to user's profile image

birthDate

string

Users's birth date

createdAt

date

Account creation timestamp

updatedAt

date

Last update timestamp

addresses

User's saved addresses

savedPayments

User's saved payment methods

session

User's current session information

Session

Attribute
Description

key: string

session key

secret: string

session secret

createdAt: Date

session creation timestamp

Sample Request and Response

curl --location 'https://staging.api.liquidcommerce.cloud/users/session' \
--header 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
    "email": "cx7bw@admin.com",
    "firstName": "John",
    "lastName": "Smith"
}'
{
    "statusCode": 201,
    "message": "Creating a new session succeeded",
    "metadata": {
        "languages": [
            "en"
        ],
        "timestamp": 1731595854533,
        "timezone": "UTC",
        "requestId": "reqid_123abc45def",
        "path": "/api/users/session",
        "version": "1.7.0"
    },
    "data": {
        "id": "usrid_123abc456def",
        "email": "cx7bw@admin.com",
        "firstName": "John",
        "company": "",
        "lastName": "Smith",
        "phone": null,
        "profileImage": "",
        "birthDate": null,
        "createdAt": "2024-11-14T13:17:47.482Z",
        "updatedAt": "2024-11-14T14:50:54.613Z",
        "addresses": [],
        "savedPayments": [],
        "session": {
            "key": "SESSION_KEY",
            "secret": "SECRET_KEY",
            "createdAt": "2024-11-14T14:50:54.843Z"
        }
    }
}
PreviousUsers APINextFetch User

Last updated 7 months ago

Array<>

Array<>

πŸ‘₯
metaDataObject
authObject
userSession
UserAddress
UserPayment
Session
Field
Type
Description

languages

Array<string>

List of supported languages for the response, e.g. ["en"]

timestamp

string

Unix timestamp (in milliseconds) when the response was generated

timezone

string

Timezone used for the response, always "UTC"

requestId

string

Unique identifier for the API request. Used for debugging and support

path

string

API path

version

string

API version used for the request