Customer

Content negotiation

Customer Endpoints

client

Method URI Name Summary
POST /v1/customer create customer Create Customer
POST /v1/customer/login customer login Login

Paths

Create Customer (createCustomer)

POST /v1/customer

creates a new customer

Parameters

Name Source Type Go type Separator Required Default Description
body body CreateCustomerRequest models.CreateCustomerRequest

All responses

Code Status Description Has headers Schema
200 OK A successful response. schema

Responses

200 - A successful response.

Status: OK

Schema

CreateCustomerResponse

Login (customerLogin)

POST /v1/customer/login

login for customers

Parameters

Name Source Type Go type Separator Required Default Description
body body CustomerLoginRequest models.CustomerLoginRequest

All responses

Code Status Description Has headers Schema
200 OK A successful response. schema

Responses

200 - A successful response.

Status: OK

Schema

CustomerLoginResponse

Models

Address

Properties

Name Type Go type Required Default Description Example
city string string city name
country string string IISO 3166-1 alpha-2 country code. https:en.wikipedia.org/wiki/List_of_ISO_3166_country_codes
isDefault boolean (formatted boolean) bool indicates if this is a default address
postalCode string string postal or zip code
stateProvince string string state or province name
street string string street name, ie: 1723 NW 23rd Ave.

CreateCustomerRequest

Properties

Name Type Go type Required Default Description Example
customer NewCustomer NewCustomer NewCustomer object

CreateCustomerResponse

Properties

Name Type Go type Required Default Description Example
customer Customer Customer Customer object
status ResponseStatus ResponseStatus a ResponseStatus object

Customer

Properties

Name Type Go type Required Default Description Example
email string string email address
firstName string string first name
id int64 (formatted integer) int64 customer id
lastName string string last or given name
password string string password

CustomerAccount

Properties

Name Type Go type Required Default Description Example
billingAddress Address Address Address object
id int64 (formatted integer) int64 customer id
shippingAddresses []Address []*Address collection of Address objects

CustomerLoginRequest

Properties

Name Type Go type Required Default Description Example
email string string email address, unique to each store id
password string string password

CustomerLoginResponse

Properties

Name Type Go type Required Default Description Example
customer Customer Customer Customer object
jwt JwtToken JwtToken jwt token
status ResponseStatus ResponseStatus a ResponseStatus object

JwtToken

Properties

Name Type Go type Required Default Description Example
accessExpire int64 (formatted integer) int64
accessToken string string
refreshAfter int64 (formatted integer) int64

NewCustomer

Properties

Name Type Go type Required Default Description Example
billingAddress Address Address Address object
email string string email address, unique per store id
firstName string string first name
lastName string string last or given name
password string string password
shippingAddresses Address Address Address object

ResponseStatus

Properties

Name Type Go type Required Default Description Example
statusCode int64 (formatted integer) int64 RFC http status code, ie. 204, etc - https:go.dev/src/net/http/status.go
statusMessage string string status message

Feedback

Was this page helpful?


Last modified January 19, 2022: content update (ec6fd04)