Businesses
Covered in this doc:

List businesses

List all business including active and deleted
1
GET /api/v2/businesses/
Copied!
List all active businesses
1
GET /api/v2/businesses/?deleted=0
Copied!

Parameters

Name
Type
Description
added__date
string
Filter for businesses created on a particular date in YYYY-MM-DD format
order_by
string
Set the field to sort the results by. Available order_by includes id (default) and business_name. You can also sort decending by prefixing the field with a minus sign (i.e. order_by=-id)
partner_business_id
string
Used to lookup/search for businesses matching a particular internal id
partner_sub_id
string
Used by multi-level private labels to filter businesses to one partner based on their assigned sub ID

Response

1
{
2
"meta": {
3
"limit": 20,
4
"next": "/api/v2/businesses/?limit=20&offset=20",
5
"offset": 0,
6
"previous": null,
7
"total_count": 1039
8
},
9
"objects": [
10
{
11
"added": "2013-05-24T11:40:21",
12
"business_name": "Some Business Name",
13
"category_id": null,
14
"deleted": false,
15
"id": 24305,
16
"modified": "2014-01-21T10:37:39",
17
"partner_business_id": null,
18
"partner_sub_id": null,
19
"resource_uri": "/api/v2/businesses/24305/",
20
"slug": "some-business-name",
21
"user_id": 142606
22
},
23
{
24
"added": "2013-05-24T11:40:21",
25
"business_name": "Another Business Name",
26
"category_id": null,
27
"deleted": false,
28
"id": 24306,
29
"modified": "2014-01-21T10:37:39",
30
"partner_business_id": null,
31
"partner_sub_id": null,
32
"resource_uri": "/api/v2/businesses/24306/",
33
"slug": "another-business-name",
34
"user_id": 142606
35
},
36
...
37
]
38
}
Copied!

Get a single business

Fetch the Business detail using the Business.id
1
GET /api/v2/businesses/:id/
Copied!

Response

1
{
2
"added": "2013-05-24T11:40:21",
3
"business_name": "Some Business Name",
4
"category": null,
5
"category_id": null,
6
"deleted": false,
7
"id": 24305,
8
"images": [
9
... list of the `Image` objects associated with the Business
10
],
11
"logo_image": {
12
... fully expanded `Image` object for the Business' logo
13
},
14
"logo_image_id": 12345,
15
"modified": "2014-01-21T10:37:39",
16
"partner_business_id": null,
17
"partner_sub_id": null,
18
"resource_uri": "/api/v2/businesses/24305/",
19
"services": [
20
... list of business `Service` objects
21
],
22
"slug": "some-business-name",
23
"user_id": 142606
24
}
Copied!

Create a business

1
POST /api/v2/businesses/
Copied!

Parameters

Name
Type
Description
business_name
string
required Name of the Business

Example

1
{
2
"business_name": "Example Business",
3
"partner_business_id": "uid-12347",
4
"locations": [
5
{
6
"contact_email": "[email protected]",
7
"description":"<p>Here is a description of the business/location</p>",
8
"street": "555 Main St",
9
"city": "Seattle",
10
"state": "WA",
11
"postal_code": "98121",
12
"country": "US",
13
"phones": [
14
{
15
"type": "phone",
16
"number": "206-555-5555"
17
}
18
]
19
}
20
]
21
}
Copied!

Response

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.

Updating a business

1
PUT /api/v2/business/:id/
Copied!
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.
Last modified 2yr ago