Services
A service that Mobile City offers
Create Service
| Name | Type | Description |
|---|---|---|
| service_name | string | The Name of the New Service |
| description | string | A description in the first step in the service process |
Creating a service is only possible if that service does not already exist. The Description is used as the 1st step of the process around the service.
curl -i -X POST "https://api.usedarwin.com/v1/service/create" \
-u "username:password" \
-d '{"service_name": "dog walking","description": "this is for what ever the 1st step is"}'
{
"message":"successfully created"
}
Get Service
Retrieving an service that Mobile City offers
| Name | Type | Description |
|---|---|---|
| service_name | string | The name of the service being queried |
| position_number | number | The Step in the process that makes up the service being offered |
curl -i -X POST "https://api.usedarwin.com/v1/service/:service_name/:position_number" \
-u "username:password"
{
"service_id": "mcs_serefkhd9erhebrne",
"service_name": "dry cleaning",
"position": {
"position_number": "3",
"position_description": "to plant",
"button_title": "Dispatch Driver",
"events": [
{
"event": "email",
}
]
},
"progress_bar": {
"total_steps": 7,
"percentage": 42.857142857143
}
}
Querying dry cleaning at position #3
Get Service Stats
Get all services and some stats associated with each
curl -i -X POST "https://api.usedarwin.com/v1/service/stats" \
-u "username:password"
{
"service_stats": [
{
"service": [
{
"service_name": "dry cleaning",
"image_title": "drycleaning",
"shade": "d",
"position_number": "1",
"description": "service request",
"position_count": 13,
"total_orders": 16
},
{
"shade": "l",
"position_number": "2",
"description": "collect",
"position_count": 0
},
{
"shade": "d",
"position_number": "3",
"description": "to plant",
"position_count": 1
},
{
"shade": "l",
"position_number": "4",
"description": "from plant",
"position_count": 1
},
{
"shade": "d",
"position_number": "5",
"description": "process",
"position_count": 1
},
{
"shade": "l",
"position_number": "6",
"description": "Return to customer",
"position_count": 0
},
{
"shade": "d",
"position_number": "7",
"description": "Successfully Returned",
"position_count": 0
}
]
},
{
"service": [
{
"service_name": "house keeping",
"image_title": "housekeeping",
"shade": "d",
"position_number": "1",
"description": "service request",
"position_count": 1,
"total_orders": 1
},
{
"shade": "l",
"position_number": "2",
"description": "schedule visit",
"position_count": 0
},
{
"shade": "d",
"position_number": "3",
"description": "visit home",
"position_count": 0
},
{
"shade": "l",
"position_number": "4",
"description": "Successfully cleaned",
"position_count": 0
}
]
},
{
"service": [
{
"service_name": "wash and fold",
"image_title": "washandfold",
"shade": "d",
"position_number": "1",
"description": "service request",
"position_count": 0,
"total_orders": 1
},
{
"shade": "l",
"position_number": "2",
"description": "collect",
"position_count": 0
},
{
"shade": "d",
"position_number": "3",
"description": "to plant",
"position_count": 0
},
{
"shade": "l",
"position_number": "4",
"description": "from plant",
"position_count": 1
},
{
"shade": "d",
"position_number": "5",
"description": "process",
"position_count": 0
},
{
"shade": "l",
"position_number": "6",
"description": "Return to customer",
"position_count": 0
},
{
"shade": "d",
"position_number": "7",
"description": "Successfully Returned",
"position_count": 0
}
]
}
]
}
Add Service
Add a step to the process within a service
| Name | Type | Description |
|---|---|---|
| service_name | string | The Service that the new step will be added to |
| description | string | The description of the new step being added |
| position_number | string | The position number of the step being added |
curl -i -X POST "https://api.usedarwin.com/v1/service/add" \
-u "username:password" \
-d '{"service_name": "dog walking","description": "This is Step number TWO", "position_number": "2"}'
{
"service_name": "dog walking",
"description": "This is Step number TWO",
"position": "2"
}
Remove Service
Remove a step to the process within a service
| Name | Type | Description |
|---|---|---|
| service_name | string | The Service that the new step will be added to |
| description | string | The description of the new step being added |
| position_number | string | The position number of the step being added |
curl -i -X POST "https://api.usedarwin.com/v1/service/remove" \
-u "username:password" \
-d '{"service_name": "dog walking","position": "2"}'
{
"message":"successfully removed"
}
Get Items
Getting ALL the items available to add to the shopping cart for a given service
| Name | Type | Description |
|---|---|---|
| service_name | string | The name of the service |
curl -i -X POST "https://api.usedarwin.com/v1/service/:service_name" \
-u "username:password"
{
"item": {
"item_count": 27,
"service_name": "dry cleaning"
},
"item_group": [
{
"item": [
{
"item_id": "1",
"title": "2 Piece Suit",
"image_url": "2_piece_suit.gif",
"price": "1200"
},
{
"item_id": "5",
"title": "Waist Coat",
"image_url": "waist_coat.gif",
"price": "2000"
},
{
"item_id": "7",
"title": "Deluxe Shirt",
"image_url": "deluxe_shirt.gif",
"price": "449"
},
{
"item_id": "11",
"title": "Light Jacket",
"image_url": "light_jacket.gif",
"price": "1200"
},
{
"item_id": "13",
"title": "Outer Jacket",
"image_url": "outer_jacket.gif",
"price": "1800"
},
{
"item_id": "17",
"title": "Robe",
"image_url": "robe.gif",
"price": "1800"
},
{
"item_id": "19",
"title": "Short Skirt",
"image_url": "short_skirt.gif",
"price": "600"
},
{
"item_id": "23",
"title": "Sweatshirt",
"image_url": "sweatshirt.gif",
"price": "600"
},
{
"item_id": "25",
"title": "Vest",
"image_url": "vest.gif",
"price": "550"
}
]
},
{
"item": [
{
"item_id": "2",
"title": "Basic Shirt",
"image_url": "basic_shirt.gif",
"price": "199"
},
{
"item_id": "4",
"title": "Blouse with Beads or Sequins",
"image_url": "blouse_with_beads_or_sequins.gif",
"price": "1000"
},
{
"item_id": "8",
"title": "Down Coat",
"image_url": "down_coat.gif",
"price": "2700"
},
{
"item_id": "10",
"title": "Full Length Coat",
"image_url": "full_length_coat.gif",
"price": "3200"
},
{
"item_id": "14",
"title": "Pants",
"image_url": "pants.gif",
"price": "500"
},
{
"item_id": "16",
"title": "Regular Blouse",
"image_url": "regular_blouse.gif",
"price": "600"
},
{
"item_id": "20",
"title": "Silk Blouse",
"image_url": "silk_blouse.gif",
"price": "700"
},
{
"item_id": "22",
"title": "Sweater",
"image_url": "sweater.gif",
"price": "600"
},
{
"item_id": "26",
"title": "Waist Coat",
"image_url": "waist_coat.gif",
"price": "2000"
}
]
},
{
"item": [
{
"item_id": "3",
"title": "Blazer Sports",
"image_url": "blazer_sports.gif",
"price": "699"
},
{
"item_id": "6",
"title": "Full Length Coat",
"image_url": "full_length_coat.gif",
"price": "3200"
},
{
"item_id": "9",
"title": "Dress",
"image_url": "dress.gif",
"price": "1200"
},
{
"item_id": "12",
"title": "Long Skirt",
"image_url": "long_skirt.gif",
"price": "800"
},
{
"item_id": "15",
"title": "Pleated Skirt",
"image_url": "pleated_skirt.gif",
"price": "700"
},
{
"item_id": "18",
"title": "Scarf",
"image_url": "scarf.gif",
"price": "600"
},
{
"item_id": "21",
"title": "Knee Skirt",
"image_url": "knee_skirt.gif",
"price": "600"
},
{
"item_id": "24",
"title": "Tie",
"image_url": "tie.gif",
"price": "550"
},
{
"item_id": "27",
"title": "Wedding",
"image_url": "wedding.gif",
"price": "22500"
}
]
}
]
}
Updated less than a minute ago
Did this page help you?
