Transaction
Create Transaction
Create a Transaction and attach it to a customer's profile
| Name | Type | Description |
|---|---|---|
| customer_id | string | The ID of the customer that initiated the transaction |
| service_name | string | The service the customer is requesting |
| pickup_timestamp | number | The pickup date & time in Unix Time Stamp |
| delivery_timestamp | number | The requested delivery date & time in Unix Time Stamp |
| notes | string | Any optional noted the customer may request |
curl -i -X POST "https://api.usedarwin.com/v1/transaction/create" \
-u "username:password" \
-d '{"customer_id":"mcs_husdsker89jd8e","service_name":"dry cleaning","pickup_timestamp":"1433187000","delivery_timestamp":"1433359260","notes":"This is a note"}'
{
"transaction_id": "mcs_tranjhsdjkf9nfel",
"transaction_code": 871011018,
"service_name": "dry cleaning",
"pickup_date": "2015-06-01",
"pickup_time": "15:30",
"delivery_date": "2015-06-03",
"delivery_time": "15:21",
"note": "This is a note",
"status": "open",
"total": "--"
}
Get Transaction
Get a customer's transaction by the transaction ID
| Name | Type | Description |
|---|---|---|
| transaction_id | string | The ID of the transaction being requested |
curl -i -X POST "https://api.usedarwin.com/v1/transaction/:transaction_id" \
-u "username:password"
{
"transaction_id": "mcs_jhds9y34ijndssdlkso",
"transaction_code": "871011013",
"customer_id": "mcs_397hwkjdbsp9d",
"pickup_date_time": "Jun 01, 2015 @ 03:30 PM",
"pickup_date": "2015-06-01",
"pickup_time": "15:30:00",
"delivery_date_time": "Jun 03, 2015 @ 03:21 PM",
"delivery_date": "2015-06-03",
"delivery_time": "15:21:00",
"note": "This is a note",
"service": {
"service_id": "mcs_uywdgoq4jhc72dsk",
"service_name": "dry cleaning",
"position": {
"position_number": "1",
"position_description": "service request",
"button_title": "Dispatch Driver",
"events": [
{
"event": "trak"
}
]
},
"progress_bar": {
"total_steps": 7,
"percentage": 14.285714285714
}
},
"status": "open",
"receipt": [
{
"receipt_id": null,
"item_id": null,
"title": null,
"image_url": null,
"price": "0.00",
"quantity": null
}
],
"total": "0.00"
}
Update Transaction
Update the information in a transaction
| Name | Type | Description |
|---|---|---|
| transaction_id | string | The ID of the transaction that will be updated |
| service_name | string | The new service name of the transaction that will be updated |
| pickup_timestamp | number | The pickup date and time in Unix Timestamp |
| delivery_timestamp | number | The delivery date and time in Unix Timestamp |
| note | string | Any notes that you wish to modify |
| status | boolean string | Can either be "open" or "closed" |
curl -i -X POST "https://api.usedarwin.com/v1/transaction/update" \
-u "username:password"
-d '{"transaction_id":"mcs_hsdue3k48rdfb98s","service_name":"dry cleaning","pickup_timestamp":"1433187000","delivery_timestamp":"1433359260","note":"This is a note","status":"open"}'
{
"service_name": "dry cleaning",
"pickup_date": "2015-06-01",
"pickup_time": "19:30",
"delivery_date": "2015-06-03",
"delivery_time": "19:21",
"note": "This is a note",
"status": "open"
}
Add to Receipt
Add Items to the Transaction & Update the Receipt
| Name | Type | Description |
|---|---|---|
| transaction_id | string | The ID of the active Transaction |
| item_id | string | The ID of the item being added |
curl -i -X POST "https://api.usedarwin.com/v1/receipt/add" \
-u "username:password"
-d '{"transaction_id": "mcs_kjdfhbdifu90erk","item_id": "mcs_jew732ibdksbkds9"}'
{
"transaction_id": "mcs_86dbsjhabsidf",
"transaction_code": "871011013",
"customer_id": "mcs_fdhbifddfjnd",
"pickup_date_time": "Jun 01, 2015 @ 03:30 PM",
"pickup_date": "2015-06-01",
"pickup_time": "15:30:00",
"delivery_date_time": "Jun 03, 2015 @ 03:21 PM",
"delivery_date": "2015-06-03",
"delivery_time": "15:21:00",
"note": "This is a note",
"service": {
"service_id": "mcs_jywgd8rjhsbdk",
"service_name": "dry cleaning",
"position": {
"position_number": "1",
"position_description": "service request",
"button_title": "Dispatch Driver",
"events": [
{
"event": "trak"
}
]
},
"progress_bar": {
"total_steps": 7,
"percentage": 14.285714285714
}
},
"status": "open",
"receipt": [
{
"receipt_id": "mcs_sdnb84hiqhwbskjhd",
"item_id": "mcs_kdkshb97wkwsdjnd",
"title": "Dress",
"image_url": "",
"price": "12.00",
"quantity": "1"
}
],
"total": "12.00"
}
Remove From Receipt
Remove Items from the Transaction & Update the Receipt
| Name | Type | Description |
|---|---|---|
| transaction_id | string | The ID of the active Transaction |
| item_id | string | The ID of the item being added |
curl -i -X POST "https://api.usedarwin.com/v1/receipt/remove" \
-u "username:password"
-d '{"transaction_id": "mcs_kjdfhbdifu90erk","item_id": "mcs_jew732ibdksbkds9"}'
{
"transaction_id": "mcs_86dbsjhabsidf",
"transaction_code": "871011013",
"customer_id": "mcs_fdhbifddfjnd",
"pickup_date_time": "Jun 01, 2015 @ 03:30 PM",
"pickup_date": "2015-06-01",
"pickup_time": "15:30:00",
"delivery_date_time": "Jun 03, 2015 @ 03:21 PM",
"delivery_date": "2015-06-03",
"delivery_time": "15:21:00",
"note": "This is a note",
"service": {
"service_id": "mcs_jywgd8rjhsbdk",
"service_name": "dry cleaning",
"position": {
"position_number": "1",
"position_description": "service request",
"button_title": "Dispatch Driver",
"events": [
{
"event": "trak"
}
]
},
"progress_bar": {
"total_steps": 7,
"percentage": 14.285714285714
}
},
"status": "open",
"receipt": [
{
"receipt_id": null,
"item_id": null,
"title": null,
"image_url": null,
"price": "0.00",
"quantity": null
}
],
"total": "0.00"
}
Move Transaction
Move a transaction FORWARD through the system
| Name | Type | Description |
|---|---|---|
| customer_id | string | The ID of the customer that the transaction belongs to |
| transaction_id | string | The ID of the transaction being moved |
curl -i -X POST "https://api.usedarwin.com/v1/transaction/move" \
-u "username:password"
-d '{"customer_id": "mcs_kjdfhbdifu90erk","transaction_id": "mcs_jew732ibdksbkds9"}'
{
"transaction_id": "mcs_76ewuh43jhddfkjdnf9s",
"transaction_code": "871011011",
"customer_id": "mcs_wei73eibskdsh8wjsn",
"pickup_date_time": "Jan 08, 2015 @ 01:00 PM",
"pickup_date": "2015-01-08",
"pickup_time": "13:00:00",
"delivery_date_time": "Jan 11, 2015 @ 07:00 AM",
"delivery_date": "2015-01-11",
"delivery_time": "07:00:00",
"note": "No notes",
"service": {
"service_id": "mcs_37hkdsjbswiwelwkwd",
"service_name": "dry cleaning",
"position": {
"position_number": "4",
"position_description": "from plant",
"button_title": "Dispatch Driver",
"events": [
{
"event": "email"
},
{
"event": "text"
}
]
},
"progress_bar": {
"total_steps": 7,
"percentage": 57.142857142857
}
},
"status": "open",
"receipt": [
{
"receipt_id": null,
"item_id": null,
"title": null,
"image_url": null,
"price": "0.00",
"quantity": null
}
],
"total": "0.00"
}
Updated less than a minute ago
Did this page help you?
