Package Exports
- @rqt/namecheap
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@rqt/namecheap) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@rqt/namecheap
@rqt/namecheap is an implementation of the namecheap.com API.
yarn add -E @rqt/namecheapTable Of Contents
API
The package is available by importing its default function:
import NameCheap from '@rqt/namecheap'constructor(
options: Options,
): void
Create a new instance of the NameCheap class.
Options: Options for the NameCheap client.
| Name | Type | Description | Default |
|---|---|---|---|
| user* | string | The username required to access the API. | - |
| key* | string | The password required used to access the API. | - |
| ip* | string | The IP address of the client accessing the application (End-user IP address). | - |
| sandbox | boolean | Whether to use the sandbox version of the API. | false |
/* yarn example/ */
import NameCheap from '@rqt/namecheap'
import bosom from 'bosom'
(async () => {
try {
// 0. Create a client.
const { user, key, ip } = await bosom('.namecheap.json')
const namecheap = new NameCheap({
user, key, sandbox: true, ip,
})
// 1. Check a domain.
const c = await namecheap.domains.check('test.co')
console.log('Check:', c, '\n')
// 2. Get list of addresses on the account.
const cc = await namecheap.address.getList()
console.log('Addresses:', cc, '\n')
// 3. Find the default address and get its info.
const { AddressId } = cc.find(({ IsDefault }) => IsDefault)
const address = await namecheap.address.getInfo(AddressId)
// 4. Register the domain using the address.
const d = new Date().toLocaleString().replace(/[ :]/g, '-')
const domain = `rqt-example-${d}.com`
const r = await namecheap.domains.create({
domain,
address,
})
console.log('Registered:', r, '\n')
// 5. Retrieve info about domain.
const info = await namecheap.domains.getInfo(domain)
console.log('Info:', info, '\n')
// 6. Get a list of domains (with filter).
const list = await namecheap.domains.getList({
filter: domain,
})
console.log('List:', list, '\n')
} catch (err) {
console.log(err)
}
})()Check: [ { Domain: 'test.co',
Available: false,
ErrorNo: 0,
Description: '',
IsPremiumName: false,
PremiumRegistrationPrice: 0,
PremiumRenewalPrice: 0,
PremiumRestorePrice: 0,
PremiumTransferPrice: 0,
IcannFee: 0,
EapFee: '0.0' } ]
Addresses: [ { AddressId: 0,
AddressName: 'Primary Address',
IsDefault: false },
{ AddressId: 101235,
AddressName: 'Planet Express',
IsDefault: true } ]
Registered: { Domain: 'rqt-example-2018-10-6-22-49-04.com',
Registered: true,
ChargedAmount: '9.0600',
DomainID: 330665,
OrderID: 1293691,
TransactionID: 1831272,
WhoisguardEnable: true,
FreePositiveSSL: false,
NonRealTimeDomain: false }
Info: { Status: 'Ok',
ID: 330665,
DomainName: 'rqt-example-2018-10-6-22-49-04.com',
OwnerName: 'zavr',
IsOwner: true,
IsPremium: false,
DomainDetails:
{ CreatedDate: '10/06/2018',
ExpiredDate: '10/06/2019',
NumYears: 0 },
Whoisguard:
{ Enabled: 'True',
ID: 269176,
ExpiredDate: '10/06/2019',
EmailDetails:
{ WhoisGuardEmail: '68c19235241b4d878ed1bf75e709d4c5.protect@whoisguard.com',
ForwardedTo: 'zoidberg@futurama.bz',
LastAutoEmailChangeDate: '',
AutoEmailChangeFrequencyDays: 0 } },
PremiumDnsSubscription:
{ UseAutoRenew: false,
SubscriptionId: -1,
CreatedDate: 0000-12-31T21:00:00.000Z,
ExpirationDate: 0000-12-31T21:00:00.000Z,
IsActive: false },
DnsDetails:
{ ProviderType: 'FREE',
IsUsingOurDNS: true,
HostCount: 2,
EmailType: 'FWD',
DynamicDNSStatus: false,
IsFailover: false,
Nameserver: [ 'dns1.registrar-servers.com', 'dns2.registrar-servers.com' ] },
Modificationrights: { All: true } }
List: { domains:
[ { ID: 330665,
Name: 'rqt-example-2018-10-6-22-49-04.com',
User: 'zavr',
Created: '10/06/2018',
Expires: '10/06/2019',
IsExpired: false,
IsLocked: false,
AutoRenew: false,
WhoisGuard: 'ENABLED',
IsPremium: false,
IsOurDNS: true } ],
TotalItems: 1,
CurrentPage: 1,
PageSize: 20 }domains
Methods to check availability, register and retrieve account domains' info.
async create(
options: Create,
): RegistrationResult
Register a domain.
Create: Options to register a domain. https://www.namecheap.com/support/api/methods/domains/create.aspx
| Name | Type | Description | Default |
|---|---|---|---|
| domain* | string | The domain name to register. | - |
| years | number | The number of years to register. | 1 |
| promo | string | Promotional (coupon) code for the domain. Check https://www.namecheap.com/promos/coupons/ for this month's offers. | - |
| nameservers | string[] | The comma-separated list of custom nameservers to be associated with the domain name. | - |
| whois | boolean | Adds free WhoisGuard for the domain. | true |
| address* | AddressDetail | A single address to use for Registrant, Tech, Admin, and AuxBilling. Saved addresses can be found out with namecheap.address.getList and namecheap.address.getInfo. |
- |
| billingAddress | AddressDetail | An address to use for AuxBilling address details. |
- |
| registrantAddress | AddressDetail | An address to use for Registrant address details. |
- |
| techAddress | AddressDetail | An address to use for Tech address details. |
- |
| adminAddress | AddressDetail | An address to use for Admin address details. |
- |
RegistrationResult: Registered domain information.
| Name | Type | Description |
|---|---|---|
| ChargedAmount* | string | Total amount charged for registration. |
| Domain* | string | Domain name that you are trying to register. |
| DomainID* | number | Unique integer value that represents the domain. |
| NonRealTimeDomain* | boolean | Indicates whether the domain registration is instant (real-time) or not. |
| OrderID* | number | Unique integer value that represents the order. |
| Registered* | boolean | Indicates whether the domain was registered. |
| TransactionID* | number | Unique integer value that represents the transaction. |
| WhoisguardEnable* | boolean | Indicates whether WhoisGuard protection is enabled for the domain. |
/**
* @param {string} domain The domain to register.
* @param {NameCheap} client
*/
const Create = async (domain, client) => {
// Find the default address.
const ad = await client.address.getList()
const { AddressId } = ad.find(({ IsDefault }) => IsDefault)
const address = await client.address.getInfo(AddressId)
// Register a domain.
const res = await client.domains.create({
domain,
address,
})
return res
}{ Domain: 'rqt-example-2018-10-6-22-49-14.com',
Registered: true,
ChargedAmount: '9.0600',
DomainID: 330666,
OrderID: 1293692,
TransactionID: 1831273,
WhoisguardEnable: true,
FreePositiveSSL: false,
NonRealTimeDomain: false }async check(
options: string|Check,
): DomainCheck[]
Check a domain or domains for availability.
Check: Options to check a domain or domains. https://www.namecheap.com/support/api/methods/domains/check.aspx
| Name | Type | Description |
|---|---|---|
| domain | string | The domain check. |
| domains | string[] | The domains to check. |
DomainCheck: The result of the check.
| Name | Type | Description |
|---|---|---|
| Domain* | string | The domain name for which you wish to check availability. |
| Available* | boolean | Indicates whether the domain name is available for registration. |
| IsPremiumName* | boolean | Indicates whether the domain name is premium. |
| PremiumRegistrationPrice* | boolean | The registration price for the premium domain. |
| PremiumRenewalPrice* | boolean | The renewal price for the premium domain. |
| PremiumRestorePrice* | boolean | The restore price for the premium domain. |
| PremiumTransferPrice* | boolean | The transfer price for the premium domain. |
| EapFee* | number | Purchase fee for the premium domain during Early Access Program (EAP)*. |
| IcannFee* | number | Fee charged by ICANN. |
/**
* @param {string} domain The domain to check.
* @param {NameCheap} client
*/
const Check = async (domain, client) => {
// Check a domain with options (returned in an array).
await client.domains.check({
domain,
})
// Check a domain with string (returned in an array).
await client.domains.check(domain)
// Check multiple domains.
const array = await client.domains.check({
domains: [
domain,
domain.replace('.com', '.net'),
],
})
return array
}[ { Domain: 'example.com',
Available: false,
ErrorNo: 0,
Description: '',
IsPremiumName: false,
PremiumRegistrationPrice: 0,
PremiumRenewalPrice: 0,
PremiumRestorePrice: 0,
PremiumTransferPrice: 0,
IcannFee: 0,
EapFee: '0.0' },
{ Domain: 'example.net',
Available: false,
ErrorNo: 0,
Description: '',
IsPremiumName: false,
PremiumRegistrationPrice: 0,
PremiumRenewalPrice: 0,
PremiumRestorePrice: 0,
PremiumTransferPrice: 0,
IcannFee: 0,
EapFee: '0.0' } ]async getInfo(
options: string|GetInfo,
): DomainInfo
Returns information about the requested domain.
GetInfo: Options to get info about a domain. https://www.namecheap.com/support/api/methods/domains/get-info.aspx
| Name | Type | Description |
|---|---|---|
| domain* | string | The domain to get info about. |
| host | string | The hosted domain name for which domain information needs to be requested. |
| Name | Type | Description |
|---|---|---|
| DomainName* | string | Domain name for which the information was requested, e.g., example.com. |
| OwnerName* | string | User account under which the domain is registered, e.g., rqt. |
| ID* | number | Unique integer value that represents the domain,e.g., 314928. |
| IsOwner* | boolean | Indicates whether the API user is the owner of the domain, e.g., true. |
| IsPremium* | boolean | Indicates whether the domain name is premium, e.g., false. |
| Status* | 'Ok'|'Locked'|'Expired' | Indicates the status of the domain, e.g., OK. |
| DomainDetails* | DomainDetails | |
| LockDetails* | LockDetails | |
| Whoisguard* | Whoisguard | |
| PremiumDnsSubscription* | PremiumDnsSubscription | |
| DnsDetails* | DnsDetails | |
| ModificationRights* | ModificationRights |
| Name | Type | Description |
|---|---|---|
| CreatedDate* | string | 06/06/2018 |
| ExpiredDate* | string | 06/06/2019 |
| NumYears* | number | 1 |
| Name | Type | Description |
|---|---|---|
| Enabled* | boolean | true |
| ID* | string | 264991 |
| ExpiredDate* | string | 06/06/2019 |
| EmailDetails* | EmailDetails |
| Name | Type | Description |
|---|---|---|
| AutoEmailChangeFrequencyDays* | number | 0 |
| ForwardedTo* | string | example@adc.sh |
| LastAutoEmailChangeDate* | string | |
| WhoisGuardEmail* | string | 43b596ee817f451f98eab1d848a4051a.protect@whoisguard.com |
| Name | Type | Description |
|---|---|---|
| CreatedDate* | Date | |
| ExpirationDate* | Date | |
| IsActive* | boolean | false |
| SubscriptionId* | number | -1 |
| UseAutoRenew* | boolean | false |
| Name | Type | Description |
|---|---|---|
| DynamicDNSStatus* | boolean | false |
| EmailType* | string | FWD |
| HostCount* | number | 2 |
| IsFailover* | boolean | false |
| IsUsingOurDNS* | boolean | true |
| Nameserver* | string[] | [dns1.registrar-servers.com, dns2.registrar-servers.com] |
| ProviderType* | 'CUSTOM'|'FREE' | FREE |
| Name | Type | Description |
|---|---|---|
| All* | boolean | true |
| hosts | boolean |
/**
* @param {string} domain The domain to get info about.
* @param {NameCheap} client
*/
const GetInfo = async (domain, client) => {
// Info with options.
await client.domains.getInfo({ domain })
// Simplified info with a string.
const res = await client.domains.getInfo(domain)
return res
}{ Status: 'Ok',
ID: 330667,
DomainName: 'rqt-example-2018-10-6-22-49-29.com',
OwnerName: 'zavr',
IsOwner: true,
IsPremium: false,
DomainDetails:
{ CreatedDate: '10/06/2018',
ExpiredDate: '10/06/2019',
NumYears: 0 },
Whoisguard:
{ Enabled: 'True',
ID: 269178,
ExpiredDate: '10/06/2019',
EmailDetails:
{ WhoisGuardEmail: 'b4328857744543919dd30217b9bcdee6.protect@whoisguard.com',
ForwardedTo: 'zoidberg@futurama.bz',
LastAutoEmailChangeDate: '',
AutoEmailChangeFrequencyDays: 0 } },
PremiumDnsSubscription:
{ UseAutoRenew: false,
SubscriptionId: -1,
CreatedDate: 0000-12-31T21:00:00.000Z,
ExpirationDate: 0000-12-31T21:00:00.000Z,
IsActive: false },
DnsDetails:
{ ProviderType: 'FREE',
IsUsingOurDNS: true,
HostCount: 2,
EmailType: 'FWD',
DynamicDNSStatus: false,
IsFailover: false,
Nameserver: [ 'dns1.registrar-servers.com', 'dns2.registrar-servers.com' ] },
Modificationrights: { All: true } }async getList(
options?: GetList,
): { domains, TotalItems, CurrentPage, PageSize }
Returns a list of domains for the particular user.
GetList: Options to get a list of domains. https://www.namecheap.com/support/api/methods/domains/get-list.aspx
| Name | Type | Description | Default |
|---|---|---|---|
| type | 'ALL'|'EXPIRING'|'EXPIRED' | The type of domains. | ALL |
| filter | string | The keyword to look for in the domain list. | - |
| page | number | The page to return. | 1 |
| pageSize | number | The number of domains to be listed on a page. Minimum value is 10, and maximum value is 100. | 20 |
| sort | 'name'|'expire'|'create' | The field by which to sort domains. If not given, the domains are sorted in descending order by their creation date. | create |
| desc | boolean | Whether to sort in descending order. | false |
| Name | Type | Description |
|---|---|---|
| AutoRenew* | boolean | false |
| Created* | string | 07/23/2018 |
| Expires* | string | 07/23/2019 |
| ID* | number | 314928 |
| IsExpired* | boolean | false |
| IsLocked* | boolean | false |
| IsOurDNS* | boolean | true |
| IsPremium* | boolean | false |
| Name* | string | domain.app |
| User* | string | user |
| WhoisGuard* | string | ENABLED |
/**
* @param {string} domain The domain to filter by.
* @param {NameCheap} client
*/
const GetList = async (domain, client) => {
const res = await client.domains.getList({
filter: domain,
})
return res
}{ domains:
[ { ID: 330668,
Name: 'rqt-example-2018-10-6-22-49-41.com',
User: 'zavr',
Created: '10/06/2018',
Expires: '10/06/2019',
IsExpired: false,
IsLocked: false,
AutoRenew: false,
WhoisGuard: 'ENABLED',
IsPremium: false,
IsOurDNS: true } ],
TotalItems: 1,
CurrentPage: 1,
PageSize: 20 }users
Methods related to the user.
async getPricing(
options: GetPricing,
): Pricing
Returns pricing information for a requested product type.
GetPricing: Options to get pricing info. https://www.namecheap.com/support/api/methods/users/get-pricing.aspx
| Name | Type | Description |
|---|---|---|
| type* | 'DOMAIN'|'SSLCERTIFICATE'|'WHOISGUARD' | Product Type to get pricing information. |
| category | string | Specific category within a product type, e.g., DOMAINS, COMODO, WHOISGUARD. |
| promoCode | string | Promotional (coupon) code for the user. |
| action | 'REGISTER'|'PURCHASE'|'RENEW'|'REACTIVATE'|'TRANSFER' | Specific action within a product type. |
| product | string | The name of the product within a product type, e.g., COM, INSTANTSSL, WHOISGUARD-PROTECT-ONE. |
The returned object will contain data according to requested types, categories, actions and products.
/**
* @param {NameCheap} client
*/
const GetPricing = async (client, options = {
type: 'DOMAIN',
action: 'REGISTER',
product: 'COM',
}) => {
const res = await client.users.getPricing(options)
return res
}Pricing: The pricing information returned as an object. The data is split into 3 types: Domain, SSL and Whois.
| Name | Type | Description |
|---|---|---|
| domains* | DomainPricing | The pricing of domains. |
| ssl* | SSLPricing | The pricing of certificates. |
| whoisguard* | WhoisPricing | The pricing of the Whois Guard. |
Price[] Product: A product consists of an array of prices for different durations.
Price: Price data for a product accoding to the duration of an action.
| Name | Type | Description |
|---|---|---|
| Duration* | number | The duration of the product, e.g., 1. |
| DurationType* | string | The duration type of the product, e.g., YEAR. |
| Price* | string | Indicates Final price (it can be from regular, userprice, special price,promo price, tier price), e.g., 20.88. |
| PricingType* | 'MULTIPLE' | Always set to MULTIPLE. |
| AdditionalCost | string | Any additional costs, such as ICANN fee for a domain registration, e.g., 0.18. |
| RegularPrice* | string | Indicates regular price, e.g., 39.00. |
| RegularPriceType* | 'MULTIPLE' | Always set to MULTIPLE. |
| RegularAdditionalCost | string | Any additional costs, such as ICANN fee for a domain registration, e.g., 0.18. |
| RegularAdditionalCostType | 'MULTIPLE' | Always set to MULTIPLE. |
| YourPrice* | string | The user’s price for the product, e.g., 20.88. |
| YourPriceType* | 'MULTIPLE' | Always set to MULTIPLE. |
| YourAdditonalCost | string | Any additional costs, such as ICANN fee for a domain registration, e.g., 0.18. |
| YourAdditonalCostType | 'MULTIPLE' | Always set to MULTIPLE. |
| PromotionPrice* | string | Price with coupon enabled. |
| Currency* | string | Currency in which the price is listed, e.g., USD. |
DomainPricing: The pricing of domains as an object, where the requested zone is a key.
| Name | Type | Description |
|---|---|---|
| register* | Object.<string, Product> | The pricing to register domains. |
| renew* | Object.<string, Product> | The pricing to renew domains. |
| reactivate* | Object.<string, Product> | The pricing to reactivate domains. |
| transfer* | Object.<string, Product> | The pricing to transfer domains. |
SSLPricing: The pricing of certificates.
| Name | Type | Description |
|---|---|---|
| purchase* | SSLPurchase | The pricing to purchase certificates. |
| renew* | SSLRenew | The pricing to renew certificates. |
Show SSL Product Pricing
SSLPurchase: The pricing to purchase certificates.
| Name | Type | Description |
|---|---|---|
| instantssl* | Product | InstantSSL https://www.namecheap.com/security/ssl-certificates/comodo/instantssl.aspx. 1-year purchase: 20.88 USD |
| positivessl* | Product | PositiveSSL https://www.namecheap.com/security/ssl-certificates/comodo/positivessl.aspx. 1-year purchase: 8.88 USD |
| positivesslWildcard* | Product | PositiveSSL Wildcard https://www.namecheap.com/security/ssl-certificates/comodo/positivessl-wildcard.aspx. 1-year purchase: 76.88 USD |
| premiumssl* | Product | PremiumSSL https://www.namecheap.com/security/ssl-certificates/comodo/premiumssl.aspx. 1-year purchase: 79.00 USD |
| quicksslPremium* | Product | 1-year purchase: 56.88 USD |
| rapidssl* | Product | 1-year purchase: 10.95 USD |
| rapidsslWildcard* | Product | 1-year purchase: 148.88 USD |
| secureSite* | Product | 1-year purchase: 285.88 USD |
| secureSitePro* | Product | 1-year purchase: 675.88 USD |
| secureSiteProWithEv* | Product | 1-year purchase: 961.88 USD |
| secureSiteWithEv* | Product | 1-year purchase: 666.88 USD |
| trueBusinessid* | Product | 1-year purchase: 98.00 USD |
| trueBusinessidWildcard* | Product | 1-year purchase: 389.00 USD |
| trueBusinessidWithEv* | Product | 1-year purchase: 179.00 USD |
| premiumsslWildcard* | Product | PremiumSSL Wildcard https://www.namecheap.com/security/ssl-certificates/comodo/premiumssl-wildcard.aspx. 1-year purchase: 169.00 USD |
| essentialssl* | Product | EssentialSSL https://www.namecheap.com/security/ssl-certificates/comodo/essentialssl.aspx. 1-year purchase: 18.88 USD |
| essentialsslWildcard* | Product | EssentialSSL Wildcard https://www.namecheap.com/security/ssl-certificates/comodo/essentialssl-wildcard.aspx. 1-year purchase: 74.88 USD |
| evSsl* | Product | EV SSL https://www.namecheap.com/security/ssl-certificates/comodo/ev.aspx. 1-year purchase: 78.88 USD |
| instantsslPro* | Product | InstantSSL Pro https://www.namecheap.com/security/ssl-certificates/comodo/instantssl-pro.aspx. 1-year purchase: 38.88 USD |
| ssl123* | Product | 1-year purchase: 39.00 USD |
| sslWebServer* | Product | 1-year purchase: 88.88 USD |
| sslWebserverEv* | Product | 1-year purchase: 163.88 USD |
| comodossl* | Product | 1-year purchase: 35.00 USD |
| comodosslWildcard* | Product | 1-year purchase: 170.00 USD |
| comodosslMultiDomainSsl* | Product | Multi-Domain SSL https://www.namecheap.com/security/ssl-certificates/comodo/multi-domain-ssl.aspx. 1-year purchase: 89.88 USD |
| comodosslMultiDomainSslMoresans* | Product | 1-year purchase: 0.00 USD |
| comodosslEvMultiDomainSsl* | Product | EV Multi-Domain SSL https://www.namecheap.com/security/ssl-certificates/comodo/ev-multi-domain-ssl.aspx. 1-year purchase: 168.88 USD |
| comodosslEvMultiDomainSslMoresans* | Product | 1-year purchase: 0.00 USD |
| positivesslMultiDomain* | Product | PositiveSSL Multi-Domain https://www.namecheap.com/security/ssl-certificates/comodo/positivessl-multi-domain.aspx. 1-year purchase: 29.88 USD |
| positivesslMultiDomainMoresans* | Product | 1-year purchase: 0.00 USD |
| trueBusinessidMultiDomain* | Product | 1-year purchase: 179.88 USD |
| trueBusinessidMultiDomainMoresans* | Product | 1-year purchase: 0.00 USD |
| trueBusinessidWithEvMultiDomain* | Product | 1-year purchase: 237.88 USD |
| trueBusinessidWithEvMultiDomainMoresans* | Product | 1-year purchase: 0.00 USD |
| unifiedCommunications* | Product | Unified Communications https://www.namecheap.com/security/ssl-certificates/comodo/unified-communications.aspx. 1-year purchase: 89.88 USD |
| unifiedCommunicationsMoresans* | Product | 1-year purchase: 0.00 USD |
| secureSiteMoresans* | Product | 1-year purchase: 0.00 USD |
| quicksslPremiumMoresans* | Product | 1-year purchase: 0.00 USD |
| secureSiteProMoresans* | Product | 1-year purchase: 0.00 USD |
| secureSiteProWithEvMoresans* | Product | 1-year purchase: 0.00 USD |
| secureSiteWithEvMoresans* | Product | 1-year purchase: 0.00 USD |
| sgcSuperCertsMoresans* | Product | 1-year purchase: 0.00 USD |
| sslWebServerMoresans* | Product | 1-year purchase: 0.00 USD |
| sslWebserverEvMoresans* | Product | 1-year purchase: 0.00 USD |
SSLRenew: The pricing to renew certificates.
| Name | Type | Description |
|---|---|---|
| instantssl* | Product | InstantSSL https://www.namecheap.com/security/ssl-certificates/comodo/instantssl.aspx. 1-year renewal: 31.98 USD |
| positivessl* | Product | PositiveSSL https://www.namecheap.com/security/ssl-certificates/comodo/positivessl.aspx. 1-year renewal: 7.28 USD |
| positivesslWildcard* | Product | PositiveSSL Wildcard https://www.namecheap.com/security/ssl-certificates/comodo/positivessl-wildcard.aspx. 1-year renewal: 77.08 USD |
| premiumssl* | Product | PremiumSSL https://www.namecheap.com/security/ssl-certificates/comodo/premiumssl.aspx. 1-year renewal: 64.78 USD |
| quicksslPremium* | Product | 1-year renewal: 46.64 USD |
| rapidssl* | Product | 1-year renewal: 8.98 USD |
| rapidsslWildcard* | Product | 1-year renewal: 122.08 USD |
| secureSite* | Product | 1-year renewal: 234.42 USD |
| secureSitePro* | Product | 1-year renewal: 554.22 USD |
| secureSiteProWithEv* | Product | 1-year renewal: 788.74 USD |
| secureSiteWithEv* | Product | 1-year renewal: 546.84 USD |
| trueBusinessid* | Product | 1-year renewal: 80.36 USD |
| trueBusinessidWildcard* | Product | 1-year renewal: 318.98 USD |
| trueBusinessidWithEv* | Product | 1-year renewal: 146.78 USD |
| ssl123* | Product | 1-year renewal: 31.98 USD |
| sslWebServer* | Product | 1-year renewal: 72.88 USD |
| sslWebserverEv* | Product | 1-year renewal: 134.38 USD |
| essentialssl* | Product | EssentialSSL https://www.namecheap.com/security/ssl-certificates/comodo/essentialssl.aspx. 1-year renewal: 18.88 USD |
| essentialsslWildcard* | Product | EssentialSSL Wildcard https://www.namecheap.com/security/ssl-certificates/comodo/essentialssl-wildcard.aspx. 1-year renewal: 74.88 USD |
| evSsl* | Product | EV SSL https://www.namecheap.com/security/ssl-certificates/comodo/ev.aspx. 1-year renewal: 118.90 USD |
| instantsslPro* | Product | InstantSSL Pro https://www.namecheap.com/security/ssl-certificates/comodo/instantssl-pro.aspx. 1-year renewal: 48.38 USD |
| premiumsslWildcard* | Product | PremiumSSL Wildcard https://www.namecheap.com/security/ssl-certificates/comodo/premiumssl-wildcard.aspx. 1-year renewal: 138.58 USD |
| comodossl* | Product | 1-year renewal: 28.70 USD |
| comodosslMultiDomainSsl* | Product | Multi-Domain SSL https://www.namecheap.com/security/ssl-certificates/comodo/multi-domain-ssl.aspx. 1-year renewal: 73.70 USD |
| comodosslEvMultiDomainSsl* | Product | EV Multi-Domain SSL https://www.namecheap.com/security/ssl-certificates/comodo/ev-multi-domain-ssl.aspx. 1-year renewal: 203.26 USD |
| positivesslMultiDomain* | Product | PositiveSSL Multi-Domain https://www.namecheap.com/security/ssl-certificates/comodo/positivessl-multi-domain.aspx. 1-year renewal: 24.50 USD |
| trueBusinessidMultiDomain* | Product | 1-year renewal: 147.50 USD |
| trueBusinessidWithEvMultiDomain* | Product | 1-year renewal: 195.06 USD |
| unifiedCommunications* | Product | Unified Communications https://www.namecheap.com/security/ssl-certificates/comodo/unified-communications.aspx. 1-year renewal: 73.70 USD |
WhoisPricing: The pricing of the Whois Guard.
| Name | Type | Description |
|---|---|---|
| purchase* | WhoisPurchase | The pricing to purchase WHOIS guards. |
| renew* | WhoisRenew | The pricing to renew WHOIS guards. |
Show Whois Product Pricing
WhoisPurchase: The pricing to purchase WHOIS guards.
| Name | Type | Description |
|---|---|---|
| whoisguard5Pack* | Product | 1-year purchase: 7.88 USD |
| whoisguardDualPack* | Product | 1-year purchase: 4.88 USD |
| whoisguardProtectOne* | Product | 1-year purchase: 0.00 USD |
WhoisRenew: The pricing to renew WHOIS guards.
| Name | Type | Description |
|---|---|---|
| whoisguardProtectOne* | Product | 1-year renewal: 0.00 USD |
Show Example COM Domain Registration Pricing Output
{
"domains": {
"register": {
"com": [
{
"Duration": 1,
"DurationType": "YEAR",
"Price": "8.88",
"PricingType": "MULTIPLE",
"AdditionalCost": "0.18",
"RegularPrice": "10.98",
"RegularPriceType": "MULTIPLE",
"RegularAdditionalCost": "0.18",
"RegularAdditionalCostType": "MULTIPLE",
"YourPrice": "8.88",
"YourPriceType": "MULTIPLE",
"YourAdditonalCost": "0.18",
"YourAdditonalCostType": "MULTIPLE",
"PromotionPrice": "0.0",
"Currency": "USD"
},
{
"Duration": 2,
"DurationType": "YEAR",
"Price": "10.88",
"PricingType": "MULTIPLE",
"AdditionalCost": "0.18",
"RegularPrice": "10.88",
"RegularPriceType": "MULTIPLE",
"RegularAdditionalCost": "0.18",
"RegularAdditionalCostType": "MULTIPLE",
"YourPrice": "10.88",
"YourPriceType": "MULTIPLE",
"YourAdditonalCost": "0.18",
"YourAdditonalCostType": "MULTIPLE",
"PromotionPrice": "0.0",
"Currency": "USD"
},
{
"Duration": 3,
"DurationType": "YEAR",
"Price": "10.78",
"PricingType": "MULTIPLE",
"AdditionalCost": "0.18",
"RegularPrice": "10.78",
"RegularPriceType": "MULTIPLE",
"RegularAdditionalCost": "0.18",
"RegularAdditionalCostType": "MULTIPLE",
"YourPrice": "10.78",
"YourPriceType": "MULTIPLE",
"YourAdditonalCost": "0.18",
"YourAdditonalCostType": "MULTIPLE",
"PromotionPrice": "0.0",
"Currency": "USD"
},
{
"Duration": 4,
"DurationType": "YEAR",
"Price": "10.68",
"PricingType": "MULTIPLE",
"AdditionalCost": "0.18",
"RegularPrice": "10.68",
"RegularPriceType": "MULTIPLE",
"RegularAdditionalCost": "0.18",
"RegularAdditionalCostType": "MULTIPLE",
"YourPrice": "10.68",
"YourPriceType": "MULTIPLE",
"YourAdditonalCost": "0.18",
"YourAdditonalCostType": "MULTIPLE",
"PromotionPrice": "0.0",
"Currency": "USD"
},
{
"Duration": 5,
"DurationType": "YEAR",
"Price": "10.58",
"PricingType": "MULTIPLE",
"AdditionalCost": "0.18",
"RegularPrice": "10.58",
"RegularPriceType": "MULTIPLE",
"RegularAdditionalCost": "0.18",
"RegularAdditionalCostType": "MULTIPLE",
"YourPrice": "10.58",
"YourPriceType": "MULTIPLE",
"YourAdditonalCost": "0.18",
"YourAdditonalCostType": "MULTIPLE",
"PromotionPrice": "0.0",
"Currency": "USD"
},
{
"Duration": 6,
"DurationType": "YEAR",
"Price": "10.58",
"PricingType": "MULTIPLE",
"AdditionalCost": "0.18",
"RegularPrice": "10.58",
"RegularPriceType": "MULTIPLE",
"RegularAdditionalCost": "0.18",
"RegularAdditionalCostType": "MULTIPLE",
"YourPrice": "10.58",
"YourPriceType": "MULTIPLE",
"YourAdditonalCost": "0.18",
"YourAdditonalCostType": "MULTIPLE",
"PromotionPrice": "0.0",
"Currency": "USD"
},
{
"Duration": 7,
"DurationType": "YEAR",
"Price": "10.58",
"PricingType": "MULTIPLE",
"AdditionalCost": "0.18",
"RegularPrice": "10.58",
"RegularPriceType": "MULTIPLE",
"RegularAdditionalCost": "0.18",
"RegularAdditionalCostType": "MULTIPLE",
"YourPrice": "10.58",
"YourPriceType": "MULTIPLE",
"YourAdditonalCost": "0.18",
"YourAdditonalCostType": "MULTIPLE",
"PromotionPrice": "0.0",
"Currency": "USD"
},
{
"Duration": 8,
"DurationType": "YEAR",
"Price": "10.58",
"PricingType": "MULTIPLE",
"AdditionalCost": "0.18",
"RegularPrice": "10.58",
"RegularPriceType": "MULTIPLE",
"RegularAdditionalCost": "0.18",
"RegularAdditionalCostType": "MULTIPLE",
"YourPrice": "10.58",
"YourPriceType": "MULTIPLE",
"YourAdditonalCost": "0.18",
"YourAdditonalCostType": "MULTIPLE",
"PromotionPrice": "0.0",
"Currency": "USD"
},
{
"Duration": 9,
"DurationType": "YEAR",
"Price": "10.58",
"PricingType": "MULTIPLE",
"AdditionalCost": "0.18",
"RegularPrice": "10.58",
"RegularPriceType": "MULTIPLE",
"RegularAdditionalCost": "0.18",
"RegularAdditionalCostType": "MULTIPLE",
"YourPrice": "10.58",
"YourPriceType": "MULTIPLE",
"YourAdditonalCost": "0.18",
"YourAdditonalCostType": "MULTIPLE",
"PromotionPrice": "0.0",
"Currency": "USD"
},
{
"Duration": 10,
"DurationType": "YEAR",
"Price": "10.58",
"PricingType": "MULTIPLE",
"AdditionalCost": "0.18",
"RegularPrice": "10.58",
"RegularPriceType": "MULTIPLE",
"RegularAdditionalCost": "0.18",
"RegularAdditionalCostType": "MULTIPLE",
"YourPrice": "10.58",
"YourPriceType": "MULTIPLE",
"YourAdditonalCost": "0.18",
"YourAdditonalCostType": "MULTIPLE",
"PromotionPrice": "0.0",
"Currency": "USD"
}
]
}
}
}Show Example SSL Purchase Pricing Output
address
Methods to manipulate addresses. In contrast to the NameCheap API, it does not fall under the group users.
async getInfo(
id: string|number,
): AddressDetail
Gets information for the requested address ID.
| Name | Type | Description |
|---|---|---|
| EmailAddress* | string | Email address of the user. |
| FirstName* | string | First name of the user. |
| LastName* | string | Last name of the user. |
| JobTitle | string | Job designation of the user |
| Organization | string | Organization of the user. |
| Address1* | string | StreetAddress1 of the user. |
| Address2 | string | StreetAddress2 of the user. |
| City* | string | City of the user. |
| StateProvince* | string | State/Province of the user. |
| StateProvinceChoice* | 'S'|'P' | State/Province choice of the user. |
| Zip* | string | Zip/Postal code of the user. |
| Country* | string | Two letter country code of the user. |
| Phone* | string | Phone number in the format +NNN.NNNNNNNNNN. |
| PhoneExt | string | PhoneExt of the user. |
| Fax | string | Fax number in the format +NNN.NNNNNNNNNN. |
/**
* @param {string|number} id The address to get info about.
* @param {NameCheap} client
*/
const GetInfo = async (id, client) => {
const res = await client.address.getInfo(id)
return res
}{ AddressId: 101235,
UserName: 'zavr',
AddressName: 'Planet Express',
Default_YN: true,
FirstName: 'John',
LastName: 'Zoidberg',
JobTitle: 'Doctor',
Organization: 'Planet Express',
Address1: 'Planet Express',
Address2: '57th Street',
City: 'New New York',
StateProvince: 'NY',
StateProvinceChoice: 'S',
Zip: '10019',
Country: 'US',
Phone: '+1.5417543010',
PhoneExt: '',
EmailAddress: 'zoidberg@futurama.bz' }async getList(): Address[]
Gets a list of address IDs and address names associated with the user account.
| Name | Type | Description |
|---|---|---|
| AddressId* | number | A unique integer value that represents the address profile. |
| AddressName* | number | The name of the address profile. |
| IsDefault* | boolean | Whether it is a default address. |
/**
* @param {NameCheap} client
*/
const GetList = async (client) => {
const res = await client.address.getList()
return res
}[ { AddressId: 0,
AddressName: 'Primary Address',
IsDefault: false },
{ AddressId: 101235,
AddressName: 'Planet Express',
IsDefault: true } ]Progress
domains: 4/11domains.dns: 0/7domains.ns: 0/4domains.transfer: 0/4ssl: 0/13users: 0/9users.address: 2/6whoisguard: 0/8
7/62 = 11%
Copyright
(c) Rqt 2018
