Customer


The Customer resource represents a single person who has a relationship and an account with your store. A customer must be identified by a unique email address or mobile phone number.

A customer may authenticate with your store using their email or mobile number and a secure password. Once authenticated, a customer has access to maintain shopping carts, an address book and other API resources.

Create a Customer

POST/customers

curl -X POST https://api.pilon.io/customers \
     -H "Authorization: Bearer ACCESS_TOKEN_GOES_HERE" \
     -H "Content-Type: application/json" \
     -d $'{
		  "environment": "string",
		  "email": "string",
		  "mobile": "string",
		  "cognitoUsername": "string",
		  "firstName": "string",
		  "lastName": "string",
		  "addresses": "string"
		}'

Retrieve a Customer

GET/customers/{id}

curl -X GET https://api.pilon.io/customers/{id} \
     -H "Authorization: Bearer ACCESS_TOKEN_GOES_HERE" \
     -H "Content-Type: application/json"

Retrieve Current Customer

GET/customers/me

curl -X GET https://api.pilon.io/customers/me \
     -H "Authorization: Bearer ACCESS_TOKEN_GOES_HERE" \
     -H "Content-Type: application/json"

Update a Customer

PUT/customers/{id}

curl -X PUT https://api.pilon.io/customers/{id} \
     -H "Authorization: Bearer ACCESS_TOKEN_GOES_HERE" \
     -H "Content-Type: application/json" \
     -d $'{
		  "email": "string",
		  "mobile": "string",
		  "cognitoUsername": "string",
		  "firstName": "string",
		  "lastName": "string",
		  "addresses": "string"
		}'

Delete a Customer

DELETE/customers/{id}

curl -X DELETE https://api.pilon.io/customers/{id} \
     -H "Authorization: Bearer ACCESS_TOKEN_GOES_HERE" \
     -H "Content-Type: application/json"

List All Customers

GET/customers

curl -X GET https://api.pilon.io/customers \
     -H "Authorization: Bearer ACCESS_TOKEN_GOES_HERE" \
     -H "Content-Type: application/json"