### Proxy Creation Example
Source: https://api-docs.devhub.com/core-resources/proxies
Example JSON payload for creating a new proxy, specifying the domain, source domain, and user ID.
```javascript
{
"domain": "someproxy.cloudbackend.net",
"source_domain": "http://www.example.com",
"user_id": 1
}
```
--------------------------------
### Perl GET Request using Chilkat
Source: https://api-docs.devhub.com/code-examples/perl
This example demonstrates how to perform a GET request using the Chilkat Perl module. It initializes OAuth1 authentication, sets up a REST client, and makes a request to a specified URL, printing the response status and JSON body.
```Perl
use chilkat();
# unlock the chilkat library
$global = chilkat::CkGlobal->new();
$global->UnlockBundle('UNLOCK CODE');
# initialize the oauth1 details
$oauth1 = chilkat::CkOAuth1->new();
$oauth1->put_ConsumerKey("PROVIDEDKEYHERE");
$oauth1->put_ConsumerSecret("PROVIDEDSECRETHERE");
$oauth1->put_SignatureMethod("HMAC-SHA1");
$oauth1->put_OauthUrl("https://yourwhitelabel.cloudfrontend.net/api/v2/sites/");
$oauth1->put_OauthMethod("GET");
$oauth1->GenNonce(32);
# initialize rest client
$rest = chilkat::CkRest->new();
$bUseQueryParams = 1;
$rest->SetAuthOAuth1($oauth1, $bUseQueryParams);
$rest->AddHeader("Content-Type","application/json; charset=UTF-8");
$success = $rest->Connect("yourwhitelabel.cloudfrontend.net", 443, 1, 1);
# make request
$responseJson = $rest->fullRequestNoBody("GET", "/api/v2/sites/");
# output response
print $rest->get_ResponseStatusCode() . "\r\n";
print $responseJson . "\r\n";
```
--------------------------------
### List Plugins Response Example
Source: https://api-docs.devhub.com/content-resources/plugins
Example JSON response structure for listing all plugins associated with a site, including metadata and a list of plugin objects.
```javascript
{
"meta": {
"limit": 20,
"next": null,
"offset": 0,
"previous": null,
"total_count": 3
},
"objects": [
{
"account_id": "GA-XXXXXX",
"active": false,
"id": 12344,
"plugin_type": "googleglobalsitetag",
"site_id": 54321
},
{
"account2_id": null,
"account_id": "PDTXXXX",
"active": true,
"id": 12345,
"plugin_type": "googletagmanager",
"site_id": 54321
},
...
]
}
```
--------------------------------
### PHP: Perform GET Request using OAuth
Source: https://api-docs.devhub.com/code-examples/php
Demonstrates how to perform a GET request to an API endpoint using the OAuth library in PHP. It initializes an OAuth object and fetches data from '/api/v2/sites/', retrieving the last response.
```php
fetch('/api/v2/sites/');
$content = $oauth->getLastResponse();
?>
```
--------------------------------
### Example Site Object
Source: https://api-docs.devhub.com/core-resources/sites
A comprehensive example of a site object, illustrating the structure and typical values for various configuration properties. This object represents a fully configured site, including custom fields, domain information, and media assets.
```JSON
{
"added": "2013-06-19T11:17:13",
"base_directory": "/",
"business_id": 432,
"business": {
"... fully expanded `Business` object"
},
"custom_fields": {
"headline_one": "Example headline one",
"headline_two": "Example headline two",
"bullet_points": [
"Bullet point one",
"Bullet point two"
]
},
"deleted": false,
"disable_analytics_events": ["form-submit"],
"domain": "yourdomain.com",
"extra_css": ".body { background-color: red }",
"formatted_domain": "www.yourdomain.com",
"formatted_url": "https://www.yourdomain.com/",
"footer_code": "",
"hash": "934dc52",
"header_code": "",
"https": true,
"id": 1234,
"language_code": "en-us",
"linklists": [
"... configuration of the Site's menu"
],
"locations": [
"... list of associated `Location` objects"
],
"logo": {
"... fully expanded `Logo` object"
},
"modified": "2014-01-28T13:20:13",
"noindex": false,
"partner_site_id": "site-12345",
"plugins": {},
"preview_url": "http://934dc52.whitelabel.cloudpreview.net/",
"published": true,
"resource_uri": "/api/v2/sites/1234/",
"screenshot_thumbnail": "https://api.urlbox.io/v1/f45f325d-c052-4f54-a839-e3b6fb93bb73/e751570235f0e814d6e94864aa361552bb234fbb/png?url=http%3A%2F%2F934dc52.whitelabel.cloudpreview.net%2F&width=1280&thumb_width=640&height=800",
"ssl_last_updated": null,
"subdomain": "www",
"theme_id": 123,
"theme_settings": {
"body_background_color": "#000000",
"hide_navigation": false
},
"title": "Site Title (internal use only)",
"trace_id": null,
"user": {
"... fully expanded `User` object"
},
"user_id": 248114,
"www_primary": true,
"vanity_domain": "vanitydomain.com"
}
```
--------------------------------
### Python: Fetch Sites (GET Request)
Source: https://api-docs.devhub.com/code-examples/python
Fetches a list of sites from the API using a GET request. This example demonstrates how to pass query parameters, such as filtering deleted items, and parse the JSON response.
```python
# Python 3 Example
response = client.get(
'{}sites/'.format(base_url),
params={
'deleted': 0,
})
content = response.json()
```
```python
# Python 2 Example
response, content = client.request('/api/v2/sites/', 'GET', headers={
'content-type': 'application/json'
})
content = json.loads(content)
```
--------------------------------
### Google Tag Manager Plugin Example Object
Source: https://api-docs.devhub.com/content-resources/plugins
An example JSON object representing a Google Tag Manager plugin configuration.
```javascript
{
"active": true,
"account_id": "PDTVXXX",
"id": 1234,
"plugin_type": "googletagmanager",
"site_id": 54321
}
```
--------------------------------
### Google Tag Manager Plugin Example
Source: https://api-docs.devhub.com/content-resources/plugins
Example JSON object for a Google Tag Manager plugin, showing common fields and plugin-specific attributes like account_id.
```javascript
{
"active": true,
"account_id": "PDTVXXX",
"id": 1234,
"plugin_type": "googletagmanager",
"site_id": 54321
}
```
--------------------------------
### Custom Tag Plugin Example
Source: https://api-docs.devhub.com/content-resources/plugins
Example JSON object for a Custom Tag plugin, demonstrating common fields and plugin-specific attributes like header_template, footer_template, and prebody_template.
```javascript
{
"active": true,
"footer_template": "",
"header_template": "",
"id": 1234,
"plugin_type": "customtag",
"prebody_template": "",
"site_id": 54321
}
```
--------------------------------
### Image Linking Examples
Source: https://api-docs.devhub.com/content-resources/images
Demonstrates how to reference uploaded images within hosted sites using local paths for optimal performance and maintainability.
```markup
```
```css
.body { background-image: url('/img/upload/c1_26.jpg'); }
```
--------------------------------
### Example Live Preview URL
Source: https://api-docs.devhub.com/live-preview-api/what-is-the-live-preview-api
Demonstrates a dynamically generated URL for the Live Preview API. This URL includes parameters for cloning a specific version and embedding business details for previewing.
```text
http://cloudtemplates.cloudfrontend.net/app/live-preview/
?clone_id=1576931&
site={%22business%22:{%22business_name%22:%20%22Johnson%20Legal%20Partners%22}}
```
--------------------------------
### Python 3: OAuth Client Setup with requests_oauthlib
Source: https://api-docs.devhub.com/code-examples/python
Initializes an OAuth1Session using the requests_oauthlib library for making authenticated API requests. This setup requires a client key and client secret provided by the API.
```python
import json
from requests_oauthlib import OAuth1Session
client = OAuth1Session('PROVIDEDKEYHERE',
client_secret='PROVIDEDSECRETHERE')
base_url = 'https://yourbrand.cloudfrontend.net/api/v2/'
```
--------------------------------
### Site Builder SSO API Parameters
Source: https://api-docs.devhub.com/single-sign-on-sso/introduction
Defines the required and optional GET request parameters for generating signed URIs for Single Sign-On (SSO) and direct-to-builder access within the Site Builder service. These parameters are used to authenticate users and specify target sites.
```APIDOC
SSO and Direct-to-Builder Access Parameters:
Required Parameters:
email (string): The email address of the partner user.
partner_user_id (string): The unique user ID from your user management system.
Optional Parameters:
first_name (string): The first name of the partner user, used in builder settings.
last_name (string): The last name of the partner user, used in builder settings.
Direct-to-Builder Access Specific Parameter:
partner_site_ids (string): Comma-separated unique site IDs assigned to created Sites. Example: "12345,23145".
```
--------------------------------
### Basic Script Installation
Source: https://api-docs.devhub.com/visitor-localization-sdk/visitor-localization-sdk
Instructions for placing the DevHub GeoIP localization script at the end of the HTML body. It highlights the need to replace the placeholder API key and configure the onLocationSet callback.
```html
```
--------------------------------
### Schema.org JSON-LD Example
Source: https://api-docs.devhub.com/core-resources/locations
An example of JSON-LD data conforming to Schema.org standards for a LocalBusiness. This structure is auto-generated but can be extended or replaced using the `extra_schema` field.
```json
{
"@type": "LocalBusiness",
"@context": "http://schema.org",
"name": "Business Name",
"telephone": "+12065555555",
"address": {
"@type": "PostalAddress",
"addressLocality":"Seattle",
"addressCountry":{
"@type": "Country",
"name": "US"
},
"addressRegion": "WA",
"streetAddress": "555 Main St",
"postalCode": "98101"
},
"openingHours": [
"Mo 08:00-18:00",
"Tu 08:00-18:00",
"We 08:00-18:00",
"Th 08:00-18:00",
"Fr 08:00-16:00",
"Sa 09:00-15:00"
],
"geo":{
"@type": "GeoCoordinates",
"latitude": "47.61416580000000",
"longitude": "-122.34258330000000"
}
}
```
--------------------------------
### Custom Fields Example
Source: https://api-docs.devhub.com/core-resources/sites
Demonstrates the structure of custom fields that can be assigned to sites, allowing for structured data with nested values. These fields can be accessed in templates via macros or template variables.
```javascript
"custom_fields": {
"headline_one": "Example headline one",
"headline_two": "Example headline two",
"bullet_points": [
"Bullet point one",
"Bullet point two"
]
}
```
--------------------------------
### Site Override Configuration Example
Source: https://api-docs.devhub.com/content-resources/themes
This JSON snippet demonstrates the `site_override` configuration, which allows a theme to inherit content from a specific site based on its language. It maps language codes to site IDs for content inheritance.
```javascript
"site_override":{
"en": 174635
}
```
--------------------------------
### Site Override Objects Configuration Example
Source: https://api-docs.devhub.com/content-resources/themes
This JSON array specifies which types of site content should be overridden by the `site_override` setting. It lists elements like pages, plugins, and CSS that will be pulled from the designated master theme site.
```javascript
"site_override_objects": [
"linklists",
"pages",
"plugins"
]
```
--------------------------------
### GeoIP Options Initialization
Source: https://api-docs.devhub.com/visitor-localization-sdk/visitor-localization-sdk
Demonstrates the basic structure for initializing GeoIP options, including localization links.
```javascript
var sbGeoipOptions = {
localizeLinks: [
"/about-us/",
"/contact-us/"
]
};
```
--------------------------------
### Implement Search Form with Loading and Error States
Source: https://api-docs.devhub.com/visitor-localization-sdk/visitor-localization-sdk
This example shows a complete implementation of an interactive search form. It includes a button to activate the form, handles form submission with loading indicators, and displays error messages if the search fails. It manages the visibility of form fields, loading spinners, and error messages.
```html
```
```javascript
// form handling
const form = document.getElementById('localize-form');
const errElement = form.getElementsByClassName('sb-error')[0];
const fieldsElement = form.getElementsByClassName('sb-form-fields')[0];
const loadingElement = form.getElementsByClassName('sb-loading')[0];
form.addEventListener('submit', (e) => {
e.preventDefault();
const currentTarget = e.currentTarget;
const formData = new FormData(e.currentTarget);
// hide form fields
fieldsElement.classList.add('hide');
// hide errors
errElement.classList.add('hide');
// show loader
loadingElement.classList.remove('hide');
// trigger a re-searching
sbGeoip.searchLocations(formData.get('q'), function(resp) {
// hide loader
loadingElement.classList.add('hide');
if (resp.error) {
// error returned
// show error
errElement.innerHTML = resp.error_message;
errElement.classList.remove('hide');
} else {
// hide the form
currentTarget.classList.add('hide');
}
// re-show the form fields
fieldsElement.classList.remove('hide');
});
});
// button activation
document.getElementById('sb-change-location').addEventListener('click', (e) => {
// show form
form.classList.remove('hide');
// focus on input and clear value
form.querySelector('input[name=q]').focus();
form.querySelector('input[name=q]').value = '';
})
```
--------------------------------
### Create Location Page (Site) API
Source: https://api-docs.devhub.com/getting-started-guides/location-pages-and-store-locator-with-custom-theme
Creates a site that functions as an individual location page. It requires the `business_id`, `location_id`, and `theme_id` from previous steps, along with a `base_directory` and `formatted_domain` to define its URL structure. The `published` flag should be set to `true` for the page to be live.
```APIDOC
POST /api/v2/sites/
Request Body:
{
"base_directory": "/seattle/",
"business_id": BUSINESS_ID,
"formatted_domain": "locations.abcbrand.com",
"locations": [LOCATION_ID],
"published": true,
"theme_id": THEME_ID,
"title": "Seattle Location Page"
}
```
```javascript
{
"base_directory": "/seattle/",
"business_id": BUSINESS_ID,
"formatted_domain": "locations.abcbrand.com",
"locations": [LOCATION_ID],
"published": true,
"theme_id": THEME_ID,
"title": "Seattle Location Page"
}
```
--------------------------------
### List Files API Response Example
Source: https://api-docs.devhub.com/content-resources/files
Example JSON response structure for the List Files API endpoint, showing pagination metadata (meta) and an array of file objects (objects) with their properties.
```javascript
{
"meta": {
"limit": 20,
"next": "/api/v2/files/?limit=20&offset=20",
"offset": 0,
"previous": null,
"total_count": 5
},
"objects": [
{
"added": "2014-07-18T12:05:44",
"checksum": "c8aaa5d3656fd6967b4826a14d3c86ef",
"filename": "chart-copy.pdf",
"filesize": 54226,
"id": 13,
"mimetype": "application/pdf",
"modified": "2014-07-18T12:05:44",
"path": null,
"resource_uri": "/api/v2/files/13/",
"site_id": 1556341,
"upload_source": "builder",
"user_id": 322,
"whitelabel_id": 10
},
...
]
}
```
--------------------------------
### Localize Page Modules using Headless Content
Source: https://api-docs.devhub.com/visitor-localization-sdk/visitor-localization-sdk
This example shows how to fetch localized content blocks (localization_html) using the `headlessContent` utility. It then injects this content into a designated element on the corporate page, allowing for dynamic display of localized modules.
```javascript
onLocationSet: function(response) {
if (response.location.location_url) {
sbGeoip.headlessContent(response.location.location_url, ['localization_html'], (content) => {
const localBlock = content.rendered.localization_html.getElementById('localization-content');
const localizationTarget = document.getElementById('localization-target');
if (localBlock && localizationTarget) {
localizationTarget.innerHTML = localBlock.innerHTML;
}
});
}
}
```
--------------------------------
### Local Site Data Example
Source: https://api-docs.devhub.com/local-storage-api/what-is-the-local-storage-api
An example of the `localSiteData` object structure, which is a JSON encoded version of the Site object. It includes custom fields, formatted URLs, and location details like city, state, and phone numbers.
```javascript
{
"custom_fields": {
"example_custom_field": "More data",
"...": "..."
},
"formatted_url": "https://www.example.com/locations/seattle/",
"locations": [
{
"city": "Seattle",
"country": "US",
"formatted_address": "555 Main St., Seattle, WA 98121",
"location_name": "Seattle Location",
"phonemap": {
"phone": "(206) 555-5555"
},
"phonemap_e164": {
"phone": "+12065555555"
},
"postal_code": "98121",
"service_areas": "Greater Seattle area",
"state": "WA",
"street": "555 Main St"
}
]
}
```
--------------------------------
### Python: Create Site (POST Request)
Source: https://api-docs.devhub.com/code-examples/python
Creates a new site by sending a POST request with a JSON payload. The payload contains details like the formatted domain for the new site. The response is parsed as JSON.
```python
# Python 3 Example
payload = {
'formatted_domain': 'www.somebusinessname.com',
...
}
response = client.post(
'{}sites/'.format(base_url),
json=payload)
content = response.json()
```
```python
# Python 2 Example
params = {
'domain': 'somebusinessname.com',
...
}
response, content = client.request('/api/v2/sites/', 'POST', body=json.dumps(params), headers={
'Content-Type': 'application/json'
})
content = json.loads(content)
```
--------------------------------
### Upload File API Request Body Example
Source: https://api-docs.devhub.com/content-resources/files
Example JSON structure for the request body when uploading a new file. It requires an 'upload' object containing the file's name and its base64 encoded content.
```javascript
{
"upload": {
"name": "chart-copy.pdf",
"file": "iVBORw0KGgoAAAANSUhEUgAAASAAAABsCAIAAABFDPh0AAAAGXRFWHRTb2Z0d2F..."
}
}
```
--------------------------------
### Error Response Examples
Source: https://api-docs.devhub.com/errors
These examples illustrate the JSON structure for error and validation responses returned by the API, typically with a 400 Bad Request status. They show how errors are reported for the object as a whole, individual fields, and nested fields.
```javascript
{"__all__": ["The provided error is related to the object as a whole"]}
```
```javascript
{"some_field": ["This field is required"]}
```
```javascript
{"nested_field": {"nested_field-1": {"some_field": ["This field is required"]}}}
```
--------------------------------
### Contact Log Model Structure and Example
Source: https://api-docs.devhub.com/logging-and-analytics/contact-logs
Defines the structure of a contact log object, detailing its fields, types, and purpose. Includes an example JSON representation of a contact log, illustrating typical data fields and their values. Note that not all fields are guaranteed to be present in every API response.
```json
{
"campaign_params": {
"utm_campaign": "ppc campaign",
"utm_source": "google",
"...": "..."
},
"data": {
"email-addresss": "example@example.com",
"your-name": "John Doe",
"phone": "206-555-5555",
"subscribe": true
},
"dispatched": true,
"dispatch_date": "2012-06-01T09:28:46",
"email": "example@example.com",
"form_id": 12345,
"id": 328269,
"ip": "187.232.189.217",
"location_id": 12345,
"logs": [
{
"filter": "Filter name"
},
"..."
],
"note": "Flagged as spam by Akismet",
"phone": "206-555-5555",
"recipients": ["owner@site.com", "leads@site.com"],
"resource_uri": "/api/v2/contact_log/328269/",
"site_id": 12345,
"spam": true,
"stage": "new",
"timestamp": "2012-06-01T09:28:46",
"...": "..."
}
```
--------------------------------
### Configuration: Localize Links
Source: https://api-docs.devhub.com/visitor-localization-sdk/visitor-localization-sdk
Provides a list of page paths that, when clicked, will redirect the visitor to the corresponding localized version of the page on a Franchisee/Local site. This requires exact path matching between corporate and local sites.
```javascript
var sbGeoipOptions = {
localizeLinks: [
"/contact-us/",
"/about-us/"
]
};
```
--------------------------------
### Perl POST Request with JSON Body using Chilkat
Source: https://api-docs.devhub.com/code-examples/perl
This example demonstrates how to perform a POST request with a JSON body using the Chilkat Perl module. It covers initializing OAuth1, setting up the REST client, constructing a JSON request body, and sending the request, then printing the response status and any errors.
```Perl
use chilkat();
# unlock the chilkat library
$global = chilkat::CkGlobal->new();
$global->UnlockBundle('UNLOCK CODE');
# initialize the oauth1 details
$oauth1 = chilkat::CkOAuth1->new();
$oauth1->put_ConsumerKey("PROVIDEDKEYHERE");
$oauth1->put_ConsumerSecret("PROVIDEDSECRETHERE");
$oauth1->put_SignatureMethod("HMAC-SHA1");
$oauth1->put_OauthUrl("https://yourwhitelabel.cloudfrontend.net/api/v2/sites/");
$oauth1->put_OauthMethod("POST");
$oauth1->GenNonce(32);
# initialize rest client
$rest = chilkat::CkRest->new();
$bUseQueryParams = 1;
$rest->SetAuthOAuth1($oauth1, $bUseQueryParams);
$rest->AddHeader("Content-Type","application/json; charset=UTF-8");
$success = $rest->Connect("yourwhitelabel.cloudfrontend.net", 443, 1, 1);
# prepare json body
$jsonReqBody = chilkat::CkJsonObject->new();
$success = $jsonReqBody->AddStringAt(-1, "title", "Example Site");
$success = $jsonReqBody->AddStringAt(-1, "formatted_domain", "somesite.yourdomain.com");
print $jsonReqBody->emit() . "\r\n";
# make request
$responseJson = $rest->fullRequestString("POST", "/api/v2/sites/", $jsonReqBody->emit());
# output response
print $rest->get_ResponseStatusCode() . "\r\n";
print $rest->lastErrorText() . "\r\n";
print $responseJson . "\r\n";
```
--------------------------------
### Create Store Locator Site API
Source: https://api-docs.devhub.com/getting-started-guides/location-pages-and-store-locator-with-custom-theme
Creates the main store locator site. This site is hosted under a primary domain (e.g., `locations.abcbrand.com`) and uses a special `base_directory` (`/lp/`) to render the store locator functionality. It requires `business_id` and `theme_id`, and should be published.
```APIDOC
POST /api/v2/sites/
Request Body:
{
"base_directory": "/lp/",
"business_id": BUSINESS_ID,
"formatted_domain": "locations.abcbrand.com",
"published": true,
"theme_id": THEME_ID,
"title": "Store Locator"
}
```
```javascript
{
"base_directory": "/lp/",
"business_id": BUSINESS_ID,
"formatted_domain": "locations.abcbrand.com",
"published": true,
"theme_id": THEME_ID,
"title": "Store Locator"
}
```
--------------------------------
### Analytics Response Structure
Source: https://api-docs.devhub.com/logging-and-analytics/analytics
Example JSON structure for the analytics site summary response.
```javascript
{
"events": {
"site-page-view": {
"average": "0.00",
"timeline": {
"2015-07-01": 0,
"2015-07-02": 0,
"2015-07-03": 0,
"2015-07-04": 0,
"2015-07-05": 0
},
"total": "0"
},
...
},
"meta": {
"events": [
"form-submit",
"link-outgoing",
"site-page-view",
...
],
"series": [
"2015-07-01",
"2015-07-02",
"2015-07-03",
"2015-07-04",
"2015-07-05"
]
}
}
```
--------------------------------
### Example Domain Alias Response Structure
Source: https://api-docs.devhub.com/advanced/domain-aliases
Illustrates the structure of a JSON response when fetching domain alias data.
```javascript
{
"meta": {
"limit": 20,
"next": "/api/v2/domain_aliases/?limit=20&offset=20",
"offset": 0,
"previous": null,
"total_count": 154
},
"objects": [
{
"added": "2013-06-19T11:17:13",
"base_directory": "/succursale/location-name/",
"deleted": false,
"domain": "www.brandname.ca",
"formatted_domain": "www.brandname.ca",
"formatted_url": "https://www.brandname.ca/succursale/location-name/",
"id": 12345,
"language_code": "fr",
"modified": "2014-01-28T13:20:13",
"partner_alias_id": "fr-locationpage-55555555",
"preview_url": "http://www.brandname.ca.whitelabel.cloudbackend.net/succursale/location-name/",
"site_id": 55555,
"trace_id": null,
"user_id": 248114
}
// ... more objects
]
}
```
--------------------------------
### HTML Template for OAuth Widget Loading
Source: https://api-docs.devhub.com/single-sign-on-sso/introduction
This HTML template is used to display content and load external JavaScript resources. It includes a placeholder div and scripts for jQuery, a dynamically generated widget URI, and a local JavaScript file.
```html
```
--------------------------------
### Payment Forms Array
Source: https://api-docs.devhub.com/core-resources/locations
An example of how to specify the payment forms supported by a location. The values should be sent in lowercase and are drawn from a predefined list of valid payment forms.
```javascript
"payment_forms": ["visa", "mastercard", "american-express"]
```
--------------------------------
### Location API Endpoints
Source: https://api-docs.devhub.com/core-resources/locations
Documentation for API endpoints related to managing business locations. Includes details on required fields for creating locations and examples for listing locations.
```APIDOC
POST /api/v2/locations/
Creates a new business location.
Required fields for a normal location:
- business_id
- street
- city
- state
- postal_code
- country
Required fields for a service area only location:
- business_id
- city
- state
- postal_code
- country
GET /api/v2/locations/
Lists locations.
To list all locations for all businesses:
GET /api/v2/locations/
To list all locations for a particular business:
GET /api/v2/locations/?business_id=12345
```
--------------------------------
### Register Domain API
Source: https://api-docs.devhub.com/core-resources/domains
Initiates the registration of a new domain. Requires the domain name and complete registrant contact details.
```APIDOC
POST /api/v2/domains/
Description: Registers a domain by providing the domain name and registrant contact details.
Request Body:
Requires a JSON payload containing the domain name and registrant information (name, address, etc.).
Example (structure only):
{
"domain_name": "example.com",
"registrant": {
"first_name": "John",
"last_name": "Doe",
"address1": "123 Main St",
"city": "Anytown",
"state": "CA",
"zip": "90210",
"country": "US",
"email": "john.doe@example.com",
"phone": "+1.5551234567"
}
}
Responses:
201 Created: Indicates successful domain registration.
400 Bad Request: If domain name is invalid or registrant details are missing/incorrect.
409 Conflict: If the domain is already registered.
```
--------------------------------
### Example Theme Object Structure
Source: https://api-docs.devhub.com/content-resources/themes
This JSON object represents a comprehensive configuration for a custom theme, including active status, display names, CSS, template references, and HTML structure. It details how various components like headers, footers, and modules are integrated into a theme.
```javascript
{
"active": true,
"added": "2019-04-25T16:14:06",
"display_name": "Custom Theme",
"extra_css": "body { background-color: red }",
"footer_code": "