Customer
The individual who orders services from Mobile City Services
Login Customer
Let a user verify themselves to login
| Name | Type | Description |
|---|---|---|
| string | A sanitized & validated customer's email address | |
| password | string | The 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
| Name | Type | Description |
|---|---|---|
| string | The 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
| Name | Type | Description |
|---|---|---|
| string | A sanitized & validated customer's email address | |
| zip | string | The 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
| Name | Type | Description |
|---|---|---|
| customer_id | string | The 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
| Name | Type | Description |
|---|---|---|
| customer_id Required | string | The ID of the customer record being updated |
| customer_name | string | The full name of the customer record being updated |
| string | The email address of the customer record being updated | |
| phone | number | The phone number of the customer record being updated |
| preferences | string | The customer's preferences |
| street | string | The street of the address of the customer |
| apartment | string | The apartment or second line of the address of the customer |
| zip | string | The customer's zip code |
| cc_name | string | The name on the customer's credit card |
| cc_number | number | The number on the customer's credit card |
| cc_expiration | string | The month and Year the the customer's credit card expires |
| cc_cvv | number | The CVV on the back of the customer's card |
| cc_zip | string | The 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
| Name | Type | Description |
|---|---|---|
| query | string | Partial 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"
}
]
}
Updated less than a minute ago
Did this page help you?
