Covered in this doc:
​List businesses​
​Get a single business​
​Create a business​
​Updating a business​
List all business including active and deleted
GET /api/v2/businesses/
List all active businesses
GET /api/v2/businesses/?deleted=0
Name | Type | Description |
|
| Filter for businesses created on a particular date in |
|
| Set the field to sort the results by. Available |
|
| Used to lookup/search for businesses matching a particular internal id |
|
| Used by multi-level private labels to filter businesses to one partner based on their assigned sub ID |
{"meta": {"limit": 20,"next": "/api/v2/businesses/?limit=20&offset=20","offset": 0,"previous": null,"total_count": 1039},"objects": [{"added": "2013-05-24T11:40:21","business_name": "Some Business Name","category_id": null,"deleted": false,"id": 24305,"modified": "2014-01-21T10:37:39","partner_business_id": null,"partner_sub_id": null,"resource_uri": "/api/v2/businesses/24305/","slug": "some-business-name","user_id": 142606},{"added": "2013-05-24T11:40:21","business_name": "Another Business Name","category_id": null,"deleted": false,"id": 24306,"modified": "2014-01-21T10:37:39","partner_business_id": null,"partner_sub_id": null,"resource_uri": "/api/v2/businesses/24306/","slug": "another-business-name","user_id": 142606},...]}
Fetch the Business detail using the Business.id
GET /api/v2/businesses/:id/
{"added": "2013-05-24T11:40:21","business_name": "Some Business Name","category": null,"category_id": null,"deleted": false,"id": 24305,"images": [... list of the `Image` objects associated with the Business],"logo_image": {... fully expanded `Image` object for the Business' logo},"logo_image_id": 12345,"modified": "2014-01-21T10:37:39","partner_business_id": null,"partner_sub_id": null,"resource_uri": "/api/v2/businesses/24305/","services": [... list of business `Service` objects],"slug": "some-business-name","user_id": 142606}
POST /api/v2/businesses/
Name | Type | Description |
|
| required Name of the Business |
{"business_name": "Example Business","partner_business_id": "uid-12347","locations": [{"contact_email": "contact@somebusiness.com","description":"<p>Here is a description of the business/location</p>","street": "555 Main St","city": "Seattle","state": "WA","postal_code": "98121","country": "US","phones": [{"type": "phone","number": "206-555-5555"}]}]}
A status code of 201 created
is returned on a successful creation and contains the created business object as JSON. See the Get a single business section for an example Business object.
PUT /api/v2/business/:id/
You can PUT
a partial or full object to the detail endpoint to update/change values on the Business object. If using a partial object, you must insure that the primary business id
is part of the payload.