API Documentation Download OpenAPI specification

Modify Mail Order

POSThttps://bll.titan.email/partner/modifyMailOrder

API to modify an existing Mail Order on Titan

Body

application/json
titanOrderIdnumberrequired

The unique order ID against each domain provisioned with Titan

Example: 1
orderIdstring

The order ID stored on your end for this mail order, if any. If needed, You can use this data to correlate orders at your end and in Titan.The data is returned in listMailOrders call.

Example: partner.order.id
planTypestring · enum

This is the Titan mail plan to be provisioned against the domain. In case the plan needs to be changed, the updated plan must be provided

Example: pro
Possible values: pro pro_trial premium premium_trial ultra ultra_trial
paymentTxnIdstringoptional
Example: qweradsf
chargedAmountnumberoptional

Required if domain is moving to paid plan or will remain on paid plan. This needs to be passed in customer's currency. It is the actual cost that the user has paid while purchasing the order after any discount (which also includes tax if any).

Example: 1.1
chargedUSDAmountnumberoptional

Total amount charged by the partner to the end customer in USD for this purchase including taxAmount. It is the actual cost that the user has paid in USD while purchasing after any discount (which also includes tax if any). Partner should provide this value, if the order is provisioned on paid plan. Open exchange rates will be used if the partner does not provide this value.

Example: 1.1
discountAmountnumberoptional

Any ad hoc discount given to the customer for this purchase. This should be passed in the original currency in which amount was charged to the customers. Titan will use this as a placeholder to check if there are any discounts given to the customer.

Example: 0.1
taxAmountnumberoptional

Amount collected from the user as TAX amount in the customer's currency for this purchase. Titan will deduct this amount from the chargedAmount to get revenue sharing amount. Precision upto 2 decimal places.

Example: 0.1
billingCyclestring · enumoptional

This defines the period for which the customer has been billed for Titan mail by the partner. This is for Titan to track the billing cycle/details for that customer. Existing options are

Example: monthly
Possible values: monthly quarterly semesterly yearly two_yearly four_yearly
expiryDatestringoptional

In yyyy-MM-dd format.
Required for Paid and Trial Plans.
If the billing is managed by partner then partner should mark order suspended on expiry date. Titan does not suspend, expire, or delete the order on your behalf in this mode, except as a safety-net measure: Titan may suspend an order whose expiryDate has remained stale for an extended period with no partner action.
If the billing is managed by Titan, then Titan will mark order suspended on non-renewal on expiry day. And after 7 days of expiry, order will be marked deleted. The permanent deletion of order data happens after 30 days of deletion.
If order is on the free plan or moving to free plan and partner wants to reset expiry date to empty, then partner should send "" (empty string) as expiry date.

Example: 2020-02-20
currencystringoptional
Example: USD
noOfAccountsnumberoptional

The number of accounts or mailboxes to be provisioned after modification. E.g. User had 3 mailboxes and wants to buy 2 more, this parameter will have to be 2+3->5. This is used as a limiting parameter for the user to create accounts within the control panel. E.g. if this is set to 5, the user will not be allowed to create more than 5 mailboxes

Example: 10
actionstring · enumoptional

Description for the type of modifications being performed

Possible values: newPurchase upgradeOrder addAccounts reduceAccounts renewOrder supportLedUpgrade supportLedExtension associatedOrderUpgrade associatedOrderRenew orderSetup downgradeOrder upgradeAndAddAccounts renewAndAddAccounts renewAndUpgrade
sourcestring · enumoptional

The source from which the order is received - Refers to the kind of package provisioned on the partners end. Source field should be either of these values - domain, standalone, hosting, migrated. It will be validated against these values when the Api call is made

Possible values: domain standalone hosting migrated
sourceContextstringoptional

The purchase hook from where Titan plan has been purchased by the customer
Purpose - This is used by Titan for reference and analyse the efficacy of various purchase hooks within the partner ecosystem from where customers are purchasing Titan paid plans. Some examples for sourceContext can be "website", "hpanel_store", "cPanel_hosting_email_section", "cPanel_email_tab", "email_marketing", etc.

Example: website
metadataobjectoptional

Details of associated partner order

Show propertiesHide properties
partnerBrandstringoptional

partner brand using which order modification happened

paymentMethodstringoptional

payment method used during purchase, i.e : credit_card, paypal, etc

autoRenewstringoptional

true/false, auto-renew value

Responses

200OKapplication/json
reqIDstringrequired
See General Errors for other errors that this API can return.
POST/partner/modifyMailOrder
curl https://bll.titan.email/partner/modifyMailOrder \
  --request POST \
  --header 'Authorization: API.Key' \
  --header 'Content-Type: application/json' \
  --data '{
  "titanOrderId": 1,
  "orderId": "partner.order.id",
  "planType": "pro",
  "paymentTxnId": "qweradsf",
  "chargedAmount": 1.1,
  "chargedUSDAmount": 1.1,
  "discountAmount": 0.1,
  "taxAmount": 0.1,
  "billingCycle": "monthly",
  "expiryDate": "2020-02-20",
  "currency": "USD",
  "noOfAccounts": 10,
  "action": "newPurchase",
  "source": "domain",
  "sourceContext": "website",
  "metadata": {
    "partnerBrand": "string",
    "paymentMethod": "string",
    "autoRenew": "string"
  }
}'
Response
{
  "reqID": "string"
}