Loading...

Knowledge Base

How to Renew a Domain Name Using the API

When your system or integration needs to renew a domain name automatically. This article explains how to renew a domain using the API. 

Description

Renews the specified Domain Registration Order for a specified number of years.

Parameters

 

NameData TypeRequired / OptionalDescription
auth-useridIntegerRequiredAuthentication Parameter
api-keyStringRequiredAuthentication Parameter
order-idIntegerRequiredOrder Id of the Domain Registration Order that you want to Renew.
yearsIntegerRequiredNumber of years for which you want to Renew this Order.
exp-dateIntegerRequiredCurrent Expiry Date of the Order in epoch time format.
purchase-privacyBooleanoptional

Renews the Privacy Protection service for the domain name.

Privacy Protection is not supported for the following TLDs (extensions):

  • .ASIA

  • .AT

  • .AU

  • .CA

  • .CN

  • .ORG.CO, .MIL.CO, .GOV.CO, .EDU.CO

  • .DE

  • .ES

  • .EU

  • .HN

  • .IN

  • .NL

  • .NZ

  • .PRO

  • .RU

  • .SX

  • .TEL

  • .UK

  • .US

auto-renewBooleanRequired

Enables / Disables the Auto-Renewal setting for the domain name.

invoice-optionStringRequiredThis will decide how the Customer Invoice will be handled. Set any of below-mentioned Invoice Options for your Customer:
  • NoInvoice: This will not raise any Invoice. The Order will be renewed.

  • PayInvoice: This will raise an Invoice and:

    • if there are sufficient funds in the Customer's Debit Account, then the Invoice will be paid and the Order will be renewed.

    • if there are insufficient funds in the Customer's Debit Account, then the Order will remain pending in the system.

  • KeepInvoice: This will raise an Invoice for the Customer to pay later. The Order will be renewed.

  • OnlyAdd: This will raise an Invoice for the Customer to pay later. The renewal action request will remain pending.

discount-amountFloatOptionalDiscount amount for the order value.
purchase-premium-dnsBooleanOptionalPurchase Premium DNS Service

HTTP Method

POST


Example Test URL Request

https://test.httpapi.com/api/domains/renew.json?auth-userid=0&api-key=key&order-id=562994&years=1&exp-date=1279012036&invoice-option=NoInvoice&discount-amount=0.0
 


Example Test URL Request for Renewing a Domain Name with Privacy Protection

https://test.httpapi.com/api/domains/renew.json?auth-userid=0&api-key=key&order-id=562994&years=1&exp-date=1279012036&invoice-option=NoInvoice&purchase-privacy=true&discount-amount=0.0


Example Test URL Request for Registry Premium domain renewal

https://test.httpapi.com/api/domains/renew.json?auth-userid=0&api-key=key&order-id=562994&years=1&exp-date=1279012036&invoice-option=NoInvoice&attr-name1=premium&attr-value1=true&discount-amount=0.0

 

Response

Returns a hash map containing the below details:

  • Domain Name (description)

  • Order ID of the Domain Name Order (entityid)

  • Action Type (actiontype)

  • Description of the Domain Renewal Action (actiontypedesc)

  • Action ID of the Domain Renewal Action (eaqid)

  • Domain Renewal Action Status (actionstatus)

  • Description of the Domain Renewal Action Status (actionstatusdesc)

  • Invoice ID of the Domain Renewal Invoice (invoiceid)

  • Selling Currency of the Reseller (sellingcurrencysymbol)

  • Selling Curreny Amount (sellingamount)

  • Discount Amount (discount-amount)

  • Customer ID associated with the Domain Name Order (customerid)

  • Privacy Protection Details (privacydetails)

    • Domain Name (description)

    • Order ID of the Domain Registration Order (entityid)

    • Action Type (actiontype)

    • Description of the Privacy Protection Purchase Action (actiontypedesc)

    • Action ID of the Privacy Protection Purchase Action (eaqid)

    • Privacy Protection Purchase Action Status (actionstatus)

    • Description of the Privacy Protection Purchase Action Status (actionstatusdesc)

    • Invoice ID of the Privacy Protection Purchase Invoice (invoiceid)

    • Selling Currency of the Reseller (sellingcurrencysymbol)

    • Transaction Amount in the Selling Currency (sellingamount)

    • Unutilized Transaction Amount in the Selling Currency (unutilisedsellingamount)

    • Customer ID associated with the Domain Registration Order (customerid)
       

NOTE
  • Invoice ID, Selling Currency Symbol, Selling Amount, Unutilised Selling Amount and Customer ID will not be returned if Invoice-Option is set to NoInvoice.
  • Details under PRIVACY DETAILS will be returned only if PURCHASE-PRIVACY is set to true in the Domain Registration API call


In case of any errors, a status key with value as ERROR along with an error message will be returned.