Personal tools

From HEXONET Wiki

Jump to: navigation, search
Line 190: Line 190:
 
== Povisioning upgrade within Weebly Site Editor ==
 
== Povisioning upgrade within Weebly Site Editor ==
 
Weebly displays upgrade triggers in the Site Editor when the website's current plan does not include that feature. There's also an upgrade button at the top right corner of the Site Editor for easy upgrade. If a customer clicks on either the upgrade triggers or button, it will open a new modal to provision the upgrade process. As our reseller, you can customize the upgrade modal content so that you can have full control on the upgrading process.
 
Weebly displays upgrade triggers in the Site Editor when the website's current plan does not include that feature. There's also an upgrade button at the top right corner of the Site Editor for easy upgrade. If a customer clicks on either the upgrade triggers or button, it will open a new modal to provision the upgrade process. As our reseller, you can customize the upgrade modal content so that you can have full control on the upgrading process.
 +
 +
[[Image:Weebly_upgrade.png|center|frame]]
  
 
To do so, you must provide us your upgrade URL that will handle the upgrading process via the CreateWebsite (for new website) or UpdateWebsite (for existing website) command. Note that you must specify the upgrade URL for each website you want to apply the changes to.
 
To do so, you must provide us your upgrade URL that will handle the upgrading process via the CreateWebsite (for new website) or UpdateWebsite (for existing website) command. Note that you must specify the upgrade URL for each website you want to apply the changes to.
Line 349: Line 351:
  
 
<headertabs/>
 
<headertabs/>
 +
 +
== How to connect domain and website ==
 +
'''If SSL certificate is enabled'''
 +
 +
Go to the Site Editor by visiting the link provided in CreateWebsiteSession
 +
 +
<pre>
 +
COMMAND = CreateWebsiteSession
 +
ENTITY = Site
 +
ID = (Website ID)
 +
</pre>
 +
 +
In the website editor, go to Settings > General > SSL. Click on the Enable button and follow the instructions on the page.
 +
 +
[[Image:Connect_website.png|left|frame]]
 +
<br>
 +
Note, it might take up to 48 hours for these changes to fully propagate on the Weebly side. During that time, the website may not be available.
 +
 +
'''If SSL certificate is disabled'''
 +
 +
Create the following A records in your domain’s DNS settings:
 +
 +
<pre>
 +
@ IN A 199.34.228.55
 +
www IN A 199.34.228.55
 +
</pre>
 +
 +
Note, it might take up to 48 hours for these changes to fully propagate on the Weebly side. During that time, the website may not be available.

Revision as of 17:12, 4 April 2019

Weebly API

fnelwfoejfw....

List of plans

Annual plan API Class Main features
Free WEEBLY_FREE 2 million queries
Starter WEEBLY_STARTER 5 million queries
Pro WEEBLY_PRO 15 million queries
Business WEEBLY_BUSINESS 30 million queries
Performance WEEBLY_PERFORMANCE 50 million queries

See here for a breakdown of plans ...

Using the API



Create new website user

To create a new website, a website user object must first be created. Please note that a website user object is different than a contact handle that's used for domains.

The following command is used to create the website user object

COMMAND = CreateWebsiteUser
CLASS = Weebly
EMAIL = (Email address)
LANGUAGE = (Primary language)


CLASS
This must always be set to Weebly

EMAIL
Email address to serve as your primary contact for important Weebly emails. Weebly provides notices and information about your websites regarding customer comments, registrations, purchases and more.

LANGUAGE
The primary language used in the Weebly interface. Valid language code are:

  • DA: Danish
  • DE: German
  • EN: English
  • ES: Spanish
  • FR: French
  • IT: Italian
  • JA: Japanese
  • NL: Dutch
  • NO: Norwegian
  • PL: Polish
  • PT: Portuguese
  • RU: Russian
  • SV: Swedish
  • TR: Turkish
  • ZH: Chinese (simplified)


If successful, CreateWebsiteUser will return a WEBSITEUSERID property.

Create new website

Once you have created a website user, you can use the following command to create the website

COMMAND = CreateWebsite
CLASS = (Website class)
DOMAIN = (Domain name)
WEBSITEUSERID = (Website User ID)
PERIOD = 1Y
SECURE = 0 | 1
TITLE = (New website title) (optional)
REFERENCE = (Original website ID to copy from) (optional)


CLASS
Website plan. Valid plan are:

  • WEEBLY_FREE
  • WEEBLY_STARTER
  • WEEBLY_PRO
  • WEEBLY_BUSINESS
  • WEEBLY_PERFORMANCE

DOMAIN
Name of domain. You can also use an external domain name. Note that the domain name must be unique and is not in used by another account.

WEBSITEUSERID
Website user object ID

PERIOD
Registration period of the website. Currently only supports period of 1 year (1Y).

SECURE
This property will either hide or show the SSL certificate option in the Site Editor so that users can enable SSL on their website

  • If set to 1, this will show the SSL certificate option in the Site Editor
  • If set to 0, this will hide the SSL certificate option in the Site Editor

TITLE
Website title. If not specified, the default value will be 'Blank title'.

REFERENCE
If you provide the ID of another website, the new website will copy the existing website

Get website status

You can see all information on your website using the following command

COMMAND = StatusWebsite
ID = (Website ID)

StatusWebsite will return the following property:

  • WEBSITEUSERID
  • STATUS
  • TITLE
  • DESCRIPTION
  • CREATEDDATE
  • PEERUSER
  • SUBCLASS
  • RENEWALMODE
  • PAIDUNTILDATE
  • ID

Access Weebly Site Editor

To access the Weebly Site Editor interface, you need to retrieve the SSO link using the following command

