Get resellers

GET /brands/:brandRef/resellers

List the resellers within the specified brand. This will return an array containing all of the resellers that exist within the brand.

Response

Status: 200 OK

{
    "resellers": [
        {
            "ref": 1,
            "parentResellerRef": null,
            "brandRef": 1,
            "resellerName": "Test Reseller",
            "displayName": "Test Reseller",
            "accountCreateLimit": 10,
            "defaultCurrencyRef": 1,
            "defaultLanguageRef": 1,
            "enabled": true,
            "created": {
                "date": "2015-10-22 17:01:44",
                "timezone_type": 3,
                "timezone": "Europe/London"
            },
            "updated": null,
            "loginURL": "https://reseller.example/login",
            "externalAccountURL": "https://reseller.example/account",
            "externalPaymentURL": "https://reseller.example/payment",
            "externalPaymentCancellationURL": "https://reseller.example/cancel",
            "externalSubscriptionURL": "https://reseller.example/subscribe",
            "resellerHelpURL": "https://reseller.example/help",
            "resellerSupportEmail": "support@reseller.example"
        }
    ]
}

Create reseller

POST /brands/:brandRef/resellers

Create a reseller within the specific brand.

Parameters

name string Required. Name of the reseller. To be used internally.
displayName string Required. This is used in various places in the UI to refer to the brand or reseller to which the user belongs.
For example, “Click here to publish your Reseller Name website”.
accountCreateLimit integer The number of accounts this reseller is allowed to create.
defaultCurrencyRef integer Required. The currency that is associated with the user when they are created.
defaultLanguageRef integer Required. The language that is associated with the user when they are created.
loginURL string The URL that a reseller’s users can visit to login to their account. This could be the BaseKit account if they access directly, or it could be the reseller account if they access via an external control panel.
externalAccountURL string If this is set then users will be redirected to this URL when the Account link is clicked from within the BaseKit application. This is typically the URL of the reseller’s control panel.
externalPaymentURL string If this is set then users will be redirected to this URL to purchase a site or add-on.
externalPaymentCancellationURL string If this is set then users will be redirected to this URL to cancel their account.
externalSubscriptionURL string If this is set then users will be redirected to this URL when they click to purchase a new subscription package. This is typically the URL of the upgrades page in the reseller’s control panel.
resellerHelpURL string If this is set then the Help link within the BaseKit editor will redirect to this URL. If it is not set then the Help URL defined in the brand will be used.
resellerSupportEmail string If this is set then this email address will be listed in the support pages.

Content-Type: application/json

{
    "name": "Test Reseller",
    "displayName": "Test Reseller",
    "accountCreateLimit": 10,
    "defaultCurrencyRef": 1,
    "defaultLanguageRef": 1,
    "loginURL": "https://reseller.example/login",
    "externalAccountURL": "https://reseller.example/account",
    "externalPaymentURL": "https://reseller.example/payment",
    "externalPaymentCancellationURL": "https://reseller.example/cancel",
    "externalSubscriptionURL": "https://reseller.example/subscribe",
    "resellerHelpURL": "https://reseller.example/help",
    "resellerSupportEmail": "support@reseller.example"
}

Response

Status: 201 Created

{
    "reseller": {
        "ref": 3,
        "parentResellerRef": null,
        "brandRef": 1,
        "resellerName": "Test Reseller",
        "displayName": "Test Reseller",
        "accountCreateLimit": 10,
        "defaultCurrencyRef": 1,
        "defaultLanguageRef": 1,
        "enabled": true,
        "created": {
            "date": "2015-10-22 17:05:50",
            "timezone_type": 3,
            "timezone": "Europe/London"
        },
        "updated": null,
        "loginURL": "https://reseller.example/login",
        "externalAccountURL": "https://reseller.example/account",
        "externalPaymentURL": "https://reseller.example/payment",
        "externalPaymentCancellationURL": "https://reseller.example/cancel",
        "externalSubscriptionURL": "https://reseller.example/subscribe",
        "resellerHelpURL": "https://reseller.example/help",
        "resellerSupportEmail": "support@reseller.example"
    },
    "credentials": {
        "consumerKey": "386ee02524ca9558a5171fd697dde66f94415b7a",
        "consumerSecret": "3fbfa59f39a97f943a060d61e6bc2a45043d1770",
        "accessToken": "921c4d8ad605d34aba142c636a0e279fc4ca912a",
        "accessSecret": "77ff7f4d0aa9b1af13ff2b3baa73f2a0db15a39f"
    }
}

