User endpoint v2

This page describes the user endpoint, which can be used to log in a user and retrieve their address and payment information from your SAP Commerce Cloud service.

With this endpoint, you can:

  • Log in a user and retrieve their access token.

  • Get, update and delete the stored addresses for a given user.

  • Get, update and delete the stored payment methods for a given user.

POST

Log in and get the user’s access token

Logs in a user and obtains the access token of the user.

Request URL

/.rest/ecommerce/v2/users/{userId}/accessToken

Parameters

Parameter Description Type Data Type

definitionName

required

The definition name.

query

string

connectionName

required

The connection name.

query

string

query

string

userId

required

The user ID.

path

string

password

required

The user password.

Create user addresses

Creates the addresses of a user.

Request URL

/.rest/ecommerce/v2/users/{userId}/addresses

Parameters

Parameter Description Type Data Type

definitionName

required

The definition name.

query

string

connectionName

required

The connection name.

query

string

userId

required

The user ID.

path

string

accessToken

required

The user’s access token.

header

string

GET

Get user addresses

Obtains the stored addresses of a user.

Request URL

/.rest/ecommerce/v2/users/{userId}/addresses

Parameters

Parameter Description Type Data Type

definitionName

required

The definition name.

query

string

connectionName

required

The connection name.

query

string

userId

required

The user ID.

path

string

accessToken

required

The user’s access token.

header

string

Get payment methods

Obtains the payment methods of a user.

Request URL

/.rest/ecommerce/v2/users/{userId}/paymentMethods

Parameters

Parameter Description Type Data Type

definitionName

required

The definition name.

query

string

connectionName

required

The connection name.

query

string

userId

required

The user ID.

path

string

accessToken

required

The user’s access token.

header

string

PUT

Update user addresses

Updates the addresses of a user.

Request URL

/.rest/ecommerce/v2/users/{userId}/addresses/{addressId}

Parameters

Parameter Description Type Data Type

definitionName

required

The definition name.

query

string

connectionName

required

The connection name.

query

string

userId

required

The user ID.

path

string

addressId

required

The address ID.

path

string

accessToken

required

The user’s access token.

header

string

Update payment methods

Updates the payment methods of a user.

Request URL

/.rest/ecommerce/v2/users/{userId}/paymentMethods/{paymentMethodId}

Parameters

Parameter Description Type Data Type

definitionName

required

The definition name.

query

string

connectionName

required

The connection name.

query

string

userId

required

The user ID.

path

string

paymentMethodId

required

The address ID.

path

string

accessToken

required

The user’s access token.

header

string

DELETE

Remove user addresses

Deletes the addresses of a user.

Request URL

/.rest/ecommerce/v2/users/{userId}/addresses/{addressId}

Parameters

Parameter Description Type Data Type

definitionName

required

The definition name.

query

string

connectionName

required

The connection name.

query

string

userId

required

The user ID.

path

string

addressId

required

The address ID.

path

string

accessToken

required

The user’s access token.

header

string

Remove payment methods

Deletes the payment methods of a user.

Request URL

/.rest/ecommerce/v2/users/{userId}/paymentMethods/{paymentMethodId}

Parameters

Parameter Description Type Data Type

definitionName

required

The definition name.

query

string

connectionName

required

The connection name.

query

string

userId

required

The user ID.

path

string

paymentMethodId

required

The address ID.

path

string

accessToken

required

The user’s access token.

header

string

Feedback

DX Core

×

Location

This widget lets you know where you are on the docs site.

You are currently perusing through the Ecommerce module docs.

Main doc sections

DX Core Headless PaaS Legacy Cloud Incubator modules