Sales
Retrieve and manage sales of your sold domains.
Manage and retrieve sales information for sold domains.
Sale Types
The API returns both types of sales in a single response:
- BUYNOW: Standard one-time purchase transactions
- LEASED: Lease-to-own transactions with installment payments
Each sale in the response includes a saleType field indicating its type.
Retrieving Sales
Endpoint: Get sales
curl -X GET 'https://api.afternic.com/v3/aftermarket/customers/my/sales' \
-H 'Authorization: sso-key YOUR_API_KEY:YOUR_API_SECRET'Default Date Range
When no date filters are provided, the API returns sales from the last 1 month by default.
To retrieve sales outside this range, use the soldAtStartDate and soldAtEndDate query parameters.
Sorting Options
The following sort options are available:
NAME_ASC,NAME_DESC- Sort by domain nameSALE_PRICE_ASC,SALE_PRICE_DESC- Sort by sale priceSTATUS_ASC,STATUS_DESC- Sort by transaction statusSOLD_AT_ASC,SOLD_AT_DESC- Sort by sale date
Updating a Sale
Providing or Changing Authorization Code
Endpoint: Update sale
When a sale requires an authorization code, use the PATCH endpoint to provide it. You can also use this endpoint to update the auth code if you previously provided an incorrect one.
# Provide auth code for the first time
curl -X PATCH 'https://api.afternic.com/v3/aftermarket/customers/my/sales/{transactionId}' \
-H 'Authorization: sso-key YOUR_API_KEY:YOUR_API_SECRET' \
-H 'Content-Type: application/json' \
-d '{"authCode": "abc123xyz"}'
# Update/correct a previously provided auth code
curl -X PATCH 'https://api.afternic.com/v3/aftermarket/customers/my/sales/{transactionId}' \
-H 'Authorization: sso-key YOUR_API_KEY:YOUR_API_SECRET' \
-H 'Content-Type: application/json' \
-d '{"authCode": "correct-auth-code-789"}'The authCode is the domain transfer authorization code (also known as EPP code or transfer key)
that you obtain from your current domain registrar.
Communicating with the TA Agent
Sending Messages
Endpoint: Send sale message
Use the sendMessage endpoint to communicate with the Transaction Assurance (TA) Agent about the transaction. This is useful for:
- Requesting additional information
- Explaining delays or issues
- Coordinating cancellation requests
curl -X POST 'https://api.afternic.com/v3/aftermarket/customers/my/sales/{transactionId}/sendMessage' \
-H 'Authorization: sso-key YOUR_API_KEY:YOUR_API_SECRET' \
-H 'Content-Type: application/json' \
-d '{"message": "Please contact support to discuss cancellation options."}'Messages are limited to 1000 characters.