Get reseller

GET /resellers/:resellerRef

Get an existing reseller by ref.

Response

Status: 200 OK

{
    "reseller": {
        "ref": 1,
        "parentResellerRef": null,
        "brandRef": 1,
        "resellerName": "Test Reseller",
        "displayName": "Test Reseller",
        "accountCreateLimit": 10,
        "defaultCurrencyRef": 1,
        "defaultLanguageRef": 1,
        "enabled": true,
        "created": {
            "date": "2015-10-22 17:01:44",
            "timezone_type": 3,
            "timezone": "Europe/London"
        },
        "updated": null,
        "loginURL": "https://reseller.example/login",
        "externalAccountURL": "https://reseller.example/account",
        "externalPaymentURL": "https://reseller.example/payment",
        "externalPaymentCancellationURL": "https://reseller.example/cancel",
        "externalSubscriptionURL": "https://reseller.example/subscribe",
        "resellerHelpURL": "https://reseller.example/help",
        "resellerSupportEmail": "support@reseller.example"
    }
}

Update reseller

PUT /resellers/:resellerRef

Update an existing reseller by ref. This is a partial update and therefore only the fields provided will be changed, if they are different.

Parameters

name string Name of the reseller. To be used internally.
displayName string This is used in various places in the UI to refer to the brand or reseller to to which the user belongs.
For example, “Click here to publish your Reseller Name website”.
accountCreateLimit integer The number of accounts this reseller is allowed to create.
defaultCurrencyRef integer The currency that is associated with the user when they are created.
defaultLanguageRef integer The language that is associated with the user when they are created.
loginURL string The URL that a reseller’s users can visit to login to their account. This could be the BaseKit account if they access directly, or it could be the reseller account if they access via an external control panel.
externalAccountURL string If this is set then users will be redirected to this URL when the Account link is clicked from within the BaseKit application. This is typically the URL of the reseller’s control panel.
externalPaymentURL string If this is set then users will be redirected to this URL to purchase a site or add-on.
externalPaymentCancellationURL string If this is set then users will be redirected to this URL to cancel their account.
externalSubscriptionURL string If this is set then users will be redirected to this URL when they click to purchase a new subscription package. This is typically the URL of the upgrades page in the reseller’s control panel.
resellerHelpURL string If this is set then the Help link within the BaseKit editor will redirect to this URL. If it is not set then the Help URL defined in the brand will be used.
resellerSupportEmail string If this is set then this email address will be listed in the support pages.

Content-Type: application/json

{
    "name": "Updated Reseller",
    "displayName": "Updated Reseller",
    "accountCreateLimit": 20,
    "defaultCurrencyRef": 1,
    "defaultLanguageRef": 1,
    "loginURL": "https://updatedreseller.example/login",
    "externalAccountURL": "https://updatedreseller.example/account",
    "externalPaymentURL": "https://updatedreseller.example/payment",
    "externalPaymentCancellationURL": "https://updatedreseller.example/cancel",
    "externalSubscriptionURL": "https://updatedreseller.example/subscribe",
    "resellerHelpURL": "https://updatedreseller.example/help",
    "resellerSupportEmail": "support@updatedreseller.example"
}

Response

Status: 200 OK

{
    "reseller": {
        "ref": 1,
        "parentResellerRef": null,
        "brandRef": 1,
        "resellerName": "Updated Reseller",
        "displayName": "Updated Reseller",
        "accountCreateLimit": 20,
        "defaultCurrencyRef": 1,
        "defaultLanguageRef": 1,
        "enabled": true,
        "created": {
            "date": "2015-10-22 17:01:44",
            "timezone_type": 3,
            "timezone": "Europe/London"
        },
        "updated": null,
        "loginURL": "https://updatedreseller.example/login",
        "externalAccountURL": "https://updatedreseller.example/account",
        "externalPaymentURL": "https://updatedreseller.example/payment",
        "externalPaymentCancellationURL": "https://updatedreseller.example/cancel",
        "externalSubscriptionURL": "https://updatedreseller.example/subscribe",
        "resellerHelpURL": "https://updatedreseller.example/help",
        "resellerSupportEmail": "support@updatedreseller.example"
    }
}