COMMAND = CreateWebsiteSession
ENTITY = Site
ID = (Website ID)

This command will return the property URL which redirects to the Weebly Site Editor.

Get website list

You can view a list of your website using the following command

COMMAND = QueryWebsiteList

Please note that downgrading is not supported for Weebly website plans


Upgrade via API

You can upgrade your website by using the following command

COMMAND = UpgradeWebsite
ID = (Website ID)
CLASS = (Website class)


ID
The website ID

CLASS
Website plan. Valid plan are:

  • WEEBLY_FREE
  • WEEBLY_STARTER
  • WEEBLY_PRO
  • WEEBLY_BUSINESS
  • WEEBLY_PERFORMANCE

Povisioning upgrade within Weebly Site Editor

Weebly displays upgrade triggers in the Site Editor when the website's current plan does not include that feature. There's also an upgrade button at the top right corner of the Site Editor for easy upgrade. If a customer clicks on either the upgrade triggers or button, it will open a new modal to provision the upgrade process. As our reseller, you can customize the upgrade modal content so that you can have full control on the upgrading process.

Weebly upgrade.png

To do so, you must provide us your upgrade URL that will handle the upgrading process via the CreateWebsite (for new website) or UpdateWebsite (for existing website) command. Note that you must specify the upgrade URL for each website you want to apply the changes to.

Weebly will call your upgrade URL whenever an upgrade trigger is clicked and adds the following parameters to the URL:

  • user_id
  • site
  • plan
  • upgrade_type
  • upgrade_id
  • plan_ids
  • hash

Here’s an example of an Upgrade URL with the added parameters and hash:

http://your-url.com/upgrade.html?user_id=1234567&site=1234567891011234&plan=starter&upgrade_type=feature&upgrade_id=edit_footer&plan_ids=40%2C14%2C41%2C10%2C35%2C39&hash=e71ca960fad7e87df447bb7879a27a8d14fa5a48&

Use the following command to update existing websites:

COMMAND = UpdateWebsite
ID = (Website ID)
UPGRADEURL = (your custom link to the upgrade modal)

Use the following command to add to new websites:

COMMAND = CreateWebsite
CLASS = (Website class)
DOMAIN = (Domain name)
WEBSITEUSERID = (Website User ID)
PERIOD = 1Y
TITLE = (New website title) (optional)
REFERENCE = (Original website ID to copy from) (optional)
UPGRADEURL = (your custom link to the upgrade modal) (optional)

Before you load your modal content, you should verify the hash to make sure the call is coming directly from the Weebly Site Editor. You can use the following command to verify the hash

COMMAND = VerifyWebsiteUpgradeHash
SITEID = Website ID
WEBSITEUSERID = (Website user ID)
HASH = (hash from the upgrade URL)
CLASS = Weebly

Delete website

Refund is not applicable if you delete a website

COMMAND = DeleteWebsite
ID = (Website ID)

Restore website

If you delete a website, you have up to 1 month to restore the website to its original state. Executing this command will automatically charge your account the annual fee of the original website plan.

COMMAND = RestoreWebsite
ID = (Website ID)
PERIOD = 1Y

Update website title

You can update the website title with the following command.

COMMAND = UpdateWebsite
ID = (Website ID)
TITLE = (New website title)

Publish or unpublish website

  • PUBLISH = 1 – publish website
  • PUBLISH = 0 – unpublish website
COMMAND = UpdateWebsite
ID = (Website ID)
PUBLISH = 1 | 0

Renew website

You can start renewing a website 61 days before the expiration date.

COMMAND = PayWebsiteRenewal
ID = (Website ID)
PERIOD = 1Y

Set renewal mode of website

  • AUTORENEW – automatically renews a website on the current expiration date
  • AUTOEXPIRE – website will be deleted upon expiry
COMMAND = SetWebsiteRenewalMode
ID = (Website ID)
RENEWALMODE = AUTOEXPIRE | AUTORENEW

See a list of website user

You can see a list of website user with the following command

COMMAND = QueryObjectList
OBJECTCLASS = WEBSITE-USER
USERDEPTH = SELF
WIDE = 1

This command will return

  • OBJECTID – Website user ID
  • DESCRIPTION – Email address of the user

Get website user status

You can see all information on your website user using the following command

COMMAND = StatusWebsiteUser
WEBSITEUSERID = (Website user ID)

Update website user

You can update the email address and/or language of a website user with the following command

COMMAND = UpdateWebsiteUser
WEBSITEUSERID = (Website user ID)
EMAIL = (Email address) (optional)
LANGUAGE = (Primary language) (optional)


LANGUAGE
The primary language used in the Weebly interface. Valid language code are:

  • DA: Danish
  • DE: German
  • EN: English
  • ES: Spanish
  • FR: French
  • IT: Italian
  • JA: Japanese
  • NL: Dutch
  • NO: Norwegian
  • PL: Polish
  • PT: Portuguese
  • RU: Russian
  • SV: Swedish
  • TR: Turkish
  • ZH: Chinese (simplified)

How to connect domain and website

If SSL certificate is enabled

Go to the Site Editor by visiting the link provided in CreateWebsiteSession

COMMAND = CreateWebsiteSession
ENTITY = Site
ID = (Website ID)

In the website editor, go to Settings > General > SSL. Click on the Enable button and follow the instructions on the page.

Connect website.png


Note, it might take up to 48 hours for these changes to fully propagate on the Weebly side. During that time, the website may not be available.

If SSL certificate is disabled

Create the following A records in your domain’s DNS settings:

@ IN A 199.34.228.55
www IN A 199.34.228.55
Note, it might take up to 48 hours for these changes to fully propagate on the Weebly side. During that time, the website may not be available.