Tap Laundry API v1 documentation
API Authentication will be via the use of API keys. Currently API keys will be static and will not link actions to a user. This creates a security concern when exposing API keys to the web browser through JavaScript as unauthenticated users would be able to use the API keys. In the future, each user should be generated an API key and web requests should be made using the authenticated user’s API key so information like UserIDs can be restricted to the authenticated user. Currently, any API key can be used to create / modify /delete / manage orders for ANY user, not the authenticated user.
All requests should post the data to the endpoint. The post body should be of type “x-www-form-urlencoded” – or a standard form post. The name of each parameter should follow the name specified in the endpoint documentation, and the value should also follow the guidelines laid out in the endpoint documentation. In addition to the parameters laid out in the endpoint documentation, every request should have a key “token” and the value should be a valid API access token.
Each API request will respond with a standardized format, to let the caller know if the request completed successfully, if an error was returned, an error message, and any results returned from the request. An example response is provided below
Successful Request{ "status": "ok", "result": { "order_id": 137, "another_result": "another result" } }Unsuccessful Request
{ "status": "error", "message": "Missing required parameter: user_id" }
Generate a Stripe Billing invoice for a commercial account.
Name | Required | Description |
---|---|---|
orders_ids | true | A comma separated list of orders to generate invoices for. Items will be grouped by commercial account and billed to the stripe account on file. |
days_until_due | true | Days until the invoice is due. If it is zero, stripe will bill automatically 1 hour after it is due. |
{ "amount_due":10203, "invoice_number":"7E8E0D8-0001" }
Generate a list of commercial accounts
Name | Required | Description |
---|
[ { "id": 1, "name": "Residential", "subaccounts": 709, "orders": 159 }, { "id": 2, "name": "White Spider", "subaccounts": 20, "orders": 227 }, { "id": 3, "name": "Dorm Mom", "subaccounts": 37, "orders": 336 }, { "id": 4, "name": "Laundry Care - College Park", "subaccounts": 5, "orders": 0 }, { "id": 5, "name": "Heaven and Earth Acupuncture", "subaccounts": 1, "orders": 44 }, { "id": 7, "name": "Timeless Skin Solutions", "subaccounts": 1, "orders": 132 }, { "id": 8, "name": "Laundry Care Imports", "subaccounts": 474, "orders": 0 }, { "id": 9, "name": "Charles Hawkins", "subaccounts": 5, "orders": 1 }, { "id": 10, "name": "Test Commercial", "subaccounts": 1, "orders": 0 } ]
Mark a Commercial Account as being reviewed.
Name | Required | Description |
---|---|---|
user_id | true | The Id of the User approving the commercial account. |
commercial_id | true | The Id of the Commercial Account to be reviewed. |
Returns status="ok" when completed successfully.
Show information and orders pertaining to a specific commercial account.
Name | Required | Description |
---|---|---|
commercial_id | true | The ID of the commercial account |
{ "id": 51, "name": "Noya Chiropractic", "creation_date": "2018-10-09 20:55:32", "is_active": true, "is_reviewed": false, "allow_rush_bonus": true, "normal_client_payment": "1", "billing_details": "", "minimum_policy": "No minimum policy entered", "user_pricing_only": true, "stripe_id": "cus_DkyBeJrV3pZcWy", "days_until_due": 0, "requires_purchase_order": true, "is_taxable_organization": true, "requires_our_w9": true, "payment_method": "card", "ein": "", "first_pickup": "10/16/2018", "payment_frequency": "onreceipt", "addresses": [ { "id": 65, "name": "Noya Chiropractic", "line_1": "4708 Wisconsin Ave NW", "line_2": "101", "state": "DC", "city": "Washington", "zip_code": "20016", "latitude": 0, "longitude": 0, "special_instructions": "No fragrance laundry soap " } ], "contacts": [ { "id": 59, "first_name": "Anthony", "last_name": "Noya", "email": "DrAnthony@NoyaChiropractic.com", "phone": "2022371399", "type": null, "addresses": [] }, { "id": 60, "first_name": "Noya Chiropractic", "last_name": "Billing", "email": "DrAnthony@NoyaChiropractic.com", "phone": "2022371399", "type": "BILLING", "addresses": [ { "id": 64, "name": "Billing Address", "line_1": "4708 Wisconsin Ave", "line_2": "101", "state": "DC", "city": "Washington", "zip_code": "20016", "latitude": null, "longitude": null, "special_instructions": null } ] }, { "id": 65, "first_name": "test1", "last_name": "test2", "email": "test3", "phone": "test4", "type": "BILLING", "addresses": [] } ], "users": [ { "id": 1719, "firstname": "Noya", "lastname": "Chiropractic", "email": "martin@noyachiropractic.com", "phone": "2022371399", "commercial_account": "Noya Chiropractic", "commercial_account_id": 51, "commercial_account_normal_client_payment": true, "site_id": 2 } ] }
View unpaid orders for a CommercialAccount
Name | Required | Description |
---|---|---|
commercial_id | true | The ID of the commercial account |
Array of Order objects.
Send an email via noreply@taplaundry.com
Name | Required | Description |
---|---|---|
request | true | formatted JSON request, like you see in the Result section. |
site_id | false | Site ID to use for filling assets into emails. Defaults to 7 (Tap Laundry). |
This endpoint does not return a result.
The format for the request parameter is as follows.
{ "to": ["daniel@fanara.co"], "cc": ["daniel@fanara.co"], "subject": "testing email", "body": "HTML BODY", "altbody": "Plain text body content." }
Add a service to the order in the form of an OrderItem.
Name | Required | Description |
---|---|---|
order_id | true | The ID of the order to update. |
service_uid | true | The ID of the service to be added to the order. |
custom_price | false* | *This field is required when adding a service that is custom priced to the order. (ex. Dry Cleaning) |
quantity | true | The quantity of the service ordered, based on the unit of measurement. If a custom price is specified, the quantity should be 1. |
{ "orderitem_id": "the ID of the order item added to the order." }
Lists 30 orders from the database for each request.
Name | Required | Description |
---|---|---|
page | false | -1 will return all orders. Returns 30 orders per page. |
This endpoint return an array of Order objects, in the same format of the /orders/view endpoint.
Assign a provider to an Order. This will fetch the tax rate using TaxJar.
Name | Required | Description |
---|---|---|
order_id | true | The ID of the order to be updated. |
provider_id | true | The user id of the provider to assign to the order. |
This endpoint has an empty result, but you can verify that is completed successfully by ensuring the status of the result is "ok"
Lists all orders created between two dates.
Name | Required | Description |
---|---|---|
start | true | The unix timestamp to start the search |
end | true | The unix timestamp to end the search |
This endpoint return an array of Order objects, in the same format of the /orders/view endpoint.
Lists all orders belonging to a customer.
Name | Required | Description |
---|---|---|
customer_id | true | The ID of the customer |
This endpoint return an array of Order objects, in the same format of the /orders/view endpoint.
List all orders within a location
Name | Required | Description |
---|---|---|
location_id | true | The ID of the location |
This endpoint return an array of Order objects, in the same format of the /orders/view endpoint.
Lists all orders assigned to a provider.
Name | Required | Description |
---|---|---|
provider_id | true | The ID of the provider |
This endpoint return an array of Order objects, in the same format of the /orders/view endpoint.
Mark an order as cancelled.
Name | Required | Description |
---|---|---|
order_id | true | The ID of the order to cancel. |
This endpoint has an empty result, but you can verify that is completed successfully by ensuring the status of the result is "ok"
Mark an order as complete. The complete order workflow will be executed, so the customer’s transaction_id should already be obtained. On success, the operation will also transfer funds to the provider’s wallet. This endpoint will also create a TaxJar item for the order.
Name | Required | Description |
---|---|---|
order_id | true | The ID of the order to mark as complete. |
transaction_id | true | The transaction ID that should be associated with the completion of the order. An empty transaction is possible, in cases where the customer is not charged due to an error etc, but the field should still be present. BILLING_ERROR indicates an error when billing the client, and PENDING_INVOICE indicates that we are invoicing a commercial client. Note: because this parameter can be empty, we should just check if it is set, but not necessarily check if it has a value. |
This endpoint has an empty result, but you can verify that is completed successfully by ensuring the status of the result is "ok"
Finalize an order. This sets the order status to finalized. An order in the finalized state means the total costs and taxes have been set, and it is ready to be reviewed for billing. The next stage would be to mark the order as completed once the order has been verified.
Name | Required | Description |
---|---|---|
order_id | true | The ID of the order to be finalized. |
This endpoint has an empty result, but you can verify that is completed successfully by ensuring the status of the result is "ok"
Modify an OrderItem attached to an order. This is useful for modifying the CustomPrice or Quantity of an OrderItem.
Name | Required | Description |
---|---|---|
orderitem_id | true | The ID of the orderitem to remove. |
order_id | true | The ID of the order to be updated. |
quantity | false | The quantity to set on the order item. |
custom_price | false* | This field is required if the service is custom priced. This sets the cost of the service orderitem. |
{ "quantity": "true or false depending on whether or not the update was successful", "custom_price": "true or false depending on whether or not the update was successful", }
This endpoint is used to create a new order for a user. After an order has been created, it will return an order ID allowing services to be added to that order.
Name | Required | Description |
---|---|---|
user_id | true | The ID of the user to associate with the order. |
location_id | true | The ID for the location of the order. This is used for calculating region based prices. |
address | true | JSON string of the address. Used for calculating taxes, and for the order's location. |
name | false | The name to associate with the order. If no name is provided, it will default to the name associated with the User. |
pickup_time | false | Unix timestamp for the order's scheduled pickup time. |
dropoff_time | false | Unix timestamp for the order's scheduled dropoff time. |
promo_id | false | The ID of the promo-code to attach to the order. Currently promos are not verified, just added to the order. |
special_instructions | false | Any instructions to associate with the order. |
send_notification | false | Defaults to true. Whether or not to send a dispatch notification to all of the eligible providers in the location. |
source | false | String describing where the order was created. ex 'workdesk' |
{ "order_id": "id of the new order" }
Return all of the notes associated with an order.
Name | Required | Description |
---|---|---|
order_id | true | The order to fetch notes for. |
provider_only | false | If set to true, only notes created by the provider will be returned. |
[ { "id": 5557, "related": 3002, "note": "Provider 1566 assigned to order.", "creation_date": "2018-07-15 02:00:30", "creation_time": 1531620030, "author": 0, "author_name": "System", "type": 6, "system_generated": true }, { "id": 5561, "related": 3002, "note": "Changed status from Waiting for Pickup to Pickup Complete.", "creation_date": "2018-07-15 14:30:14", "creation_time": 1531665014, "author": 0, "author_name": "System", "type": 6, "system_generated": true }, { "id": 5587, "related": 3002, "note": "Changed status from Pickup Complete to In progress.", "creation_date": "2018-07-16 01:05:42", "creation_time": 1531703142, "author": 0, "author_name": "System", "type": 6, "system_generated": true }, { "id": 5727, "related": 3002, "note": "Changed status from In progress to Out for delivery.", "creation_date": "2018-07-17 13:43:35", "creation_time": 1531835015, "author": 0, "author_name": "System", "type": 6, "system_generated": true } ]
Create a new note on an Order.
Name | Required | Description |
---|---|---|
order_id | true | The Order Id to attach the note to |
user_id | true | The Id of the user creating the note |
note | true | The content of the note |
Check for status = "ok" for successful requests
Remove an OrderItem from an Order
Name | Required | Description |
---|---|---|
orderitem_id | true | The ID of the orderitem to remove. |
order_id | true | The ID of the order to be updated. |
This endpoint has an empty result, but you can verify that is completed successfully by ensuring the status of the result is "ok"
Leave a review for a provider on an order. This endpoint is not restricted to a specific status, but should be called after an order has been completed.
Name | Required | Description |
---|---|---|
order_id | true | The ID of the order to review. |
rating | true | Numerical equivalent to rate the provider. Should be up to 5 stars. |
comment | true | Optional comment to leave with review. The comment can be empty but the parameter should still be sent to the server. |
This endpoint does not return a result, status = ok if the call was successful.
Force rush status on an order.
Name | Required | Description |
---|---|---|
user_id | true | User that initiated the API call. |
order_id | true | The Order to be updated. |
rush_status | true | 0 enables the default method of rush calculation, 1 forces rush status on an order, 2 force disables rush status on an order. |
{ "id": 4500, "location": { "id": 61, "name": "Testville", "state": "TestState", "state_abbreviation": "TS", "time_difference": 0, "is_taxable": false, "is_origin_tax": false, "is_active": false, "url": "", "site_id": 1 }, "order_items": null, "customer_id": 1084, "creation_date": 1539492866, "customer_name": "Test order. Do not accept.", "promo": null, "is_finalized": false, "payment_id": "", "final_cost": null, "final_discount_amount": null, "final_tax_cost": null, "final_provider_payment": null, "pickup_time": 1532779200, "dropoff_time": 1532865600, "status": "Cancelled", "provider": null, "tax_rate": null, "address": "{\"address\":\"2585 Findley Ave\",\"address2\":\"\",\"zipcode\":\"43202\"}", "is_rush": true, "special_request": "This is a test order. ", "is_active": false, "final_tip": 0, "customer_reviewed": true, "force_rush_status": 1 }
Leave a tip on an order for the provider. This endpoint requires the order be in the finalized state.
Name | Required | Description |
---|---|---|
order_id | true | The ID of the Order to leave a tip for. |
amount | true | The amount in dollars to tip for an order. |
This endpoint does not return a result, status = ok if the call was successful.
Lists all of the unassigned orders for a location.
Name | Required | Description |
---|---|---|
location_id | true | Location to query for unassigned orders |
An array of Order objects.
This endpoint is used to update some fields of an order. You can specify as many or as few parameters as you’d like so you can update multiple properties of an order in a single call. This endpoint supports things like updating the: pickup time, dropoff time, or status, and provider of an order.
Name | Required | Description |
---|---|---|
order_id | true | The ID of the order to update. |
address | false | JSON string of the address. Used for calculating taxes, and for the order's location. |
pickup_time | false | Unix timestamp for the order's scheduled pickup time. |
dropoff_time | false | Unix timestamp for the order's scheduled dropoff time. |
status | false | String to set the status field to. Typically, this is something like “Complete” or “Cancelled”. Generally, this value is automatically set through calls like finalizing the order or cancelling the order and is only useful for setting the order status outside of the typical workflow. |
payment_id | false | Stripe Payment ID or PENDING_INVOICE or BILLING_FAILED |
special_request | false | The customers special instructions |
{ "pickup_time": "true or false depending on if the update was successful", "dropoff_time": "true or false depending on if the update was successful", "status": "true or false depending on if the update was successful", "address": "true or false depending on if the update was successful", }
View all the information necessary to render an order.
Name | Required | Description |
---|---|---|
order_id | true | The ID of the Order to be fetched. |
{ "order_id": 4230, "name": "Elizabeth Giesecke", "total": 32.25, "pretax_total": 30, "prediscount_total": 30, "payment_id": "ch_1DJ29kG3BgNXlmeZIahFezCw", "provider_total": 20, "dropoff_time": 1538568000, "pickup_time": 1538395200, "provider": { "id": 1027, "name": "Laura C.", "firstname": "Laura", "lastname": "Chapman", "phone": "6142028628", "role": "Guru", "location": { "Id": 1, "Name": "Columbus", "State": "Ohio", "Site_Id": 1, "StateAbbreviation": "OH", "BagRate": 35, "TimeDifference": "0", "isTaxable": 1, "isOriginTax": 1, "isActive": 1, "Url": "/locations/columbus/", "CreationDate": "2017-11-18 16:53:00", "Longitude": "-82.99879420000002", "Latitude": "39.9611755", "ComingSoon": 0, "GoogleListing": 0, "YelpListing": 0, "Type": 0, "Tier": 1, "ClientPortal": 1 } }, "address": "{\"address\":\"1287 Glenn Ave.Columbus, Ohio 43212\",\"address2\":\"\",\"zipcode\":\"43212\",\"city\":\"Columbus\",\"state\":\"OH\"}", "status": "Complete", "customer": { "id": 2097, "firstname": "Elizabeth", "lastname": "Giesecke", "email": "egiesecke1@aol.com", "phone": "6148008866", "commercial_account": "Residential", "commercial_account_id": 1, "commercial_account_normal_client_payment": true, "site_id": 2 }, "promo": null, "tax_total": 2.25, "tax_rate": 0.075, "rush": false, "active": false, "location": { "id": 1, "name": "Columbus", "state": "Ohio", "state_abbreviation": "OH", "time_difference": 0, "is_taxable": true, "is_origin_tax": true, "is_active": true, "url": "/locations/columbus/", "site_id": 1 }, "special_request": "none", "reviewed": true, "force_rush_status": 0, "details": { "stripe": { "total_charge": 3225, "total_transfer": 3101 } }, "flags": [], "receipt_email": "https://mail.taplaundry.com/archive/0b8eabb7-ca61-4d51-8f1f-1b20ffaa85db.html", "orderitems": [ { "id": 4847, "service_id": 45, "service_name": "Wash and Fold", "service_description": "13 gallons capacity. Clothing, towels, sheets, and/or light blankets. Wash, dry, and fold.", "service_partial_unit": false, "price": 30, "unitprice": 30, "provider_total": 20, "unit": "bag", "quantity": 1, "taxable": true } ] }
Runs a saved query, supports cached queries as defined in the database. [DEPRECATED] You should opt to use /query/execute unless you would like to utilize the caching ability of this endpoint.
Name | Required | Description |
---|---|---|
query_id | true | Id of the query to execute. |
The result returned will vary depending on the query being executed. Successful queries return status="ok"
Execute a saved query or execute a raw query. Saved queries should be used whenever possible, raw queries are used for dynamically generated queries such as the query building tool.
Name | Required | Description |
---|---|---|
query_id | false | Id of the saved query to execute. |
query | false | Raw JSON query structure to execute. |
The result returned will vary depending on the query being executed. Successful queries return status="ok"
List saved queries.
Name | Required | Description |
---|
[ { "id": 1, "name": "List Orders", "description": "List all orders with provider/customer names and ids including pickup and dropoff times." }, { "id": 2, "name": "Incorrect Payouts", "description": "Transactions generated for an order assigned to a provider that is different than the provider on the order. " }, { "id": 3, "name": "Billing Page", "description": "List all relevant details for orders in the finalized state to be rendered on the billing section." }, { "id": 4, "name": "Billing Audit Page", "description": "List all relevant details for orders that have not been audited yet." }, { "id": 5, "name": "Commercial Users Stripe Audit", "description": "List commercial account users that have an incorrect stripe id associated with them." }, { "id": 6, "name": "List Clients", "description": "List all clients and necessary information for the clients module." } ]
List all services and their attributes from the database.
Name | Required | Description |
---|---|---|
site_id | false | Optional filter for site_id |
[ { "id": 45, "name": "Wash and Fold", "description": "13 gallons capacity. Clothing, towels, sheets, and/or light blankets. Wash, dry, and fold.", "is_custom_pricing": 0, "site_id": 2, "is_taxable": 1, "has_partial_unit": 0 }, { "id": 48, "name": "Nylon Bag", "description": "Reusable nylon Laundry Care bag.", "is_custom_pricing": 0, "site_id": 2, "is_taxable": 1, "has_partial_unit": 0 } ]
Lists all of the available services. Supplying a user and a location will give a list of available services to a user for a given location, passing just a location will give a list of services available to the entire region.
Name | Required | Description |
---|---|---|
location_id | false | If a location ID is given, only services will be shown that are available in that region. |
customer_id | false | If this parameter is present, then location_id must also be sent. Supplying both of these parameters will return services that are available to this user in a given location. In addition to services available in the region, this method will also return services that are not available for the entire region but are available to the specified region. |
include_price | false | Defaults to false. If true, the price of a service will be returned along with the service. If a user is specified, the price will reflect any user-specific pricing associated with the service. If a user-specific pricing does not apply, the standard price for a region will be returned. It will also return the unit of measurement associated with the cost. |
site_id | false | The site making the request. This is to make sure that we are loading services for the correct laundry site. |
An array of service objects similar to the one below.
Note on Scope: Set based on if the pricing is location, user or globally specific.
{ "id": 5, "name": "Laundry By The Pound", "description": "blah", "custom_pricing": false, "price": "1.5", "unit": "Pound", "taxable": true, "scope": "location" }
Create a new service.
Name | Required | Description |
---|---|---|
name | true | Name of the new service. |
description | true | Short description of the service. |
is_custom_pricing | true | Boolean. True if the provider must input a cost for a service instead of a quantity. |
site_id | true | The Id of the site the service belongs to. |
is_taxable | true | Boolean. True if tax should be applied to the service. |
has_partial_unit | true | Boolean. True if the provider can enter a decimal, false to limit the input to whole number only (Ex. Bag pricing) |
{ "id": 121, "name": "Test Service", "description": "DESCRIPTION!", "is_custom_pricing": false, "site_id": 1, "is_taxable": false, "has_partial_unit": false }
Create a new ServicePrice for a user.
Name | Required | Description |
---|---|---|
service_id | true | |
unit | true | Unit of measurement for Service Price. |
customer_id | true | |
client_price | true | |
client_rush_price | true | |
provider_price | true | |
provider_rush_price | true |
Returns no result, status = "ok" if the operation succeeded.
Retrieve the URL to a site's brand asset.
Name | Required | Description |
---|---|---|
site_id | true | The ID of the site. |
{ "brand_logo": "https://www.taplaundry.com/api/images/company-badges/1.png" }
Lists all of the available states as per given Site ID.
Name | Required | Description |
---|---|---|
site_id | true | Returns all the states having same site_id as provided in 'site_id' parameter. |
An array is rendered similar to the one below.
{ "status": "ok", "result": [ { "id": 1, "name": "Alabama", "abbreviation": "Description of the state", "isOriginTax": true, "isTaxable": true, }, { "id": 2, "name": "Alaska", "abbreviation": "Description of the state", "isOriginTax": true, "isTaxable": false, }, { "id": 7, "name": "Texas", "abbreviation": "Description of the state", "isOriginTax": false, "isTaxable": false, } ] }
This endpoint is used to update some fields of an state. You can specify as many or as few parameters as you’d like so you can update multiple properties of a state in a single call.
Name | Required | Description |
---|---|---|
state_id | true | The ID of the state to update. |
is_taxable | false | Boolean (true/false) |
is_origin_tax | false | Boolean (true/false) |
license_required | false | Boolean (true/false) |
license_obtained | false | Boolean (true/false) |
sos_website | false | Name of the Sos Website |
license_filed_time | false | Time of filing license |
license_number | false | License Number |
renewal_frequency | false | Renewal Frequency of the license |
registered_agent | false | Name of the agent |
This endpoint has an empty result, but you can verify that is completed successfully by ensuring the status of the result is "ok"
Returns a state object according to state id.
Name | Required | Description |
---|---|---|
state_id | true | The ID of the State to be fetched. |
{ "id": 1, "name": "Alabama", "abbreviation": "Description of the state", "is_taxable": true, "is_origin_tax": true, "license_required": true, "license_obtained": true, "license_filed_time": "", "license_number": "", "renewal_frequency": "", "registered_agent": "" }
List all trainings.
Name | Required | Description |
---|
{ "trainings": [ { "id": 1, "title": "Pricing", "description": "Learn how our pricing works.", "link": "http://www.laundrycareconnection.biz/pricing", "is_active": true, "creation_date": "2018-09-18 21:26:06", "assigned_users": 1 }, { "id": 2, "title": "Nylon Bags", "description": "Learn when to give our resuable nylon bags and how much to charge for them.", "link": "http://www.laundrycareconnection.biz/nylon-bags", "is_active": true, "creation_date": "2018-09-18 21:27:02", "assigned_users": 1 }, { "id": 3, "title": "Dispatching", "description": "Learn about how we notify you of new clients and how we transfer client information.", "link": "http://www.laundrycareconnection.biz/dispatching", "is_active": true, "creation_date": "2018-09-18 21:29:10", "assigned_users": 1 } ] }
Mark a training as complete for a provider.
Name | Required | Description |
---|---|---|
assignment_id | true | The assignment to mark as complete. |
Returns status="ok" when the endpoint completes successfully.
List trainings for a provider.
Name | Required | Description |
---|---|---|
provider_id | true |
[{ "assignment_id": 1, "title": "Pricing", "description": "Learn how our pricing works.", "link": "http://www.laundrycareconnection.biz/pricing", "is_active": true, "is_complete": true, "is_required": true, "completed_on": 2147483647 }]
Upload files to a new endpoint. Files uploaded via HTTP will be saved, and a URL will be returned for each item. This endpoint supports multiple files in one post.
Name | Required | Description |
---|
{"status":"ok","result":{"file":"https:\/\/uploads.taplaundry.com\/889027b4-06ce-4e72-b924-5ca91380beb1"}}
Deletes a user's address.
Name | Required | Description |
---|---|---|
address_id | true | The Address.Id to delete. |
The endpoint only returns the status. Check if status=='ok' to see if it completed successfully.
List all addresses attached to a user's account.
Name | Required | Description |
---|---|---|
user_id | true | The user's ID for listing addresses |
{ "status": "ok", "result": [ { "id": null, "name": "", "address": "933 E 224th St", "address2": "Apt 3", "state": "NY", "state_id": "", "city": "Bronx", "zipcode": "10466-4603", "latitude": 40.88496, "longitude": -73.85372, "special_instructions": "", "is_default": true } ] }
Creates a new address to attach to a user.
Name | Required | Description |
---|---|---|
user_id | true | The Id of the user the address is attached to. This can be removed in a later release, but due to the nature of how addresses are currently stored it is a requirement to include this parameter. |
name | true | Generalized name for the address. Ex: 'home' or 'work' |
address | true | The first line of the address. |
address2 | true | The second line of the address. |
city | true | The city of the address. |
state | true | The state of the address. Note: this MUST be a 2 letter, capitalized abbreviation. |
zipcode | true | The zip code of the address. |
{"address_id": 1}
Update an address that is attached to a user.
Name | Required | Description |
---|---|---|
address_id | See Description | The address.id to update. Important note. If an address from /users/address/list returns an id with the address, you MUST specify it here. If the id is null, then do not include this parameter. |
user_id | true | The Id of the user the address is attached to. This can be removed in a later release, but due to the nature of how addresses are currently stored it is a requirement to include this parameter. |
address | true | The first line of the address. |
address2 | true | The second line of the address. |
city | true | The city of the address. |
state | true | The state of the address. Note: this MUST be a 2 letter, capitalized abbreviation. |
zipcode | true | The ZipCode of the address. |
isDefault | false | (Boolean). Can be set to true to override the existing default address for a user. |
The endpoint only returns the status. Check if status=='ok' to see if it completed successfully.
Authenticate by using an email and password. Returns full user object.
Name | Required | Description |
---|---|---|
true | Email address of requested user. | |
password | true | Plain text password string. |
source | true | Must be one of the acceptable values: WORK_DESK, JOIN_SITE, CLIENT_SITE, API, DRIVER_APP, CLIENT_APP. |
site_id | true | The site id for the user's company. |
{ "status": "ok", "result": { "user": { "id": 1, "first_name": "Test", "last_name": "User", "email": "test@user.com", "site_id": 1, "role": "User", "default_preferences": "test", "assigned_provider": null, "phone": "1112223333", "location": { "id": "1", "time_zone": "America/Chicago" }, "address": { "address": "123 test ln", "address2": "", "city": "Columbus", "state": "OH", "zipcode": "43235" }, "service_radius": 1, "app_views": { "all_orders_ui": 2, "new_orders_ui": 3, "my_orders_ui": 3, "availability_ui": 0, "wallet_ui": 0, "profile_ui": 3, "supplies_ui": 0, "support_ui": 3, "provider_payment_ui": 0, "recent_clients_ui": 3 }, "is_admin": false, "stripe": { "id": 1, "publishable_key": "pk_...", "customer_id": "cus_..." }, "modules": [ { "label": "Dashboard", "icon": "fa fa-dashboard", "url": "/" }, ... ], "language": [ { "name": "DRIVER", "category": "BASIC_TERMS", "type": "TEXT", "label": "Driver" }, ... ], "average_rating": 0 }, "tokens": [ { "id": 1, "token": "42b65aa1fabf68b0...", "last_used": 0, "created": 1594868866, "site_id": 1, "user_id": 1, "source": "WORK_DESK" }, ... ] } }
Create a new client user. Returns the newly created user id. Login immediately after to get user object.
Name | Required | Description |
---|---|---|
first_name | true | First name of the user. |
last_name | true | Last name of the user. |
true | Email address of the user. | |
site_id | true | Site id of the company. |
phone | true | Phone number of the user. |
address | true | Address object. Example: {"address":"10310 Saint Clair Avenue","address2":"","zipcode":"44108","city":"Cleveland","state":"OH"} |
role | true | Must be set to User or Guru |
location_id | true | Id of the parent location. |
longitude | true | Longitude of the user's location. |
latitude | true | Latitude of the user's location. |
password | false | Plain text password string. If not sent, password will be set to random string. |
referrer | false | Url of referring site. Use "direct" if not known. If not set, referrer will be null. |
source | false | Must be one of the acceptable values: "Client Site", "Workdesk", "Client App". |
commercial_id | false | The commercial account id of user's parent account. |
googleId | false | Unique google user auth id. |
facebookId | false | Unique facebook user auth id. |
{ "status": "ok", "result": 12345 }
List a customer's payment sources.
Name | Required | Description |
---|---|---|
user_id | true | The user's ID for listing sources |
Add later
Creates a new source and attaches it to a user. Only used for giftcards currently.
Name | Required | Description |
---|---|---|
user_id | true | The user's ID for listing sources |
type | true | Options: 'GIFTUP' |
giftcard_code | true | Gift card code |
Add later
Request a cashout from a provider's wallet.
Name | Required | Description |
---|---|---|
provider_id | true | The provider Id to request the cashout for |
{ "amount": 13.43 "id": 110" }
Mark a cashout request as complete.
Name | Required | Description |
---|---|---|
transaction_id | true | The Transaction ID to mark as complete. |
Returns an empty result.
Return pending cashouts
Name | Required | Description |
---|
An array of transaction objects
List all transactions for a provider.
Name | Required | Description |
---|---|---|
provider_id | true | The provider Id to fetch transactions for. |
Array of transactions like /wallet/transactions/all
List all wallet transactions.
Name | Required | Description |
---|
An array of transaction objects
{ "id": 213, "amount": 15.4, "description": "Payment for Order #3187", "order_id": 3187, "unixtime": 1534026618, "is_active": true, "status": 2, "pending_till": 1534199418, "provider_id": "1027" }