Customer

When interacting with the shop resource, some endpoints allow for customer or guest information associated with the request.

Customer Access Token

Yordadev's eCommerce Solution provides all shop's their own segregated customer's authentication & authorization system. Some resource endpoints like adding a product to a cart require an additional header to be added to the request.

X-Customer-Token: Bearer {InsertCustomerTokenHere}

External Authentication or Guest

You can either utilize our guest user persistent cart system or you can use your own auth system. Whatever you choose, we got you covered. You will still need to include the following header either way:

X-Customer-Token: Bearer {InsertSessionID|or|ExternalToken}

You may utilize your own customer token such as a session_id or your own generated token.

Note the life cycle on guest carts is 72 hours.

post
Authenticating a Existing Customer

https://yorauth.yordadev.network/v1/shop/customer/login
This endpoint allows you to authenticate a customer to retrieve their customer access token.
Request
Response
Request
Headers
Authorization
required
string
Your Shop's Client Credential Token.
Form Data Parameters
email
required
string
The email of the customer.
password
required
string
The customer's password.
Response
200: OK

post
Registering a new Customer

https://yorauth.yordadev.network/v1/shop/customer/register
This endpoint allows you to register a customer to your shop.
Request
Response
Request
Headers
Authorization
required
string
Your shop's Client Credential token.
X-Customer-Token
optional
string
The customer's guest token, if at all to transfer a guest cart to this customer.
Form Data Parameters
name
required
string
The name of the customer registering.
email
required
string
The e-mail address of the customer. This will be validated by an e-mail verification.
password
required
string
The password of the customer.
c_password
required
string
The password confirmed.
Response
201: Created