# API: Add Order Draft Item
# addOrderDraftItem
Add new domain or service to existing draft.
# Required parameters
Parameter | Description |
---|---|
id | Draft ID |
prod_type | Type of item: domain, service |
# Optional parameters
Parameter | Description |
---|---|
product | Product ID for service |
service | Account ID for upgrade orders |
cycle | Billing cycle for service, needs to be supported by product. ie:free for freeonce for one-timem for monthlyq for quarterlya for annually |
host | Hostname for service |
domain_sld | SLD name for domain |
domain_tld | TLD ID for domain |
domain_period | Period for domain |
domain_action | Action type for domain: Register or Transfer |
domain_eppcode | EPP Code for domain in case of Transfer |
custom | Form component values for domains and services. It structure may depend on form type, please check Advanced tab in given Component->Form to get sample api use. Example: custom[{form_id}][{item_id}]=test for text field custom[{form_id}][{item_id}]=10 for qty field custom[{form_id}]={item_id} for select fieldFor more complex fields consider using browser inspector to check xhr request made when adding item to draft order in admin ui |
addons | Addons details for service. I.e.: to order addon id: 10, monthly cycle: addons[10][qty]=1 addons[10][cycle]=m |
checkifadded | Set to 1 to verify whether added domain is already in draft |
billing[price] | Custom order item price |
billing[setup] | Custom order item setup fee |
qty | Product quantity to add |
multiple | Array containing multiple items to add at once, each item can use keys listed above. See examples below |
domain_nameservers | Array containing nameservers which the domain should accept |
domain_contacts[registrant][firstname] | Registrant firstname |
domain_contacts[registrant][lastname] | Registrant lastname |
domain_contacts[registrant][companyname] | Registrant companyname |
domain_contacts[registrant][address1] | Registrant address |
domain_contacts[registrant][address2] | Registrant address 2 |
domain_contacts[registrant][city] | Registrant city |
domain_contacts[registrant][state] | Registrant state |
domain_contacts[registrant][country] | Registrant country code |
domain_contacts[registrant][postcode] | Registrant post code |
domain_contacts[registrant][email] | Registrant email |
domain_contacts[registrant][phonenumber] | Registrant phone number |
domain_contacts[admin][firstname] | Admin firstname |
domain_contacts[admin][lastname] | Admin lastname |
domain_contacts[admin][companyname] | Admin companyname |
domain_contacts[admin][address1] | Admin address |
domain_contacts[admin][address2] | Admin address 2 |
domain_contacts[admin][city] | Admin city |
domain_contacts[admin][state] | Admin state |
domain_contacts[admin][country] | Admin country code |
domain_contacts[admin][postcode] | Admin post code |
domain_contacts[admin][email] | Admin email |
domain_contacts[admin][phonenumber] | Admin phone number |
domain_contacts[tech][firstname] | Tech firstname |
domain_contacts[tech][lastname] | Tech lastname |
domain_contacts[tech][companyname] | Tech companyname |
domain_contacts[tech][address1] | Tech address |
domain_contacts[tech][address2] | Tech address 2 |
domain_contacts[tech][city] | Tech city |
domain_contacts[tech][state] | Tech state |
domain_contacts[tech][country] | Tech country code |
domain_contacts[tech][postcode] | Tech post code |
domain_contacts[tech][email] | Tech email |
domain_contacts[tech][phonenumber] | Tech phone number |
domain_contacts[billing][firstname] | Billing firstname |
domain_contacts[billing][lastname] | Billing lastname |
domain_contacts[billing][companyname] | Billing companyname |
domain_contacts[billing][address1] | Billing address |
domain_contacts[billing][address2] | Billing address 2 |
domain_contacts[billing][city] | Billing city |
domain_contacts[billing][state] | Billing state |
domain_contacts[billing][country] | Billing country code |
domain_contacts[billing][postcode] | Billing post code |
domain_contacts[billing][email] | Billing email |
domain_contacts[billing][phonenumber] | Billing phone number |
# Request
GET /admin/api.php?api_id=API_ID&api_key=API_KEY&call=addOrderDraftItem&id=ID&prod_type=PROD_TYPE
# PHP Samples
# PHP Samples: Add single monthly product to order draft
# PHP Samples: Add multiple products to order draft
# PHP Samples: Add single monthly product to order draft with nameservers
# Response
{
"success": true,
"item_id": 5,
"call": "addOrderDraftItem",
"server_time": 1736853903
}