Delete reseller

DELETE /resellers/:resellerRef

Delete an existing reseller by ref.

Response

Status: 204 No Content

Get reseller prices

GET /resellers/:resellerRef/prices

List all package prices for a reseller. This will return an array containing all of the prices added to the reseller. Note that this will return an empty response until prices have been added.

Response

Status: 200 OK

{
    "prices": [
        {
            "ref": 2,
            "billingPeriodMonths": 1,
            "price": "1.00",
            "offerPrice": "0.00",
            "currency": {
                "ref": 1,
                "name": "Pound Sterling",
                "alphaCode": "GBP",
                "numCode": "826",
                "htmlCode": "£",
                "currencyRate": 1
            },
            "packageRef": 16,
            "packageName": "Demo Account",
            "type": "reseller",
            "formattedPrice": "\u00a31.00"
        },
        {
            "ref": 1,
            "billingPeriodMonths": 12,
            "price": "10.00",
            "offerPrice": "0.00",
            "currency": {
                "ref": 1,
                "name": "Pound Sterling",
                "alphaCode": "GBP",
                "numCode": "826",
                "htmlCode": "£",
                "currencyRate": 1
            },
            "packageRef": 16,
            "packageName": "Demo Account",
            "type": "reseller",
            "formattedPrice": "\u00a310.00"
        }
    ]
}

Get reseller price

GET /resellers/:resellerRef/prices/:priceRef

Get a reseller price by ref.

Response

Status: 200 OK

{
    "price": {
        "ref": 2,
        "billingPeriodMonths": 1,
        "price": "1.00",
        "offerPrice": "0.00",
        "currency": {
            "ref": 1,
            "name": "Pound Sterling",
            "alphaCode": "GBP",
            "numCode": "826",
            "htmlCode": "£",
            "currencyRate": 1
        },
        "packageRef": 16,
        "packageName": "Demo Account",
        "type": "reseller"
    }

Create reseller price

POST /resellers/:resellerRef/prices

Add a reseller package price for a specified billing period and currency. In most cases you will not need an offer price so it is suggested that you provide the same price to each of these parameters.

Parameters

packageRef integer Required.
billingPeriodMonths integer Required.
currencyRef integer Required.
price integer Required.
offerPrice integer Required.

Content-Type: application/json

Response

Status: 201 Created

{
    "price": {
        "ref": 1,
        "billingPeriodMonths": 12,
        "price": 10,
        "offerPrice": 0,
        "currency": {
            "ref": 1,
            "name": "Pound Sterling",
            "alphaCode": "GBP",
            "numCode": "826",
            "htmlCode": "£",
            "currencyRate": 1
        },
        "packageRef": 16,
        "packageName": "Demo Account",
        "type": "reseller"
    }
}

Update reseller price

PUT /resellers/:resellerRef/prices/:priceRef

Update a reseller price by ref. You would typically only update price and offerPrice but you can optionally provide all other fields as with the POST method.

Parameters

price integer
offerPrice integer

Content-Type: application/json

Response

Staus: 200 OK

{
    "price": {
        "ref": 1,
        "billingPeriodMonths": 12,
        "price": "20",
        "offerPrice": "0.00",
        "currency": {
            "ref": 1,
            "name": "Pound Sterling",
            "alphaCode": "GBP",
            "numCode": "826",
            "htmlCode": "£",
            "currencyRate": 1
        },
        "packageRef": 16,
        "packageName": "Demo Account",
        "type": "reseller"
    }
}

Delete reseller price

DELETE /resellers/:resellerRef/prices/:priceRef

Delete a reseller price by ref.

Response

Status: 204 No Content