Customer

The individual who orders services from Mobile City Services

Login Customer

Let a user verify themselves to login

NameTypeDescription
emailstringA sanitized & validated customer's email address
passwordstringThe user's password
curl -i -X POST "https://api.usedarwin.com/v1/customer/signin" \
	-u "username:password" \
	-d '{"email": "[email protected]", "password": "myAwesomePassword"}'
{"status":"success","customer_id":"mcs_hjskeh8qbx7qqwdksud8"}

Forget Password

For customers to reset their password with their email address

NameTypeDescription
emailstringThe Customer's Email address
curl -i -X POST "https://api.usedarwin.com/v1/customer/reset_password" \
	-u "username:password" \
	-d '{"email": "[email protected]"'
{
  "message": "Awesome! An email was sent to you with a link to reset you password"
}

Create Customer

Initiate the creation of a customer

NameTypeDescription
emailstringA sanitized & validated customer's email address
zipstringThe Customer's zipcode
curl -i -X POST "https://api.usedarwin.com/v1/customer/create" \
	-u "username:password" \
	-d '{"zip": "10025", "email": "[email protected]"}'
{
    "customer_id": "mcs_sdbsu7ewnd7wchs1",
    "first_name": "",
    "last_name": "",
    "email": "[email protected]",
    "phone": "",
    "stripe_customer_id": "",
    "address": {
      "street_one": "",
      "street_two": "",
      "city": "New York",
      "state": "New York",
      "zip": "10025"
    }
  }

Get Customer

Retrieving a customer by ID

NameTypeDescription
customer_idstringThe customer's ID
curl -i -X POST "https://api.usedarwin.com/v1/customer/:customer_id" \
	-u "username:password"
{
	"customer_id": "mcs_hejwds8euajdnw8",
	"first_name": "Elvan",
	"last_name": "Dudly",
	"username": "[email protected]",
	"email": "[email protected]",
	"phone": "3475264380",
	"preference": "",
	"address": {
		"street": "314 W 115th Street",
		"apartment": "23",
		"city": "New York",
		"state": "New York",
		"zipcode": "10026"
	}
}

Update Customer

Update a Customer's Records

NameTypeDescription
customer_id
Required
stringThe ID of the customer record being updated
customer_namestringThe full name of the customer record being updated
emailstringThe email address of the customer record being updated
phonenumberThe phone number of the customer record being updated
preferencesstringThe customer's preferences
streetstringThe street of the address of the customer
apartmentstringThe apartment or second line of the address of the customer
zipstringThe customer's zip code
cc_namestringThe name on the customer's credit card
cc_numbernumberThe number on the customer's credit card
cc_expirationstringThe month and Year the the customer's credit card expires
cc_cvvnumberThe CVV on the back of the customer's card
cc_zipstringThe billing zip code of the customer's card

Credit card updates Cannot be partial

curl -i -X POST "https://api.usedarwin.com/v1/customer/update" \
	-u "username:password" \
	-d '{"customer":{"customer_id":"mcs_hejwds8euajdnw8","customer_name":"Elvan Dudly","email":"[email protected]","phone":3475264380,"preference":"Fold Pants & Hang Shirts","address":{"street":"314 W 115th Street","apartment":"23","zip":"10026"},"creditcard":{"cc_name":"Elvan J. Dudly","cc_number":4242424242424242,"cc_expiration":"01/2023","cc_cvv":345,"cc_zip":"10006-2134"}}}'
{
	"customer_id": "mcs_hejwds8euajdnw8",
	"first_name": "Elvan",
	"last_name": "Dudly",
	"username": "[email protected]",
	"email": "[email protected]",
	"phone": "3475264380",
	"preference": "Fold Pants & Hang Shirts",
	"address": {
		"street": "314 W 115th Street",
		"apartment": "23",
		"city": "New York",
		"state": "New York",
		"zipcode": "10026"
	}
}

Search Customer

NameTypeDescription
querystringPartial or full user's first or last name
curl -i -X POST "https://api.usedarwin.com/v1/customer/search" \
	-u "username:password" \
	-d '{"query": "elv"}'
{
  "customer": [
    {
      "customer_id": "mcs_hsdgs7sdjhwbkdwp",
      "customer_name": "Elvan Dudly",
      "customer_email": "elvan.dud.ly"
    },
    {
      "customer_id": "mcs_ywdbskdushdnslck",
      "customer_name": "Elvon Dudla",
      "customer_email": "elvon.dud.la"
    }
  ]
}

Did this page help you?