purchases
GoDaddy Domains v1 API. Accepts a Personal Access Token (Bearer) or a classic sso-key credential.
Overview
| Name | purchases |
| Type | Resource |
| Id | godaddy.registration.purchases |
Fields
The following fields are returned by SELECT queries:
SELECT not supported for this resource, use SHOW METHODS to view available operations for the resource.
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
create | insert | domain, consent | x_shopper_id | Registers the specified domain. Requires a consent object with agreement keys from GET /v1/domains/agreements. Charges the account's billing method. |
validate_contacts | exec | domains | market_id | All contacts specified in request will be validated against all domains specified in "domains". As an alternative, you can also pass in tlds, with the exception of uk, which requires full domain names |
validate | exec | domain, consent | Validates a purchase request body against the TLD schema with no side effects and no charge. Returns 200 on success. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
market_id | string (bcp-47) | MarketId in which the request is being made, and for which responses should be localized |
x_shopper_id | string | Shopper ID which owns the domain. NOTE: This is only required if you are a Reseller managing a domain purchased outside the scope of your reseller account. (wire: X-Shopper-Id) |
INSERT examples
- create
- Manifest
Registers the specified domain. Requires a consent object with agreement keys from GET /v1/domains/agreements. Charges the account's billing method.
INSERT INTO godaddy.registration.purchases (
consent,
contact_admin,
contact_billing,
contact_registrant,
contact_tech,
domain,
name_servers,
period,
privacy,
renew_auto,
x_shopper_id
)
SELECT
'{{ consent }}' /* required */,
'{{ contact_admin }}',
'{{ contact_billing }}',
'{{ contact_registrant }}',
'{{ contact_tech }}',
'{{ domain }}' /* required */,
'{{ name_servers }}',
{{ period }},
{{ privacy }},
{{ renew_auto }},
'{{ x_shopper_id }}'
RETURNING
order_id,
currency,
item_count,
total
;
# Description fields are for documentation purposes
- name: purchases
props:
- name: consent
value:
agreedAt: "{{ agreedAt }}"
agreedBy: "{{ agreedBy }}"
agreementKeys:
- "{{ agreementKeys }}"
- name: contact_admin
value:
addressMailing:
address1: "{{ address1 }}"
address2: "{{ address2 }}"
city: "{{ city }}"
country: "{{ country }}"
postalCode: "{{ postalCode }}"
state: "{{ state }}"
email: "{{ email }}"
fax: "{{ fax }}"
jobTitle: "{{ jobTitle }}"
nameFirst: "{{ nameFirst }}"
nameLast: "{{ nameLast }}"
nameMiddle: "{{ nameMiddle }}"
organization: "{{ organization }}"
phone: "{{ phone }}"
- name: contact_billing
value:
addressMailing:
address1: "{{ address1 }}"
address2: "{{ address2 }}"
city: "{{ city }}"
country: "{{ country }}"
postalCode: "{{ postalCode }}"
state: "{{ state }}"
email: "{{ email }}"
fax: "{{ fax }}"
jobTitle: "{{ jobTitle }}"
nameFirst: "{{ nameFirst }}"
nameLast: "{{ nameLast }}"
nameMiddle: "{{ nameMiddle }}"
organization: "{{ organization }}"
phone: "{{ phone }}"
- name: contact_registrant
value:
addressMailing:
address1: "{{ address1 }}"
address2: "{{ address2 }}"
city: "{{ city }}"
country: "{{ country }}"
postalCode: "{{ postalCode }}"
state: "{{ state }}"
email: "{{ email }}"
fax: "{{ fax }}"
jobTitle: "{{ jobTitle }}"
nameFirst: "{{ nameFirst }}"
nameLast: "{{ nameLast }}"
nameMiddle: "{{ nameMiddle }}"
organization: "{{ organization }}"
phone: "{{ phone }}"
- name: contact_tech
value:
addressMailing:
address1: "{{ address1 }}"
address2: "{{ address2 }}"
city: "{{ city }}"
country: "{{ country }}"
postalCode: "{{ postalCode }}"
state: "{{ state }}"
email: "{{ email }}"
fax: "{{ fax }}"
jobTitle: "{{ jobTitle }}"
nameFirst: "{{ nameFirst }}"
nameLast: "{{ nameLast }}"
nameMiddle: "{{ nameMiddle }}"
organization: "{{ organization }}"
phone: "{{ phone }}"
- name: domain
value: "{{ domain }}"
description: |
For internationalized domain names with non-ascii characters, the domain name is converted to punycode before format and pattern validation rules are checked
- name: name_servers
value:
- "{{ name_servers }}"
- name: period
value: {{ period }}
default: 1
- name: privacy
value: {{ privacy }}
default: false
- name: renew_auto
value: {{ renew_auto }}
default: true
- name: x_shopper_id
value: "{{ x_shopper_id }}"
description: Shopper ID which owns the domain. NOTE: This is only required if you are a Reseller managing a domain purchased outside the scope of your reseller account.
description: Shopper ID which owns the domain. NOTE: This is only required if you are a Reseller managing a domain purchased outside the scope of your reseller account.
Lifecycle Methods
EXEC variables use wire (API) names.
- validate_contacts
- validate
All contacts specified in request will be validated against all domains specified in "domains". As an alternative, you can also pass in tlds, with the exception of uk, which requires full domain names
EXEC godaddy.registration.purchases.validate_contacts
@market_id='{{ market_id }}',
@contact_admin='{{ contact_admin }}',
@contact_billing='{{ contact_billing }}',
@contact_presence='{{ contact_presence }}',
@contact_registrant='{{ contact_registrant }}',
@contact_tech='{{ contact_tech }}',
@domains='{{ domains }}',
@entity_type='{{ entity_type }}'
;
Validates a purchase request body against the TLD schema with no side effects and no charge. Returns 200 on success.
EXEC godaddy.registration.purchases.validate
@consent='{{ consent }}',
@contact_admin='{{ contact_admin }}',
@contact_billing='{{ contact_billing }}',
@contact_registrant='{{ contact_registrant }}',
@contact_tech='{{ contact_tech }}',
@domain='{{ domain }}',
@name_servers='{{ name_servers }}',
@period='{{ period }}',
@privacy='{{ privacy }}',
@renew_auto='{{ renew_auto }}'
;