# API: Add Order Draft Item
# addOrderDraftItem
Add new domain or service to existing draft.
# Required parameters
Parameter | Description |
---|---|
id | Draft ID |
# Optional parameters
Parameter | Description |
---|---|
product | Product ID for service |
prod_type | Type of item: domain, 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 |
ssl_config[cn] | SSL Certificate CN |
ssl_config[csr] | SSL Certificate CSR |
ssl_config[server_software] | Server software for SSL Certificate |
ssl_config[dcv] | Domain control validation (DCV) methods [email |
ssl_config[approval_email] | DCV Approval email |
ssl_contacts[organization][name] | Organization name |
ssl_contacts[organization][unit] | Organization unit |
ssl_contacts[organization][orgnumber] | Organization number |
ssl_contacts[organization][address1] | Organization address |
ssl_contacts[organization][address2] | Organization address 2 |
ssl_contacts[organization][city] | Organization city |
ssl_contacts[organization][state] | Organization state |
ssl_contacts[organization][postcode] | Organization post code |
ssl_contacts[organization][country] | Organization country code |
ssl_contacts[organization][phone] | Organization phone number |
ssl_contacts[organization][fax] | Organization fax |
ssl_contacts[admin][firstname] | Admin firstname |
ssl_contacts[admin][lastname] | Admin lastname |
ssl_contacts[admin][jobtitle] | Admin job title |
ssl_contacts[admin][company] | Admin company name |
ssl_contacts[admin][address1] | Admin address |
ssl_contacts[admin][address2] | Admin address 2 |
ssl_contacts[admin][city] | Admin city |
ssl_contacts[admin][state] | Admin state |
ssl_contacts[admin][postcode] | Admin post code |
ssl_contacts[admin][country] | Admin country code |
ssl_contacts[admin][email] | Admin email |
ssl_contacts[admin][phone] | Admin phone number |
ssl_contacts[admin][fax] | Admin fax |
ssl_contacts[tech][copy][] | Use same details as for admin contact. Set to 1 only if data is to be copied |
ssl_contacts[tech][firstname] | Tech firstname |
ssl_contacts[tech][lastname] | Tech lastname |
ssl_contacts[tech][jobtitle] | Tech job title |
ssl_contacts[tech][company] | Tech company name |
ssl_contacts[tech][address1] | Tech address |
ssl_contacts[tech][address2] | Tech address 2 |
ssl_contacts[tech][city] | Tech city |
ssl_contacts[tech][state] | Tech state |
ssl_contacts[tech][postcode] | Tech post code |
ssl_contacts[tech][country] | Tech country code |
ssl_contacts[tech][email] | Tech email |
ssl_contacts[tech][phone] | Tech phone number |
ssl_contacts[tech][fax] | Tech fax |
ssl_contacts[billing][copy][] | Use same details as for admin contact. Set to 1 only if data is to be copied |
ssl_contacts[billing][firstname] | Billing firstname |
ssl_contacts[billing][lastname] | Billing lastname |
ssl_contacts[billing][jobtitle] | Billing job title |
ssl_contacts[billing][company] | Billing company name |
ssl_contacts[billing][address1] | Billing address |
ssl_contacts[billing][address2] | Billing address 2 |
ssl_contacts[billing][city] | Billing city |
ssl_contacts[billing][state] | Billing state |
ssl_contacts[billing][postcode] | Billing post code |
ssl_contacts[billing][country] | Billing country code |
ssl_contacts[billing][email] | Billing email |
ssl_contacts[billing][phone] | Billing phone number |
ssl_contacts[billing][fax] | Billing fax |
# Request
GET /admin/api.php?api_id=API_ID&api_key=API_KEY&call=addOrderDraftItem&id=ID
# 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
# PHP Samples: Add single SSL certificate product to order draft
# Response
{
"success": true,
"item_id": 5,
"call": "addOrderDraftItem",
"server_time": 1736853903
}