Send Events to Titan
https://bll.titan.email/partner/notifyNotification APIs should be used post discussion. This is a reference document as to how notifications can be used by a partner. This can be decided upon if there is utility for these notifications
Note :
- HOSTING_PURCHASED
- This Event notifies Titan that a hosting plan has been purchased at partner's end and the user is eligible for a Titan plan. This information helps in tracking the signup (attach) rates.
- REFUND_ISSUED
- This Event notifies Titan that a refund has been issued from partner to the customer.
- Event can be called for active/suspended/deleted mail order.
- If API is called multiple times with same
paymentTxnIdand different data (domainName, refundAmount refundTaxAmount, refundUSDAmount and currency), partner will getBAD_REQUESTexception else no action is taken. - If
paymentTxnIdis not sent, Titan records each call as a new refund.
- MAIL_ORDER_SETUP_COMPLETED
- On this API notification Titan will mark order's setup as completed and stop showing relevant upgrade/purchase hooks
- MAIL_ORDER_PURCHASED
- This Event notifies Titan that mail order is purchased and contains details related to transaction.
- This Event is only used for reference and reporting on Titan's end.
- PAYMENT_DATA_BULK
- This Event notifies Titan of the customer's purchase of standalone email order / additional mailbox purchases / Titan order upgrades / Titan order renewals.
- Max batch size of the event is 100 orders
- REFUND_ISSUED_BULK
- This Event notifies Titan that a refund has been issued from partner to the customer in bulk.
- Max batch size of the event is 100 orders.
- CREDIT_ISSUED
- This Event notifies Titan that a credit has been issued from partner to the customer.
- MAIL_ORDER_PURCHASE_CANCELED
- This Event notifies Titan that mail order is canceled at partner's end. Titan only records this event and does not change the mail order.
- Send this event when user has purchased standalone email plan, does not setup the email during plan duration and doesn't renew on plan expiry.
- MODIFY_MAIL_ORDER_DETAILS
- This Event notifies Titan that the payment method or the auto-renew setting of a mail order has been modified.
Body
application/jsonevent name
event data in json
Show propertiesHide properties
Show propertiesHide properties
Show propertiesHide properties
The order ID stored on your end for this mail order, if any.
You will need to send a unique paymentTxnId for the refund payment. If you cannot pass a unique refund paymentTxnId, then you can pass the original paymentTxnId used for the respective original purchase that was made.
In yyyy-MM-dd format.
Reason stated by a customer for refund
This API notifies Titan that a mail order is purchased by the customer. This API is only used for reference and reporting on Titan's end. Actual mail order can only be provisioned by calling Create Mail Order API
Show propertiesHide properties
The order ID stored on your end for this mail order, if any.
The customer ID stored on your end for each customer This is used to identify all the orders linked to a particular customer
Name of the customer as stored in the partners system Titan utilizes this for any communication sent across to the customer
The email address with which the customer registers on the partner website This email is used in order for Titan to send out the password setup email or any signup/usage nudges to get the customer to utilize the email This email will be used by the customer to login into Control Panel. This user will also be the primary admin for the domain
Should be the 2 letter ISO Code, country from which the customer is accessing partner website/making the purchase. Titan will use this to identify the localized pricing based on the location of the customer in cases where Titan mail is managing the billing.
This email will be used to send emails, in case email delivery fails for customerEmailAddress
This is the Titan mail plan to be provisioned for the provided mail order. This would vary based on the plans being positioned with the partner. It is highly recommended to provide payment details in case this is a paid plan
Required for Paid Plans The number of accounts or mailboxes to be provisioned against the domain. This is used as a limiting parameter for the user to create accounts within the Control Panel. E.g. if this is set to 2, the user will not be allowed to create more than 2 mailboxes
In yyyy-MM-dd format.
Required for Paid and Trial Plans.
If the billing is managed by partner then partner should mark mail order suspended on expiry date.
If the billing is managed by Titan, then Titan will mark mail order suspended on non-renewal on expiry
day. And after 7 days of expiry, mail order will be marked deleted. The permanent deletion of mail order
data happens after 30 days of deletion.
Partner should provide transactionId when the order is provisioned on paid plan or associated order is paid
Required for Paid Plans Total amount charged by the partner to the end customer in the customer's currency for this purchase including taxAmount. Precision upto 2 decimal places. Used primarily for reference and reporting on Titan's end. This is applicable only in the case of a paid plan. For free/trial plans, this should be passed as "0"
Should be 3 letter ISO code This is the currency in which the customer is being charged for Titan mail. Default USD (can be changed as for partner) . Used primarily for reference and reporting on Titan's end.
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
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. This field is just for book-keeping.
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.
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
Specifies the language to be set within the Email Control Panel. List of support Titan languages
- link Default is set to en-us
The source from which the order is received - Refers to the kind of package provisioned on the partners end
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.
Details of associated partner order
Show propertiesHide properties
Expiry date of the associated package/service sold by the partner. Stored as metadata on Titan's end. Used primarily for reference. Only applicable for bundled purchases
The type of the plan of the associated order sold on the partners end. E.g. Shared Hosting plans as Small, Medium, Large etc. Stored as metadata on Titan's end. Used primarily for reference. Only applicable for bundled purchases
cPanel hostname where the user's hosting order has been provisioned/ Applicable only for hosting bundled Titan plans. Used at Titan's end to create mapping against appropriate cPanel server to provide user additional functionality inside cPanel. Only applicable for hosting bundled purchases. Enter the hostname, even if the hosting server is non-cPanel
cPanel username associated with this user's account. Applicable only for hosting bundled Titan plans. Used at Titan's end to create mapping against appropriate cPanel user account to provide user additional functionality inside cPanel. Only applicable for hosting bundled purchases. Enter the UserName, even if the hosting server is non-cPanel
Payment method used by the customer to make the purchase. Eg: credit_card, paypal, etc
To be passed as "true" if auto-renew is switched on by default at the time of purchase completion or else "false".
On this API notification Titan will mark order's setup as completed and stop showing relevant upgrade/purchase hooks
Show propertiesHide properties
The unique order ID against each domain provisioned with Titan
Show propertiesHide properties
Unique order ID stored at partner's end for the particular order.
Unique order ID created on Titan's end (Will need to be passed only if a titanOrderID is created on Titan's end for the orderID).
The unique transaction ID for the purchase made by the customer.
Amount charged by partner to the customer for the purchase.
3 letter ISO code of the currency in which the purchase was made by the customer.
Amount charged in USD by partner to the customer for the purchase
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. This field is just for book-keeping.
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.
Billing cycle chosen for the order.
Signifies the purpose for which the notification is being sent, i.e. for creation of a new order, upgrade of an existing order, buying of additional mailboxes.
Show propertiesHide properties
You will need to send a unique paymentTxnId for the refund payment. If you cannot pass a unique refund paymentTxnId, then you can pass the original paymentTxnId used for the respective original purchase that was made.
In yyyy-MM-dd format.
Reason stated by a customer for refund
Show propertiesHide properties
The order ID stored on your end for this mail order, if any.
The customer ID stored on your end for each customer This is used to identify all the orders linked to a particular customer
Name of the customer as stored in the partners system Titan utilizes this for any communication sent across to the customer
The email address with which the customer registers on the partner website This email is used in order for Titan to send out the password setup email or any signup/usage nudges to get the customer to utilize the email This email will be used by the customer to login into Control Panel. This user will also be the primary admin for the domain
Should be the 2 letter ISO Code, country from which the customer is accessing partner website/making the purchase. Titan will use this to identify the localized pricing based on the location of the customer in cases where Titan mail is managing the billing.
This is the Titan mail plan to be provisioned for the provided mail order. This would vary based on the plans being positioned with the partner. It is highly recommended to provide payment details in case this is a paid plan
Required for Paid Plans The number of accounts or mailboxes to be provisioned against the domain. This is used as a limiting parameter for the user to create accounts within the Control Panel. E.g. if this is set to 2, the user will not be allowed to create more than 2 mailboxes
In yyyy-MM-dd format.
Required for Paid and Trial Plans.
Should be set as 3 months from the date of hosting plan purchase.
If the billing is managed by partner then partner should mark mail order suspended on expiry date.
If the billing is managed by Titan, then Titan will mark mail order suspended on non-renewal on expiry
day. And after 7 days of expiry, mail order will be marked deleted. The permanent deletion of mail order
data happens after 30 days of deletion.
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
The source from which the order is received - Refers to the kind of package provisioned on the partners end
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.
Details of associated partner order
Show propertiesHide properties
Payment method used by the customer to make the purchase. Eg: credit_card, paypal, etc
The specific brand (if any) from where the purchase was made
To be passed as "true" if auto-renew is switched on by default at the time of purchase completion or else "false"
Expiry date of the associated package/service sold by the partner. Stored as metadata on Titan's end. Used primarily for reference. Only applicable for bundled purchases
The type of the plan of the associated order sold on the partners end. E.g. Shared Hosting plans as Small, Medium, Large etc. Stored as metadata on Titan's end. Used primarily for reference. Only applicable for bundled purchases
The unique transaction ID for the purchase made by the customer
The timestamp of the payment transaction in epoch milliseconds
Signifies the purpose for which the notification is being sent
Show propertiesHide properties
The order ID stored on your end for this mail order, if any.
The customer ID stored on your end for each customer This is used to identify all the orders linked to a particular customer
Show propertiesHide properties
Unique order ID created on Titan's end.
Payment method used by the customer to make the purchase. Eg: credit_card, paypal, etc
To be passed as true if auto-renew is switched on by default at the time of purchase completion or else false.
Responses
200OKapplication/json
400BAD_REQUEST
- If
REFUND_ISSUEDis called multiple times with samepaymentTxnIdand different data (domainName, refundAmount refundTaxAmount, refundUSDAmount and currency), partner will getBAD_REQUESTexception.
/partner/notify#include <curl/curl.h>
int main(void) {
curl_global_init(CURL_GLOBAL_DEFAULT);
CURL *curl = curl_easy_init();
if (!curl) {
curl_global_cleanup();
return 1;
}
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(curl, CURLOPT_URL, "https://bll.titan.email/partner/notify");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Authorization: API.Key");
headers = curl_slist_append(headers, "Content-Type: application/json");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_POSTFIELDS,
"{\n"
" \"event\": \"MAIL_ORDER_SETUP_COMPLETED\",\n"
" \"data\": {}\n"
"}");
CURLcode res = curl_easy_perform(curl);
curl_easy_cleanup(curl);
curl_slist_free_all(headers);
curl_global_cleanup();
return (int)res;
}using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://bll.titan.email/partner/notify");
request.Headers.TryAddWithoutValidation("Authorization", "API.Key");
request.Content = new StringContent(
"""
{
"event": "MAIL_ORDER_SETUP_COMPLETED",
"data": {}
}
""",
System.Text.Encoding.UTF8, "application/json");
using var response = await client.SendAsync(request);var client = new RestClient("https://bll.titan.email/partner/notify");
var request = new RestRequest("", Method.Post);
request.AddHeader("Authorization", "API.Key");
request.AddHeader("Content-Type", "application/json");
request.AddStringBody("""
{
"event": "MAIL_ORDER_SETUP_COMPLETED",
"data": {}
}
""", ContentType.Json);
var response = await client.ExecuteAsync(request);(require '[clj-http.client :as client])
(client/post "https://bll.titan.email/partner/notify" {:headers {:Authorization "API.Key"}
:content-type :json
:form-params {:event "MAIL_ORDER_SETUP_COMPLETED"
:data {}}})import 'package:http/http.dart' as http;
void main() async {
final headers = <String,String>{
'Authorization': 'API.Key',
'Content-Type': 'application/json',
};
final body = r'{"event":"MAIL_ORDER_SETUP_COMPLETED","data":{}}';
final response = await http.post(Uri.parse('https://bll.titan.email/partner/notify'), headers: headers, body: body);
print(response.body);
}let httpRequestMessage = new HttpRequestMessage(
HttpMethod("POST"),
new Uri("https://bll.titan.email/partner/notify")
)
httpRequestMessage.Headers.Add("Authorization", "API.Key")
httpRequestMessage.Headers.Add("Content-Type", "application/json")
let content = new StringContent("""{
"event": "MAIL_ORDER_SETUP_COMPLETED",
"data": {}
}""", Encoding.UTF8, "application/json")
httpRequestMessage.Content <- content
let client = new HttpClient()
let! result = client.SendAsync(httpRequestMessage)
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
requestUrl := "https://bll.titan.email/partner/notify"
payload := strings.NewReader(`{
"event": "MAIL_ORDER_SETUP_COMPLETED",
"data": {}
}`)
req, _ := http.NewRequest("POST", requestUrl, payload)
req.Header.Add("Authorization", "API.Key")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}POST /partner/notify HTTP/1.1
Host: bll.titan.email
Authorization: API.Key
Content-Type: application/json
{"event":"MAIL_ORDER_SETUP_COMPLETED","data":{}}POST /bll/partner/notify HTTP/1.1
Host: api-euc1.titan.email
Authorization: API.Key
Content-Type: application/json
{"event":"MAIL_ORDER_SETUP_COMPLETED","data":{}}java.io.ByteArrayOutputStream body = new java.io.ByteArrayOutputStream();
body.write("{\"event\":\"MAIL_ORDER_SETUP_COMPLETED\",\"data\":{}}".getBytes(java.nio.charset.StandardCharsets.UTF_8));
try (AsyncHttpClient client = new DefaultAsyncHttpClient()) {
Response response = client.prepare("POST", "https://bll.titan.email/partner/notify")
.addHeader("Authorization", "API.Key")
.addHeader("Content-Type", "application/json")
.setBody(body.toByteArray())
.execute()
.get();
System.out.println(response.getResponseBody());
}java.io.ByteArrayOutputStream body = new java.io.ByteArrayOutputStream();
body.write("{\"event\":\"MAIL_ORDER_SETUP_COMPLETED\",\"data\":{}}".getBytes(java.nio.charset.StandardCharsets.UTF_8));
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(java.net.URI.create("https://bll.titan.email/partner/notify"))
.header("Authorization", "API.Key")
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofByteArray(body.toByteArray()))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());OkHttpClient client = new OkHttpClient();
RequestBody body = RequestBody.create(MediaType.parse("application/json"), "{\"event\":\"MAIL_ORDER_SETUP_COMPLETED\",\"data\":{}}");
Request request = new Request.Builder()
.url("https://bll.titan.email/partner/notify")
.method("POST", body)
.addHeader("Authorization", "API.Key")
.addHeader("Content-Type", "application/json")
.build();
try (Response response = client.newCall(request).execute()) {
System.out.println(response.body().string());
}java.io.ByteArrayOutputStream body = new java.io.ByteArrayOutputStream();
body.write("{\"event\":\"MAIL_ORDER_SETUP_COMPLETED\",\"data\":{}}".getBytes(java.nio.charset.StandardCharsets.UTF_8));
HttpResponse<String> response = Unirest.request("POST", "https://bll.titan.email/partner/notify")
.header("Authorization", "API.Key")
.header("Content-Type", "application/json")
.body(body.toByteArray())
.asString();
System.out.println(response.getBody());fetch('https://bll.titan.email/partner/notify', {
method: 'POST',
headers: {
Authorization: 'API.Key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
event: 'MAIL_ORDER_SETUP_COMPLETED',
data: {}
})
})import axios from 'axios'
const options = {
method: 'POST',
url: 'https://bll.titan.email/partner/notify',
headers: {
Authorization: 'API.Key',
'Content-Type': 'application/json'
},
data: {
event: 'MAIL_ORDER_SETUP_COMPLETED',
data: {}
}
}
try {
const { data } = await axios.request(options)
console.log(data)
} catch (error) {
console.error(error)
}import { ofetch } from 'ofetch'
ofetch('https://bll.titan.email/partner/notify', {
method: 'POST',
headers: {
Authorization: 'API.Key',
'Content-Type': 'application/json'
},
body: {
event: 'MAIL_ORDER_SETUP_COMPLETED',
data: {}
}
})$.ajax({
url: "https://bll.titan.email/partner/notify",
method: "POST",
processData: false,
contentType: false,
beforeSend(xhr) {
xhr.setRequestHeader("Authorization", "API.Key");
xhr.setRequestHeader("Content-Type", "application/json");
},
data: "{\"event\":\"MAIL_ORDER_SETUP_COMPLETED\",\"data\":{}}"
}).done((response) => console.log(response));const xhr = new XMLHttpRequest();
xhr.open("POST", "https://bll.titan.email/partner/notify");
xhr.withCredentials = true;
xhr.setRequestHeader("Authorization", "API.Key");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.addEventListener("load", () => console.log(xhr.responseText));
xhr.send("{\"event\":\"MAIL_ORDER_SETUP_COMPLETED\",\"data\":{}}");using HTTP
using JSON
response = HTTP.post(
"https://bll.titan.email/partner/notify",
[
"Authorization" => "API.Key",
"Content-Type" => "application/json"
],
JSON.json(Dict(
"event" => "MAIL_ORDER_SETUP_COMPLETED",
"data" => Dict()
))
)
println(String(response.body))val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\"event\":\"MAIL_ORDER_SETUP_COMPLETED\",\"data\":{}}")
val request = Request.Builder()
.url("https://bll.titan.email/partner/notify")
.post(body)
.addHeader("Authorization", "API.Key")
.addHeader("Content-Type", "application/json")
.build()
val response = client.newCall(request).execute()fetch('https://bll.titan.email/partner/notify', {
method: 'POST',
headers: {
Authorization: 'API.Key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
event: 'MAIL_ORDER_SETUP_COMPLETED',
data: {}
})
})import axios from 'axios'
const options = {
method: 'POST',
url: 'https://bll.titan.email/partner/notify',
headers: {
Authorization: 'API.Key',
'Content-Type': 'application/json'
},
data: {
event: 'MAIL_ORDER_SETUP_COMPLETED',
data: {}
}
}
try {
const { data } = await axios.request(options)
console.log(data)
} catch (error) {
console.error(error)
}import { ofetch } from 'ofetch'
ofetch('https://bll.titan.email/partner/notify', {
method: 'POST',
headers: {
Authorization: 'API.Key',
'Content-Type': 'application/json'
},
body: {
event: 'MAIL_ORDER_SETUP_COMPLETED',
data: {}
}
})import { request } from 'undici'
const { statusCode, body } = await request('https://bll.titan.email/partner/notify', {
method: 'POST',
headers: {
Authorization: 'API.Key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
event: 'MAIL_ORDER_SETUP_COMPLETED',
data: {}
})
})#import <Foundation/Foundation.h>
NSDictionary *headers = @{ @"Authorization": @"API.Key",
@"Content-Type": @"application/json" };
NSDictionary *parameters = @{ @"event": @"MAIL_ORDER_SETUP_COMPLETED",
@"data": @{ } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://bll.titan.email/partner/notify"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];open Lwt.Infix
let () =
Lwt_main.run (
let uri = Uri.of_string "https://bll.titan.email/partner/notify" in
let headers = Cohttp.Header.of_list [
("Authorization", "API.Key");
("Content-Type", "application/json");
] in
let part0 = "{\"event\":\"MAIL_ORDER_SETUP_COMPLETED\",\"data\":{}}" in
let body = Cohttp_lwt.Body.of_string (String.concat "" [part0]) in
Cohttp_lwt_unix.Client.call ~headers ~body (Cohttp.Code.method_of_string "POST") uri
>>= fun (_response, body) ->
Cohttp_lwt.Body.to_string body >>= Lwt_io.printl
)$ch = curl_init("https://bll.titan.email/partner/notify");
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: API.Key', 'Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
'event' => 'MAIL_ORDER_SETUP_COMPLETED',
'data' => []
]));
curl_exec($ch);
curl_close($ch);$client = new GuzzleHttp\Client();
$response = $client->request('POST', 'https://bll.titan.email/partner/notify', [
'headers' => [
'Authorization' => 'API.Key',
'Content-Type' => 'application/json'
],
'json' => [
'event' => 'MAIL_ORDER_SETUP_COMPLETED',
'data' => []
]
]);use Illuminate\Support\Facades\Http;
$response = Http::withHeaders([
'Authorization' => 'API.Key',
'Content-Type' => 'application/json'
])
->post('https://bll.titan.email/partner/notify', [
'event' => 'MAIL_ORDER_SETUP_COMPLETED',
'data' => []
]);$headers = @{
'Authorization' = 'API.Key'
'Content-Type' = 'application/json'
}
$body = [System.IO.MemoryStream]::new()
$bytes = [System.Text.Encoding]::UTF8.GetBytes('{"event":"MAIL_ORDER_SETUP_COMPLETED","data":{}}')
$body.Write($bytes, 0, $bytes.Length)
$response = Invoke-WebRequest -Uri 'https://bll.titan.email/partner/notify' -Method 'POST' -Headers $headers -Body $body.ToArray()
$body.Dispose()
$response$headers = @{
'Authorization' = 'API.Key'
'Content-Type' = 'application/json'
}
$body = [System.IO.MemoryStream]::new()
$bytes = [System.Text.Encoding]::UTF8.GetBytes('{"event":"MAIL_ORDER_SETUP_COMPLETED","data":{}}')
$body.Write($bytes, 0, $bytes.Length)
$response = Invoke-RestMethod -Uri 'https://bll.titan.email/partner/notify' -Method 'POST' -Headers $headers -Body $body.ToArray()
$body.Dispose()
$responseimport http.client
import json
conn = http.client.HTTPSConnection("bll.titan.email")
payload = json.dumps({
"event": "MAIL_ORDER_SETUP_COMPLETED",
"data": {}
})
headers = {
"Authorization": "API.Key",
"Content-Type": "application/json"
}
conn.request(
"POST",
"/partner/notify",
body=payload,
headers=headers,
)
response = conn.getresponse()
print(response.read().decode())
conn.close()import http.client
import json
conn = http.client.HTTPSConnection("api-euc1.titan.email")
payload = json.dumps({
"event": "MAIL_ORDER_SETUP_COMPLETED",
"data": {}
})
headers = {
"Authorization": "API.Key",
"Content-Type": "application/json"
}
conn.request(
"POST",
"/bll/partner/notify",
body=payload,
headers=headers,
)
response = conn.getresponse()
print(response.read().decode())
conn.close()requests.post("https://bll.titan.email/partner/notify",
headers={
"Authorization": "API.Key",
"Content-Type": "application/json"
},
json={
"event": "MAIL_ORDER_SETUP_COMPLETED",
"data": {}
}
)async with aiohttp.ClientSession() as session:
await session.post("https://bll.titan.email/partner/notify",
headers={
"Authorization": "API.Key",
"Content-Type": "application/json"
},
json={
"event": "MAIL_ORDER_SETUP_COMPLETED",
"data": {}
}
)httpx.post("https://bll.titan.email/partner/notify",
headers={
"Authorization": "API.Key",
"Content-Type": "application/json"
},
json={
"event": "MAIL_ORDER_SETUP_COMPLETED",
"data": {}
}
)async with httpx.AsyncClient() as client:
await client.post("https://bll.titan.email/partner/notify",
headers={
"Authorization": "API.Key",
"Content-Type": "application/json"
},
json={
"event": "MAIL_ORDER_SETUP_COMPLETED",
"data": {}
}
)library(httr2)
response <- request("https://bll.titan.email/partner/notify") |>
req_method("POST") |>
req_headers(
"Authorization" = "API.Key",
"Content-Type" = "application/json"
) |>
req_body_json(list(
event = "MAIL_ORDER_SETUP_COMPLETED",
data = list()
)) |>
req_perform()
resp_body_string(response)require 'uri'
require 'net/http'
url = URI("https://bll.titan.email/partner/notify")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'API.Key'
request["Content-Type"] = 'application/json'
request.body = <<~JSON
{
"event": "MAIL_ORDER_SETUP_COMPLETED",
"data": {}
}
JSON
response = http.request(request)
puts response.read_bodylet client = reqwest::Client::new();
let request = client
.post("https://bll.titan.email/partner/notify")
.header("Authorization", "API.Key")
.header("Content-Type", "application/json")
.json(&serde_json::json!({
"event": "MAIL_ORDER_SETUP_COMPLETED",
"data": {}
}));
let response = request.send().await?;curl https://bll.titan.email/partner/notify \
--request POST \
--header 'Authorization: API.Key' \
--header 'Content-Type: application/json' \
--data '{
"event": "MAIL_ORDER_SETUP_COMPLETED",
"data": {}
}'wget --quiet \
--method POST \
--header 'Authorization: API.Key' \
--header 'Content-Type: application/json' \
--body-data '{
"event": "MAIL_ORDER_SETUP_COMPLETED",
"data": {}
}' \
--output-document \
- https://bll.titan.email/partner/notifyhttp --ignore-stdin 'POST' 'https://bll.titan.email/partner/notify' \
'Authorization:API.Key' \
'Content-Type:application/json' \
--raw='{"event":"MAIL_ORDER_SETUP_COMPLETED","data":{}}'import Foundation
var request = URLRequest(url: URL(string: "https://bll.titan.email/partner/notify")!)
request.httpMethod = "POST"
request.setValue("API.Key", forHTTPHeaderField: "Authorization")
request.setValue("application/json", forHTTPHeaderField: "Content-Type")
let jsonBody = #"""
{
"event": "MAIL_ORDER_SETUP_COMPLETED",
"data": {}
}
"""#
request.httpBody = jsonBody.data(using: .utf8)
let (data, response) = try await URLSession.shared.data(for: request)
guard let httpResponse = response as? HTTPURLResponse,
200..<300 ~= httpResponse.statusCode else {
throw URLError(.badServerResponse)
}
print(String(data: data, encoding: .utf8) ?? "")#include <curl/curl.h>
int main(void) {
curl_global_init(CURL_GLOBAL_DEFAULT);
CURL *curl = curl_easy_init();
if (!curl) {
curl_global_cleanup();
return 1;
}
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(curl, CURLOPT_URL, "https://bll.titan.email/partner/notify");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Authorization: API.Key");
headers = curl_slist_append(headers, "Content-Type: application/json");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_POSTFIELDS,
"{\n"
" \"event\": \"HOSTING_PURCHASED\",\n"
" \"data\": {\n"
" \"orderId\": \"1\",\n"
" \"domainName\": \"shoppers.com\",\n"
" \"customer\": {\n"
" \"customerId\": \"123qwe\",\n"
" \"companyName\": \"Shoppers Delight\",\n"
" \"firstName\": \"James\",\n"
" \"lastName\": \"Smith\",\n"
" \"email\": \"james@gmail.com\"\n"
" }\n"
" }\n"
"}");
CURLcode res = curl_easy_perform(curl);
curl_easy_cleanup(curl);
curl_slist_free_all(headers);
curl_global_cleanup();
return (int)res;
}using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://bll.titan.email/partner/notify");
request.Headers.TryAddWithoutValidation("Authorization", "API.Key");
request.Content = new StringContent(
"""
{
"event": "HOSTING_PURCHASED",
"data": {
"orderId": "1",
"domainName": "shoppers.com",
"customer": {
"customerId": "123qwe",
"companyName": "Shoppers Delight",
"firstName": "James",
"lastName": "Smith",
"email": "james@gmail.com"
}
}
}
""",
System.Text.Encoding.UTF8, "application/json");
using var response = await client.SendAsync(request);var client = new RestClient("https://bll.titan.email/partner/notify");
var request = new RestRequest("", Method.Post);
request.AddHeader("Authorization", "API.Key");
request.AddHeader("Content-Type", "application/json");
request.AddStringBody("""
{
"event": "HOSTING_PURCHASED",
"data": {
"orderId": "1",
"domainName": "shoppers.com",
"customer": {
"customerId": "123qwe",
"companyName": "Shoppers Delight",
"firstName": "James",
"lastName": "Smith",
"email": "james@gmail.com"
}
}
}
""", ContentType.Json);
var response = await client.ExecuteAsync(request);(require '[clj-http.client :as client])
(client/post "https://bll.titan.email/partner/notify" {:headers {:Authorization "API.Key"}
:content-type :json
:form-params {:event "HOSTING_PURCHASED"
:data {:orderId "1"
:domainName "shoppers.com"
:customer {:customerId "123qwe"
:companyName "Shoppers Delight"
:firstName "James"
:lastName "Smith"
:email "james@gmail.com"}}}})import 'package:http/http.dart' as http;
void main() async {
final headers = <String,String>{
'Authorization': 'API.Key',
'Content-Type': 'application/json',
};
final body = r'{"event":"HOSTING_PURCHASED","data":{"orderId":"1","domainName":"shoppers.com","customer":{"customerId":"123qwe","companyName":"Shoppers Delight","firstName":"James","lastName":"Smith","email":"james@gmail.com"}}}';
final response = await http.post(Uri.parse('https://bll.titan.email/partner/notify'), headers: headers, body: body);
print(response.body);
}let httpRequestMessage = new HttpRequestMessage(
HttpMethod("POST"),
new Uri("https://bll.titan.email/partner/notify")
)
httpRequestMessage.Headers.Add("Authorization", "API.Key")
httpRequestMessage.Headers.Add("Content-Type", "application/json")
let content = new StringContent("""{
"event": "HOSTING_PURCHASED",
"data": {
"orderId": "1",
"domainName": "shoppers.com",
"customer": {
"customerId": "123qwe",
"companyName": "Shoppers Delight",
"firstName": "James",
"lastName": "Smith",
"email": "james@gmail.com"
}
}
}""", Encoding.UTF8, "application/json")
httpRequestMessage.Content <- content
let client = new HttpClient()
let! result = client.SendAsync(httpRequestMessage)
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
requestUrl := "https://bll.titan.email/partner/notify"
payload := strings.NewReader(`{
"event": "HOSTING_PURCHASED",
"data": {
"orderId": "1",
"domainName": "shoppers.com",
"customer": {
"customerId": "123qwe",
"companyName": "Shoppers Delight",
"firstName": "James",
"lastName": "Smith",
"email": "james@gmail.com"
}
}
}`)
req, _ := http.NewRequest("POST", requestUrl, payload)
req.Header.Add("Authorization", "API.Key")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}POST /partner/notify HTTP/1.1
Host: bll.titan.email
Authorization: API.Key
Content-Type: application/json
{"event":"HOSTING_PURCHASED","data":{"orderId":"1","domainName":"shoppers.com","customer":{"customerId":"123qwe","companyName":"Shoppers Delight","firstName":"James","lastName":"Smith","email":"james@gmail.com"}}}POST /bll/partner/notify HTTP/1.1
Host: api-euc1.titan.email
Authorization: API.Key
Content-Type: application/json
{"event":"HOSTING_PURCHASED","data":{"orderId":"1","domainName":"shoppers.com","customer":{"customerId":"123qwe","companyName":"Shoppers Delight","firstName":"James","lastName":"Smith","email":"james@gmail.com"}}}java.io.ByteArrayOutputStream body = new java.io.ByteArrayOutputStream();
body.write("{\"event\":\"HOSTING_PURCHASED\",\"data\":{\"orderId\":\"1\",\"domainName\":\"shoppers.com\",\"customer\":{\"customerId\":\"123qwe\",\"companyName\":\"Shoppers Delight\",\"firstName\":\"James\",\"lastName\":\"Smith\",\"email\":\"james@gmail.com\"}}}".getBytes(java.nio.charset.StandardCharsets.UTF_8));
try (AsyncHttpClient client = new DefaultAsyncHttpClient()) {
Response response = client.prepare("POST", "https://bll.titan.email/partner/notify")
.addHeader("Authorization", "API.Key")
.addHeader("Content-Type", "application/json")
.setBody(body.toByteArray())
.execute()
.get();
System.out.println(response.getResponseBody());
}java.io.ByteArrayOutputStream body = new java.io.ByteArrayOutputStream();
body.write("{\"event\":\"HOSTING_PURCHASED\",\"data\":{\"orderId\":\"1\",\"domainName\":\"shoppers.com\",\"customer\":{\"customerId\":\"123qwe\",\"companyName\":\"Shoppers Delight\",\"firstName\":\"James\",\"lastName\":\"Smith\",\"email\":\"james@gmail.com\"}}}".getBytes(java.nio.charset.StandardCharsets.UTF_8));
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(java.net.URI.create("https://bll.titan.email/partner/notify"))
.header("Authorization", "API.Key")
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofByteArray(body.toByteArray()))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());OkHttpClient client = new OkHttpClient();
RequestBody body = RequestBody.create(MediaType.parse("application/json"), "{\"event\":\"HOSTING_PURCHASED\",\"data\":{\"orderId\":\"1\",\"domainName\":\"shoppers.com\",\"customer\":{\"customerId\":\"123qwe\",\"companyName\":\"Shoppers Delight\",\"firstName\":\"James\",\"lastName\":\"Smith\",\"email\":\"james@gmail.com\"}}}");
Request request = new Request.Builder()
.url("https://bll.titan.email/partner/notify")
.method("POST", body)
.addHeader("Authorization", "API.Key")
.addHeader("Content-Type", "application/json")
.build();
try (Response response = client.newCall(request).execute()) {
System.out.println(response.body().string());
}java.io.ByteArrayOutputStream body = new java.io.ByteArrayOutputStream();
body.write("{\"event\":\"HOSTING_PURCHASED\",\"data\":{\"orderId\":\"1\",\"domainName\":\"shoppers.com\",\"customer\":{\"customerId\":\"123qwe\",\"companyName\":\"Shoppers Delight\",\"firstName\":\"James\",\"lastName\":\"Smith\",\"email\":\"james@gmail.com\"}}}".getBytes(java.nio.charset.StandardCharsets.UTF_8));
HttpResponse<String> response = Unirest.request("POST", "https://bll.titan.email/partner/notify")
.header("Authorization", "API.Key")
.header("Content-Type", "application/json")
.body(body.toByteArray())
.asString();
System.out.println(response.getBody());fetch('https://bll.titan.email/partner/notify', {
method: 'POST',
headers: {
Authorization: 'API.Key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
event: 'HOSTING_PURCHASED',
data: {
orderId: '1',
domainName: 'shoppers.com',
customer: {
customerId: '123qwe',
companyName: 'Shoppers Delight',
firstName: 'James',
lastName: 'Smith',
email: 'james@gmail.com'
}
}
})
})import axios from 'axios'
const options = {
method: 'POST',
url: 'https://bll.titan.email/partner/notify',
headers: {
Authorization: 'API.Key',
'Content-Type': 'application/json'
},
data: {
event: 'HOSTING_PURCHASED',
data: {
orderId: '1',
domainName: 'shoppers.com',
customer: {
customerId: '123qwe',
companyName: 'Shoppers Delight',
firstName: 'James',
lastName: 'Smith',
email: 'james@gmail.com'
}
}
}
}
try {
const { data } = await axios.request(options)
console.log(data)
} catch (error) {
console.error(error)
}import { ofetch } from 'ofetch'
ofetch('https://bll.titan.email/partner/notify', {
method: 'POST',
headers: {
Authorization: 'API.Key',
'Content-Type': 'application/json'
},
body: {
event: 'HOSTING_PURCHASED',
data: {
orderId: '1',
domainName: 'shoppers.com',
customer: {
customerId: '123qwe',
companyName: 'Shoppers Delight',
firstName: 'James',
lastName: 'Smith',
email: 'james@gmail.com'
}
}
}
})$.ajax({
url: "https://bll.titan.email/partner/notify",
method: "POST",
processData: false,
contentType: false,
beforeSend(xhr) {
xhr.setRequestHeader("Authorization", "API.Key");
xhr.setRequestHeader("Content-Type", "application/json");
},
data: "{\"event\":\"HOSTING_PURCHASED\",\"data\":{\"orderId\":\"1\",\"domainName\":\"shoppers.com\",\"customer\":{\"customerId\":\"123qwe\",\"companyName\":\"Shoppers Delight\",\"firstName\":\"James\",\"lastName\":\"Smith\",\"email\":\"james@gmail.com\"}}}"
}).done((response) => console.log(response));const xhr = new XMLHttpRequest();
xhr.open("POST", "https://bll.titan.email/partner/notify");
xhr.withCredentials = true;
xhr.setRequestHeader("Authorization", "API.Key");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.addEventListener("load", () => console.log(xhr.responseText));
xhr.send("{\"event\":\"HOSTING_PURCHASED\",\"data\":{\"orderId\":\"1\",\"domainName\":\"shoppers.com\",\"customer\":{\"customerId\":\"123qwe\",\"companyName\":\"Shoppers Delight\",\"firstName\":\"James\",\"lastName\":\"Smith\",\"email\":\"james@gmail.com\"}}}");using HTTP
using JSON
response = HTTP.post(
"https://bll.titan.email/partner/notify",
[
"Authorization" => "API.Key",
"Content-Type" => "application/json"
],
JSON.json(Dict(
"event" => "HOSTING_PURCHASED",
"data" => Dict(
"orderId" => "1",
"domainName" => "shoppers.com",
"customer" => Dict(
"customerId" => "123qwe",
"companyName" => "Shoppers Delight",
"firstName" => "James",
"lastName" => "Smith",
"email" => "james@gmail.com"
)
)
))
)
println(String(response.body))val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\"event\":\"HOSTING_PURCHASED\",\"data\":{\"orderId\":\"1\",\"domainName\":\"shoppers.com\",\"customer\":{\"customerId\":\"123qwe\",\"companyName\":\"Shoppers Delight\",\"firstName\":\"James\",\"lastName\":\"Smith\",\"email\":\"james@gmail.com\"}}}")
val request = Request.Builder()
.url("https://bll.titan.email/partner/notify")
.post(body)
.addHeader("Authorization", "API.Key")
.addHeader("Content-Type", "application/json")
.build()
val response = client.newCall(request).execute()fetch('https://bll.titan.email/partner/notify', {
method: 'POST',
headers: {
Authorization: 'API.Key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
event: 'HOSTING_PURCHASED',
data: {
orderId: '1',
domainName: 'shoppers.com',
customer: {
customerId: '123qwe',
companyName: 'Shoppers Delight',
firstName: 'James',
lastName: 'Smith',
email: 'james@gmail.com'
}
}
})
})import axios from 'axios'
const options = {
method: 'POST',
url: 'https://bll.titan.email/partner/notify',
headers: {
Authorization: 'API.Key',
'Content-Type': 'application/json'
},
data: {
event: 'HOSTING_PURCHASED',
data: {
orderId: '1',
domainName: 'shoppers.com',
customer: {
customerId: '123qwe',
companyName: 'Shoppers Delight',
firstName: 'James',
lastName: 'Smith',
email: 'james@gmail.com'
}
}
}
}
try {
const { data } = await axios.request(options)
console.log(data)
} catch (error) {
console.error(error)
}import { ofetch } from 'ofetch'
ofetch('https://bll.titan.email/partner/notify', {
method: 'POST',
headers: {
Authorization: 'API.Key',
'Content-Type': 'application/json'
},
body: {
event: 'HOSTING_PURCHASED',
data: {
orderId: '1',
domainName: 'shoppers.com',
customer: {
customerId: '123qwe',
companyName: 'Shoppers Delight',
firstName: 'James',
lastName: 'Smith',
email: 'james@gmail.com'
}
}
}
})import { request } from 'undici'
const { statusCode, body } = await request('https://bll.titan.email/partner/notify', {
method: 'POST',
headers: {
Authorization: 'API.Key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
event: 'HOSTING_PURCHASED',
data: {
orderId: '1',
domainName: 'shoppers.com',
customer: {
customerId: '123qwe',
companyName: 'Shoppers Delight',
firstName: 'James',
lastName: 'Smith',
email: 'james@gmail.com'
}
}
})
})#import <Foundation/Foundation.h>
NSDictionary *headers = @{ @"Authorization": @"API.Key",
@"Content-Type": @"application/json" };
NSDictionary *parameters = @{ @"event": @"HOSTING_PURCHASED",
@"data": @{ @"orderId": @"1", @"domainName": @"shoppers.com", @"customer": @{ @"customerId": @"123qwe", @"companyName": @"Shoppers Delight", @"firstName": @"James", @"lastName": @"Smith", @"email": @"james@gmail.com" } } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://bll.titan.email/partner/notify"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];open Lwt.Infix
let () =
Lwt_main.run (
let uri = Uri.of_string "https://bll.titan.email/partner/notify" in
let headers = Cohttp.Header.of_list [
("Authorization", "API.Key");
("Content-Type", "application/json");
] in
let part0 = "{\"event\":\"HOSTING_PURCHASED\",\"data\":{\"orderId\":\"1\",\"domainName\":\"shoppers.com\",\"customer\":{\"customerId\":\"123qwe\",\"companyName\":\"Shoppers Delight\",\"firstName\":\"James\",\"lastName\":\"Smith\",\"email\":\"james@gmail.com\"}}}" in
let body = Cohttp_lwt.Body.of_string (String.concat "" [part0]) in
Cohttp_lwt_unix.Client.call ~headers ~body (Cohttp.Code.method_of_string "POST") uri
>>= fun (_response, body) ->
Cohttp_lwt.Body.to_string body >>= Lwt_io.printl
)$ch = curl_init("https://bll.titan.email/partner/notify");
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: API.Key', 'Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
'event' => 'HOSTING_PURCHASED',
'data' => [
'orderId' => '1',
'domainName' => 'shoppers.com',
'customer' => [
'customerId' => '123qwe',
'companyName' => 'Shoppers Delight',
'firstName' => 'James',
'lastName' => 'Smith',
'email' => 'james@gmail.com'
]
]
]));
curl_exec($ch);
curl_close($ch);$client = new GuzzleHttp\Client();
$response = $client->request('POST', 'https://bll.titan.email/partner/notify', [
'headers' => [
'Authorization' => 'API.Key',
'Content-Type' => 'application/json'
],
'json' => [
'event' => 'HOSTING_PURCHASED',
'data' => [
'orderId' => '1',
'domainName' => 'shoppers.com',
'customer' => [
'customerId' => '123qwe',
'companyName' => 'Shoppers Delight',
'firstName' => 'James',
'lastName' => 'Smith',
'email' => 'james@gmail.com'
]
]
]
]);use Illuminate\Support\Facades\Http;
$response = Http::withHeaders([
'Authorization' => 'API.Key',
'Content-Type' => 'application/json'
])
->post('https://bll.titan.email/partner/notify', [
'event' => 'HOSTING_PURCHASED',
'data' => [
'orderId' => '1',
'domainName' => 'shoppers.com',
'customer' => [
'customerId' => '123qwe',
'companyName' => 'Shoppers Delight',
'firstName' => 'James',
'lastName' => 'Smith',
'email' => 'james@gmail.com'
]
]
]);$headers = @{
'Authorization' = 'API.Key'
'Content-Type' = 'application/json'
}
$body = [System.IO.MemoryStream]::new()
$bytes = [System.Text.Encoding]::UTF8.GetBytes('{"event":"HOSTING_PURCHASED","data":{"orderId":"1","domainName":"shoppers.com","customer":{"customerId":"123qwe","companyName":"Shoppers Delight","firstName":"James","lastName":"Smith","email":"james@gmail.com"}}}')
$body.Write($bytes, 0, $bytes.Length)
$response = Invoke-WebRequest -Uri 'https://bll.titan.email/partner/notify' -Method 'POST' -Headers $headers -Body $body.ToArray()
$body.Dispose()
$response$headers = @{
'Authorization' = 'API.Key'
'Content-Type' = 'application/json'
}
$body = [System.IO.MemoryStream]::new()
$bytes = [System.Text.Encoding]::UTF8.GetBytes('{"event":"HOSTING_PURCHASED","data":{"orderId":"1","domainName":"shoppers.com","customer":{"customerId":"123qwe","companyName":"Shoppers Delight","firstName":"James","lastName":"Smith","email":"james@gmail.com"}}}')
$body.Write($bytes, 0, $bytes.Length)
$response = Invoke-RestMethod -Uri 'https://bll.titan.email/partner/notify' -Method 'POST' -Headers $headers -Body $body.ToArray()
$body.Dispose()
$responseimport http.client
import json
conn = http.client.HTTPSConnection("bll.titan.email")
payload = json.dumps({
"event": "HOSTING_PURCHASED",
"data": {
"orderId": "1",
"domainName": "shoppers.com",
"customer": {
"customerId": "123qwe",
"companyName": "Shoppers Delight",
"firstName": "James",
"lastName": "Smith",
"email": "james@gmail.com"
}
}
})
headers = {
"Authorization": "API.Key",
"Content-Type": "application/json"
}
conn.request(
"POST",
"/partner/notify",
body=payload,
headers=headers,
)
response = conn.getresponse()
print(response.read().decode())
conn.close()import http.client
import json
conn = http.client.HTTPSConnection("api-euc1.titan.email")
payload = json.dumps({
"event": "HOSTING_PURCHASED",
"data": {
"orderId": "1",
"domainName": "shoppers.com",
"customer": {
"customerId": "123qwe",
"companyName": "Shoppers Delight",
"firstName": "James",
"lastName": "Smith",
"email": "james@gmail.com"
}
}
})
headers = {
"Authorization": "API.Key",
"Content-Type": "application/json"
}
conn.request(
"POST",
"/bll/partner/notify",
body=payload,
headers=headers,
)
response = conn.getresponse()
print(response.read().decode())
conn.close()requests.post("https://bll.titan.email/partner/notify",
headers={
"Authorization": "API.Key",
"Content-Type": "application/json"
},
json={
"event": "HOSTING_PURCHASED",
"data": {
"orderId": "1",
"domainName": "shoppers.com",
"customer": {
"customerId": "123qwe",
"companyName": "Shoppers Delight",
"firstName": "James",
"lastName": "Smith",
"email": "james@gmail.com"
}
}
}
)async with aiohttp.ClientSession() as session:
await session.post("https://bll.titan.email/partner/notify",
headers={
"Authorization": "API.Key",
"Content-Type": "application/json"
},
json={
"event": "HOSTING_PURCHASED",
"data": {
"orderId": "1",
"domainName": "shoppers.com",
"customer": {
"customerId": "123qwe",
"companyName": "Shoppers Delight",
"firstName": "James",
"lastName": "Smith",
"email": "james@gmail.com"
}
}
}
)httpx.post("https://bll.titan.email/partner/notify",
headers={
"Authorization": "API.Key",
"Content-Type": "application/json"
},
json={
"event": "HOSTING_PURCHASED",
"data": {
"orderId": "1",
"domainName": "shoppers.com",
"customer": {
"customerId": "123qwe",
"companyName": "Shoppers Delight",
"firstName": "James",
"lastName": "Smith",
"email": "james@gmail.com"
}
}
}
)async with httpx.AsyncClient() as client:
await client.post("https://bll.titan.email/partner/notify",
headers={
"Authorization": "API.Key",
"Content-Type": "application/json"
},
json={
"event": "HOSTING_PURCHASED",
"data": {
"orderId": "1",
"domainName": "shoppers.com",
"customer": {
"customerId": "123qwe",
"companyName": "Shoppers Delight",
"firstName": "James",
"lastName": "Smith",
"email": "james@gmail.com"
}
}
}
)library(httr2)
response <- request("https://bll.titan.email/partner/notify") |>
req_method("POST") |>
req_headers(
"Authorization" = "API.Key",
"Content-Type" = "application/json"
) |>
req_body_json(list(
event = "HOSTING_PURCHASED",
data = list(
orderId = "1",
domainName = "shoppers.com",
customer = list(
customerId = "123qwe",
companyName = "Shoppers Delight",
firstName = "James",
lastName = "Smith",
email = "james@gmail.com"
)
)
)) |>
req_perform()
resp_body_string(response)require 'uri'
require 'net/http'
url = URI("https://bll.titan.email/partner/notify")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'API.Key'
request["Content-Type"] = 'application/json'
request.body = <<~JSON
{
"event": "HOSTING_PURCHASED",
"data": {
"orderId": "1",
"domainName": "shoppers.com",
"customer": {
"customerId": "123qwe",
"companyName": "Shoppers Delight",
"firstName": "James",
"lastName": "Smith",
"email": "james@gmail.com"
}
}
}
JSON
response = http.request(request)
puts response.read_bodylet client = reqwest::Client::new();
let request = client
.post("https://bll.titan.email/partner/notify")
.header("Authorization", "API.Key")
.header("Content-Type", "application/json")
.json(&serde_json::json!({
"event": "HOSTING_PURCHASED",
"data": {
"orderId": "1",
"domainName": "shoppers.com",
"customer": {
"customerId": "123qwe",
"companyName": "Shoppers Delight",
"firstName": "James",
"lastName": "Smith",
"email": "james@gmail.com"
}
}
}));
let response = request.send().await?;curl https://bll.titan.email/partner/notify \
--request POST \
--header 'Authorization: API.Key' \
--header 'Content-Type: application/json' \
--data '{
"event": "HOSTING_PURCHASED",
"data": {
"orderId": "1",
"domainName": "shoppers.com",
"customer": {
"customerId": "123qwe",
"companyName": "Shoppers Delight",
"firstName": "James",
"lastName": "Smith",
"email": "james@gmail.com"
}
}
}'wget --quiet \
--method POST \
--header 'Authorization: API.Key' \
--header 'Content-Type: application/json' \
--body-data '{
"event": "HOSTING_PURCHASED",
"data": {
"orderId": "1",
"domainName": "shoppers.com",
"customer": {
"customerId": "123qwe",
"companyName": "Shoppers Delight",
"firstName": "James",
"lastName": "Smith",
"email": "james@gmail.com"
}
}
}' \
--output-document \
- https://bll.titan.email/partner/notifyhttp --ignore-stdin 'POST' 'https://bll.titan.email/partner/notify' \
'Authorization:API.Key' \
'Content-Type:application/json' \
--raw='{"event":"HOSTING_PURCHASED","data":{"orderId":"1","domainName":"shoppers.com","customer":{"customerId":"123qwe","companyName":"Shoppers Delight","firstName":"James","lastName":"Smith","email":"james@gmail.com"}}}'import Foundation
var request = URLRequest(url: URL(string: "https://bll.titan.email/partner/notify")!)
request.httpMethod = "POST"
request.setValue("API.Key", forHTTPHeaderField: "Authorization")
request.setValue("application/json", forHTTPHeaderField: "Content-Type")
let jsonBody = #"""
{
"event": "HOSTING_PURCHASED",
"data": {
"orderId": "1",
"domainName": "shoppers.com",
"customer": {
"customerId": "123qwe",
"companyName": "Shoppers Delight",
"firstName": "James",
"lastName": "Smith",
"email": "james@gmail.com"
}
}
}
"""#
request.httpBody = jsonBody.data(using: .utf8)
let (data, response) = try await URLSession.shared.data(for: request)
guard let httpResponse = response as? HTTPURLResponse,
200..<300 ~= httpResponse.statusCode else {
throw URLError(.badServerResponse)
}
print(String(data: data, encoding: .utf8) ?? "")#include <curl/curl.h>
int main(void) {
curl_global_init(CURL_GLOBAL_DEFAULT);
CURL *curl = curl_easy_init();
if (!curl) {
curl_global_cleanup();
return 1;
}
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(curl, CURLOPT_URL, "https://bll.titan.email/partner/notify");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Authorization: API.Key");
headers = curl_slist_append(headers, "Content-Type: application/json");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_POSTFIELDS,
"{\n"
" \"event\": \"REFUND_ISSUED\",\n"
" \"data\": {\n"
" \"titanOrderId\": 1,\n"
" \"orderId\": \"1\",\n"
" \"domainName\": \"shoppers.com\",\n"
" \"customerId\": \"123qwe\",\n"
" \"paymentTxnId\": \"asd123sds\",\n"
" \"refundDate\": \"2020-02-20\",\n"
" \"refundAmount\": 123,\n"
" \"refundTaxAmount\": 12,\n"
" \"refundUSDAmount\": 123,\n"
" \"currency\": \"USD\",\n"
" \"reason\": \"Reason stated by a customer for refund\"\n"
" }\n"
"}");
CURLcode res = curl_easy_perform(curl);
curl_easy_cleanup(curl);
curl_slist_free_all(headers);
curl_global_cleanup();
return (int)res;
}using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://bll.titan.email/partner/notify");
request.Headers.TryAddWithoutValidation("Authorization", "API.Key");
request.Content = new StringContent(
"""
{
"event": "REFUND_ISSUED",
"data": {
"titanOrderId": 1,
"orderId": "1",
"domainName": "shoppers.com",
"customerId": "123qwe",
"paymentTxnId": "asd123sds",
"refundDate": "2020-02-20",
"refundAmount": 123,
"refundTaxAmount": 12,
"refundUSDAmount": 123,
"currency": "USD",
"reason": "Reason stated by a customer for refund"
}
}
""",
System.Text.Encoding.UTF8, "application/json");
using var response = await client.SendAsync(request);var client = new RestClient("https://bll.titan.email/partner/notify");
var request = new RestRequest("", Method.Post);
request.AddHeader("Authorization", "API.Key");
request.AddHeader("Content-Type", "application/json");
request.AddStringBody("""
{
"event": "REFUND_ISSUED",
"data": {
"titanOrderId": 1,
"orderId": "1",
"domainName": "shoppers.com",
"customerId": "123qwe",
"paymentTxnId": "asd123sds",
"refundDate": "2020-02-20",
"refundAmount": 123,
"refundTaxAmount": 12,
"refundUSDAmount": 123,
"currency": "USD",
"reason": "Reason stated by a customer for refund"
}
}
""", ContentType.Json);
var response = await client.ExecuteAsync(request);(require '[clj-http.client :as client])
(client/post "https://bll.titan.email/partner/notify" {:headers {:Authorization "API.Key"}
:content-type :json
:form-params {:event "REFUND_ISSUED"
:data {:titanOrderId 1
:orderId "1"
:domainName "shoppers.com"
:customerId "123qwe"
:paymentTxnId "asd123sds"
:refundDate "2020-02-20"
:refundAmount 123
:refundTaxAmount 12
:refundUSDAmount 123
:currency "USD"
:reason "Reason stated by a customer for refund"}}})import 'package:http/http.dart' as http;
void main() async {
final headers = <String,String>{
'Authorization': 'API.Key',
'Content-Type': 'application/json',
};
final body = r'{"event":"REFUND_ISSUED","data":{"titanOrderId":1,"orderId":"1","domainName":"shoppers.com","customerId":"123qwe","paymentTxnId":"asd123sds","refundDate":"2020-02-20","refundAmount":123,"refundTaxAmount":12,"refundUSDAmount":123,"currency":"USD","reason":"Reason stated by a customer for refund"}}';
final response = await http.post(Uri.parse('https://bll.titan.email/partner/notify'), headers: headers, body: body);
print(response.body);
}let httpRequestMessage = new HttpRequestMessage(
HttpMethod("POST"),
new Uri("https://bll.titan.email/partner/notify")
)
httpRequestMessage.Headers.Add("Authorization", "API.Key")
httpRequestMessage.Headers.Add("Content-Type", "application/json")
let content = new StringContent("""{
"event": "REFUND_ISSUED",
"data": {
"titanOrderId": 1,
"orderId": "1",
"domainName": "shoppers.com",
"customerId": "123qwe",
"paymentTxnId": "asd123sds",
"refundDate": "2020-02-20",
"refundAmount": 123,
"refundTaxAmount": 12,
"refundUSDAmount": 123,
"currency": "USD",
"reason": "Reason stated by a customer for refund"
}
}""", Encoding.UTF8, "application/json")
httpRequestMessage.Content <- content
let client = new HttpClient()
let! result = client.SendAsync(httpRequestMessage)
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
requestUrl := "https://bll.titan.email/partner/notify"
payload := strings.NewReader(`{
"event": "REFUND_ISSUED",
"data": {
"titanOrderId": 1,
"orderId": "1",
"domainName": "shoppers.com",
"customerId": "123qwe",
"paymentTxnId": "asd123sds",
"refundDate": "2020-02-20",
"refundAmount": 123,
"refundTaxAmount": 12,
"refundUSDAmount": 123,
"currency": "USD",
"reason": "Reason stated by a customer for refund"
}
}`)
req, _ := http.NewRequest("POST", requestUrl, payload)
req.Header.Add("Authorization", "API.Key")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}POST /partner/notify HTTP/1.1
Host: bll.titan.email
Authorization: API.Key
Content-Type: application/json
{"event":"REFUND_ISSUED","data":{"titanOrderId":1,"orderId":"1","domainName":"shoppers.com","customerId":"123qwe","paymentTxnId":"asd123sds","refundDate":"2020-02-20","refundAmount":123,"refundTaxAmount":12,"refundUSDAmount":123,"currency":"USD","reason":"Reason stated by a customer for refund"}}POST /bll/partner/notify HTTP/1.1
Host: api-euc1.titan.email
Authorization: API.Key
Content-Type: application/json
{"event":"REFUND_ISSUED","data":{"titanOrderId":1,"orderId":"1","domainName":"shoppers.com","customerId":"123qwe","paymentTxnId":"asd123sds","refundDate":"2020-02-20","refundAmount":123,"refundTaxAmount":12,"refundUSDAmount":123,"currency":"USD","reason":"Reason stated by a customer for refund"}}java.io.ByteArrayOutputStream body = new java.io.ByteArrayOutputStream();
body.write("{\"event\":\"REFUND_ISSUED\",\"data\":{\"titanOrderId\":1,\"orderId\":\"1\",\"domainName\":\"shoppers.com\",\"customerId\":\"123qwe\",\"paymentTxnId\":\"asd123sds\",\"refundDate\":\"2020-02-20\",\"refundAmount\":123,\"refundTaxAmount\":12,\"refundUSDAmount\":123,\"currency\":\"USD\",\"reason\":\"Reason stated by a customer for refund\"}}".getBytes(java.nio.charset.StandardCharsets.UTF_8));
try (AsyncHttpClient client = new DefaultAsyncHttpClient()) {
Response response = client.prepare("POST", "https://bll.titan.email/partner/notify")
.addHeader("Authorization", "API.Key")
.addHeader("Content-Type", "application/json")
.setBody(body.toByteArray())
.execute()
.get();
System.out.println(response.getResponseBody());
}java.io.ByteArrayOutputStream body = new java.io.ByteArrayOutputStream();
body.write("{\"event\":\"REFUND_ISSUED\",\"data\":{\"titanOrderId\":1,\"orderId\":\"1\",\"domainName\":\"shoppers.com\",\"customerId\":\"123qwe\",\"paymentTxnId\":\"asd123sds\",\"refundDate\":\"2020-02-20\",\"refundAmount\":123,\"refundTaxAmount\":12,\"refundUSDAmount\":123,\"currency\":\"USD\",\"reason\":\"Reason stated by a customer for refund\"}}".getBytes(java.nio.charset.StandardCharsets.UTF_8));
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(java.net.URI.create("https://bll.titan.email/partner/notify"))
.header("Authorization", "API.Key")
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofByteArray(body.toByteArray()))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());OkHttpClient client = new OkHttpClient();
RequestBody body = RequestBody.create(MediaType.parse("application/json"), "{\"event\":\"REFUND_ISSUED\",\"data\":{\"titanOrderId\":1,\"orderId\":\"1\",\"domainName\":\"shoppers.com\",\"customerId\":\"123qwe\",\"paymentTxnId\":\"asd123sds\",\"refundDate\":\"2020-02-20\",\"refundAmount\":123,\"refundTaxAmount\":12,\"refundUSDAmount\":123,\"currency\":\"USD\",\"reason\":\"Reason stated by a customer for refund\"}}");
Request request = new Request.Builder()
.url("https://bll.titan.email/partner/notify")
.method("POST", body)
.addHeader("Authorization", "API.Key")
.addHeader("Content-Type", "application/json")
.build();
try (Response response = client.newCall(request).execute()) {
System.out.println(response.body().string());
}java.io.ByteArrayOutputStream body = new java.io.ByteArrayOutputStream();
body.write("{\"event\":\"REFUND_ISSUED\",\"data\":{\"titanOrderId\":1,\"orderId\":\"1\",\"domainName\":\"shoppers.com\",\"customerId\":\"123qwe\",\"paymentTxnId\":\"asd123sds\",\"refundDate\":\"2020-02-20\",\"refundAmount\":123,\"refundTaxAmount\":12,\"refundUSDAmount\":123,\"currency\":\"USD\",\"reason\":\"Reason stated by a customer for refund\"}}".getBytes(java.nio.charset.StandardCharsets.UTF_8));
HttpResponse<String> response = Unirest.request("POST", "https://bll.titan.email/partner/notify")
.header("Authorization", "API.Key")
.header("Content-Type", "application/json")
.body(body.toByteArray())
.asString();
System.out.println(response.getBody());fetch('https://bll.titan.email/partner/notify', {
method: 'POST',
headers: {
Authorization: 'API.Key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
event: 'REFUND_ISSUED',
data: {
titanOrderId: 1,
orderId: '1',
domainName: 'shoppers.com',
customerId: '123qwe',
paymentTxnId: 'asd123sds',
refundDate: '2020-02-20',
refundAmount: 123,
refundTaxAmount: 12,
refundUSDAmount: 123,
currency: 'USD',
reason: 'Reason stated by a customer for refund'
}
})
})import axios from 'axios'
const options = {
method: 'POST',
url: 'https://bll.titan.email/partner/notify',
headers: {
Authorization: 'API.Key',
'Content-Type': 'application/json'
},
data: {
event: 'REFUND_ISSUED',
data: {
titanOrderId: 1,
orderId: '1',
domainName: 'shoppers.com',
customerId: '123qwe',
paymentTxnId: 'asd123sds',
refundDate: '2020-02-20',
refundAmount: 123,
refundTaxAmount: 12,
refundUSDAmount: 123,
currency: 'USD',
reason: 'Reason stated by a customer for refund'
}
}
}
try {
const { data } = await axios.request(options)
console.log(data)
} catch (error) {
console.error(error)
}import { ofetch } from 'ofetch'
ofetch('https://bll.titan.email/partner/notify', {
method: 'POST',
headers: {
Authorization: 'API.Key',
'Content-Type': 'application/json'
},
body: {
event: 'REFUND_ISSUED',
data: {
titanOrderId: 1,
orderId: '1',
domainName: 'shoppers.com',
customerId: '123qwe',
paymentTxnId: 'asd123sds',
refundDate: '2020-02-20',
refundAmount: 123,
refundTaxAmount: 12,
refundUSDAmount: 123,
currency: 'USD',
reason: 'Reason stated by a customer for refund'
}
}
})$.ajax({
url: "https://bll.titan.email/partner/notify",
method: "POST",
processData: false,
contentType: false,
beforeSend(xhr) {
xhr.setRequestHeader("Authorization", "API.Key");
xhr.setRequestHeader("Content-Type", "application/json");
},
data: "{\"event\":\"REFUND_ISSUED\",\"data\":{\"titanOrderId\":1,\"orderId\":\"1\",\"domainName\":\"shoppers.com\",\"customerId\":\"123qwe\",\"paymentTxnId\":\"asd123sds\",\"refundDate\":\"2020-02-20\",\"refundAmount\":123,\"refundTaxAmount\":12,\"refundUSDAmount\":123,\"currency\":\"USD\",\"reason\":\"Reason stated by a customer for refund\"}}"
}).done((response) => console.log(response));const xhr = new XMLHttpRequest();
xhr.open("POST", "https://bll.titan.email/partner/notify");
xhr.withCredentials = true;
xhr.setRequestHeader("Authorization", "API.Key");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.addEventListener("load", () => console.log(xhr.responseText));
xhr.send("{\"event\":\"REFUND_ISSUED\",\"data\":{\"titanOrderId\":1,\"orderId\":\"1\",\"domainName\":\"shoppers.com\",\"customerId\":\"123qwe\",\"paymentTxnId\":\"asd123sds\",\"refundDate\":\"2020-02-20\",\"refundAmount\":123,\"refundTaxAmount\":12,\"refundUSDAmount\":123,\"currency\":\"USD\",\"reason\":\"Reason stated by a customer for refund\"}}");using HTTP
using JSON
response = HTTP.post(
"https://bll.titan.email/partner/notify",
[
"Authorization" => "API.Key",
"Content-Type" => "application/json"
],
JSON.json(Dict(
"event" => "REFUND_ISSUED",
"data" => Dict(
"titanOrderId" => 1,
"orderId" => "1",
"domainName" => "shoppers.com",
"customerId" => "123qwe",
"paymentTxnId" => "asd123sds",
"refundDate" => "2020-02-20",
"refundAmount" => 123,
"refundTaxAmount" => 12,
"refundUSDAmount" => 123,
"currency" => "USD",
"reason" => "Reason stated by a customer for refund"
)
))
)
println(String(response.body))val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\"event\":\"REFUND_ISSUED\",\"data\":{\"titanOrderId\":1,\"orderId\":\"1\",\"domainName\":\"shoppers.com\",\"customerId\":\"123qwe\",\"paymentTxnId\":\"asd123sds\",\"refundDate\":\"2020-02-20\",\"refundAmount\":123,\"refundTaxAmount\":12,\"refundUSDAmount\":123,\"currency\":\"USD\",\"reason\":\"Reason stated by a customer for refund\"}}")
val request = Request.Builder()
.url("https://bll.titan.email/partner/notify")
.post(body)
.addHeader("Authorization", "API.Key")
.addHeader("Content-Type", "application/json")
.build()
val response = client.newCall(request).execute()fetch('https://bll.titan.email/partner/notify', {
method: 'POST',
headers: {
Authorization: 'API.Key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
event: 'REFUND_ISSUED',
data: {
titanOrderId: 1,
orderId: '1',
domainName: 'shoppers.com',
customerId: '123qwe',
paymentTxnId: 'asd123sds',
refundDate: '2020-02-20',
refundAmount: 123,
refundTaxAmount: 12,
refundUSDAmount: 123,
currency: 'USD',
reason: 'Reason stated by a customer for refund'
}
})
})import axios from 'axios'
const options = {
method: 'POST',
url: 'https://bll.titan.email/partner/notify',
headers: {
Authorization: 'API.Key',
'Content-Type': 'application/json'
},
data: {
event: 'REFUND_ISSUED',
data: {
titanOrderId: 1,
orderId: '1',
domainName: 'shoppers.com',
customerId: '123qwe',
paymentTxnId: 'asd123sds',
refundDate: '2020-02-20',
refundAmount: 123,
refundTaxAmount: 12,
refundUSDAmount: 123,
currency: 'USD',
reason: 'Reason stated by a customer for refund'
}
}
}
try {
const { data } = await axios.request(options)
console.log(data)
} catch (error) {
console.error(error)
}import { ofetch } from 'ofetch'
ofetch('https://bll.titan.email/partner/notify', {
method: 'POST',
headers: {
Authorization: 'API.Key',
'Content-Type': 'application/json'
},
body: {
event: 'REFUND_ISSUED',
data: {
titanOrderId: 1,
orderId: '1',
domainName: 'shoppers.com',
customerId: '123qwe',
paymentTxnId: 'asd123sds',
refundDate: '2020-02-20',
refundAmount: 123,
refundTaxAmount: 12,
refundUSDAmount: 123,
currency: 'USD',
reason: 'Reason stated by a customer for refund'
}
}
})import { request } from 'undici'
const { statusCode, body } = await request('https://bll.titan.email/partner/notify', {
method: 'POST',
headers: {
Authorization: 'API.Key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
event: 'REFUND_ISSUED',
data: {
titanOrderId: 1,
orderId: '1',
domainName: 'shoppers.com',
customerId: '123qwe',
paymentTxnId: 'asd123sds',
refundDate: '2020-02-20',
refundAmount: 123,
refundTaxAmount: 12,
refundUSDAmount: 123,
currency: 'USD',
reason: 'Reason stated by a customer for refund'
}
})
})#import <Foundation/Foundation.h>
NSDictionary *headers = @{ @"Authorization": @"API.Key",
@"Content-Type": @"application/json" };
NSDictionary *parameters = @{ @"event": @"REFUND_ISSUED",
@"data": @{ @"titanOrderId": @1, @"orderId": @"1", @"domainName": @"shoppers.com", @"customerId": @"123qwe", @"paymentTxnId": @"asd123sds", @"refundDate": @"2020-02-20", @"refundAmount": @123, @"refundTaxAmount": @12, @"refundUSDAmount": @123, @"currency": @"USD", @"reason": @"Reason stated by a customer for refund" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://bll.titan.email/partner/notify"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];open Lwt.Infix
let () =
Lwt_main.run (
let uri = Uri.of_string "https://bll.titan.email/partner/notify" in
let headers = Cohttp.Header.of_list [
("Authorization", "API.Key");
("Content-Type", "application/json");
] in
let part0 = "{\"event\":\"REFUND_ISSUED\",\"data\":{\"titanOrderId\":1,\"orderId\":\"1\",\"domainName\":\"shoppers.com\",\"customerId\":\"123qwe\",\"paymentTxnId\":\"asd123sds\",\"refundDate\":\"2020-02-20\",\"refundAmount\":123,\"refundTaxAmount\":12,\"refundUSDAmount\":123,\"currency\":\"USD\",\"reason\":\"Reason stated by a customer for refund\"}}" in
let body = Cohttp_lwt.Body.of_string (String.concat "" [part0]) in
Cohttp_lwt_unix.Client.call ~headers ~body (Cohttp.Code.method_of_string "POST") uri
>>= fun (_response, body) ->
Cohttp_lwt.Body.to_string body >>= Lwt_io.printl
)$ch = curl_init("https://bll.titan.email/partner/notify");
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: API.Key', 'Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
'event' => 'REFUND_ISSUED',
'data' => [
'titanOrderId' => 1,
'orderId' => '1',
'domainName' => 'shoppers.com',
'customerId' => '123qwe',
'paymentTxnId' => 'asd123sds',
'refundDate' => '2020-02-20',
'refundAmount' => 123,
'refundTaxAmount' => 12,
'refundUSDAmount' => 123,
'currency' => 'USD',
'reason' => 'Reason stated by a customer for refund'
]
]));
curl_exec($ch);
curl_close($ch);$client = new GuzzleHttp\Client();
$response = $client->request('POST', 'https://bll.titan.email/partner/notify', [
'headers' => [
'Authorization' => 'API.Key',
'Content-Type' => 'application/json'
],
'json' => [
'event' => 'REFUND_ISSUED',
'data' => [
'titanOrderId' => 1,
'orderId' => '1',
'domainName' => 'shoppers.com',
'customerId' => '123qwe',
'paymentTxnId' => 'asd123sds',
'refundDate' => '2020-02-20',
'refundAmount' => 123,
'refundTaxAmount' => 12,
'refundUSDAmount' => 123,
'currency' => 'USD',
'reason' => 'Reason stated by a customer for refund'
]
]
]);use Illuminate\Support\Facades\Http;
$response = Http::withHeaders([
'Authorization' => 'API.Key',
'Content-Type' => 'application/json'
])
->post('https://bll.titan.email/partner/notify', [
'event' => 'REFUND_ISSUED',
'data' => [
'titanOrderId' => 1,
'orderId' => '1',
'domainName' => 'shoppers.com',
'customerId' => '123qwe',
'paymentTxnId' => 'asd123sds',
'refundDate' => '2020-02-20',
'refundAmount' => 123,
'refundTaxAmount' => 12,
'refundUSDAmount' => 123,
'currency' => 'USD',
'reason' => 'Reason stated by a customer for refund'
]
]);$headers = @{
'Authorization' = 'API.Key'
'Content-Type' = 'application/json'
}
$body = [System.IO.MemoryStream]::new()
$bytes = [System.Text.Encoding]::UTF8.GetBytes('{"event":"REFUND_ISSUED","data":{"titanOrderId":1,"orderId":"1","domainName":"shoppers.com","customerId":"123qwe","paymentTxnId":"asd123sds","refundDate":"2020-02-20","refundAmount":123,"refundTaxAmount":12,"refundUSDAmount":123,"currency":"USD","reason":"Reason stated by a customer for refund"}}')
$body.Write($bytes, 0, $bytes.Length)
$response = Invoke-WebRequest -Uri 'https://bll.titan.email/partner/notify' -Method 'POST' -Headers $headers -Body $body.ToArray()
$body.Dispose()
$response$headers = @{
'Authorization' = 'API.Key'
'Content-Type' = 'application/json'
}
$body = [System.IO.MemoryStream]::new()
$bytes = [System.Text.Encoding]::UTF8.GetBytes('{"event":"REFUND_ISSUED","data":{"titanOrderId":1,"orderId":"1","domainName":"shoppers.com","customerId":"123qwe","paymentTxnId":"asd123sds","refundDate":"2020-02-20","refundAmount":123,"refundTaxAmount":12,"refundUSDAmount":123,"currency":"USD","reason":"Reason stated by a customer for refund"}}')
$body.Write($bytes, 0, $bytes.Length)
$response = Invoke-RestMethod -Uri 'https://bll.titan.email/partner/notify' -Method 'POST' -Headers $headers -Body $body.ToArray()
$body.Dispose()
$responseimport http.client
import json
conn = http.client.HTTPSConnection("bll.titan.email")
payload = json.dumps({
"event": "REFUND_ISSUED",
"data": {
"titanOrderId": 1,
"orderId": "1",
"domainName": "shoppers.com",
"customerId": "123qwe",
"paymentTxnId": "asd123sds",
"refundDate": "2020-02-20",
"refundAmount": 123,
"refundTaxAmount": 12,
"refundUSDAmount": 123,
"currency": "USD",
"reason": "Reason stated by a customer for refund"
}
})
headers = {
"Authorization": "API.Key",
"Content-Type": "application/json"
}
conn.request(
"POST",
"/partner/notify",
body=payload,
headers=headers,
)
response = conn.getresponse()
print(response.read().decode())
conn.close()import http.client
import json
conn = http.client.HTTPSConnection("api-euc1.titan.email")
payload = json.dumps({
"event": "REFUND_ISSUED",
"data": {
"titanOrderId": 1,
"orderId": "1",
"domainName": "shoppers.com",
"customerId": "123qwe",
"paymentTxnId": "asd123sds",
"refundDate": "2020-02-20",
"refundAmount": 123,
"refundTaxAmount": 12,
"refundUSDAmount": 123,
"currency": "USD",
"reason": "Reason stated by a customer for refund"
}
})
headers = {
"Authorization": "API.Key",
"Content-Type": "application/json"
}
conn.request(
"POST",
"/bll/partner/notify",
body=payload,
headers=headers,
)
response = conn.getresponse()
print(response.read().decode())
conn.close()requests.post("https://bll.titan.email/partner/notify",
headers={
"Authorization": "API.Key",
"Content-Type": "application/json"
},
json={
"event": "REFUND_ISSUED",
"data": {
"titanOrderId": 1,
"orderId": "1",
"domainName": "shoppers.com",
"customerId": "123qwe",
"paymentTxnId": "asd123sds",
"refundDate": "2020-02-20",
"refundAmount": 123,
"refundTaxAmount": 12,
"refundUSDAmount": 123,
"currency": "USD",
"reason": "Reason stated by a customer for refund"
}
}
)async with aiohttp.ClientSession() as session:
await session.post("https://bll.titan.email/partner/notify",
headers={
"Authorization": "API.Key",
"Content-Type": "application/json"
},
json={
"event": "REFUND_ISSUED",
"data": {
"titanOrderId": 1,
"orderId": "1",
"domainName": "shoppers.com",
"customerId": "123qwe",
"paymentTxnId": "asd123sds",
"refundDate": "2020-02-20",
"refundAmount": 123,
"refundTaxAmount": 12,
"refundUSDAmount": 123,
"currency": "USD",
"reason": "Reason stated by a customer for refund"
}
}
)httpx.post("https://bll.titan.email/partner/notify",
headers={
"Authorization": "API.Key",
"Content-Type": "application/json"
},
json={
"event": "REFUND_ISSUED",
"data": {
"titanOrderId": 1,
"orderId": "1",
"domainName": "shoppers.com",
"customerId": "123qwe",
"paymentTxnId": "asd123sds",
"refundDate": "2020-02-20",
"refundAmount": 123,
"refundTaxAmount": 12,
"refundUSDAmount": 123,
"currency": "USD",
"reason": "Reason stated by a customer for refund"
}
}
)async with httpx.AsyncClient() as client:
await client.post("https://bll.titan.email/partner/notify",
headers={
"Authorization": "API.Key",
"Content-Type": "application/json"
},
json={
"event": "REFUND_ISSUED",
"data": {
"titanOrderId": 1,
"orderId": "1",
"domainName": "shoppers.com",
"customerId": "123qwe",
"paymentTxnId": "asd123sds",
"refundDate": "2020-02-20",
"refundAmount": 123,
"refundTaxAmount": 12,
"refundUSDAmount": 123,
"currency": "USD",
"reason": "Reason stated by a customer for refund"
}
}
)library(httr2)
response <- request("https://bll.titan.email/partner/notify") |>
req_method("POST") |>
req_headers(
"Authorization" = "API.Key",
"Content-Type" = "application/json"
) |>
req_body_json(list(
event = "REFUND_ISSUED",
data = list(
titanOrderId = 1,
orderId = "1",
domainName = "shoppers.com",
customerId = "123qwe",
paymentTxnId = "asd123sds",
refundDate = "2020-02-20",
refundAmount = 123,
refundTaxAmount = 12,
refundUSDAmount = 123,
currency = "USD",
reason = "Reason stated by a customer for refund"
)
)) |>
req_perform()
resp_body_string(response)require 'uri'
require 'net/http'
url = URI("https://bll.titan.email/partner/notify")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'API.Key'
request["Content-Type"] = 'application/json'
request.body = <<~JSON
{
"event": "REFUND_ISSUED",
"data": {
"titanOrderId": 1,
"orderId": "1",
"domainName": "shoppers.com",
"customerId": "123qwe",
"paymentTxnId": "asd123sds",
"refundDate": "2020-02-20",
"refundAmount": 123,
"refundTaxAmount": 12,
"refundUSDAmount": 123,
"currency": "USD",
"reason": "Reason stated by a customer for refund"
}
}
JSON
response = http.request(request)
puts response.read_bodylet client = reqwest::Client::new();
let request = client
.post("https://bll.titan.email/partner/notify")
.header("Authorization", "API.Key")
.header("Content-Type", "application/json")
.json(&serde_json::json!({
"event": "REFUND_ISSUED",
"data": {
"titanOrderId": 1,
"orderId": "1",
"domainName": "shoppers.com",
"customerId": "123qwe",
"paymentTxnId": "asd123sds",
"refundDate": "2020-02-20",
"refundAmount": 123,
"refundTaxAmount": 12,
"refundUSDAmount": 123,
"currency": "USD",
"reason": "Reason stated by a customer for refund"
}
}));
let response = request.send().await?;curl https://bll.titan.email/partner/notify \
--request POST \
--header 'Authorization: API.Key' \
--header 'Content-Type: application/json' \
--data '{
"event": "REFUND_ISSUED",
"data": {
"titanOrderId": 1,
"orderId": "1",
"domainName": "shoppers.com",
"customerId": "123qwe",
"paymentTxnId": "asd123sds",
"refundDate": "2020-02-20",
"refundAmount": 123,
"refundTaxAmount": 12,
"refundUSDAmount": 123,
"currency": "USD",
"reason": "Reason stated by a customer for refund"
}
}'wget --quiet \
--method POST \
--header 'Authorization: API.Key' \
--header 'Content-Type: application/json' \
--body-data '{
"event": "REFUND_ISSUED",
"data": {
"titanOrderId": 1,
"orderId": "1",
"domainName": "shoppers.com",
"customerId": "123qwe",
"paymentTxnId": "asd123sds",
"refundDate": "2020-02-20",
"refundAmount": 123,
"refundTaxAmount": 12,
"refundUSDAmount": 123,
"currency": "USD",
"reason": "Reason stated by a customer for refund"
}
}' \
--output-document \
- https://bll.titan.email/partner/notifyhttp --ignore-stdin 'POST' 'https://bll.titan.email/partner/notify' \
'Authorization:API.Key' \
'Content-Type:application/json' \
--raw='{"event":"REFUND_ISSUED","data":{"titanOrderId":1,"orderId":"1","domainName":"shoppers.com","customerId":"123qwe","paymentTxnId":"asd123sds","refundDate":"2020-02-20","refundAmount":123,"refundTaxAmount":12,"refundUSDAmount":123,"currency":"USD","reason":"Reason stated by a customer for refund"}}'import Foundation
var request = URLRequest(url: URL(string: "https://bll.titan.email/partner/notify")!)
request.httpMethod = "POST"
request.setValue("API.Key", forHTTPHeaderField: "Authorization")
request.setValue("application/json", forHTTPHeaderField: "Content-Type")
let jsonBody = #"""
{
"event": "REFUND_ISSUED",
"data": {
"titanOrderId": 1,
"orderId": "1",
"domainName": "shoppers.com",
"customerId": "123qwe",
"paymentTxnId": "asd123sds",
"refundDate": "2020-02-20",
"refundAmount": 123,
"refundTaxAmount": 12,
"refundUSDAmount": 123,
"currency": "USD",
"reason": "Reason stated by a customer for refund"
}
}
"""#
request.httpBody = jsonBody.data(using: .utf8)
let (data, response) = try await URLSession.shared.data(for: request)
guard let httpResponse = response as? HTTPURLResponse,
200..<300 ~= httpResponse.statusCode else {
throw URLError(.badServerResponse)
}
print(String(data: data, encoding: .utf8) ?? "")#include <curl/curl.h>
int main(void) {
curl_global_init(CURL_GLOBAL_DEFAULT);
CURL *curl = curl_easy_init();
if (!curl) {
curl_global_cleanup();
return 1;
}
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(curl, CURLOPT_URL, "https://bll.titan.email/partner/notify");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Authorization: API.Key");
headers = curl_slist_append(headers, "Content-Type: application/json");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_POSTFIELDS,
"{\n"
" \"event\": \"MAIL_ORDER_PURCHASED\",\n"
" \"data\": {\n"
" \"orderId\": \"12431\",\n"
" \"customerId\": \"abcd123\",\n"
" \"customerName\": \"Adam\",\n"
" \"customerEmailAddress\": \"adam@gmail.com\",\n"
" \"customerCountry\": \"US\",\n"
" \"alternateEmailAddress\": \"abc@xyz.com\",\n"
" \"planType\": \"pro\",\n"
" \"noOfAccounts\": 10,\n"
" \"expiryDate\": \"2022-02-20\",\n"
" \"paymentTxnId\": \"qweradsf\",\n"
" \"chargedAmount\": 1.1,\n"
" \"currency\": \"USD\",\n"
" \"chargedUSDAmount\": 1.1,\n"
" \"discountAmount\": 0.1,\n"
" \"taxAmount\": 0.1,\n"
" \"billingCycle\": \"monthly\",\n"
" \"locale\": \"en-gb\",\n"
" \"source\": \"hosting\",\n"
" \"sourceContext\": \"website\",\n"
" \"metadata\": {\n"
" \"associatedOrderExpiryDate\": \"string\",\n"
" \"associatedOrderPlanType\": \"string\",\n"
" \"cpanelHostName\": \"string\",\n"
" \"cpanelUserName\": \"string\",\n"
" \"paymentMethod\": \"string\",\n"
" \"autoRenew\": \"string\"\n"
" }\n"
" }\n"
"}");
CURLcode res = curl_easy_perform(curl);
curl_easy_cleanup(curl);
curl_slist_free_all(headers);
curl_global_cleanup();
return (int)res;
}using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://bll.titan.email/partner/notify");
request.Headers.TryAddWithoutValidation("Authorization", "API.Key");
request.Content = new StringContent(
"""
{
"event": "MAIL_ORDER_PURCHASED",
"data": {
"orderId": "12431",
"customerId": "abcd123",
"customerName": "Adam",
"customerEmailAddress": "adam@gmail.com",
"customerCountry": "US",
"alternateEmailAddress": "abc@xyz.com",
"planType": "pro",
"noOfAccounts": 10,
"expiryDate": "2022-02-20",
"paymentTxnId": "qweradsf",
"chargedAmount": 1.1,
"currency": "USD",
"chargedUSDAmount": 1.1,
"discountAmount": 0.1,
"taxAmount": 0.1,
"billingCycle": "monthly",
"locale": "en-gb",
"source": "hosting",
"sourceContext": "website",
"metadata": {
"associatedOrderExpiryDate": "string",
"associatedOrderPlanType": "string",
"cpanelHostName": "string",
"cpanelUserName": "string",
"paymentMethod": "string",
"autoRenew": "string"
}
}
}
""",
System.Text.Encoding.UTF8, "application/json");
using var response = await client.SendAsync(request);var client = new RestClient("https://bll.titan.email/partner/notify");
var request = new RestRequest("", Method.Post);
request.AddHeader("Authorization", "API.Key");
request.AddHeader("Content-Type", "application/json");
request.AddStringBody("""
{
"event": "MAIL_ORDER_PURCHASED",
"data": {
"orderId": "12431",
"customerId": "abcd123",
"customerName": "Adam",
"customerEmailAddress": "adam@gmail.com",
"customerCountry": "US",
"alternateEmailAddress": "abc@xyz.com",
"planType": "pro",
"noOfAccounts": 10,
"expiryDate": "2022-02-20",
"paymentTxnId": "qweradsf",
"chargedAmount": 1.1,
"currency": "USD",
"chargedUSDAmount": 1.1,
"discountAmount": 0.1,
"taxAmount": 0.1,
"billingCycle": "monthly",
"locale": "en-gb",
"source": "hosting",
"sourceContext": "website",
"metadata": {
"associatedOrderExpiryDate": "string",
"associatedOrderPlanType": "string",
"cpanelHostName": "string",
"cpanelUserName": "string",
"paymentMethod": "string",
"autoRenew": "string"
}
}
}
""", ContentType.Json);
var response = await client.ExecuteAsync(request);(require '[clj-http.client :as client])
(client/post "https://bll.titan.email/partner/notify" {:headers {:Authorization "API.Key"}
:content-type :json
:form-params {:event "MAIL_ORDER_PURCHASED"
:data {:orderId "12431"
:customerId "abcd123"
:customerName "Adam"
:customerEmailAddress "adam@gmail.com"
:customerCountry "US"
:alternateEmailAddress "abc@xyz.com"
:planType "pro"
:noOfAccounts 10
:expiryDate "2022-02-20"
:paymentTxnId "qweradsf"
:chargedAmount 1.1
:currency "USD"
:chargedUSDAmount 1.1
:discountAmount 0.1
:taxAmount 0.1
:billingCycle "monthly"
:locale "en-gb"
:source "hosting"
:sourceContext "website"
:metadata {:associatedOrderExpiryDate "string"
:associatedOrderPlanType "string"
:cpanelHostName "string"
:cpanelUserName "string"
:paymentMethod "string"
:autoRenew "string"}}}})import 'package:http/http.dart' as http;
void main() async {
final headers = <String,String>{
'Authorization': 'API.Key',
'Content-Type': 'application/json',
};
final body = r'{"event":"MAIL_ORDER_PURCHASED","data":{"orderId":"12431","customerId":"abcd123","customerName":"Adam","customerEmailAddress":"adam@gmail.com","customerCountry":"US","alternateEmailAddress":"abc@xyz.com","planType":"pro","noOfAccounts":10,"expiryDate":"2022-02-20","paymentTxnId":"qweradsf","chargedAmount":1.1,"currency":"USD","chargedUSDAmount":1.1,"discountAmount":0.1,"taxAmount":0.1,"billingCycle":"monthly","locale":"en-gb","source":"hosting","sourceContext":"website","metadata":{"associatedOrderExpiryDate":"string","associatedOrderPlanType":"string","cpanelHostName":"string","cpanelUserName":"string","paymentMethod":"string","autoRenew":"string"}}}';
final response = await http.post(Uri.parse('https://bll.titan.email/partner/notify'), headers: headers, body: body);
print(response.body);
}let httpRequestMessage = new HttpRequestMessage(
HttpMethod("POST"),
new Uri("https://bll.titan.email/partner/notify")
)
httpRequestMessage.Headers.Add("Authorization", "API.Key")
httpRequestMessage.Headers.Add("Content-Type", "application/json")
let content = new StringContent("""{
"event": "MAIL_ORDER_PURCHASED",
"data": {
"orderId": "12431",
"customerId": "abcd123",
"customerName": "Adam",
"customerEmailAddress": "adam@gmail.com",
"customerCountry": "US",
"alternateEmailAddress": "abc@xyz.com",
"planType": "pro",
"noOfAccounts": 10,
"expiryDate": "2022-02-20",
"paymentTxnId": "qweradsf",
"chargedAmount": 1.1,
"currency": "USD",
"chargedUSDAmount": 1.1,
"discountAmount": 0.1,
"taxAmount": 0.1,
"billingCycle": "monthly",
"locale": "en-gb",
"source": "hosting",
"sourceContext": "website",
"metadata": {
"associatedOrderExpiryDate": "string",
"associatedOrderPlanType": "string",
"cpanelHostName": "string",
"cpanelUserName": "string",
"paymentMethod": "string",
"autoRenew": "string"
}
}
}""", Encoding.UTF8, "application/json")
httpRequestMessage.Content <- content
let client = new HttpClient()
let! result = client.SendAsync(httpRequestMessage)
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
requestUrl := "https://bll.titan.email/partner/notify"
payload := strings.NewReader(`{
"event": "MAIL_ORDER_PURCHASED",
"data": {
"orderId": "12431",
"customerId": "abcd123",
"customerName": "Adam",
"customerEmailAddress": "adam@gmail.com",
"customerCountry": "US",
"alternateEmailAddress": "abc@xyz.com",
"planType": "pro",
"noOfAccounts": 10,
"expiryDate": "2022-02-20",
"paymentTxnId": "qweradsf",
"chargedAmount": 1.1,
"currency": "USD",
"chargedUSDAmount": 1.1,
"discountAmount": 0.1,
"taxAmount": 0.1,
"billingCycle": "monthly",
"locale": "en-gb",
"source": "hosting",
"sourceContext": "website",
"metadata": {
"associatedOrderExpiryDate": "string",
"associatedOrderPlanType": "string",
"cpanelHostName": "string",
"cpanelUserName": "string",
"paymentMethod": "string",
"autoRenew": "string"
}
}
}`)
req, _ := http.NewRequest("POST", requestUrl, payload)
req.Header.Add("Authorization", "API.Key")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}POST /partner/notify HTTP/1.1
Host: bll.titan.email
Authorization: API.Key
Content-Type: application/json
{"event":"MAIL_ORDER_PURCHASED","data":{"orderId":"12431","customerId":"abcd123","customerName":"Adam","customerEmailAddress":"adam@gmail.com","customerCountry":"US","alternateEmailAddress":"abc@xyz.com","planType":"pro","noOfAccounts":10,"expiryDate":"2022-02-20","paymentTxnId":"qweradsf","chargedAmount":1.1,"currency":"USD","chargedUSDAmount":1.1,"discountAmount":0.1,"taxAmount":0.1,"billingCycle":"monthly","locale":"en-gb","source":"hosting","sourceContext":"website","metadata":{"associatedOrderExpiryDate":"string","associatedOrderPlanType":"string","cpanelHostName":"string","cpanelUserName":"string","paymentMethod":"string","autoRenew":"string"}}}POST /bll/partner/notify HTTP/1.1
Host: api-euc1.titan.email
Authorization: API.Key
Content-Type: application/json
{"event":"MAIL_ORDER_PURCHASED","data":{"orderId":"12431","customerId":"abcd123","customerName":"Adam","customerEmailAddress":"adam@gmail.com","customerCountry":"US","alternateEmailAddress":"abc@xyz.com","planType":"pro","noOfAccounts":10,"expiryDate":"2022-02-20","paymentTxnId":"qweradsf","chargedAmount":1.1,"currency":"USD","chargedUSDAmount":1.1,"discountAmount":0.1,"taxAmount":0.1,"billingCycle":"monthly","locale":"en-gb","source":"hosting","sourceContext":"website","metadata":{"associatedOrderExpiryDate":"string","associatedOrderPlanType":"string","cpanelHostName":"string","cpanelUserName":"string","paymentMethod":"string","autoRenew":"string"}}}java.io.ByteArrayOutputStream body = new java.io.ByteArrayOutputStream();
body.write("{\"event\":\"MAIL_ORDER_PURCHASED\",\"data\":{\"orderId\":\"12431\",\"customerId\":\"abcd123\",\"customerName\":\"Adam\",\"customerEmailAddress\":\"adam@gmail.com\",\"customerCountry\":\"US\",\"alternateEmailAddress\":\"abc@xyz.com\",\"planType\":\"pro\",\"noOfAccounts\":10,\"expiryDate\":\"2022-02-20\",\"paymentTxnId\":\"qweradsf\",\"chargedAmount\":1.1,\"currency\":\"USD\",\"chargedUSDAmount\":1.1,\"discountAmount\":0.1,\"taxAmount\":0.1,\"billingCycle\":\"monthly\",\"locale\":\"en-gb\",\"source\":\"hosting\",\"sourceContext\":\"website\",\"metadata\":{\"associatedOrderExpiryDate\":\"string\",\"associatedOrderPlanType\":\"string\",\"cpanelHostName\":\"string\",\"cpanelUserName\":\"string\",\"paymentMethod\":\"string\",\"autoRenew\":\"string\"}}}".getBytes(java.nio.charset.StandardCharsets.UTF_8));
try (AsyncHttpClient client = new DefaultAsyncHttpClient()) {
Response response = client.prepare("POST", "https://bll.titan.email/partner/notify")
.addHeader("Authorization", "API.Key")
.addHeader("Content-Type", "application/json")
.setBody(body.toByteArray())
.execute()
.get();
System.out.println(response.getResponseBody());
}java.io.ByteArrayOutputStream body = new java.io.ByteArrayOutputStream();
body.write("{\"event\":\"MAIL_ORDER_PURCHASED\",\"data\":{\"orderId\":\"12431\",\"customerId\":\"abcd123\",\"customerName\":\"Adam\",\"customerEmailAddress\":\"adam@gmail.com\",\"customerCountry\":\"US\",\"alternateEmailAddress\":\"abc@xyz.com\",\"planType\":\"pro\",\"noOfAccounts\":10,\"expiryDate\":\"2022-02-20\",\"paymentTxnId\":\"qweradsf\",\"chargedAmount\":1.1,\"currency\":\"USD\",\"chargedUSDAmount\":1.1,\"discountAmount\":0.1,\"taxAmount\":0.1,\"billingCycle\":\"monthly\",\"locale\":\"en-gb\",\"source\":\"hosting\",\"sourceContext\":\"website\",\"metadata\":{\"associatedOrderExpiryDate\":\"string\",\"associatedOrderPlanType\":\"string\",\"cpanelHostName\":\"string\",\"cpanelUserName\":\"string\",\"paymentMethod\":\"string\",\"autoRenew\":\"string\"}}}".getBytes(java.nio.charset.StandardCharsets.UTF_8));
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(java.net.URI.create("https://bll.titan.email/partner/notify"))
.header("Authorization", "API.Key")
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofByteArray(body.toByteArray()))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());OkHttpClient client = new OkHttpClient();
RequestBody body = RequestBody.create(MediaType.parse("application/json"), "{\"event\":\"MAIL_ORDER_PURCHASED\",\"data\":{\"orderId\":\"12431\",\"customerId\":\"abcd123\",\"customerName\":\"Adam\",\"customerEmailAddress\":\"adam@gmail.com\",\"customerCountry\":\"US\",\"alternateEmailAddress\":\"abc@xyz.com\",\"planType\":\"pro\",\"noOfAccounts\":10,\"expiryDate\":\"2022-02-20\",\"paymentTxnId\":\"qweradsf\",\"chargedAmount\":1.1,\"currency\":\"USD\",\"chargedUSDAmount\":1.1,\"discountAmount\":0.1,\"taxAmount\":0.1,\"billingCycle\":\"monthly\",\"locale\":\"en-gb\",\"source\":\"hosting\",\"sourceContext\":\"website\",\"metadata\":{\"associatedOrderExpiryDate\":\"string\",\"associatedOrderPlanType\":\"string\",\"cpanelHostName\":\"string\",\"cpanelUserName\":\"string\",\"paymentMethod\":\"string\",\"autoRenew\":\"string\"}}}");
Request request = new Request.Builder()
.url("https://bll.titan.email/partner/notify")
.method("POST", body)
.addHeader("Authorization", "API.Key")
.addHeader("Content-Type", "application/json")
.build();
try (Response response = client.newCall(request).execute()) {
System.out.println(response.body().string());
}java.io.ByteArrayOutputStream body = new java.io.ByteArrayOutputStream();
body.write("{\"event\":\"MAIL_ORDER_PURCHASED\",\"data\":{\"orderId\":\"12431\",\"customerId\":\"abcd123\",\"customerName\":\"Adam\",\"customerEmailAddress\":\"adam@gmail.com\",\"customerCountry\":\"US\",\"alternateEmailAddress\":\"abc@xyz.com\",\"planType\":\"pro\",\"noOfAccounts\":10,\"expiryDate\":\"2022-02-20\",\"paymentTxnId\":\"qweradsf\",\"chargedAmount\":1.1,\"currency\":\"USD\",\"chargedUSDAmount\":1.1,\"discountAmount\":0.1,\"taxAmount\":0.1,\"billingCycle\":\"monthly\",\"locale\":\"en-gb\",\"source\":\"hosting\",\"sourceContext\":\"website\",\"metadata\":{\"associatedOrderExpiryDate\":\"string\",\"associatedOrderPlanType\":\"string\",\"cpanelHostName\":\"string\",\"cpanelUserName\":\"string\",\"paymentMethod\":\"string\",\"autoRenew\":\"string\"}}}".getBytes(java.nio.charset.StandardCharsets.UTF_8));
HttpResponse<String> response = Unirest.request("POST", "https://bll.titan.email/partner/notify")
.header("Authorization", "API.Key")
.header("Content-Type", "application/json")
.body(body.toByteArray())
.asString();
System.out.println(response.getBody());fetch('https://bll.titan.email/partner/notify', {
method: 'POST',
headers: {
Authorization: 'API.Key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
event: 'MAIL_ORDER_PURCHASED',
data: {
orderId: '12431',
customerId: 'abcd123',
customerName: 'Adam',
customerEmailAddress: 'adam@gmail.com',
customerCountry: 'US',
alternateEmailAddress: 'abc@xyz.com',
planType: 'pro',
noOfAccounts: 10,
expiryDate: '2022-02-20',
paymentTxnId: 'qweradsf',
chargedAmount: 1.1,
currency: 'USD',
chargedUSDAmount: 1.1,
discountAmount: 0.1,
taxAmount: 0.1,
billingCycle: 'monthly',
locale: 'en-gb',
source: 'hosting',
sourceContext: 'website',
metadata: {
associatedOrderExpiryDate: 'string',
associatedOrderPlanType: 'string',
cpanelHostName: 'string',
cpanelUserName: 'string',
paymentMethod: 'string',
autoRenew: 'string'
}
}
})
})import axios from 'axios'
const options = {
method: 'POST',
url: 'https://bll.titan.email/partner/notify',
headers: {
Authorization: 'API.Key',
'Content-Type': 'application/json'
},
data: {
event: 'MAIL_ORDER_PURCHASED',
data: {
orderId: '12431',
customerId: 'abcd123',
customerName: 'Adam',
customerEmailAddress: 'adam@gmail.com',
customerCountry: 'US',
alternateEmailAddress: 'abc@xyz.com',
planType: 'pro',
noOfAccounts: 10,
expiryDate: '2022-02-20',
paymentTxnId: 'qweradsf',
chargedAmount: 1.1,
currency: 'USD',
chargedUSDAmount: 1.1,
discountAmount: 0.1,
taxAmount: 0.1,
billingCycle: 'monthly',
locale: 'en-gb',
source: 'hosting',
sourceContext: 'website',
metadata: {
associatedOrderExpiryDate: 'string',
associatedOrderPlanType: 'string',
cpanelHostName: 'string',
cpanelUserName: 'string',
paymentMethod: 'string',
autoRenew: 'string'
}
}
}
}
try {
const { data } = await axios.request(options)
console.log(data)
} catch (error) {
console.error(error)
}import { ofetch } from 'ofetch'
ofetch('https://bll.titan.email/partner/notify', {
method: 'POST',
headers: {
Authorization: 'API.Key',
'Content-Type': 'application/json'
},
body: {
event: 'MAIL_ORDER_PURCHASED',
data: {
orderId: '12431',
customerId: 'abcd123',
customerName: 'Adam',
customerEmailAddress: 'adam@gmail.com',
customerCountry: 'US',
alternateEmailAddress: 'abc@xyz.com',
planType: 'pro',
noOfAccounts: 10,
expiryDate: '2022-02-20',
paymentTxnId: 'qweradsf',
chargedAmount: 1.1,
currency: 'USD',
chargedUSDAmount: 1.1,
discountAmount: 0.1,
taxAmount: 0.1,
billingCycle: 'monthly',
locale: 'en-gb',
source: 'hosting',
sourceContext: 'website',
metadata: {
associatedOrderExpiryDate: 'string',
associatedOrderPlanType: 'string',
cpanelHostName: 'string',
cpanelUserName: 'string',
paymentMethod: 'string',
autoRenew: 'string'
}
}
}
})$.ajax({
url: "https://bll.titan.email/partner/notify",
method: "POST",
processData: false,
contentType: false,
beforeSend(xhr) {
xhr.setRequestHeader("Authorization", "API.Key");
xhr.setRequestHeader("Content-Type", "application/json");
},
data: "{\"event\":\"MAIL_ORDER_PURCHASED\",\"data\":{\"orderId\":\"12431\",\"customerId\":\"abcd123\",\"customerName\":\"Adam\",\"customerEmailAddress\":\"adam@gmail.com\",\"customerCountry\":\"US\",\"alternateEmailAddress\":\"abc@xyz.com\",\"planType\":\"pro\",\"noOfAccounts\":10,\"expiryDate\":\"2022-02-20\",\"paymentTxnId\":\"qweradsf\",\"chargedAmount\":1.1,\"currency\":\"USD\",\"chargedUSDAmount\":1.1,\"discountAmount\":0.1,\"taxAmount\":0.1,\"billingCycle\":\"monthly\",\"locale\":\"en-gb\",\"source\":\"hosting\",\"sourceContext\":\"website\",\"metadata\":{\"associatedOrderExpiryDate\":\"string\",\"associatedOrderPlanType\":\"string\",\"cpanelHostName\":\"string\",\"cpanelUserName\":\"string\",\"paymentMethod\":\"string\",\"autoRenew\":\"string\"}}}"
}).done((response) => console.log(response));const xhr = new XMLHttpRequest();
xhr.open("POST", "https://bll.titan.email/partner/notify");
xhr.withCredentials = true;
xhr.setRequestHeader("Authorization", "API.Key");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.addEventListener("load", () => console.log(xhr.responseText));
xhr.send("{\"event\":\"MAIL_ORDER_PURCHASED\",\"data\":{\"orderId\":\"12431\",\"customerId\":\"abcd123\",\"customerName\":\"Adam\",\"customerEmailAddress\":\"adam@gmail.com\",\"customerCountry\":\"US\",\"alternateEmailAddress\":\"abc@xyz.com\",\"planType\":\"pro\",\"noOfAccounts\":10,\"expiryDate\":\"2022-02-20\",\"paymentTxnId\":\"qweradsf\",\"chargedAmount\":1.1,\"currency\":\"USD\",\"chargedUSDAmount\":1.1,\"discountAmount\":0.1,\"taxAmount\":0.1,\"billingCycle\":\"monthly\",\"locale\":\"en-gb\",\"source\":\"hosting\",\"sourceContext\":\"website\",\"metadata\":{\"associatedOrderExpiryDate\":\"string\",\"associatedOrderPlanType\":\"string\",\"cpanelHostName\":\"string\",\"cpanelUserName\":\"string\",\"paymentMethod\":\"string\",\"autoRenew\":\"string\"}}}");using HTTP
using JSON
response = HTTP.post(
"https://bll.titan.email/partner/notify",
[
"Authorization" => "API.Key",
"Content-Type" => "application/json"
],
JSON.json(Dict(
"event" => "MAIL_ORDER_PURCHASED",
"data" => Dict(
"orderId" => "12431",
"customerId" => "abcd123",
"customerName" => "Adam",
"customerEmailAddress" => "adam@gmail.com",
"customerCountry" => "US",
"alternateEmailAddress" => "abc@xyz.com",
"planType" => "pro",
"noOfAccounts" => 10,
"expiryDate" => "2022-02-20",
"paymentTxnId" => "qweradsf",
"chargedAmount" => 1.1,
"currency" => "USD",
"chargedUSDAmount" => 1.1,
"discountAmount" => 0.1,
"taxAmount" => 0.1,
"billingCycle" => "monthly",
"locale" => "en-gb",
"source" => "hosting",
"sourceContext" => "website",
"metadata" => Dict(
"associatedOrderExpiryDate" => "string",
"associatedOrderPlanType" => "string",
"cpanelHostName" => "string",
"cpanelUserName" => "string",
"paymentMethod" => "string",
"autoRenew" => "string"
)
)
))
)
println(String(response.body))val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\"event\":\"MAIL_ORDER_PURCHASED\",\"data\":{\"orderId\":\"12431\",\"customerId\":\"abcd123\",\"customerName\":\"Adam\",\"customerEmailAddress\":\"adam@gmail.com\",\"customerCountry\":\"US\",\"alternateEmailAddress\":\"abc@xyz.com\",\"planType\":\"pro\",\"noOfAccounts\":10,\"expiryDate\":\"2022-02-20\",\"paymentTxnId\":\"qweradsf\",\"chargedAmount\":1.1,\"currency\":\"USD\",\"chargedUSDAmount\":1.1,\"discountAmount\":0.1,\"taxAmount\":0.1,\"billingCycle\":\"monthly\",\"locale\":\"en-gb\",\"source\":\"hosting\",\"sourceContext\":\"website\",\"metadata\":{\"associatedOrderExpiryDate\":\"string\",\"associatedOrderPlanType\":\"string\",\"cpanelHostName\":\"string\",\"cpanelUserName\":\"string\",\"paymentMethod\":\"string\",\"autoRenew\":\"string\"}}}")
val request = Request.Builder()
.url("https://bll.titan.email/partner/notify")
.post(body)
.addHeader("Authorization", "API.Key")
.addHeader("Content-Type", "application/json")
.build()
val response = client.newCall(request).execute()fetch('https://bll.titan.email/partner/notify', {
method: 'POST',
headers: {
Authorization: 'API.Key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
event: 'MAIL_ORDER_PURCHASED',
data: {
orderId: '12431',
customerId: 'abcd123',
customerName: 'Adam',
customerEmailAddress: 'adam@gmail.com',
customerCountry: 'US',
alternateEmailAddress: 'abc@xyz.com',
planType: 'pro',
noOfAccounts: 10,
expiryDate: '2022-02-20',
paymentTxnId: 'qweradsf',
chargedAmount: 1.1,
currency: 'USD',
chargedUSDAmount: 1.1,
discountAmount: 0.1,
taxAmount: 0.1,
billingCycle: 'monthly',
locale: 'en-gb',
source: 'hosting',
sourceContext: 'website',
metadata: {
associatedOrderExpiryDate: 'string',
associatedOrderPlanType: 'string',
cpanelHostName: 'string',
cpanelUserName: 'string',
paymentMethod: 'string',
autoRenew: 'string'
}
}
})
})import axios from 'axios'
const options = {
method: 'POST',
url: 'https://bll.titan.email/partner/notify',
headers: {
Authorization: 'API.Key',
'Content-Type': 'application/json'
},
data: {
event: 'MAIL_ORDER_PURCHASED',
data: {
orderId: '12431',
customerId: 'abcd123',
customerName: 'Adam',
customerEmailAddress: 'adam@gmail.com',
customerCountry: 'US',
alternateEmailAddress: 'abc@xyz.com',
planType: 'pro',
noOfAccounts: 10,
expiryDate: '2022-02-20',
paymentTxnId: 'qweradsf',
chargedAmount: 1.1,
currency: 'USD',
chargedUSDAmount: 1.1,
discountAmount: 0.1,
taxAmount: 0.1,
billingCycle: 'monthly',
locale: 'en-gb',
source: 'hosting',
sourceContext: 'website',
metadata: {
associatedOrderExpiryDate: 'string',
associatedOrderPlanType: 'string',
cpanelHostName: 'string',
cpanelUserName: 'string',
paymentMethod: 'string',
autoRenew: 'string'
}
}
}
}
try {
const { data } = await axios.request(options)
console.log(data)
} catch (error) {
console.error(error)
}import { ofetch } from 'ofetch'
ofetch('https://bll.titan.email/partner/notify', {
method: 'POST',
headers: {
Authorization: 'API.Key',
'Content-Type': 'application/json'
},
body: {
event: 'MAIL_ORDER_PURCHASED',
data: {
orderId: '12431',
customerId: 'abcd123',
customerName: 'Adam',
customerEmailAddress: 'adam@gmail.com',
customerCountry: 'US',
alternateEmailAddress: 'abc@xyz.com',
planType: 'pro',
noOfAccounts: 10,
expiryDate: '2022-02-20',
paymentTxnId: 'qweradsf',
chargedAmount: 1.1,
currency: 'USD',
chargedUSDAmount: 1.1,
discountAmount: 0.1,
taxAmount: 0.1,
billingCycle: 'monthly',
locale: 'en-gb',
source: 'hosting',
sourceContext: 'website',
metadata: {
associatedOrderExpiryDate: 'string',
associatedOrderPlanType: 'string',
cpanelHostName: 'string',
cpanelUserName: 'string',
paymentMethod: 'string',
autoRenew: 'string'
}
}
}
})import { request } from 'undici'
const { statusCode, body } = await request('https://bll.titan.email/partner/notify', {
method: 'POST',
headers: {
Authorization: 'API.Key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
event: 'MAIL_ORDER_PURCHASED',
data: {
orderId: '12431',
customerId: 'abcd123',
customerName: 'Adam',
customerEmailAddress: 'adam@gmail.com',
customerCountry: 'US',
alternateEmailAddress: 'abc@xyz.com',
planType: 'pro',
noOfAccounts: 10,
expiryDate: '2022-02-20',
paymentTxnId: 'qweradsf',
chargedAmount: 1.1,
currency: 'USD',
chargedUSDAmount: 1.1,
discountAmount: 0.1,
taxAmount: 0.1,
billingCycle: 'monthly',
locale: 'en-gb',
source: 'hosting',
sourceContext: 'website',
metadata: {
associatedOrderExpiryDate: 'string',
associatedOrderPlanType: 'string',
cpanelHostName: 'string',
cpanelUserName: 'string',
paymentMethod: 'string',
autoRenew: 'string'
}
}
})
})#import <Foundation/Foundation.h>
NSDictionary *headers = @{ @"Authorization": @"API.Key",
@"Content-Type": @"application/json" };
NSDictionary *parameters = @{ @"event": @"MAIL_ORDER_PURCHASED",
@"data": @{ @"orderId": @"12431", @"customerId": @"abcd123", @"customerName": @"Adam", @"customerEmailAddress": @"adam@gmail.com", @"customerCountry": @"US", @"alternateEmailAddress": @"abc@xyz.com", @"planType": @"pro", @"noOfAccounts": @10, @"expiryDate": @"2022-02-20", @"paymentTxnId": @"qweradsf", @"chargedAmount": @1.1, @"currency": @"USD", @"chargedUSDAmount": @1.1, @"discountAmount": @0.1, @"taxAmount": @0.1, @"billingCycle": @"monthly", @"locale": @"en-gb", @"source": @"hosting", @"sourceContext": @"website", @"metadata": @{ @"associatedOrderExpiryDate": @"string", @"associatedOrderPlanType": @"string", @"cpanelHostName": @"string", @"cpanelUserName": @"string", @"paymentMethod": @"string", @"autoRenew": @"string" } } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://bll.titan.email/partner/notify"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];open Lwt.Infix
let () =
Lwt_main.run (
let uri = Uri.of_string "https://bll.titan.email/partner/notify" in
let headers = Cohttp.Header.of_list [
("Authorization", "API.Key");
("Content-Type", "application/json");
] in
let part0 = "{\"event\":\"MAIL_ORDER_PURCHASED\",\"data\":{\"orderId\":\"12431\",\"customerId\":\"abcd123\",\"customerName\":\"Adam\",\"customerEmailAddress\":\"adam@gmail.com\",\"customerCountry\":\"US\",\"alternateEmailAddress\":\"abc@xyz.com\",\"planType\":\"pro\",\"noOfAccounts\":10,\"expiryDate\":\"2022-02-20\",\"paymentTxnId\":\"qweradsf\",\"chargedAmount\":1.1,\"currency\":\"USD\",\"chargedUSDAmount\":1.1,\"discountAmount\":0.1,\"taxAmount\":0.1,\"billingCycle\":\"monthly\",\"locale\":\"en-gb\",\"source\":\"hosting\",\"sourceContext\":\"website\",\"metadata\":{\"associatedOrderExpiryDate\":\"string\",\"associatedOrderPlanType\":\"string\",\"cpanelHostName\":\"string\",\"cpanelUserName\":\"string\",\"paymentMethod\":\"string\",\"autoRenew\":\"string\"}}}" in
let body = Cohttp_lwt.Body.of_string (String.concat "" [part0]) in
Cohttp_lwt_unix.Client.call ~headers ~body (Cohttp.Code.method_of_string "POST") uri
>>= fun (_response, body) ->
Cohttp_lwt.Body.to_string body >>= Lwt_io.printl
)$ch = curl_init("https://bll.titan.email/partner/notify");
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: API.Key', 'Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
'event' => 'MAIL_ORDER_PURCHASED',
'data' => [
'orderId' => '12431',
'customerId' => 'abcd123',
'customerName' => 'Adam',
'customerEmailAddress' => 'adam@gmail.com',
'customerCountry' => 'US',
'alternateEmailAddress' => 'abc@xyz.com',
'planType' => 'pro',
'noOfAccounts' => 10,
'expiryDate' => '2022-02-20',
'paymentTxnId' => 'qweradsf',
'chargedAmount' => 1.1,
'currency' => 'USD',
'chargedUSDAmount' => 1.1,
'discountAmount' => 0.1,
'taxAmount' => 0.1,
'billingCycle' => 'monthly',
'locale' => 'en-gb',
'source' => 'hosting',
'sourceContext' => 'website',
'metadata' => [
'associatedOrderExpiryDate' => 'string',
'associatedOrderPlanType' => 'string',
'cpanelHostName' => 'string',
'cpanelUserName' => 'string',
'paymentMethod' => 'string',
'autoRenew' => 'string'
]
]
]));
curl_exec($ch);
curl_close($ch);$client = new GuzzleHttp\Client();
$response = $client->request('POST', 'https://bll.titan.email/partner/notify', [
'headers' => [
'Authorization' => 'API.Key',
'Content-Type' => 'application/json'
],
'json' => [
'event' => 'MAIL_ORDER_PURCHASED',
'data' => [
'orderId' => '12431',
'customerId' => 'abcd123',
'customerName' => 'Adam',
'customerEmailAddress' => 'adam@gmail.com',
'customerCountry' => 'US',
'alternateEmailAddress' => 'abc@xyz.com',
'planType' => 'pro',
'noOfAccounts' => 10,
'expiryDate' => '2022-02-20',
'paymentTxnId' => 'qweradsf',
'chargedAmount' => 1.1,
'currency' => 'USD',
'chargedUSDAmount' => 1.1,
'discountAmount' => 0.1,
'taxAmount' => 0.1,
'billingCycle' => 'monthly',
'locale' => 'en-gb',
'source' => 'hosting',
'sourceContext' => 'website',
'metadata' => [
'associatedOrderExpiryDate' => 'string',
'associatedOrderPlanType' => 'string',
'cpanelHostName' => 'string',
'cpanelUserName' => 'string',
'paymentMethod' => 'string',
'autoRenew' => 'string'
]
]
]
]);use Illuminate\Support\Facades\Http;
$response = Http::withHeaders([
'Authorization' => 'API.Key',
'Content-Type' => 'application/json'
])
->post('https://bll.titan.email/partner/notify', [
'event' => 'MAIL_ORDER_PURCHASED',
'data' => [
'orderId' => '12431',
'customerId' => 'abcd123',
'customerName' => 'Adam',
'customerEmailAddress' => 'adam@gmail.com',
'customerCountry' => 'US',
'alternateEmailAddress' => 'abc@xyz.com',
'planType' => 'pro',
'noOfAccounts' => 10,
'expiryDate' => '2022-02-20',
'paymentTxnId' => 'qweradsf',
'chargedAmount' => 1.1,
'currency' => 'USD',
'chargedUSDAmount' => 1.1,
'discountAmount' => 0.1,
'taxAmount' => 0.1,
'billingCycle' => 'monthly',
'locale' => 'en-gb',
'source' => 'hosting',
'sourceContext' => 'website',
'metadata' => [
'associatedOrderExpiryDate' => 'string',
'associatedOrderPlanType' => 'string',
'cpanelHostName' => 'string',
'cpanelUserName' => 'string',
'paymentMethod' => 'string',
'autoRenew' => 'string'
]
]
]);$headers = @{
'Authorization' = 'API.Key'
'Content-Type' = 'application/json'
}
$body = [System.IO.MemoryStream]::new()
$bytes = [System.Text.Encoding]::UTF8.GetBytes('{"event":"MAIL_ORDER_PURCHASED","data":{"orderId":"12431","customerId":"abcd123","customerName":"Adam","customerEmailAddress":"adam@gmail.com","customerCountry":"US","alternateEmailAddress":"abc@xyz.com","planType":"pro","noOfAccounts":10,"expiryDate":"2022-02-20","paymentTxnId":"qweradsf","chargedAmount":1.1,"currency":"USD","chargedUSDAmount":1.1,"discountAmount":0.1,"taxAmount":0.1,"billingCycle":"monthly","locale":"en-gb","source":"hosting","sourceContext":"website","metadata":{"associatedOrderExpiryDate":"string","associatedOrderPlanType":"string","cpanelHostName":"string","cpanelUserName":"string","paymentMethod":"string","autoRenew":"string"}}}')
$body.Write($bytes, 0, $bytes.Length)
$response = Invoke-WebRequest -Uri 'https://bll.titan.email/partner/notify' -Method 'POST' -Headers $headers -Body $body.ToArray()
$body.Dispose()
$response$headers = @{
'Authorization' = 'API.Key'
'Content-Type' = 'application/json'
}
$body = [System.IO.MemoryStream]::new()
$bytes = [System.Text.Encoding]::UTF8.GetBytes('{"event":"MAIL_ORDER_PURCHASED","data":{"orderId":"12431","customerId":"abcd123","customerName":"Adam","customerEmailAddress":"adam@gmail.com","customerCountry":"US","alternateEmailAddress":"abc@xyz.com","planType":"pro","noOfAccounts":10,"expiryDate":"2022-02-20","paymentTxnId":"qweradsf","chargedAmount":1.1,"currency":"USD","chargedUSDAmount":1.1,"discountAmount":0.1,"taxAmount":0.1,"billingCycle":"monthly","locale":"en-gb","source":"hosting","sourceContext":"website","metadata":{"associatedOrderExpiryDate":"string","associatedOrderPlanType":"string","cpanelHostName":"string","cpanelUserName":"string","paymentMethod":"string","autoRenew":"string"}}}')
$body.Write($bytes, 0, $bytes.Length)
$response = Invoke-RestMethod -Uri 'https://bll.titan.email/partner/notify' -Method 'POST' -Headers $headers -Body $body.ToArray()
$body.Dispose()
$responseimport http.client
import json
conn = http.client.HTTPSConnection("bll.titan.email")
payload = json.dumps({
"event": "MAIL_ORDER_PURCHASED",
"data": {
"orderId": "12431",
"customerId": "abcd123",
"customerName": "Adam",
"customerEmailAddress": "adam@gmail.com",
"customerCountry": "US",
"alternateEmailAddress": "abc@xyz.com",
"planType": "pro",
"noOfAccounts": 10,
"expiryDate": "2022-02-20",
"paymentTxnId": "qweradsf",
"chargedAmount": 1.1,
"currency": "USD",
"chargedUSDAmount": 1.1,
"discountAmount": 0.1,
"taxAmount": 0.1,
"billingCycle": "monthly",
"locale": "en-gb",
"source": "hosting",
"sourceContext": "website",
"metadata": {
"associatedOrderExpiryDate": "string",
"associatedOrderPlanType": "string",
"cpanelHostName": "string",
"cpanelUserName": "string",
"paymentMethod": "string",
"autoRenew": "string"
}
}
})
headers = {
"Authorization": "API.Key",
"Content-Type": "application/json"
}
conn.request(
"POST",
"/partner/notify",
body=payload,
headers=headers,
)
response = conn.getresponse()
print(response.read().decode())
conn.close()import http.client
import json
conn = http.client.HTTPSConnection("api-euc1.titan.email")
payload = json.dumps({
"event": "MAIL_ORDER_PURCHASED",
"data": {
"orderId": "12431",
"customerId": "abcd123",
"customerName": "Adam",
"customerEmailAddress": "adam@gmail.com",
"customerCountry": "US",
"alternateEmailAddress": "abc@xyz.com",
"planType": "pro",
"noOfAccounts": 10,
"expiryDate": "2022-02-20",
"paymentTxnId": "qweradsf",
"chargedAmount": 1.1,
"currency": "USD",
"chargedUSDAmount": 1.1,
"discountAmount": 0.1,
"taxAmount": 0.1,
"billingCycle": "monthly",
"locale": "en-gb",
"source": "hosting",
"sourceContext": "website",
"metadata": {
"associatedOrderExpiryDate": "string",
"associatedOrderPlanType": "string",
"cpanelHostName": "string",
"cpanelUserName": "string",
"paymentMethod": "string",
"autoRenew": "string"
}
}
})
headers = {
"Authorization": "API.Key",
"Content-Type": "application/json"
}
conn.request(
"POST",
"/bll/partner/notify",
body=payload,
headers=headers,
)
response = conn.getresponse()
print(response.read().decode())
conn.close()requests.post("https://bll.titan.email/partner/notify",
headers={
"Authorization": "API.Key",
"Content-Type": "application/json"
},
json={
"event": "MAIL_ORDER_PURCHASED",
"data": {
"orderId": "12431",
"customerId": "abcd123",
"customerName": "Adam",
"customerEmailAddress": "adam@gmail.com",
"customerCountry": "US",
"alternateEmailAddress": "abc@xyz.com",
"planType": "pro",
"noOfAccounts": 10,
"expiryDate": "2022-02-20",
"paymentTxnId": "qweradsf",
"chargedAmount": 1.1,
"currency": "USD",
"chargedUSDAmount": 1.1,
"discountAmount": 0.1,
"taxAmount": 0.1,
"billingCycle": "monthly",
"locale": "en-gb",
"source": "hosting",
"sourceContext": "website",
"metadata": {
"associatedOrderExpiryDate": "string",
"associatedOrderPlanType": "string",
"cpanelHostName": "string",
"cpanelUserName": "string",
"paymentMethod": "string",
"autoRenew": "string"
}
}
}
)async with aiohttp.ClientSession() as session:
await session.post("https://bll.titan.email/partner/notify",
headers={
"Authorization": "API.Key",
"Content-Type": "application/json"
},
json={
"event": "MAIL_ORDER_PURCHASED",
"data": {
"orderId": "12431",
"customerId": "abcd123",
"customerName": "Adam",
"customerEmailAddress": "adam@gmail.com",
"customerCountry": "US",
"alternateEmailAddress": "abc@xyz.com",
"planType": "pro",
"noOfAccounts": 10,
"expiryDate": "2022-02-20",
"paymentTxnId": "qweradsf",
"chargedAmount": 1.1,
"currency": "USD",
"chargedUSDAmount": 1.1,
"discountAmount": 0.1,
"taxAmount": 0.1,
"billingCycle": "monthly",
"locale": "en-gb",
"source": "hosting",
"sourceContext": "website",
"metadata": {
"associatedOrderExpiryDate": "string",
"associatedOrderPlanType": "string",
"cpanelHostName": "string",
"cpanelUserName": "string",
"paymentMethod": "string",
"autoRenew": "string"
}
}
}
)httpx.post("https://bll.titan.email/partner/notify",
headers={
"Authorization": "API.Key",
"Content-Type": "application/json"
},
json={
"event": "MAIL_ORDER_PURCHASED",
"data": {
"orderId": "12431",
"customerId": "abcd123",
"customerName": "Adam",
"customerEmailAddress": "adam@gmail.com",
"customerCountry": "US",
"alternateEmailAddress": "abc@xyz.com",
"planType": "pro",
"noOfAccounts": 10,
"expiryDate": "2022-02-20",
"paymentTxnId": "qweradsf",
"chargedAmount": 1.1,
"currency": "USD",
"chargedUSDAmount": 1.1,
"discountAmount": 0.1,
"taxAmount": 0.1,
"billingCycle": "monthly",
"locale": "en-gb",
"source": "hosting",
"sourceContext": "website",
"metadata": {
"associatedOrderExpiryDate": "string",
"associatedOrderPlanType": "string",
"cpanelHostName": "string",
"cpanelUserName": "string",
"paymentMethod": "string",
"autoRenew": "string"
}
}
}
)async with httpx.AsyncClient() as client:
await client.post("https://bll.titan.email/partner/notify",
headers={
"Authorization": "API.Key",
"Content-Type": "application/json"
},
json={
"event": "MAIL_ORDER_PURCHASED",
"data": {
"orderId": "12431",
"customerId": "abcd123",
"customerName": "Adam",
"customerEmailAddress": "adam@gmail.com",
"customerCountry": "US",
"alternateEmailAddress": "abc@xyz.com",
"planType": "pro",
"noOfAccounts": 10,
"expiryDate": "2022-02-20",
"paymentTxnId": "qweradsf",
"chargedAmount": 1.1,
"currency": "USD",
"chargedUSDAmount": 1.1,
"discountAmount": 0.1,
"taxAmount": 0.1,
"billingCycle": "monthly",
"locale": "en-gb",
"source": "hosting",
"sourceContext": "website",
"metadata": {
"associatedOrderExpiryDate": "string",
"associatedOrderPlanType": "string",
"cpanelHostName": "string",
"cpanelUserName": "string",
"paymentMethod": "string",
"autoRenew": "string"
}
}
}
)library(httr2)
response <- request("https://bll.titan.email/partner/notify") |>
req_method("POST") |>
req_headers(
"Authorization" = "API.Key",
"Content-Type" = "application/json"
) |>
req_body_json(list(
event = "MAIL_ORDER_PURCHASED",
data = list(
orderId = "12431",
customerId = "abcd123",
customerName = "Adam",
customerEmailAddress = "adam@gmail.com",
customerCountry = "US",
alternateEmailAddress = "abc@xyz.com",
planType = "pro",
noOfAccounts = 10,
expiryDate = "2022-02-20",
paymentTxnId = "qweradsf",
chargedAmount = 1.1,
currency = "USD",
chargedUSDAmount = 1.1,
discountAmount = 0.1,
taxAmount = 0.1,
billingCycle = "monthly",
locale = "en-gb",
source = "hosting",
sourceContext = "website",
metadata = list(
associatedOrderExpiryDate = "string",
associatedOrderPlanType = "string",
cpanelHostName = "string",
cpanelUserName = "string",
paymentMethod = "string",
autoRenew = "string"
)
)
)) |>
req_perform()
resp_body_string(response)require 'uri'
require 'net/http'
url = URI("https://bll.titan.email/partner/notify")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'API.Key'
request["Content-Type"] = 'application/json'
request.body = <<~JSON
{
"event": "MAIL_ORDER_PURCHASED",
"data": {
"orderId": "12431",
"customerId": "abcd123",
"customerName": "Adam",
"customerEmailAddress": "adam@gmail.com",
"customerCountry": "US",
"alternateEmailAddress": "abc@xyz.com",
"planType": "pro",
"noOfAccounts": 10,
"expiryDate": "2022-02-20",
"paymentTxnId": "qweradsf",
"chargedAmount": 1.1,
"currency": "USD",
"chargedUSDAmount": 1.1,
"discountAmount": 0.1,
"taxAmount": 0.1,
"billingCycle": "monthly",
"locale": "en-gb",
"source": "hosting",
"sourceContext": "website",
"metadata": {
"associatedOrderExpiryDate": "string",
"associatedOrderPlanType": "string",
"cpanelHostName": "string",
"cpanelUserName": "string",
"paymentMethod": "string",
"autoRenew": "string"
}
}
}
JSON
response = http.request(request)
puts response.read_bodylet client = reqwest::Client::new();
let request = client
.post("https://bll.titan.email/partner/notify")
.header("Authorization", "API.Key")
.header("Content-Type", "application/json")
.json(&serde_json::json!({
"event": "MAIL_ORDER_PURCHASED",
"data": {
"orderId": "12431",
"customerId": "abcd123",
"customerName": "Adam",
"customerEmailAddress": "adam@gmail.com",
"customerCountry": "US",
"alternateEmailAddress": "abc@xyz.com",
"planType": "pro",
"noOfAccounts": 10,
"expiryDate": "2022-02-20",
"paymentTxnId": "qweradsf",
"chargedAmount": 1.1,
"currency": "USD",
"chargedUSDAmount": 1.1,
"discountAmount": 0.1,
"taxAmount": 0.1,
"billingCycle": "monthly",
"locale": "en-gb",
"source": "hosting",
"sourceContext": "website",
"metadata": {
"associatedOrderExpiryDate": "string",
"associatedOrderPlanType": "string",
"cpanelHostName": "string",
"cpanelUserName": "string",
"paymentMethod": "string",
"autoRenew": "string"
}
}
}));
let response = request.send().await?;curl https://bll.titan.email/partner/notify \
--request POST \
--header 'Authorization: API.Key' \
--header 'Content-Type: application/json' \
--data '{
"event": "MAIL_ORDER_PURCHASED",
"data": {
"orderId": "12431",
"customerId": "abcd123",
"customerName": "Adam",
"customerEmailAddress": "adam@gmail.com",
"customerCountry": "US",
"alternateEmailAddress": "abc@xyz.com",
"planType": "pro",
"noOfAccounts": 10,
"expiryDate": "2022-02-20",
"paymentTxnId": "qweradsf",
"chargedAmount": 1.1,
"currency": "USD",
"chargedUSDAmount": 1.1,
"discountAmount": 0.1,
"taxAmount": 0.1,
"billingCycle": "monthly",
"locale": "en-gb",
"source": "hosting",
"sourceContext": "website",
"metadata": {
"associatedOrderExpiryDate": "string",
"associatedOrderPlanType": "string",
"cpanelHostName": "string",
"cpanelUserName": "string",
"paymentMethod": "string",
"autoRenew": "string"
}
}
}'wget --quiet \
--method POST \
--header 'Authorization: API.Key' \
--header 'Content-Type: application/json' \
--body-data '{
"event": "MAIL_ORDER_PURCHASED",
"data": {
"orderId": "12431",
"customerId": "abcd123",
"customerName": "Adam",
"customerEmailAddress": "adam@gmail.com",
"customerCountry": "US",
"alternateEmailAddress": "abc@xyz.com",
"planType": "pro",
"noOfAccounts": 10,
"expiryDate": "2022-02-20",
"paymentTxnId": "qweradsf",
"chargedAmount": 1.1,
"currency": "USD",
"chargedUSDAmount": 1.1,
"discountAmount": 0.1,
"taxAmount": 0.1,
"billingCycle": "monthly",
"locale": "en-gb",
"source": "hosting",
"sourceContext": "website",
"metadata": {
"associatedOrderExpiryDate": "string",
"associatedOrderPlanType": "string",
"cpanelHostName": "string",
"cpanelUserName": "string",
"paymentMethod": "string",
"autoRenew": "string"
}
}
}' \
--output-document \
- https://bll.titan.email/partner/notifyhttp --ignore-stdin 'POST' 'https://bll.titan.email/partner/notify' \
'Authorization:API.Key' \
'Content-Type:application/json' \
--raw='{"event":"MAIL_ORDER_PURCHASED","data":{"orderId":"12431","customerId":"abcd123","customerName":"Adam","customerEmailAddress":"adam@gmail.com","customerCountry":"US","alternateEmailAddress":"abc@xyz.com","planType":"pro","noOfAccounts":10,"expiryDate":"2022-02-20","paymentTxnId":"qweradsf","chargedAmount":1.1,"currency":"USD","chargedUSDAmount":1.1,"discountAmount":0.1,"taxAmount":0.1,"billingCycle":"monthly","locale":"en-gb","source":"hosting","sourceContext":"website","metadata":{"associatedOrderExpiryDate":"string","associatedOrderPlanType":"string","cpanelHostName":"string","cpanelUserName":"string","paymentMethod":"string","autoRenew":"string"}}}'import Foundation
var request = URLRequest(url: URL(string: "https://bll.titan.email/partner/notify")!)
request.httpMethod = "POST"
request.setValue("API.Key", forHTTPHeaderField: "Authorization")
request.setValue("application/json", forHTTPHeaderField: "Content-Type")
let jsonBody = #"""
{
"event": "MAIL_ORDER_PURCHASED",
"data": {
"orderId": "12431",
"customerId": "abcd123",
"customerName": "Adam",
"customerEmailAddress": "adam@gmail.com",
"customerCountry": "US",
"alternateEmailAddress": "abc@xyz.com",
"planType": "pro",
"noOfAccounts": 10,
"expiryDate": "2022-02-20",
"paymentTxnId": "qweradsf",
"chargedAmount": 1.1,
"currency": "USD",
"chargedUSDAmount": 1.1,
"discountAmount": 0.1,
"taxAmount": 0.1,
"billingCycle": "monthly",
"locale": "en-gb",
"source": "hosting",
"sourceContext": "website",
"metadata": {
"associatedOrderExpiryDate": "string",
"associatedOrderPlanType": "string",
"cpanelHostName": "string",
"cpanelUserName": "string",
"paymentMethod": "string",
"autoRenew": "string"
}
}
}
"""#
request.httpBody = jsonBody.data(using: .utf8)
let (data, response) = try await URLSession.shared.data(for: request)
guard let httpResponse = response as? HTTPURLResponse,
200..<300 ~= httpResponse.statusCode else {
throw URLError(.badServerResponse)
}
print(String(data: data, encoding: .utf8) ?? "")#include <curl/curl.h>
int main(void) {
curl_global_init(CURL_GLOBAL_DEFAULT);
CURL *curl = curl_easy_init();
if (!curl) {
curl_global_cleanup();
return 1;
}
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(curl, CURLOPT_URL, "https://bll.titan.email/partner/notify");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Authorization: API.Key");
headers = curl_slist_append(headers, "Content-Type: application/json");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_POSTFIELDS,
"{\n"
" \"event\": \"MAIL_ORDER_SETUP_COMPLETED\",\n"
" \"data\": {\n"
" \"titanOrderId\": 0\n"
" }\n"
"}");
CURLcode res = curl_easy_perform(curl);
curl_easy_cleanup(curl);
curl_slist_free_all(headers);
curl_global_cleanup();
return (int)res;
}using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://bll.titan.email/partner/notify");
request.Headers.TryAddWithoutValidation("Authorization", "API.Key");
request.Content = new StringContent(
"""
{
"event": "MAIL_ORDER_SETUP_COMPLETED",
"data": {
"titanOrderId": 0
}
}
""",
System.Text.Encoding.UTF8, "application/json");
using var response = await client.SendAsync(request);var client = new RestClient("https://bll.titan.email/partner/notify");
var request = new RestRequest("", Method.Post);
request.AddHeader("Authorization", "API.Key");
request.AddHeader("Content-Type", "application/json");
request.AddStringBody("""
{
"event": "MAIL_ORDER_SETUP_COMPLETED",
"data": {
"titanOrderId": 0
}
}
""", ContentType.Json);
var response = await client.ExecuteAsync(request);(require '[clj-http.client :as client])
(client/post "https://bll.titan.email/partner/notify" {:headers {:Authorization "API.Key"}
:content-type :json
:form-params {:event "MAIL_ORDER_SETUP_COMPLETED"
:data {:titanOrderId 0}}})import 'package:http/http.dart' as http;
void main() async {
final headers = <String,String>{
'Authorization': 'API.Key',
'Content-Type': 'application/json',
};
final body = r'{"event":"MAIL_ORDER_SETUP_COMPLETED","data":{"titanOrderId":0}}';
final response = await http.post(Uri.parse('https://bll.titan.email/partner/notify'), headers: headers, body: body);
print(response.body);
}let httpRequestMessage = new HttpRequestMessage(
HttpMethod("POST"),
new Uri("https://bll.titan.email/partner/notify")
)
httpRequestMessage.Headers.Add("Authorization", "API.Key")
httpRequestMessage.Headers.Add("Content-Type", "application/json")
let content = new StringContent("""{
"event": "MAIL_ORDER_SETUP_COMPLETED",
"data": {
"titanOrderId": 0
}
}""", Encoding.UTF8, "application/json")
httpRequestMessage.Content <- content
let client = new HttpClient()
let! result = client.SendAsync(httpRequestMessage)
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
requestUrl := "https://bll.titan.email/partner/notify"
payload := strings.NewReader(`{
"event": "MAIL_ORDER_SETUP_COMPLETED",
"data": {
"titanOrderId": 0
}
}`)
req, _ := http.NewRequest("POST", requestUrl, payload)
req.Header.Add("Authorization", "API.Key")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}POST /partner/notify HTTP/1.1
Host: bll.titan.email
Authorization: API.Key
Content-Type: application/json
{"event":"MAIL_ORDER_SETUP_COMPLETED","data":{"titanOrderId":0}}POST /bll/partner/notify HTTP/1.1
Host: api-euc1.titan.email
Authorization: API.Key
Content-Type: application/json
{"event":"MAIL_ORDER_SETUP_COMPLETED","data":{"titanOrderId":0}}java.io.ByteArrayOutputStream body = new java.io.ByteArrayOutputStream();
body.write("{\"event\":\"MAIL_ORDER_SETUP_COMPLETED\",\"data\":{\"titanOrderId\":0}}".getBytes(java.nio.charset.StandardCharsets.UTF_8));
try (AsyncHttpClient client = new DefaultAsyncHttpClient()) {
Response response = client.prepare("POST", "https://bll.titan.email/partner/notify")
.addHeader("Authorization", "API.Key")
.addHeader("Content-Type", "application/json")
.setBody(body.toByteArray())
.execute()
.get();
System.out.println(response.getResponseBody());
}java.io.ByteArrayOutputStream body = new java.io.ByteArrayOutputStream();
body.write("{\"event\":\"MAIL_ORDER_SETUP_COMPLETED\",\"data\":{\"titanOrderId\":0}}".getBytes(java.nio.charset.StandardCharsets.UTF_8));
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(java.net.URI.create("https://bll.titan.email/partner/notify"))
.header("Authorization", "API.Key")
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofByteArray(body.toByteArray()))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());OkHttpClient client = new OkHttpClient();
RequestBody body = RequestBody.create(MediaType.parse("application/json"), "{\"event\":\"MAIL_ORDER_SETUP_COMPLETED\",\"data\":{\"titanOrderId\":0}}");
Request request = new Request.Builder()
.url("https://bll.titan.email/partner/notify")
.method("POST", body)
.addHeader("Authorization", "API.Key")
.addHeader("Content-Type", "application/json")
.build();
try (Response response = client.newCall(request).execute()) {
System.out.println(response.body().string());
}java.io.ByteArrayOutputStream body = new java.io.ByteArrayOutputStream();
body.write("{\"event\":\"MAIL_ORDER_SETUP_COMPLETED\",\"data\":{\"titanOrderId\":0}}".getBytes(java.nio.charset.StandardCharsets.UTF_8));
HttpResponse<String> response = Unirest.request("POST", "https://bll.titan.email/partner/notify")
.header("Authorization", "API.Key")
.header("Content-Type", "application/json")
.body(body.toByteArray())
.asString();
System.out.println(response.getBody());fetch('https://bll.titan.email/partner/notify', {
method: 'POST',
headers: {
Authorization: 'API.Key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
event: 'MAIL_ORDER_SETUP_COMPLETED',
data: {
titanOrderId: 0
}
})
})import axios from 'axios'
const options = {
method: 'POST',
url: 'https://bll.titan.email/partner/notify',
headers: {
Authorization: 'API.Key',
'Content-Type': 'application/json'
},
data: {
event: 'MAIL_ORDER_SETUP_COMPLETED',
data: {
titanOrderId: 0
}
}
}
try {
const { data } = await axios.request(options)
console.log(data)
} catch (error) {
console.error(error)
}import { ofetch } from 'ofetch'
ofetch('https://bll.titan.email/partner/notify', {
method: 'POST',
headers: {
Authorization: 'API.Key',
'Content-Type': 'application/json'
},
body: {
event: 'MAIL_ORDER_SETUP_COMPLETED',
data: {
titanOrderId: 0
}
}
})$.ajax({
url: "https://bll.titan.email/partner/notify",
method: "POST",
processData: false,
contentType: false,
beforeSend(xhr) {
xhr.setRequestHeader("Authorization", "API.Key");
xhr.setRequestHeader("Content-Type", "application/json");
},
data: "{\"event\":\"MAIL_ORDER_SETUP_COMPLETED\",\"data\":{\"titanOrderId\":0}}"
}).done((response) => console.log(response));const xhr = new XMLHttpRequest();
xhr.open("POST", "https://bll.titan.email/partner/notify");
xhr.withCredentials = true;
xhr.setRequestHeader("Authorization", "API.Key");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.addEventListener("load", () => console.log(xhr.responseText));
xhr.send("{\"event\":\"MAIL_ORDER_SETUP_COMPLETED\",\"data\":{\"titanOrderId\":0}}");using HTTP
using JSON
response = HTTP.post(
"https://bll.titan.email/partner/notify",
[
"Authorization" => "API.Key",
"Content-Type" => "application/json"
],
JSON.json(Dict(
"event" => "MAIL_ORDER_SETUP_COMPLETED",
"data" => Dict("titanOrderId" => 0)
))
)
println(String(response.body))val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\"event\":\"MAIL_ORDER_SETUP_COMPLETED\",\"data\":{\"titanOrderId\":0}}")
val request = Request.Builder()
.url("https://bll.titan.email/partner/notify")
.post(body)
.addHeader("Authorization", "API.Key")
.addHeader("Content-Type", "application/json")
.build()
val response = client.newCall(request).execute()fetch('https://bll.titan.email/partner/notify', {
method: 'POST',
headers: {
Authorization: 'API.Key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
event: 'MAIL_ORDER_SETUP_COMPLETED',
data: {
titanOrderId: 0
}
})
})import axios from 'axios'
const options = {
method: 'POST',
url: 'https://bll.titan.email/partner/notify',
headers: {
Authorization: 'API.Key',
'Content-Type': 'application/json'
},
data: {
event: 'MAIL_ORDER_SETUP_COMPLETED',
data: {
titanOrderId: 0
}
}
}
try {
const { data } = await axios.request(options)
console.log(data)
} catch (error) {
console.error(error)
}import { ofetch } from 'ofetch'
ofetch('https://bll.titan.email/partner/notify', {
method: 'POST',
headers: {
Authorization: 'API.Key',
'Content-Type': 'application/json'
},
body: {
event: 'MAIL_ORDER_SETUP_COMPLETED',
data: {
titanOrderId: 0
}
}
})import { request } from 'undici'
const { statusCode, body } = await request('https://bll.titan.email/partner/notify', {
method: 'POST',
headers: {
Authorization: 'API.Key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
event: 'MAIL_ORDER_SETUP_COMPLETED',
data: {
titanOrderId: 0
}
})
})#import <Foundation/Foundation.h>
NSDictionary *headers = @{ @"Authorization": @"API.Key",
@"Content-Type": @"application/json" };
NSDictionary *parameters = @{ @"event": @"MAIL_ORDER_SETUP_COMPLETED",
@"data": @{ @"titanOrderId": @0 } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://bll.titan.email/partner/notify"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];open Lwt.Infix
let () =
Lwt_main.run (
let uri = Uri.of_string "https://bll.titan.email/partner/notify" in
let headers = Cohttp.Header.of_list [
("Authorization", "API.Key");
("Content-Type", "application/json");
] in
let part0 = "{\"event\":\"MAIL_ORDER_SETUP_COMPLETED\",\"data\":{\"titanOrderId\":0}}" in
let body = Cohttp_lwt.Body.of_string (String.concat "" [part0]) in
Cohttp_lwt_unix.Client.call ~headers ~body (Cohttp.Code.method_of_string "POST") uri
>>= fun (_response, body) ->
Cohttp_lwt.Body.to_string body >>= Lwt_io.printl
)$ch = curl_init("https://bll.titan.email/partner/notify");
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: API.Key', 'Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
'event' => 'MAIL_ORDER_SETUP_COMPLETED',
'data' => [
'titanOrderId' => 0
]
]));
curl_exec($ch);
curl_close($ch);$client = new GuzzleHttp\Client();
$response = $client->request('POST', 'https://bll.titan.email/partner/notify', [
'headers' => [
'Authorization' => 'API.Key',
'Content-Type' => 'application/json'
],
'json' => [
'event' => 'MAIL_ORDER_SETUP_COMPLETED',
'data' => [
'titanOrderId' => 0
]
]
]);use Illuminate\Support\Facades\Http;
$response = Http::withHeaders([
'Authorization' => 'API.Key',
'Content-Type' => 'application/json'
])
->post('https://bll.titan.email/partner/notify', [
'event' => 'MAIL_ORDER_SETUP_COMPLETED',
'data' => [
'titanOrderId' => 0
]
]);$headers = @{
'Authorization' = 'API.Key'
'Content-Type' = 'application/json'
}
$body = [System.IO.MemoryStream]::new()
$bytes = [System.Text.Encoding]::UTF8.GetBytes('{"event":"MAIL_ORDER_SETUP_COMPLETED","data":{"titanOrderId":0}}')
$body.Write($bytes, 0, $bytes.Length)
$response = Invoke-WebRequest -Uri 'https://bll.titan.email/partner/notify' -Method 'POST' -Headers $headers -Body $body.ToArray()
$body.Dispose()
$response$headers = @{
'Authorization' = 'API.Key'
'Content-Type' = 'application/json'
}
$body = [System.IO.MemoryStream]::new()
$bytes = [System.Text.Encoding]::UTF8.GetBytes('{"event":"MAIL_ORDER_SETUP_COMPLETED","data":{"titanOrderId":0}}')
$body.Write($bytes, 0, $bytes.Length)
$response = Invoke-RestMethod -Uri 'https://bll.titan.email/partner/notify' -Method 'POST' -Headers $headers -Body $body.ToArray()
$body.Dispose()
$responseimport http.client
import json
conn = http.client.HTTPSConnection("bll.titan.email")
payload = json.dumps({
"event": "MAIL_ORDER_SETUP_COMPLETED",
"data": {
"titanOrderId": 0
}
})
headers = {
"Authorization": "API.Key",
"Content-Type": "application/json"
}
conn.request(
"POST",
"/partner/notify",
body=payload,
headers=headers,
)
response = conn.getresponse()
print(response.read().decode())
conn.close()import http.client
import json
conn = http.client.HTTPSConnection("api-euc1.titan.email")
payload = json.dumps({
"event": "MAIL_ORDER_SETUP_COMPLETED",
"data": {
"titanOrderId": 0
}
})
headers = {
"Authorization": "API.Key",
"Content-Type": "application/json"
}
conn.request(
"POST",
"/bll/partner/notify",
body=payload,
headers=headers,
)
response = conn.getresponse()
print(response.read().decode())
conn.close()requests.post("https://bll.titan.email/partner/notify",
headers={
"Authorization": "API.Key",
"Content-Type": "application/json"
},
json={
"event": "MAIL_ORDER_SETUP_COMPLETED",
"data": {
"titanOrderId": 0
}
}
)async with aiohttp.ClientSession() as session:
await session.post("https://bll.titan.email/partner/notify",
headers={
"Authorization": "API.Key",
"Content-Type": "application/json"
},
json={
"event": "MAIL_ORDER_SETUP_COMPLETED",
"data": {
"titanOrderId": 0
}
}
)httpx.post("https://bll.titan.email/partner/notify",
headers={
"Authorization": "API.Key",
"Content-Type": "application/json"
},
json={
"event": "MAIL_ORDER_SETUP_COMPLETED",
"data": {
"titanOrderId": 0
}
}
)async with httpx.AsyncClient() as client:
await client.post("https://bll.titan.email/partner/notify",
headers={
"Authorization": "API.Key",
"Content-Type": "application/json"
},
json={
"event": "MAIL_ORDER_SETUP_COMPLETED",
"data": {
"titanOrderId": 0
}
}
)library(httr2)
response <- request("https://bll.titan.email/partner/notify") |>
req_method("POST") |>
req_headers(
"Authorization" = "API.Key",
"Content-Type" = "application/json"
) |>
req_body_json(list(
event = "MAIL_ORDER_SETUP_COMPLETED",
data = list(
titanOrderId = 0
)
)) |>
req_perform()
resp_body_string(response)require 'uri'
require 'net/http'
url = URI("https://bll.titan.email/partner/notify")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'API.Key'
request["Content-Type"] = 'application/json'
request.body = <<~JSON
{
"event": "MAIL_ORDER_SETUP_COMPLETED",
"data": {
"titanOrderId": 0
}
}
JSON
response = http.request(request)
puts response.read_bodylet client = reqwest::Client::new();
let request = client
.post("https://bll.titan.email/partner/notify")
.header("Authorization", "API.Key")
.header("Content-Type", "application/json")
.json(&serde_json::json!({
"event": "MAIL_ORDER_SETUP_COMPLETED",
"data": {
"titanOrderId": 0
}
}));
let response = request.send().await?;curl https://bll.titan.email/partner/notify \
--request POST \
--header 'Authorization: API.Key' \
--header 'Content-Type: application/json' \
--data '{
"event": "MAIL_ORDER_SETUP_COMPLETED",
"data": {
"titanOrderId": 0
}
}'wget --quiet \
--method POST \
--header 'Authorization: API.Key' \
--header 'Content-Type: application/json' \
--body-data '{
"event": "MAIL_ORDER_SETUP_COMPLETED",
"data": {
"titanOrderId": 0
}
}' \
--output-document \
- https://bll.titan.email/partner/notifyhttp --ignore-stdin 'POST' 'https://bll.titan.email/partner/notify' \
'Authorization:API.Key' \
'Content-Type:application/json' \
--raw='{"event":"MAIL_ORDER_SETUP_COMPLETED","data":{"titanOrderId":0}}'import Foundation
var request = URLRequest(url: URL(string: "https://bll.titan.email/partner/notify")!)
request.httpMethod = "POST"
request.setValue("API.Key", forHTTPHeaderField: "Authorization")
request.setValue("application/json", forHTTPHeaderField: "Content-Type")
let jsonBody = #"""
{
"event": "MAIL_ORDER_SETUP_COMPLETED",
"data": {
"titanOrderId": 0
}
}
"""#
request.httpBody = jsonBody.data(using: .utf8)
let (data, response) = try await URLSession.shared.data(for: request)
guard let httpResponse = response as? HTTPURLResponse,
200..<300 ~= httpResponse.statusCode else {
throw URLError(.badServerResponse)
}
print(String(data: data, encoding: .utf8) ?? "")#include <curl/curl.h>
int main(void) {
curl_global_init(CURL_GLOBAL_DEFAULT);
CURL *curl = curl_easy_init();
if (!curl) {
curl_global_cleanup();
return 1;
}
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(curl, CURLOPT_URL, "https://bll.titan.email/partner/notify");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Authorization: API.Key");
headers = curl_slist_append(headers, "Content-Type: application/json");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_POSTFIELDS,
"{\n"
" \"event\": \"PAYMENT_DATA_BULK\",\n"
" \"data\": [\n"
" {\n"
" \"orderId\": \"string\",\n"
" \"titanOrderId\": 0,\n"
" \"paymentTxnId\": \"string\",\n"
" \"chargedAmount\": 0,\n"
" \"currency\": \"string\",\n"
" \"chargedUSDAmount\": 0,\n"
" \"discountAmount\": 0,\n"
" \"taxAmount\": 0,\n"
" \"billingCycle\": \"monthly\",\n"
" \"action\": \"newPurchase\"\n"
" }\n"
" ]\n"
"}");
CURLcode res = curl_easy_perform(curl);
curl_easy_cleanup(curl);
curl_slist_free_all(headers);
curl_global_cleanup();
return (int)res;
}using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://bll.titan.email/partner/notify");
request.Headers.TryAddWithoutValidation("Authorization", "API.Key");
request.Content = new StringContent(
"""
{
"event": "PAYMENT_DATA_BULK",
"data": [
{
"orderId": "string",
"titanOrderId": 0,
"paymentTxnId": "string",
"chargedAmount": 0,
"currency": "string",
"chargedUSDAmount": 0,
"discountAmount": 0,
"taxAmount": 0,
"billingCycle": "monthly",
"action": "newPurchase"
}
]
}
""",
System.Text.Encoding.UTF8, "application/json");
using var response = await client.SendAsync(request);var client = new RestClient("https://bll.titan.email/partner/notify");
var request = new RestRequest("", Method.Post);
request.AddHeader("Authorization", "API.Key");
request.AddHeader("Content-Type", "application/json");
request.AddStringBody("""
{
"event": "PAYMENT_DATA_BULK",
"data": [
{
"orderId": "string",
"titanOrderId": 0,
"paymentTxnId": "string",
"chargedAmount": 0,
"currency": "string",
"chargedUSDAmount": 0,
"discountAmount": 0,
"taxAmount": 0,
"billingCycle": "monthly",
"action": "newPurchase"
}
]
}
""", ContentType.Json);
var response = await client.ExecuteAsync(request);(require '[clj-http.client :as client])
(client/post "https://bll.titan.email/partner/notify" {:headers {:Authorization "API.Key"}
:content-type :json
:form-params {:event "PAYMENT_DATA_BULK"
:data [{:orderId "string"
:titanOrderId 0
:paymentTxnId "string"
:chargedAmount 0
:currency "string"
:chargedUSDAmount 0
:discountAmount 0
:taxAmount 0
:billingCycle "monthly"
:action "newPurchase"}]}})import 'package:http/http.dart' as http;
void main() async {
final headers = <String,String>{
'Authorization': 'API.Key',
'Content-Type': 'application/json',
};
final body = r'{"event":"PAYMENT_DATA_BULK","data":[{"orderId":"string","titanOrderId":0,"paymentTxnId":"string","chargedAmount":0,"currency":"string","chargedUSDAmount":0,"discountAmount":0,"taxAmount":0,"billingCycle":"monthly","action":"newPurchase"}]}';
final response = await http.post(Uri.parse('https://bll.titan.email/partner/notify'), headers: headers, body: body);
print(response.body);
}let httpRequestMessage = new HttpRequestMessage(
HttpMethod("POST"),
new Uri("https://bll.titan.email/partner/notify")
)
httpRequestMessage.Headers.Add("Authorization", "API.Key")
httpRequestMessage.Headers.Add("Content-Type", "application/json")
let content = new StringContent("""{
"event": "PAYMENT_DATA_BULK",
"data": [
{
"orderId": "string",
"titanOrderId": 0,
"paymentTxnId": "string",
"chargedAmount": 0,
"currency": "string",
"chargedUSDAmount": 0,
"discountAmount": 0,
"taxAmount": 0,
"billingCycle": "monthly",
"action": "newPurchase"
}
]
}""", Encoding.UTF8, "application/json")
httpRequestMessage.Content <- content
let client = new HttpClient()
let! result = client.SendAsync(httpRequestMessage)
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
requestUrl := "https://bll.titan.email/partner/notify"
payload := strings.NewReader(`{
"event": "PAYMENT_DATA_BULK",
"data": [
{
"orderId": "string",
"titanOrderId": 0,
"paymentTxnId": "string",
"chargedAmount": 0,
"currency": "string",
"chargedUSDAmount": 0,
"discountAmount": 0,
"taxAmount": 0,
"billingCycle": "monthly",
"action": "newPurchase"
}
]
}`)
req, _ := http.NewRequest("POST", requestUrl, payload)
req.Header.Add("Authorization", "API.Key")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}POST /partner/notify HTTP/1.1
Host: bll.titan.email
Authorization: API.Key
Content-Type: application/json
{"event":"PAYMENT_DATA_BULK","data":[{"orderId":"string","titanOrderId":0,"paymentTxnId":"string","chargedAmount":0,"currency":"string","chargedUSDAmount":0,"discountAmount":0,"taxAmount":0,"billingCycle":"monthly","action":"newPurchase"}]}POST /bll/partner/notify HTTP/1.1
Host: api-euc1.titan.email
Authorization: API.Key
Content-Type: application/json
{"event":"PAYMENT_DATA_BULK","data":[{"orderId":"string","titanOrderId":0,"paymentTxnId":"string","chargedAmount":0,"currency":"string","chargedUSDAmount":0,"discountAmount":0,"taxAmount":0,"billingCycle":"monthly","action":"newPurchase"}]}java.io.ByteArrayOutputStream body = new java.io.ByteArrayOutputStream();
body.write("{\"event\":\"PAYMENT_DATA_BULK\",\"data\":[{\"orderId\":\"string\",\"titanOrderId\":0,\"paymentTxnId\":\"string\",\"chargedAmount\":0,\"currency\":\"string\",\"chargedUSDAmount\":0,\"discountAmount\":0,\"taxAmount\":0,\"billingCycle\":\"monthly\",\"action\":\"newPurchase\"}]}".getBytes(java.nio.charset.StandardCharsets.UTF_8));
try (AsyncHttpClient client = new DefaultAsyncHttpClient()) {
Response response = client.prepare("POST", "https://bll.titan.email/partner/notify")
.addHeader("Authorization", "API.Key")
.addHeader("Content-Type", "application/json")
.setBody(body.toByteArray())
.execute()
.get();
System.out.println(response.getResponseBody());
}java.io.ByteArrayOutputStream body = new java.io.ByteArrayOutputStream();
body.write("{\"event\":\"PAYMENT_DATA_BULK\",\"data\":[{\"orderId\":\"string\",\"titanOrderId\":0,\"paymentTxnId\":\"string\",\"chargedAmount\":0,\"currency\":\"string\",\"chargedUSDAmount\":0,\"discountAmount\":0,\"taxAmount\":0,\"billingCycle\":\"monthly\",\"action\":\"newPurchase\"}]}".getBytes(java.nio.charset.StandardCharsets.UTF_8));
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(java.net.URI.create("https://bll.titan.email/partner/notify"))
.header("Authorization", "API.Key")
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofByteArray(body.toByteArray()))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());OkHttpClient client = new OkHttpClient();
RequestBody body = RequestBody.create(MediaType.parse("application/json"), "{\"event\":\"PAYMENT_DATA_BULK\",\"data\":[{\"orderId\":\"string\",\"titanOrderId\":0,\"paymentTxnId\":\"string\",\"chargedAmount\":0,\"currency\":\"string\",\"chargedUSDAmount\":0,\"discountAmount\":0,\"taxAmount\":0,\"billingCycle\":\"monthly\",\"action\":\"newPurchase\"}]}");
Request request = new Request.Builder()
.url("https://bll.titan.email/partner/notify")
.method("POST", body)
.addHeader("Authorization", "API.Key")
.addHeader("Content-Type", "application/json")
.build();
try (Response response = client.newCall(request).execute()) {
System.out.println(response.body().string());
}java.io.ByteArrayOutputStream body = new java.io.ByteArrayOutputStream();
body.write("{\"event\":\"PAYMENT_DATA_BULK\",\"data\":[{\"orderId\":\"string\",\"titanOrderId\":0,\"paymentTxnId\":\"string\",\"chargedAmount\":0,\"currency\":\"string\",\"chargedUSDAmount\":0,\"discountAmount\":0,\"taxAmount\":0,\"billingCycle\":\"monthly\",\"action\":\"newPurchase\"}]}".getBytes(java.nio.charset.StandardCharsets.UTF_8));
HttpResponse<String> response = Unirest.request("POST", "https://bll.titan.email/partner/notify")
.header("Authorization", "API.Key")
.header("Content-Type", "application/json")
.body(body.toByteArray())
.asString();
System.out.println(response.getBody());fetch('https://bll.titan.email/partner/notify', {
method: 'POST',
headers: {
Authorization: 'API.Key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
event: 'PAYMENT_DATA_BULK',
data: [
{
orderId: 'string',
titanOrderId: 0,
paymentTxnId: 'string',
chargedAmount: 0,
currency: 'string',
chargedUSDAmount: 0,
discountAmount: 0,
taxAmount: 0,
billingCycle: 'monthly',
action: 'newPurchase'
}
]
})
})import axios from 'axios'
const options = {
method: 'POST',
url: 'https://bll.titan.email/partner/notify',
headers: {
Authorization: 'API.Key',
'Content-Type': 'application/json'
},
data: {
event: 'PAYMENT_DATA_BULK',
data: [
{
orderId: 'string',
titanOrderId: 0,
paymentTxnId: 'string',
chargedAmount: 0,
currency: 'string',
chargedUSDAmount: 0,
discountAmount: 0,
taxAmount: 0,
billingCycle: 'monthly',
action: 'newPurchase'
}
]
}
}
try {
const { data } = await axios.request(options)
console.log(data)
} catch (error) {
console.error(error)
}import { ofetch } from 'ofetch'
ofetch('https://bll.titan.email/partner/notify', {
method: 'POST',
headers: {
Authorization: 'API.Key',
'Content-Type': 'application/json'
},
body: {
event: 'PAYMENT_DATA_BULK',
data: [
{
orderId: 'string',
titanOrderId: 0,
paymentTxnId: 'string',
chargedAmount: 0,
currency: 'string',
chargedUSDAmount: 0,
discountAmount: 0,
taxAmount: 0,
billingCycle: 'monthly',
action: 'newPurchase'
}
]
}
})$.ajax({
url: "https://bll.titan.email/partner/notify",
method: "POST",
processData: false,
contentType: false,
beforeSend(xhr) {
xhr.setRequestHeader("Authorization", "API.Key");
xhr.setRequestHeader("Content-Type", "application/json");
},
data: "{\"event\":\"PAYMENT_DATA_BULK\",\"data\":[{\"orderId\":\"string\",\"titanOrderId\":0,\"paymentTxnId\":\"string\",\"chargedAmount\":0,\"currency\":\"string\",\"chargedUSDAmount\":0,\"discountAmount\":0,\"taxAmount\":0,\"billingCycle\":\"monthly\",\"action\":\"newPurchase\"}]}"
}).done((response) => console.log(response));const xhr = new XMLHttpRequest();
xhr.open("POST", "https://bll.titan.email/partner/notify");
xhr.withCredentials = true;
xhr.setRequestHeader("Authorization", "API.Key");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.addEventListener("load", () => console.log(xhr.responseText));
xhr.send("{\"event\":\"PAYMENT_DATA_BULK\",\"data\":[{\"orderId\":\"string\",\"titanOrderId\":0,\"paymentTxnId\":\"string\",\"chargedAmount\":0,\"currency\":\"string\",\"chargedUSDAmount\":0,\"discountAmount\":0,\"taxAmount\":0,\"billingCycle\":\"monthly\",\"action\":\"newPurchase\"}]}");using HTTP
using JSON
response = HTTP.post(
"https://bll.titan.email/partner/notify",
[
"Authorization" => "API.Key",
"Content-Type" => "application/json"
],
JSON.json(Dict(
"event" => "PAYMENT_DATA_BULK",
"data" => [
Dict(
"orderId" => "string",
"titanOrderId" => 0,
"paymentTxnId" => "string",
"chargedAmount" => 0,
"currency" => "string",
"chargedUSDAmount" => 0,
"discountAmount" => 0,
"taxAmount" => 0,
"billingCycle" => "monthly",
"action" => "newPurchase"
)
]
))
)
println(String(response.body))val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\"event\":\"PAYMENT_DATA_BULK\",\"data\":[{\"orderId\":\"string\",\"titanOrderId\":0,\"paymentTxnId\":\"string\",\"chargedAmount\":0,\"currency\":\"string\",\"chargedUSDAmount\":0,\"discountAmount\":0,\"taxAmount\":0,\"billingCycle\":\"monthly\",\"action\":\"newPurchase\"}]}")
val request = Request.Builder()
.url("https://bll.titan.email/partner/notify")
.post(body)
.addHeader("Authorization", "API.Key")
.addHeader("Content-Type", "application/json")
.build()
val response = client.newCall(request).execute()fetch('https://bll.titan.email/partner/notify', {
method: 'POST',
headers: {
Authorization: 'API.Key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
event: 'PAYMENT_DATA_BULK',
data: [
{
orderId: 'string',
titanOrderId: 0,
paymentTxnId: 'string',
chargedAmount: 0,
currency: 'string',
chargedUSDAmount: 0,
discountAmount: 0,
taxAmount: 0,
billingCycle: 'monthly',
action: 'newPurchase'
}
]
})
})import axios from 'axios'
const options = {
method: 'POST',
url: 'https://bll.titan.email/partner/notify',
headers: {
Authorization: 'API.Key',
'Content-Type': 'application/json'
},
data: {
event: 'PAYMENT_DATA_BULK',
data: [
{
orderId: 'string',
titanOrderId: 0,
paymentTxnId: 'string',
chargedAmount: 0,
currency: 'string',
chargedUSDAmount: 0,
discountAmount: 0,
taxAmount: 0,
billingCycle: 'monthly',
action: 'newPurchase'
}
]
}
}
try {
const { data } = await axios.request(options)
console.log(data)
} catch (error) {
console.error(error)
}import { ofetch } from 'ofetch'
ofetch('https://bll.titan.email/partner/notify', {
method: 'POST',
headers: {
Authorization: 'API.Key',
'Content-Type': 'application/json'
},
body: {
event: 'PAYMENT_DATA_BULK',
data: [
{
orderId: 'string',
titanOrderId: 0,
paymentTxnId: 'string',
chargedAmount: 0,
currency: 'string',
chargedUSDAmount: 0,
discountAmount: 0,
taxAmount: 0,
billingCycle: 'monthly',
action: 'newPurchase'
}
]
}
})import { request } from 'undici'
const { statusCode, body } = await request('https://bll.titan.email/partner/notify', {
method: 'POST',
headers: {
Authorization: 'API.Key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
event: 'PAYMENT_DATA_BULK',
data: [
{
orderId: 'string',
titanOrderId: 0,
paymentTxnId: 'string',
chargedAmount: 0,
currency: 'string',
chargedUSDAmount: 0,
discountAmount: 0,
taxAmount: 0,
billingCycle: 'monthly',
action: 'newPurchase'
}
]
})
})#import <Foundation/Foundation.h>
NSDictionary *headers = @{ @"Authorization": @"API.Key",
@"Content-Type": @"application/json" };
NSDictionary *parameters = @{ @"event": @"PAYMENT_DATA_BULK",
@"data": @[ @{ @"orderId": @"string", @"titanOrderId": @0, @"paymentTxnId": @"string", @"chargedAmount": @0, @"currency": @"string", @"chargedUSDAmount": @0, @"discountAmount": @0, @"taxAmount": @0, @"billingCycle": @"monthly", @"action": @"newPurchase" } ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://bll.titan.email/partner/notify"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];open Lwt.Infix
let () =
Lwt_main.run (
let uri = Uri.of_string "https://bll.titan.email/partner/notify" in
let headers = Cohttp.Header.of_list [
("Authorization", "API.Key");
("Content-Type", "application/json");
] in
let part0 = "{\"event\":\"PAYMENT_DATA_BULK\",\"data\":[{\"orderId\":\"string\",\"titanOrderId\":0,\"paymentTxnId\":\"string\",\"chargedAmount\":0,\"currency\":\"string\",\"chargedUSDAmount\":0,\"discountAmount\":0,\"taxAmount\":0,\"billingCycle\":\"monthly\",\"action\":\"newPurchase\"}]}" in
let body = Cohttp_lwt.Body.of_string (String.concat "" [part0]) in
Cohttp_lwt_unix.Client.call ~headers ~body (Cohttp.Code.method_of_string "POST") uri
>>= fun (_response, body) ->
Cohttp_lwt.Body.to_string body >>= Lwt_io.printl
)$ch = curl_init("https://bll.titan.email/partner/notify");
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: API.Key', 'Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
'event' => 'PAYMENT_DATA_BULK',
'data' => [
[
'orderId' => 'string',
'titanOrderId' => 0,
'paymentTxnId' => 'string',
'chargedAmount' => 0,
'currency' => 'string',
'chargedUSDAmount' => 0,
'discountAmount' => 0,
'taxAmount' => 0,
'billingCycle' => 'monthly',
'action' => 'newPurchase'
]
]
]));
curl_exec($ch);
curl_close($ch);$client = new GuzzleHttp\Client();
$response = $client->request('POST', 'https://bll.titan.email/partner/notify', [
'headers' => [
'Authorization' => 'API.Key',
'Content-Type' => 'application/json'
],
'json' => [
'event' => 'PAYMENT_DATA_BULK',
'data' => [
[
'orderId' => 'string',
'titanOrderId' => 0,
'paymentTxnId' => 'string',
'chargedAmount' => 0,
'currency' => 'string',
'chargedUSDAmount' => 0,
'discountAmount' => 0,
'taxAmount' => 0,
'billingCycle' => 'monthly',
'action' => 'newPurchase'
]
]
]
]);use Illuminate\Support\Facades\Http;
$response = Http::withHeaders([
'Authorization' => 'API.Key',
'Content-Type' => 'application/json'
])
->post('https://bll.titan.email/partner/notify', [
'event' => 'PAYMENT_DATA_BULK',
'data' => [
[
'orderId' => 'string',
'titanOrderId' => 0,
'paymentTxnId' => 'string',
'chargedAmount' => 0,
'currency' => 'string',
'chargedUSDAmount' => 0,
'discountAmount' => 0,
'taxAmount' => 0,
'billingCycle' => 'monthly',
'action' => 'newPurchase'
]
]
]);$headers = @{
'Authorization' = 'API.Key'
'Content-Type' = 'application/json'
}
$body = [System.IO.MemoryStream]::new()
$bytes = [System.Text.Encoding]::UTF8.GetBytes('{"event":"PAYMENT_DATA_BULK","data":[{"orderId":"string","titanOrderId":0,"paymentTxnId":"string","chargedAmount":0,"currency":"string","chargedUSDAmount":0,"discountAmount":0,"taxAmount":0,"billingCycle":"monthly","action":"newPurchase"}]}')
$body.Write($bytes, 0, $bytes.Length)
$response = Invoke-WebRequest -Uri 'https://bll.titan.email/partner/notify' -Method 'POST' -Headers $headers -Body $body.ToArray()
$body.Dispose()
$response$headers = @{
'Authorization' = 'API.Key'
'Content-Type' = 'application/json'
}
$body = [System.IO.MemoryStream]::new()
$bytes = [System.Text.Encoding]::UTF8.GetBytes('{"event":"PAYMENT_DATA_BULK","data":[{"orderId":"string","titanOrderId":0,"paymentTxnId":"string","chargedAmount":0,"currency":"string","chargedUSDAmount":0,"discountAmount":0,"taxAmount":0,"billingCycle":"monthly","action":"newPurchase"}]}')
$body.Write($bytes, 0, $bytes.Length)
$response = Invoke-RestMethod -Uri 'https://bll.titan.email/partner/notify' -Method 'POST' -Headers $headers -Body $body.ToArray()
$body.Dispose()
$responseimport http.client
import json
conn = http.client.HTTPSConnection("bll.titan.email")
payload = json.dumps({
"event": "PAYMENT_DATA_BULK",
"data": [
{
"orderId": "string",
"titanOrderId": 0,
"paymentTxnId": "string",
"chargedAmount": 0,
"currency": "string",
"chargedUSDAmount": 0,
"discountAmount": 0,
"taxAmount": 0,
"billingCycle": "monthly",
"action": "newPurchase"
}
]
})
headers = {
"Authorization": "API.Key",
"Content-Type": "application/json"
}
conn.request(
"POST",
"/partner/notify",
body=payload,
headers=headers,
)
response = conn.getresponse()
print(response.read().decode())
conn.close()import http.client
import json
conn = http.client.HTTPSConnection("api-euc1.titan.email")
payload = json.dumps({
"event": "PAYMENT_DATA_BULK",
"data": [
{
"orderId": "string",
"titanOrderId": 0,
"paymentTxnId": "string",
"chargedAmount": 0,
"currency": "string",
"chargedUSDAmount": 0,
"discountAmount": 0,
"taxAmount": 0,
"billingCycle": "monthly",
"action": "newPurchase"
}
]
})
headers = {
"Authorization": "API.Key",
"Content-Type": "application/json"
}
conn.request(
"POST",
"/bll/partner/notify",
body=payload,
headers=headers,
)
response = conn.getresponse()
print(response.read().decode())
conn.close()requests.post("https://bll.titan.email/partner/notify",
headers={
"Authorization": "API.Key",
"Content-Type": "application/json"
},
json={
"event": "PAYMENT_DATA_BULK",
"data": [
{
"orderId": "string",
"titanOrderId": 0,
"paymentTxnId": "string",
"chargedAmount": 0,
"currency": "string",
"chargedUSDAmount": 0,
"discountAmount": 0,
"taxAmount": 0,
"billingCycle": "monthly",
"action": "newPurchase"
}
]
}
)async with aiohttp.ClientSession() as session:
await session.post("https://bll.titan.email/partner/notify",
headers={
"Authorization": "API.Key",
"Content-Type": "application/json"
},
json={
"event": "PAYMENT_DATA_BULK",
"data": [
{
"orderId": "string",
"titanOrderId": 0,
"paymentTxnId": "string",
"chargedAmount": 0,
"currency": "string",
"chargedUSDAmount": 0,
"discountAmount": 0,
"taxAmount": 0,
"billingCycle": "monthly",
"action": "newPurchase"
}
]
}
)httpx.post("https://bll.titan.email/partner/notify",
headers={
"Authorization": "API.Key",
"Content-Type": "application/json"
},
json={
"event": "PAYMENT_DATA_BULK",
"data": [
{
"orderId": "string",
"titanOrderId": 0,
"paymentTxnId": "string",
"chargedAmount": 0,
"currency": "string",
"chargedUSDAmount": 0,
"discountAmount": 0,
"taxAmount": 0,
"billingCycle": "monthly",
"action": "newPurchase"
}
]
}
)async with httpx.AsyncClient() as client:
await client.post("https://bll.titan.email/partner/notify",
headers={
"Authorization": "API.Key",
"Content-Type": "application/json"
},
json={
"event": "PAYMENT_DATA_BULK",
"data": [
{
"orderId": "string",
"titanOrderId": 0,
"paymentTxnId": "string",
"chargedAmount": 0,
"currency": "string",
"chargedUSDAmount": 0,
"discountAmount": 0,
"taxAmount": 0,
"billingCycle": "monthly",
"action": "newPurchase"
}
]
}
)library(httr2)
response <- request("https://bll.titan.email/partner/notify") |>
req_method("POST") |>
req_headers(
"Authorization" = "API.Key",
"Content-Type" = "application/json"
) |>
req_body_json(list(
event = "PAYMENT_DATA_BULK",
data = list(
list(
orderId = "string",
titanOrderId = 0,
paymentTxnId = "string",
chargedAmount = 0,
currency = "string",
chargedUSDAmount = 0,
discountAmount = 0,
taxAmount = 0,
billingCycle = "monthly",
action = "newPurchase"
)
)
)) |>
req_perform()
resp_body_string(response)require 'uri'
require 'net/http'
url = URI("https://bll.titan.email/partner/notify")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'API.Key'
request["Content-Type"] = 'application/json'
request.body = <<~JSON
{
"event": "PAYMENT_DATA_BULK",
"data": [
{
"orderId": "string",
"titanOrderId": 0,
"paymentTxnId": "string",
"chargedAmount": 0,
"currency": "string",
"chargedUSDAmount": 0,
"discountAmount": 0,
"taxAmount": 0,
"billingCycle": "monthly",
"action": "newPurchase"
}
]
}
JSON
response = http.request(request)
puts response.read_bodylet client = reqwest::Client::new();
let request = client
.post("https://bll.titan.email/partner/notify")
.header("Authorization", "API.Key")
.header("Content-Type", "application/json")
.json(&serde_json::json!({
"event": "PAYMENT_DATA_BULK",
"data": [
{
"orderId": "string",
"titanOrderId": 0,
"paymentTxnId": "string",
"chargedAmount": 0,
"currency": "string",
"chargedUSDAmount": 0,
"discountAmount": 0,
"taxAmount": 0,
"billingCycle": "monthly",
"action": "newPurchase"
}
]
}));
let response = request.send().await?;curl https://bll.titan.email/partner/notify \
--request POST \
--header 'Authorization: API.Key' \
--header 'Content-Type: application/json' \
--data '{
"event": "PAYMENT_DATA_BULK",
"data": [
{
"orderId": "string",
"titanOrderId": 0,
"paymentTxnId": "string",
"chargedAmount": 0,
"currency": "string",
"chargedUSDAmount": 0,
"discountAmount": 0,
"taxAmount": 0,
"billingCycle": "monthly",
"action": "newPurchase"
}
]
}'wget --quiet \
--method POST \
--header 'Authorization: API.Key' \
--header 'Content-Type: application/json' \
--body-data '{
"event": "PAYMENT_DATA_BULK",
"data": [
{
"orderId": "string",
"titanOrderId": 0,
"paymentTxnId": "string",
"chargedAmount": 0,
"currency": "string",
"chargedUSDAmount": 0,
"discountAmount": 0,
"taxAmount": 0,
"billingCycle": "monthly",
"action": "newPurchase"
}
]
}' \
--output-document \
- https://bll.titan.email/partner/notifyhttp --ignore-stdin 'POST' 'https://bll.titan.email/partner/notify' \
'Authorization:API.Key' \
'Content-Type:application/json' \
--raw='{"event":"PAYMENT_DATA_BULK","data":[{"orderId":"string","titanOrderId":0,"paymentTxnId":"string","chargedAmount":0,"currency":"string","chargedUSDAmount":0,"discountAmount":0,"taxAmount":0,"billingCycle":"monthly","action":"newPurchase"}]}'import Foundation
var request = URLRequest(url: URL(string: "https://bll.titan.email/partner/notify")!)
request.httpMethod = "POST"
request.setValue("API.Key", forHTTPHeaderField: "Authorization")
request.setValue("application/json", forHTTPHeaderField: "Content-Type")
let jsonBody = #"""
{
"event": "PAYMENT_DATA_BULK",
"data": [
{
"orderId": "string",
"titanOrderId": 0,
"paymentTxnId": "string",
"chargedAmount": 0,
"currency": "string",
"chargedUSDAmount": 0,
"discountAmount": 0,
"taxAmount": 0,
"billingCycle": "monthly",
"action": "newPurchase"
}
]
}
"""#
request.httpBody = jsonBody.data(using: .utf8)
let (data, response) = try await URLSession.shared.data(for: request)
guard let httpResponse = response as? HTTPURLResponse,
200..<300 ~= httpResponse.statusCode else {
throw URLError(.badServerResponse)
}
print(String(data: data, encoding: .utf8) ?? "")#include <curl/curl.h>
int main(void) {
curl_global_init(CURL_GLOBAL_DEFAULT);
CURL *curl = curl_easy_init();
if (!curl) {
curl_global_cleanup();
return 1;
}
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(curl, CURLOPT_URL, "https://bll.titan.email/partner/notify");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Authorization: API.Key");
headers = curl_slist_append(headers, "Content-Type: application/json");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_POSTFIELDS,
"{\n"
" \"event\": \"REFUND_ISSUED_BULK\",\n"
" \"data\": [\n"
" {\n"
" \"orderId\": \"string\",\n"
" \"domainName\": \"string\",\n"
" \"customerId\": \"string\",\n"
" \"paymentTxnId\": \"string\",\n"
" \"refundDate\": \"string\",\n"
" \"refundAmount\": 0,\n"
" \"refundTaxAmount\": 0,\n"
" \"refundUSDAmount\": 0,\n"
" \"currency\": \"string\",\n"
" \"reason\": \"string\"\n"
" }\n"
" ]\n"
"}");
CURLcode res = curl_easy_perform(curl);
curl_easy_cleanup(curl);
curl_slist_free_all(headers);
curl_global_cleanup();
return (int)res;
}using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://bll.titan.email/partner/notify");
request.Headers.TryAddWithoutValidation("Authorization", "API.Key");
request.Content = new StringContent(
"""
{
"event": "REFUND_ISSUED_BULK",
"data": [
{
"orderId": "string",
"domainName": "string",
"customerId": "string",
"paymentTxnId": "string",
"refundDate": "string",
"refundAmount": 0,
"refundTaxAmount": 0,
"refundUSDAmount": 0,
"currency": "string",
"reason": "string"
}
]
}
""",
System.Text.Encoding.UTF8, "application/json");
using var response = await client.SendAsync(request);var client = new RestClient("https://bll.titan.email/partner/notify");
var request = new RestRequest("", Method.Post);
request.AddHeader("Authorization", "API.Key");
request.AddHeader("Content-Type", "application/json");
request.AddStringBody("""
{
"event": "REFUND_ISSUED_BULK",
"data": [
{
"orderId": "string",
"domainName": "string",
"customerId": "string",
"paymentTxnId": "string",
"refundDate": "string",
"refundAmount": 0,
"refundTaxAmount": 0,
"refundUSDAmount": 0,
"currency": "string",
"reason": "string"
}
]
}
""", ContentType.Json);
var response = await client.ExecuteAsync(request);(require '[clj-http.client :as client])
(client/post "https://bll.titan.email/partner/notify" {:headers {:Authorization "API.Key"}
:content-type :json
:form-params {:event "REFUND_ISSUED_BULK"
:data [{:orderId "string"
:domainName "string"
:customerId "string"
:paymentTxnId "string"
:refundDate "string"
:refundAmount 0
:refundTaxAmount 0
:refundUSDAmount 0
:currency "string"
:reason "string"}]}})import 'package:http/http.dart' as http;
void main() async {
final headers = <String,String>{
'Authorization': 'API.Key',
'Content-Type': 'application/json',
};
final body = r'{"event":"REFUND_ISSUED_BULK","data":[{"orderId":"string","domainName":"string","customerId":"string","paymentTxnId":"string","refundDate":"string","refundAmount":0,"refundTaxAmount":0,"refundUSDAmount":0,"currency":"string","reason":"string"}]}';
final response = await http.post(Uri.parse('https://bll.titan.email/partner/notify'), headers: headers, body: body);
print(response.body);
}let httpRequestMessage = new HttpRequestMessage(
HttpMethod("POST"),
new Uri("https://bll.titan.email/partner/notify")
)
httpRequestMessage.Headers.Add("Authorization", "API.Key")
httpRequestMessage.Headers.Add("Content-Type", "application/json")
let content = new StringContent("""{
"event": "REFUND_ISSUED_BULK",
"data": [
{
"orderId": "string",
"domainName": "string",
"customerId": "string",
"paymentTxnId": "string",
"refundDate": "string",
"refundAmount": 0,
"refundTaxAmount": 0,
"refundUSDAmount": 0,
"currency": "string",
"reason": "string"
}
]
}""", Encoding.UTF8, "application/json")
httpRequestMessage.Content <- content
let client = new HttpClient()
let! result = client.SendAsync(httpRequestMessage)
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
requestUrl := "https://bll.titan.email/partner/notify"
payload := strings.NewReader(`{
"event": "REFUND_ISSUED_BULK",
"data": [
{
"orderId": "string",
"domainName": "string",
"customerId": "string",
"paymentTxnId": "string",
"refundDate": "string",
"refundAmount": 0,
"refundTaxAmount": 0,
"refundUSDAmount": 0,
"currency": "string",
"reason": "string"
}
]
}`)
req, _ := http.NewRequest("POST", requestUrl, payload)
req.Header.Add("Authorization", "API.Key")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}POST /partner/notify HTTP/1.1
Host: bll.titan.email
Authorization: API.Key
Content-Type: application/json
{"event":"REFUND_ISSUED_BULK","data":[{"orderId":"string","domainName":"string","customerId":"string","paymentTxnId":"string","refundDate":"string","refundAmount":0,"refundTaxAmount":0,"refundUSDAmount":0,"currency":"string","reason":"string"}]}POST /bll/partner/notify HTTP/1.1
Host: api-euc1.titan.email
Authorization: API.Key
Content-Type: application/json
{"event":"REFUND_ISSUED_BULK","data":[{"orderId":"string","domainName":"string","customerId":"string","paymentTxnId":"string","refundDate":"string","refundAmount":0,"refundTaxAmount":0,"refundUSDAmount":0,"currency":"string","reason":"string"}]}java.io.ByteArrayOutputStream body = new java.io.ByteArrayOutputStream();
body.write("{\"event\":\"REFUND_ISSUED_BULK\",\"data\":[{\"orderId\":\"string\",\"domainName\":\"string\",\"customerId\":\"string\",\"paymentTxnId\":\"string\",\"refundDate\":\"string\",\"refundAmount\":0,\"refundTaxAmount\":0,\"refundUSDAmount\":0,\"currency\":\"string\",\"reason\":\"string\"}]}".getBytes(java.nio.charset.StandardCharsets.UTF_8));
try (AsyncHttpClient client = new DefaultAsyncHttpClient()) {
Response response = client.prepare("POST", "https://bll.titan.email/partner/notify")
.addHeader("Authorization", "API.Key")
.addHeader("Content-Type", "application/json")
.setBody(body.toByteArray())
.execute()
.get();
System.out.println(response.getResponseBody());
}java.io.ByteArrayOutputStream body = new java.io.ByteArrayOutputStream();
body.write("{\"event\":\"REFUND_ISSUED_BULK\",\"data\":[{\"orderId\":\"string\",\"domainName\":\"string\",\"customerId\":\"string\",\"paymentTxnId\":\"string\",\"refundDate\":\"string\",\"refundAmount\":0,\"refundTaxAmount\":0,\"refundUSDAmount\":0,\"currency\":\"string\",\"reason\":\"string\"}]}".getBytes(java.nio.charset.StandardCharsets.UTF_8));
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(java.net.URI.create("https://bll.titan.email/partner/notify"))
.header("Authorization", "API.Key")
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofByteArray(body.toByteArray()))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());OkHttpClient client = new OkHttpClient();
RequestBody body = RequestBody.create(MediaType.parse("application/json"), "{\"event\":\"REFUND_ISSUED_BULK\",\"data\":[{\"orderId\":\"string\",\"domainName\":\"string\",\"customerId\":\"string\",\"paymentTxnId\":\"string\",\"refundDate\":\"string\",\"refundAmount\":0,\"refundTaxAmount\":0,\"refundUSDAmount\":0,\"currency\":\"string\",\"reason\":\"string\"}]}");
Request request = new Request.Builder()
.url("https://bll.titan.email/partner/notify")
.method("POST", body)
.addHeader("Authorization", "API.Key")
.addHeader("Content-Type", "application/json")
.build();
try (Response response = client.newCall(request).execute()) {
System.out.println(response.body().string());
}java.io.ByteArrayOutputStream body = new java.io.ByteArrayOutputStream();
body.write("{\"event\":\"REFUND_ISSUED_BULK\",\"data\":[{\"orderId\":\"string\",\"domainName\":\"string\",\"customerId\":\"string\",\"paymentTxnId\":\"string\",\"refundDate\":\"string\",\"refundAmount\":0,\"refundTaxAmount\":0,\"refundUSDAmount\":0,\"currency\":\"string\",\"reason\":\"string\"}]}".getBytes(java.nio.charset.StandardCharsets.UTF_8));
HttpResponse<String> response = Unirest.request("POST", "https://bll.titan.email/partner/notify")
.header("Authorization", "API.Key")
.header("Content-Type", "application/json")
.body(body.toByteArray())
.asString();
System.out.println(response.getBody());fetch('https://bll.titan.email/partner/notify', {
method: 'POST',
headers: {
Authorization: 'API.Key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
event: 'REFUND_ISSUED_BULK',
data: [
{
orderId: 'string',
domainName: 'string',
customerId: 'string',
paymentTxnId: 'string',
refundDate: 'string',
refundAmount: 0,
refundTaxAmount: 0,
refundUSDAmount: 0,
currency: 'string',
reason: 'string'
}
]
})
})import axios from 'axios'
const options = {
method: 'POST',
url: 'https://bll.titan.email/partner/notify',
headers: {
Authorization: 'API.Key',
'Content-Type': 'application/json'
},
data: {
event: 'REFUND_ISSUED_BULK',
data: [
{
orderId: 'string',
domainName: 'string',
customerId: 'string',
paymentTxnId: 'string',
refundDate: 'string',
refundAmount: 0,
refundTaxAmount: 0,
refundUSDAmount: 0,
currency: 'string',
reason: 'string'
}
]
}
}
try {
const { data } = await axios.request(options)
console.log(data)
} catch (error) {
console.error(error)
}import { ofetch } from 'ofetch'
ofetch('https://bll.titan.email/partner/notify', {
method: 'POST',
headers: {
Authorization: 'API.Key',
'Content-Type': 'application/json'
},
body: {
event: 'REFUND_ISSUED_BULK',
data: [
{
orderId: 'string',
domainName: 'string',
customerId: 'string',
paymentTxnId: 'string',
refundDate: 'string',
refundAmount: 0,
refundTaxAmount: 0,
refundUSDAmount: 0,
currency: 'string',
reason: 'string'
}
]
}
})$.ajax({
url: "https://bll.titan.email/partner/notify",
method: "POST",
processData: false,
contentType: false,
beforeSend(xhr) {
xhr.setRequestHeader("Authorization", "API.Key");
xhr.setRequestHeader("Content-Type", "application/json");
},
data: "{\"event\":\"REFUND_ISSUED_BULK\",\"data\":[{\"orderId\":\"string\",\"domainName\":\"string\",\"customerId\":\"string\",\"paymentTxnId\":\"string\",\"refundDate\":\"string\",\"refundAmount\":0,\"refundTaxAmount\":0,\"refundUSDAmount\":0,\"currency\":\"string\",\"reason\":\"string\"}]}"
}).done((response) => console.log(response));const xhr = new XMLHttpRequest();
xhr.open("POST", "https://bll.titan.email/partner/notify");
xhr.withCredentials = true;
xhr.setRequestHeader("Authorization", "API.Key");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.addEventListener("load", () => console.log(xhr.responseText));
xhr.send("{\"event\":\"REFUND_ISSUED_BULK\",\"data\":[{\"orderId\":\"string\",\"domainName\":\"string\",\"customerId\":\"string\",\"paymentTxnId\":\"string\",\"refundDate\":\"string\",\"refundAmount\":0,\"refundTaxAmount\":0,\"refundUSDAmount\":0,\"currency\":\"string\",\"reason\":\"string\"}]}");using HTTP
using JSON
response = HTTP.post(
"https://bll.titan.email/partner/notify",
[
"Authorization" => "API.Key",
"Content-Type" => "application/json"
],
JSON.json(Dict(
"event" => "REFUND_ISSUED_BULK",
"data" => [
Dict(
"orderId" => "string",
"domainName" => "string",
"customerId" => "string",
"paymentTxnId" => "string",
"refundDate" => "string",
"refundAmount" => 0,
"refundTaxAmount" => 0,
"refundUSDAmount" => 0,
"currency" => "string",
"reason" => "string"
)
]
))
)
println(String(response.body))val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\"event\":\"REFUND_ISSUED_BULK\",\"data\":[{\"orderId\":\"string\",\"domainName\":\"string\",\"customerId\":\"string\",\"paymentTxnId\":\"string\",\"refundDate\":\"string\",\"refundAmount\":0,\"refundTaxAmount\":0,\"refundUSDAmount\":0,\"currency\":\"string\",\"reason\":\"string\"}]}")
val request = Request.Builder()
.url("https://bll.titan.email/partner/notify")
.post(body)
.addHeader("Authorization", "API.Key")
.addHeader("Content-Type", "application/json")
.build()
val response = client.newCall(request).execute()fetch('https://bll.titan.email/partner/notify', {
method: 'POST',
headers: {
Authorization: 'API.Key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
event: 'REFUND_ISSUED_BULK',
data: [
{
orderId: 'string',
domainName: 'string',
customerId: 'string',
paymentTxnId: 'string',
refundDate: 'string',
refundAmount: 0,
refundTaxAmount: 0,
refundUSDAmount: 0,
currency: 'string',
reason: 'string'
}
]
})
})import axios from 'axios'
const options = {
method: 'POST',
url: 'https://bll.titan.email/partner/notify',
headers: {
Authorization: 'API.Key',
'Content-Type': 'application/json'
},
data: {
event: 'REFUND_ISSUED_BULK',
data: [
{
orderId: 'string',
domainName: 'string',
customerId: 'string',
paymentTxnId: 'string',
refundDate: 'string',
refundAmount: 0,
refundTaxAmount: 0,
refundUSDAmount: 0,
currency: 'string',
reason: 'string'
}
]
}
}
try {
const { data } = await axios.request(options)
console.log(data)
} catch (error) {
console.error(error)
}import { ofetch } from 'ofetch'
ofetch('https://bll.titan.email/partner/notify', {
method: 'POST',
headers: {
Authorization: 'API.Key',
'Content-Type': 'application/json'
},
body: {
event: 'REFUND_ISSUED_BULK',
data: [
{
orderId: 'string',
domainName: 'string',
customerId: 'string',
paymentTxnId: 'string',
refundDate: 'string',
refundAmount: 0,
refundTaxAmount: 0,
refundUSDAmount: 0,
currency: 'string',
reason: 'string'
}
]
}
})import { request } from 'undici'
const { statusCode, body } = await request('https://bll.titan.email/partner/notify', {
method: 'POST',
headers: {
Authorization: 'API.Key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
event: 'REFUND_ISSUED_BULK',
data: [
{
orderId: 'string',
domainName: 'string',
customerId: 'string',
paymentTxnId: 'string',
refundDate: 'string',
refundAmount: 0,
refundTaxAmount: 0,
refundUSDAmount: 0,
currency: 'string',
reason: 'string'
}
]
})
})#import <Foundation/Foundation.h>
NSDictionary *headers = @{ @"Authorization": @"API.Key",
@"Content-Type": @"application/json" };
NSDictionary *parameters = @{ @"event": @"REFUND_ISSUED_BULK",
@"data": @[ @{ @"orderId": @"string", @"domainName": @"string", @"customerId": @"string", @"paymentTxnId": @"string", @"refundDate": @"string", @"refundAmount": @0, @"refundTaxAmount": @0, @"refundUSDAmount": @0, @"currency": @"string", @"reason": @"string" } ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://bll.titan.email/partner/notify"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];open Lwt.Infix
let () =
Lwt_main.run (
let uri = Uri.of_string "https://bll.titan.email/partner/notify" in
let headers = Cohttp.Header.of_list [
("Authorization", "API.Key");
("Content-Type", "application/json");
] in
let part0 = "{\"event\":\"REFUND_ISSUED_BULK\",\"data\":[{\"orderId\":\"string\",\"domainName\":\"string\",\"customerId\":\"string\",\"paymentTxnId\":\"string\",\"refundDate\":\"string\",\"refundAmount\":0,\"refundTaxAmount\":0,\"refundUSDAmount\":0,\"currency\":\"string\",\"reason\":\"string\"}]}" in
let body = Cohttp_lwt.Body.of_string (String.concat "" [part0]) in
Cohttp_lwt_unix.Client.call ~headers ~body (Cohttp.Code.method_of_string "POST") uri
>>= fun (_response, body) ->
Cohttp_lwt.Body.to_string body >>= Lwt_io.printl
)$ch = curl_init("https://bll.titan.email/partner/notify");
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: API.Key', 'Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
'event' => 'REFUND_ISSUED_BULK',
'data' => [
[
'orderId' => 'string',
'domainName' => 'string',
'customerId' => 'string',
'paymentTxnId' => 'string',
'refundDate' => 'string',
'refundAmount' => 0,
'refundTaxAmount' => 0,
'refundUSDAmount' => 0,
'currency' => 'string',
'reason' => 'string'
]
]
]));
curl_exec($ch);
curl_close($ch);$client = new GuzzleHttp\Client();
$response = $client->request('POST', 'https://bll.titan.email/partner/notify', [
'headers' => [
'Authorization' => 'API.Key',
'Content-Type' => 'application/json'
],
'json' => [
'event' => 'REFUND_ISSUED_BULK',
'data' => [
[
'orderId' => 'string',
'domainName' => 'string',
'customerId' => 'string',
'paymentTxnId' => 'string',
'refundDate' => 'string',
'refundAmount' => 0,
'refundTaxAmount' => 0,
'refundUSDAmount' => 0,
'currency' => 'string',
'reason' => 'string'
]
]
]
]);use Illuminate\Support\Facades\Http;
$response = Http::withHeaders([
'Authorization' => 'API.Key',
'Content-Type' => 'application/json'
])
->post('https://bll.titan.email/partner/notify', [
'event' => 'REFUND_ISSUED_BULK',
'data' => [
[
'orderId' => 'string',
'domainName' => 'string',
'customerId' => 'string',
'paymentTxnId' => 'string',
'refundDate' => 'string',
'refundAmount' => 0,
'refundTaxAmount' => 0,
'refundUSDAmount' => 0,
'currency' => 'string',
'reason' => 'string'
]
]
]);$headers = @{
'Authorization' = 'API.Key'
'Content-Type' = 'application/json'
}
$body = [System.IO.MemoryStream]::new()
$bytes = [System.Text.Encoding]::UTF8.GetBytes('{"event":"REFUND_ISSUED_BULK","data":[{"orderId":"string","domainName":"string","customerId":"string","paymentTxnId":"string","refundDate":"string","refundAmount":0,"refundTaxAmount":0,"refundUSDAmount":0,"currency":"string","reason":"string"}]}')
$body.Write($bytes, 0, $bytes.Length)
$response = Invoke-WebRequest -Uri 'https://bll.titan.email/partner/notify' -Method 'POST' -Headers $headers -Body $body.ToArray()
$body.Dispose()
$response$headers = @{
'Authorization' = 'API.Key'
'Content-Type' = 'application/json'
}
$body = [System.IO.MemoryStream]::new()
$bytes = [System.Text.Encoding]::UTF8.GetBytes('{"event":"REFUND_ISSUED_BULK","data":[{"orderId":"string","domainName":"string","customerId":"string","paymentTxnId":"string","refundDate":"string","refundAmount":0,"refundTaxAmount":0,"refundUSDAmount":0,"currency":"string","reason":"string"}]}')
$body.Write($bytes, 0, $bytes.Length)
$response = Invoke-RestMethod -Uri 'https://bll.titan.email/partner/notify' -Method 'POST' -Headers $headers -Body $body.ToArray()
$body.Dispose()
$responseimport http.client
import json
conn = http.client.HTTPSConnection("bll.titan.email")
payload = json.dumps({
"event": "REFUND_ISSUED_BULK",
"data": [
{
"orderId": "string",
"domainName": "string",
"customerId": "string",
"paymentTxnId": "string",
"refundDate": "string",
"refundAmount": 0,
"refundTaxAmount": 0,
"refundUSDAmount": 0,
"currency": "string",
"reason": "string"
}
]
})
headers = {
"Authorization": "API.Key",
"Content-Type": "application/json"
}
conn.request(
"POST",
"/partner/notify",
body=payload,
headers=headers,
)
response = conn.getresponse()
print(response.read().decode())
conn.close()import http.client
import json
conn = http.client.HTTPSConnection("api-euc1.titan.email")
payload = json.dumps({
"event": "REFUND_ISSUED_BULK",
"data": [
{
"orderId": "string",
"domainName": "string",
"customerId": "string",
"paymentTxnId": "string",
"refundDate": "string",
"refundAmount": 0,
"refundTaxAmount": 0,
"refundUSDAmount": 0,
"currency": "string",
"reason": "string"
}
]
})
headers = {
"Authorization": "API.Key",
"Content-Type": "application/json"
}
conn.request(
"POST",
"/bll/partner/notify",
body=payload,
headers=headers,
)
response = conn.getresponse()
print(response.read().decode())
conn.close()requests.post("https://bll.titan.email/partner/notify",
headers={
"Authorization": "API.Key",
"Content-Type": "application/json"
},
json={
"event": "REFUND_ISSUED_BULK",
"data": [
{
"orderId": "string",
"domainName": "string",
"customerId": "string",
"paymentTxnId": "string",
"refundDate": "string",
"refundAmount": 0,
"refundTaxAmount": 0,
"refundUSDAmount": 0,
"currency": "string",
"reason": "string"
}
]
}
)async with aiohttp.ClientSession() as session:
await session.post("https://bll.titan.email/partner/notify",
headers={
"Authorization": "API.Key",
"Content-Type": "application/json"
},
json={
"event": "REFUND_ISSUED_BULK",
"data": [
{
"orderId": "string",
"domainName": "string",
"customerId": "string",
"paymentTxnId": "string",
"refundDate": "string",
"refundAmount": 0,
"refundTaxAmount": 0,
"refundUSDAmount": 0,
"currency": "string",
"reason": "string"
}
]
}
)httpx.post("https://bll.titan.email/partner/notify",
headers={
"Authorization": "API.Key",
"Content-Type": "application/json"
},
json={
"event": "REFUND_ISSUED_BULK",
"data": [
{
"orderId": "string",
"domainName": "string",
"customerId": "string",
"paymentTxnId": "string",
"refundDate": "string",
"refundAmount": 0,
"refundTaxAmount": 0,
"refundUSDAmount": 0,
"currency": "string",
"reason": "string"
}
]
}
)async with httpx.AsyncClient() as client:
await client.post("https://bll.titan.email/partner/notify",
headers={
"Authorization": "API.Key",
"Content-Type": "application/json"
},
json={
"event": "REFUND_ISSUED_BULK",
"data": [
{
"orderId": "string",
"domainName": "string",
"customerId": "string",
"paymentTxnId": "string",
"refundDate": "string",
"refundAmount": 0,
"refundTaxAmount": 0,
"refundUSDAmount": 0,
"currency": "string",
"reason": "string"
}
]
}
)library(httr2)
response <- request("https://bll.titan.email/partner/notify") |>
req_method("POST") |>
req_headers(
"Authorization" = "API.Key",
"Content-Type" = "application/json"
) |>
req_body_json(list(
event = "REFUND_ISSUED_BULK",
data = list(
list(
orderId = "string",
domainName = "string",
customerId = "string",
paymentTxnId = "string",
refundDate = "string",
refundAmount = 0,
refundTaxAmount = 0,
refundUSDAmount = 0,
currency = "string",
reason = "string"
)
)
)) |>
req_perform()
resp_body_string(response)require 'uri'
require 'net/http'
url = URI("https://bll.titan.email/partner/notify")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'API.Key'
request["Content-Type"] = 'application/json'
request.body = <<~JSON
{
"event": "REFUND_ISSUED_BULK",
"data": [
{
"orderId": "string",
"domainName": "string",
"customerId": "string",
"paymentTxnId": "string",
"refundDate": "string",
"refundAmount": 0,
"refundTaxAmount": 0,
"refundUSDAmount": 0,
"currency": "string",
"reason": "string"
}
]
}
JSON
response = http.request(request)
puts response.read_bodylet client = reqwest::Client::new();
let request = client
.post("https://bll.titan.email/partner/notify")
.header("Authorization", "API.Key")
.header("Content-Type", "application/json")
.json(&serde_json::json!({
"event": "REFUND_ISSUED_BULK",
"data": [
{
"orderId": "string",
"domainName": "string",
"customerId": "string",
"paymentTxnId": "string",
"refundDate": "string",
"refundAmount": 0,
"refundTaxAmount": 0,
"refundUSDAmount": 0,
"currency": "string",
"reason": "string"
}
]
}));
let response = request.send().await?;curl https://bll.titan.email/partner/notify \
--request POST \
--header 'Authorization: API.Key' \
--header 'Content-Type: application/json' \
--data '{
"event": "REFUND_ISSUED_BULK",
"data": [
{
"orderId": "string",
"domainName": "string",
"customerId": "string",
"paymentTxnId": "string",
"refundDate": "string",
"refundAmount": 0,
"refundTaxAmount": 0,
"refundUSDAmount": 0,
"currency": "string",
"reason": "string"
}
]
}'wget --quiet \
--method POST \
--header 'Authorization: API.Key' \
--header 'Content-Type: application/json' \
--body-data '{
"event": "REFUND_ISSUED_BULK",
"data": [
{
"orderId": "string",
"domainName": "string",
"customerId": "string",
"paymentTxnId": "string",
"refundDate": "string",
"refundAmount": 0,
"refundTaxAmount": 0,
"refundUSDAmount": 0,
"currency": "string",
"reason": "string"
}
]
}' \
--output-document \
- https://bll.titan.email/partner/notifyhttp --ignore-stdin 'POST' 'https://bll.titan.email/partner/notify' \
'Authorization:API.Key' \
'Content-Type:application/json' \
--raw='{"event":"REFUND_ISSUED_BULK","data":[{"orderId":"string","domainName":"string","customerId":"string","paymentTxnId":"string","refundDate":"string","refundAmount":0,"refundTaxAmount":0,"refundUSDAmount":0,"currency":"string","reason":"string"}]}'import Foundation
var request = URLRequest(url: URL(string: "https://bll.titan.email/partner/notify")!)
request.httpMethod = "POST"
request.setValue("API.Key", forHTTPHeaderField: "Authorization")
request.setValue("application/json", forHTTPHeaderField: "Content-Type")
let jsonBody = #"""
{
"event": "REFUND_ISSUED_BULK",
"data": [
{
"orderId": "string",
"domainName": "string",
"customerId": "string",
"paymentTxnId": "string",
"refundDate": "string",
"refundAmount": 0,
"refundTaxAmount": 0,
"refundUSDAmount": 0,
"currency": "string",
"reason": "string"
}
]
}
"""#
request.httpBody = jsonBody.data(using: .utf8)
let (data, response) = try await URLSession.shared.data(for: request)
guard let httpResponse = response as? HTTPURLResponse,
200..<300 ~= httpResponse.statusCode else {
throw URLError(.badServerResponse)
}
print(String(data: data, encoding: .utf8) ?? "")#include <curl/curl.h>
int main(void) {
curl_global_init(CURL_GLOBAL_DEFAULT);
CURL *curl = curl_easy_init();
if (!curl) {
curl_global_cleanup();
return 1;
}
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(curl, CURLOPT_URL, "https://bll.titan.email/partner/notify");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Authorization: API.Key");
headers = curl_slist_append(headers, "Content-Type: application/json");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_POSTFIELDS,
"{\n"
" \"event\": \"CREDIT_ISSUED\",\n"
" \"data\": {\n"
" \"orderId\": \"string\",\n"
" \"customerId\": \"string\",\n"
" \"customerName\": \"string\",\n"
" \"customerEmailAddress\": \"string\",\n"
" \"customerCountry\": \"string\",\n"
" \"planType\": \"free\",\n"
" \"noOfAccounts\": 0,\n"
" \"expiryDate\": \"string\",\n"
" \"billingCycle\": \"monthly\",\n"
" \"source\": \"string\",\n"
" \"sourceContext\": \"string\",\n"
" \"metadata\": {\n"
" \"paymentMethod\": \"string\",\n"
" \"partnerBrand\": \"string\",\n"
" \"autoRenew\": \"string\",\n"
" \"associatedOrderExpiryDate\": \"string\",\n"
" \"associatedOrderPlanType\": \"string\"\n"
" },\n"
" \"paymentTxnId\": \"qweradsf\",\n"
" \"paymentTxnTimestamp\": 1718886400000,\n"
" \"action\": \"newPurchase\"\n"
" }\n"
"}");
CURLcode res = curl_easy_perform(curl);
curl_easy_cleanup(curl);
curl_slist_free_all(headers);
curl_global_cleanup();
return (int)res;
}using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://bll.titan.email/partner/notify");
request.Headers.TryAddWithoutValidation("Authorization", "API.Key");
request.Content = new StringContent(
"""
{
"event": "CREDIT_ISSUED",
"data": {
"orderId": "string",
"customerId": "string",
"customerName": "string",
"customerEmailAddress": "string",
"customerCountry": "string",
"planType": "free",
"noOfAccounts": 0,
"expiryDate": "string",
"billingCycle": "monthly",
"source": "string",
"sourceContext": "string",
"metadata": {
"paymentMethod": "string",
"partnerBrand": "string",
"autoRenew": "string",
"associatedOrderExpiryDate": "string",
"associatedOrderPlanType": "string"
},
"paymentTxnId": "qweradsf",
"paymentTxnTimestamp": 1718886400000,
"action": "newPurchase"
}
}
""",
System.Text.Encoding.UTF8, "application/json");
using var response = await client.SendAsync(request);var client = new RestClient("https://bll.titan.email/partner/notify");
var request = new RestRequest("", Method.Post);
request.AddHeader("Authorization", "API.Key");
request.AddHeader("Content-Type", "application/json");
request.AddStringBody("""
{
"event": "CREDIT_ISSUED",
"data": {
"orderId": "string",
"customerId": "string",
"customerName": "string",
"customerEmailAddress": "string",
"customerCountry": "string",
"planType": "free",
"noOfAccounts": 0,
"expiryDate": "string",
"billingCycle": "monthly",
"source": "string",
"sourceContext": "string",
"metadata": {
"paymentMethod": "string",
"partnerBrand": "string",
"autoRenew": "string",
"associatedOrderExpiryDate": "string",
"associatedOrderPlanType": "string"
},
"paymentTxnId": "qweradsf",
"paymentTxnTimestamp": 1718886400000,
"action": "newPurchase"
}
}
""", ContentType.Json);
var response = await client.ExecuteAsync(request);(require '[clj-http.client :as client])
(client/post "https://bll.titan.email/partner/notify" {:headers {:Authorization "API.Key"}
:content-type :json
:form-params {:event "CREDIT_ISSUED"
:data {:orderId "string"
:customerId "string"
:customerName "string"
:customerEmailAddress "string"
:customerCountry "string"
:planType "free"
:noOfAccounts 0
:expiryDate "string"
:billingCycle "monthly"
:source "string"
:sourceContext "string"
:metadata {:paymentMethod "string"
:partnerBrand "string"
:autoRenew "string"
:associatedOrderExpiryDate "string"
:associatedOrderPlanType "string"}
:paymentTxnId "qweradsf"
:paymentTxnTimestamp 1718886400000
:action "newPurchase"}}})import 'package:http/http.dart' as http;
void main() async {
final headers = <String,String>{
'Authorization': 'API.Key',
'Content-Type': 'application/json',
};
final body = r'{"event":"CREDIT_ISSUED","data":{"orderId":"string","customerId":"string","customerName":"string","customerEmailAddress":"string","customerCountry":"string","planType":"free","noOfAccounts":0,"expiryDate":"string","billingCycle":"monthly","source":"string","sourceContext":"string","metadata":{"paymentMethod":"string","partnerBrand":"string","autoRenew":"string","associatedOrderExpiryDate":"string","associatedOrderPlanType":"string"},"paymentTxnId":"qweradsf","paymentTxnTimestamp":1718886400000,"action":"newPurchase"}}';
final response = await http.post(Uri.parse('https://bll.titan.email/partner/notify'), headers: headers, body: body);
print(response.body);
}let httpRequestMessage = new HttpRequestMessage(
HttpMethod("POST"),
new Uri("https://bll.titan.email/partner/notify")
)
httpRequestMessage.Headers.Add("Authorization", "API.Key")
httpRequestMessage.Headers.Add("Content-Type", "application/json")
let content = new StringContent("""{
"event": "CREDIT_ISSUED",
"data": {
"orderId": "string",
"customerId": "string",
"customerName": "string",
"customerEmailAddress": "string",
"customerCountry": "string",
"planType": "free",
"noOfAccounts": 0,
"expiryDate": "string",
"billingCycle": "monthly",
"source": "string",
"sourceContext": "string",
"metadata": {
"paymentMethod": "string",
"partnerBrand": "string",
"autoRenew": "string",
"associatedOrderExpiryDate": "string",
"associatedOrderPlanType": "string"
},
"paymentTxnId": "qweradsf",
"paymentTxnTimestamp": 1718886400000,
"action": "newPurchase"
}
}""", Encoding.UTF8, "application/json")
httpRequestMessage.Content <- content
let client = new HttpClient()
let! result = client.SendAsync(httpRequestMessage)
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
requestUrl := "https://bll.titan.email/partner/notify"
payload := strings.NewReader(`{
"event": "CREDIT_ISSUED",
"data": {
"orderId": "string",
"customerId": "string",
"customerName": "string",
"customerEmailAddress": "string",
"customerCountry": "string",
"planType": "free",
"noOfAccounts": 0,
"expiryDate": "string",
"billingCycle": "monthly",
"source": "string",
"sourceContext": "string",
"metadata": {
"paymentMethod": "string",
"partnerBrand": "string",
"autoRenew": "string",
"associatedOrderExpiryDate": "string",
"associatedOrderPlanType": "string"
},
"paymentTxnId": "qweradsf",
"paymentTxnTimestamp": 1718886400000,
"action": "newPurchase"
}
}`)
req, _ := http.NewRequest("POST", requestUrl, payload)
req.Header.Add("Authorization", "API.Key")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}POST /partner/notify HTTP/1.1
Host: bll.titan.email
Authorization: API.Key
Content-Type: application/json
{"event":"CREDIT_ISSUED","data":{"orderId":"string","customerId":"string","customerName":"string","customerEmailAddress":"string","customerCountry":"string","planType":"free","noOfAccounts":0,"expiryDate":"string","billingCycle":"monthly","source":"string","sourceContext":"string","metadata":{"paymentMethod":"string","partnerBrand":"string","autoRenew":"string","associatedOrderExpiryDate":"string","associatedOrderPlanType":"string"},"paymentTxnId":"qweradsf","paymentTxnTimestamp":1718886400000,"action":"newPurchase"}}POST /bll/partner/notify HTTP/1.1
Host: api-euc1.titan.email
Authorization: API.Key
Content-Type: application/json
{"event":"CREDIT_ISSUED","data":{"orderId":"string","customerId":"string","customerName":"string","customerEmailAddress":"string","customerCountry":"string","planType":"free","noOfAccounts":0,"expiryDate":"string","billingCycle":"monthly","source":"string","sourceContext":"string","metadata":{"paymentMethod":"string","partnerBrand":"string","autoRenew":"string","associatedOrderExpiryDate":"string","associatedOrderPlanType":"string"},"paymentTxnId":"qweradsf","paymentTxnTimestamp":1718886400000,"action":"newPurchase"}}java.io.ByteArrayOutputStream body = new java.io.ByteArrayOutputStream();
body.write("{\"event\":\"CREDIT_ISSUED\",\"data\":{\"orderId\":\"string\",\"customerId\":\"string\",\"customerName\":\"string\",\"customerEmailAddress\":\"string\",\"customerCountry\":\"string\",\"planType\":\"free\",\"noOfAccounts\":0,\"expiryDate\":\"string\",\"billingCycle\":\"monthly\",\"source\":\"string\",\"sourceContext\":\"string\",\"metadata\":{\"paymentMethod\":\"string\",\"partnerBrand\":\"string\",\"autoRenew\":\"string\",\"associatedOrderExpiryDate\":\"string\",\"associatedOrderPlanType\":\"string\"},\"paymentTxnId\":\"qweradsf\",\"paymentTxnTimestamp\":1718886400000,\"action\":\"newPurchase\"}}".getBytes(java.nio.charset.StandardCharsets.UTF_8));
try (AsyncHttpClient client = new DefaultAsyncHttpClient()) {
Response response = client.prepare("POST", "https://bll.titan.email/partner/notify")
.addHeader("Authorization", "API.Key")
.addHeader("Content-Type", "application/json")
.setBody(body.toByteArray())
.execute()
.get();
System.out.println(response.getResponseBody());
}java.io.ByteArrayOutputStream body = new java.io.ByteArrayOutputStream();
body.write("{\"event\":\"CREDIT_ISSUED\",\"data\":{\"orderId\":\"string\",\"customerId\":\"string\",\"customerName\":\"string\",\"customerEmailAddress\":\"string\",\"customerCountry\":\"string\",\"planType\":\"free\",\"noOfAccounts\":0,\"expiryDate\":\"string\",\"billingCycle\":\"monthly\",\"source\":\"string\",\"sourceContext\":\"string\",\"metadata\":{\"paymentMethod\":\"string\",\"partnerBrand\":\"string\",\"autoRenew\":\"string\",\"associatedOrderExpiryDate\":\"string\",\"associatedOrderPlanType\":\"string\"},\"paymentTxnId\":\"qweradsf\",\"paymentTxnTimestamp\":1718886400000,\"action\":\"newPurchase\"}}".getBytes(java.nio.charset.StandardCharsets.UTF_8));
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(java.net.URI.create("https://bll.titan.email/partner/notify"))
.header("Authorization", "API.Key")
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofByteArray(body.toByteArray()))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());OkHttpClient client = new OkHttpClient();
RequestBody body = RequestBody.create(MediaType.parse("application/json"), "{\"event\":\"CREDIT_ISSUED\",\"data\":{\"orderId\":\"string\",\"customerId\":\"string\",\"customerName\":\"string\",\"customerEmailAddress\":\"string\",\"customerCountry\":\"string\",\"planType\":\"free\",\"noOfAccounts\":0,\"expiryDate\":\"string\",\"billingCycle\":\"monthly\",\"source\":\"string\",\"sourceContext\":\"string\",\"metadata\":{\"paymentMethod\":\"string\",\"partnerBrand\":\"string\",\"autoRenew\":\"string\",\"associatedOrderExpiryDate\":\"string\",\"associatedOrderPlanType\":\"string\"},\"paymentTxnId\":\"qweradsf\",\"paymentTxnTimestamp\":1718886400000,\"action\":\"newPurchase\"}}");
Request request = new Request.Builder()
.url("https://bll.titan.email/partner/notify")
.method("POST", body)
.addHeader("Authorization", "API.Key")
.addHeader("Content-Type", "application/json")
.build();
try (Response response = client.newCall(request).execute()) {
System.out.println(response.body().string());
}java.io.ByteArrayOutputStream body = new java.io.ByteArrayOutputStream();
body.write("{\"event\":\"CREDIT_ISSUED\",\"data\":{\"orderId\":\"string\",\"customerId\":\"string\",\"customerName\":\"string\",\"customerEmailAddress\":\"string\",\"customerCountry\":\"string\",\"planType\":\"free\",\"noOfAccounts\":0,\"expiryDate\":\"string\",\"billingCycle\":\"monthly\",\"source\":\"string\",\"sourceContext\":\"string\",\"metadata\":{\"paymentMethod\":\"string\",\"partnerBrand\":\"string\",\"autoRenew\":\"string\",\"associatedOrderExpiryDate\":\"string\",\"associatedOrderPlanType\":\"string\"},\"paymentTxnId\":\"qweradsf\",\"paymentTxnTimestamp\":1718886400000,\"action\":\"newPurchase\"}}".getBytes(java.nio.charset.StandardCharsets.UTF_8));
HttpResponse<String> response = Unirest.request("POST", "https://bll.titan.email/partner/notify")
.header("Authorization", "API.Key")
.header("Content-Type", "application/json")
.body(body.toByteArray())
.asString();
System.out.println(response.getBody());fetch('https://bll.titan.email/partner/notify', {
method: 'POST',
headers: {
Authorization: 'API.Key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
event: 'CREDIT_ISSUED',
data: {
orderId: 'string',
customerId: 'string',
customerName: 'string',
customerEmailAddress: 'string',
customerCountry: 'string',
planType: 'free',
noOfAccounts: 0,
expiryDate: 'string',
billingCycle: 'monthly',
source: 'string',
sourceContext: 'string',
metadata: {
paymentMethod: 'string',
partnerBrand: 'string',
autoRenew: 'string',
associatedOrderExpiryDate: 'string',
associatedOrderPlanType: 'string'
},
paymentTxnId: 'qweradsf',
paymentTxnTimestamp: 1718886400000,
action: 'newPurchase'
}
})
})import axios from 'axios'
const options = {
method: 'POST',
url: 'https://bll.titan.email/partner/notify',
headers: {
Authorization: 'API.Key',
'Content-Type': 'application/json'
},
data: {
event: 'CREDIT_ISSUED',
data: {
orderId: 'string',
customerId: 'string',
customerName: 'string',
customerEmailAddress: 'string',
customerCountry: 'string',
planType: 'free',
noOfAccounts: 0,
expiryDate: 'string',
billingCycle: 'monthly',
source: 'string',
sourceContext: 'string',
metadata: {
paymentMethod: 'string',
partnerBrand: 'string',
autoRenew: 'string',
associatedOrderExpiryDate: 'string',
associatedOrderPlanType: 'string'
},
paymentTxnId: 'qweradsf',
paymentTxnTimestamp: 1718886400000,
action: 'newPurchase'
}
}
}
try {
const { data } = await axios.request(options)
console.log(data)
} catch (error) {
console.error(error)
}import { ofetch } from 'ofetch'
ofetch('https://bll.titan.email/partner/notify', {
method: 'POST',
headers: {
Authorization: 'API.Key',
'Content-Type': 'application/json'
},
body: {
event: 'CREDIT_ISSUED',
data: {
orderId: 'string',
customerId: 'string',
customerName: 'string',
customerEmailAddress: 'string',
customerCountry: 'string',
planType: 'free',
noOfAccounts: 0,
expiryDate: 'string',
billingCycle: 'monthly',
source: 'string',
sourceContext: 'string',
metadata: {
paymentMethod: 'string',
partnerBrand: 'string',
autoRenew: 'string',
associatedOrderExpiryDate: 'string',
associatedOrderPlanType: 'string'
},
paymentTxnId: 'qweradsf',
paymentTxnTimestamp: 1718886400000,
action: 'newPurchase'
}
}
})$.ajax({
url: "https://bll.titan.email/partner/notify",
method: "POST",
processData: false,
contentType: false,
beforeSend(xhr) {
xhr.setRequestHeader("Authorization", "API.Key");
xhr.setRequestHeader("Content-Type", "application/json");
},
data: "{\"event\":\"CREDIT_ISSUED\",\"data\":{\"orderId\":\"string\",\"customerId\":\"string\",\"customerName\":\"string\",\"customerEmailAddress\":\"string\",\"customerCountry\":\"string\",\"planType\":\"free\",\"noOfAccounts\":0,\"expiryDate\":\"string\",\"billingCycle\":\"monthly\",\"source\":\"string\",\"sourceContext\":\"string\",\"metadata\":{\"paymentMethod\":\"string\",\"partnerBrand\":\"string\",\"autoRenew\":\"string\",\"associatedOrderExpiryDate\":\"string\",\"associatedOrderPlanType\":\"string\"},\"paymentTxnId\":\"qweradsf\",\"paymentTxnTimestamp\":1718886400000,\"action\":\"newPurchase\"}}"
}).done((response) => console.log(response));const xhr = new XMLHttpRequest();
xhr.open("POST", "https://bll.titan.email/partner/notify");
xhr.withCredentials = true;
xhr.setRequestHeader("Authorization", "API.Key");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.addEventListener("load", () => console.log(xhr.responseText));
xhr.send("{\"event\":\"CREDIT_ISSUED\",\"data\":{\"orderId\":\"string\",\"customerId\":\"string\",\"customerName\":\"string\",\"customerEmailAddress\":\"string\",\"customerCountry\":\"string\",\"planType\":\"free\",\"noOfAccounts\":0,\"expiryDate\":\"string\",\"billingCycle\":\"monthly\",\"source\":\"string\",\"sourceContext\":\"string\",\"metadata\":{\"paymentMethod\":\"string\",\"partnerBrand\":\"string\",\"autoRenew\":\"string\",\"associatedOrderExpiryDate\":\"string\",\"associatedOrderPlanType\":\"string\"},\"paymentTxnId\":\"qweradsf\",\"paymentTxnTimestamp\":1718886400000,\"action\":\"newPurchase\"}}");using HTTP
using JSON
response = HTTP.post(
"https://bll.titan.email/partner/notify",
[
"Authorization" => "API.Key",
"Content-Type" => "application/json"
],
JSON.json(Dict(
"event" => "CREDIT_ISSUED",
"data" => Dict(
"orderId" => "string",
"customerId" => "string",
"customerName" => "string",
"customerEmailAddress" => "string",
"customerCountry" => "string",
"planType" => "free",
"noOfAccounts" => 0,
"expiryDate" => "string",
"billingCycle" => "monthly",
"source" => "string",
"sourceContext" => "string",
"metadata" => Dict(
"paymentMethod" => "string",
"partnerBrand" => "string",
"autoRenew" => "string",
"associatedOrderExpiryDate" => "string",
"associatedOrderPlanType" => "string"
),
"paymentTxnId" => "qweradsf",
"paymentTxnTimestamp" => 1718886400000,
"action" => "newPurchase"
)
))
)
println(String(response.body))val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\"event\":\"CREDIT_ISSUED\",\"data\":{\"orderId\":\"string\",\"customerId\":\"string\",\"customerName\":\"string\",\"customerEmailAddress\":\"string\",\"customerCountry\":\"string\",\"planType\":\"free\",\"noOfAccounts\":0,\"expiryDate\":\"string\",\"billingCycle\":\"monthly\",\"source\":\"string\",\"sourceContext\":\"string\",\"metadata\":{\"paymentMethod\":\"string\",\"partnerBrand\":\"string\",\"autoRenew\":\"string\",\"associatedOrderExpiryDate\":\"string\",\"associatedOrderPlanType\":\"string\"},\"paymentTxnId\":\"qweradsf\",\"paymentTxnTimestamp\":1718886400000,\"action\":\"newPurchase\"}}")
val request = Request.Builder()
.url("https://bll.titan.email/partner/notify")
.post(body)
.addHeader("Authorization", "API.Key")
.addHeader("Content-Type", "application/json")
.build()
val response = client.newCall(request).execute()fetch('https://bll.titan.email/partner/notify', {
method: 'POST',
headers: {
Authorization: 'API.Key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
event: 'CREDIT_ISSUED',
data: {
orderId: 'string',
customerId: 'string',
customerName: 'string',
customerEmailAddress: 'string',
customerCountry: 'string',
planType: 'free',
noOfAccounts: 0,
expiryDate: 'string',
billingCycle: 'monthly',
source: 'string',
sourceContext: 'string',
metadata: {
paymentMethod: 'string',
partnerBrand: 'string',
autoRenew: 'string',
associatedOrderExpiryDate: 'string',
associatedOrderPlanType: 'string'
},
paymentTxnId: 'qweradsf',
paymentTxnTimestamp: 1718886400000,
action: 'newPurchase'
}
})
})import axios from 'axios'
const options = {
method: 'POST',
url: 'https://bll.titan.email/partner/notify',
headers: {
Authorization: 'API.Key',
'Content-Type': 'application/json'
},
data: {
event: 'CREDIT_ISSUED',
data: {
orderId: 'string',
customerId: 'string',
customerName: 'string',
customerEmailAddress: 'string',
customerCountry: 'string',
planType: 'free',
noOfAccounts: 0,
expiryDate: 'string',
billingCycle: 'monthly',
source: 'string',
sourceContext: 'string',
metadata: {
paymentMethod: 'string',
partnerBrand: 'string',
autoRenew: 'string',
associatedOrderExpiryDate: 'string',
associatedOrderPlanType: 'string'
},
paymentTxnId: 'qweradsf',
paymentTxnTimestamp: 1718886400000,
action: 'newPurchase'
}
}
}
try {
const { data } = await axios.request(options)
console.log(data)
} catch (error) {
console.error(error)
}import { ofetch } from 'ofetch'
ofetch('https://bll.titan.email/partner/notify', {
method: 'POST',
headers: {
Authorization: 'API.Key',
'Content-Type': 'application/json'
},
body: {
event: 'CREDIT_ISSUED',
data: {
orderId: 'string',
customerId: 'string',
customerName: 'string',
customerEmailAddress: 'string',
customerCountry: 'string',
planType: 'free',
noOfAccounts: 0,
expiryDate: 'string',
billingCycle: 'monthly',
source: 'string',
sourceContext: 'string',
metadata: {
paymentMethod: 'string',
partnerBrand: 'string',
autoRenew: 'string',
associatedOrderExpiryDate: 'string',
associatedOrderPlanType: 'string'
},
paymentTxnId: 'qweradsf',
paymentTxnTimestamp: 1718886400000,
action: 'newPurchase'
}
}
})import { request } from 'undici'
const { statusCode, body } = await request('https://bll.titan.email/partner/notify', {
method: 'POST',
headers: {
Authorization: 'API.Key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
event: 'CREDIT_ISSUED',
data: {
orderId: 'string',
customerId: 'string',
customerName: 'string',
customerEmailAddress: 'string',
customerCountry: 'string',
planType: 'free',
noOfAccounts: 0,
expiryDate: 'string',
billingCycle: 'monthly',
source: 'string',
sourceContext: 'string',
metadata: {
paymentMethod: 'string',
partnerBrand: 'string',
autoRenew: 'string',
associatedOrderExpiryDate: 'string',
associatedOrderPlanType: 'string'
},
paymentTxnId: 'qweradsf',
paymentTxnTimestamp: 1718886400000,
action: 'newPurchase'
}
})
})#import <Foundation/Foundation.h>
NSDictionary *headers = @{ @"Authorization": @"API.Key",
@"Content-Type": @"application/json" };
NSDictionary *parameters = @{ @"event": @"CREDIT_ISSUED",
@"data": @{ @"orderId": @"string", @"customerId": @"string", @"customerName": @"string", @"customerEmailAddress": @"string", @"customerCountry": @"string", @"planType": @"free", @"noOfAccounts": @0, @"expiryDate": @"string", @"billingCycle": @"monthly", @"source": @"string", @"sourceContext": @"string", @"metadata": @{ @"paymentMethod": @"string", @"partnerBrand": @"string", @"autoRenew": @"string", @"associatedOrderExpiryDate": @"string", @"associatedOrderPlanType": @"string" }, @"paymentTxnId": @"qweradsf", @"paymentTxnTimestamp": @1718886400000, @"action": @"newPurchase" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://bll.titan.email/partner/notify"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];open Lwt.Infix
let () =
Lwt_main.run (
let uri = Uri.of_string "https://bll.titan.email/partner/notify" in
let headers = Cohttp.Header.of_list [
("Authorization", "API.Key");
("Content-Type", "application/json");
] in
let part0 = "{\"event\":\"CREDIT_ISSUED\",\"data\":{\"orderId\":\"string\",\"customerId\":\"string\",\"customerName\":\"string\",\"customerEmailAddress\":\"string\",\"customerCountry\":\"string\",\"planType\":\"free\",\"noOfAccounts\":0,\"expiryDate\":\"string\",\"billingCycle\":\"monthly\",\"source\":\"string\",\"sourceContext\":\"string\",\"metadata\":{\"paymentMethod\":\"string\",\"partnerBrand\":\"string\",\"autoRenew\":\"string\",\"associatedOrderExpiryDate\":\"string\",\"associatedOrderPlanType\":\"string\"},\"paymentTxnId\":\"qweradsf\",\"paymentTxnTimestamp\":1718886400000,\"action\":\"newPurchase\"}}" in
let body = Cohttp_lwt.Body.of_string (String.concat "" [part0]) in
Cohttp_lwt_unix.Client.call ~headers ~body (Cohttp.Code.method_of_string "POST") uri
>>= fun (_response, body) ->
Cohttp_lwt.Body.to_string body >>= Lwt_io.printl
)$ch = curl_init("https://bll.titan.email/partner/notify");
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: API.Key', 'Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
'event' => 'CREDIT_ISSUED',
'data' => [
'orderId' => 'string',
'customerId' => 'string',
'customerName' => 'string',
'customerEmailAddress' => 'string',
'customerCountry' => 'string',
'planType' => 'free',
'noOfAccounts' => 0,
'expiryDate' => 'string',
'billingCycle' => 'monthly',
'source' => 'string',
'sourceContext' => 'string',
'metadata' => [
'paymentMethod' => 'string',
'partnerBrand' => 'string',
'autoRenew' => 'string',
'associatedOrderExpiryDate' => 'string',
'associatedOrderPlanType' => 'string'
],
'paymentTxnId' => 'qweradsf',
'paymentTxnTimestamp' => 1718886400000,
'action' => 'newPurchase'
]
]));
curl_exec($ch);
curl_close($ch);$client = new GuzzleHttp\Client();
$response = $client->request('POST', 'https://bll.titan.email/partner/notify', [
'headers' => [
'Authorization' => 'API.Key',
'Content-Type' => 'application/json'
],
'json' => [
'event' => 'CREDIT_ISSUED',
'data' => [
'orderId' => 'string',
'customerId' => 'string',
'customerName' => 'string',
'customerEmailAddress' => 'string',
'customerCountry' => 'string',
'planType' => 'free',
'noOfAccounts' => 0,
'expiryDate' => 'string',
'billingCycle' => 'monthly',
'source' => 'string',
'sourceContext' => 'string',
'metadata' => [
'paymentMethod' => 'string',
'partnerBrand' => 'string',
'autoRenew' => 'string',
'associatedOrderExpiryDate' => 'string',
'associatedOrderPlanType' => 'string'
],
'paymentTxnId' => 'qweradsf',
'paymentTxnTimestamp' => 1718886400000,
'action' => 'newPurchase'
]
]
]);use Illuminate\Support\Facades\Http;
$response = Http::withHeaders([
'Authorization' => 'API.Key',
'Content-Type' => 'application/json'
])
->post('https://bll.titan.email/partner/notify', [
'event' => 'CREDIT_ISSUED',
'data' => [
'orderId' => 'string',
'customerId' => 'string',
'customerName' => 'string',
'customerEmailAddress' => 'string',
'customerCountry' => 'string',
'planType' => 'free',
'noOfAccounts' => 0,
'expiryDate' => 'string',
'billingCycle' => 'monthly',
'source' => 'string',
'sourceContext' => 'string',
'metadata' => [
'paymentMethod' => 'string',
'partnerBrand' => 'string',
'autoRenew' => 'string',
'associatedOrderExpiryDate' => 'string',
'associatedOrderPlanType' => 'string'
],
'paymentTxnId' => 'qweradsf',
'paymentTxnTimestamp' => 1718886400000,
'action' => 'newPurchase'
]
]);$headers = @{
'Authorization' = 'API.Key'
'Content-Type' = 'application/json'
}
$body = [System.IO.MemoryStream]::new()
$bytes = [System.Text.Encoding]::UTF8.GetBytes('{"event":"CREDIT_ISSUED","data":{"orderId":"string","customerId":"string","customerName":"string","customerEmailAddress":"string","customerCountry":"string","planType":"free","noOfAccounts":0,"expiryDate":"string","billingCycle":"monthly","source":"string","sourceContext":"string","metadata":{"paymentMethod":"string","partnerBrand":"string","autoRenew":"string","associatedOrderExpiryDate":"string","associatedOrderPlanType":"string"},"paymentTxnId":"qweradsf","paymentTxnTimestamp":1718886400000,"action":"newPurchase"}}')
$body.Write($bytes, 0, $bytes.Length)
$response = Invoke-WebRequest -Uri 'https://bll.titan.email/partner/notify' -Method 'POST' -Headers $headers -Body $body.ToArray()
$body.Dispose()
$response$headers = @{
'Authorization' = 'API.Key'
'Content-Type' = 'application/json'
}
$body = [System.IO.MemoryStream]::new()
$bytes = [System.Text.Encoding]::UTF8.GetBytes('{"event":"CREDIT_ISSUED","data":{"orderId":"string","customerId":"string","customerName":"string","customerEmailAddress":"string","customerCountry":"string","planType":"free","noOfAccounts":0,"expiryDate":"string","billingCycle":"monthly","source":"string","sourceContext":"string","metadata":{"paymentMethod":"string","partnerBrand":"string","autoRenew":"string","associatedOrderExpiryDate":"string","associatedOrderPlanType":"string"},"paymentTxnId":"qweradsf","paymentTxnTimestamp":1718886400000,"action":"newPurchase"}}')
$body.Write($bytes, 0, $bytes.Length)
$response = Invoke-RestMethod -Uri 'https://bll.titan.email/partner/notify' -Method 'POST' -Headers $headers -Body $body.ToArray()
$body.Dispose()
$responseimport http.client
import json
conn = http.client.HTTPSConnection("bll.titan.email")
payload = json.dumps({
"event": "CREDIT_ISSUED",
"data": {
"orderId": "string",
"customerId": "string",
"customerName": "string",
"customerEmailAddress": "string",
"customerCountry": "string",
"planType": "free",
"noOfAccounts": 0,
"expiryDate": "string",
"billingCycle": "monthly",
"source": "string",
"sourceContext": "string",
"metadata": {
"paymentMethod": "string",
"partnerBrand": "string",
"autoRenew": "string",
"associatedOrderExpiryDate": "string",
"associatedOrderPlanType": "string"
},
"paymentTxnId": "qweradsf",
"paymentTxnTimestamp": 1718886400000,
"action": "newPurchase"
}
})
headers = {
"Authorization": "API.Key",
"Content-Type": "application/json"
}
conn.request(
"POST",
"/partner/notify",
body=payload,
headers=headers,
)
response = conn.getresponse()
print(response.read().decode())
conn.close()import http.client
import json
conn = http.client.HTTPSConnection("api-euc1.titan.email")
payload = json.dumps({
"event": "CREDIT_ISSUED",
"data": {
"orderId": "string",
"customerId": "string",
"customerName": "string",
"customerEmailAddress": "string",
"customerCountry": "string",
"planType": "free",
"noOfAccounts": 0,
"expiryDate": "string",
"billingCycle": "monthly",
"source": "string",
"sourceContext": "string",
"metadata": {
"paymentMethod": "string",
"partnerBrand": "string",
"autoRenew": "string",
"associatedOrderExpiryDate": "string",
"associatedOrderPlanType": "string"
},
"paymentTxnId": "qweradsf",
"paymentTxnTimestamp": 1718886400000,
"action": "newPurchase"
}
})
headers = {
"Authorization": "API.Key",
"Content-Type": "application/json"
}
conn.request(
"POST",
"/bll/partner/notify",
body=payload,
headers=headers,
)
response = conn.getresponse()
print(response.read().decode())
conn.close()requests.post("https://bll.titan.email/partner/notify",
headers={
"Authorization": "API.Key",
"Content-Type": "application/json"
},
json={
"event": "CREDIT_ISSUED",
"data": {
"orderId": "string",
"customerId": "string",
"customerName": "string",
"customerEmailAddress": "string",
"customerCountry": "string",
"planType": "free",
"noOfAccounts": 0,
"expiryDate": "string",
"billingCycle": "monthly",
"source": "string",
"sourceContext": "string",
"metadata": {
"paymentMethod": "string",
"partnerBrand": "string",
"autoRenew": "string",
"associatedOrderExpiryDate": "string",
"associatedOrderPlanType": "string"
},
"paymentTxnId": "qweradsf",
"paymentTxnTimestamp": 1718886400000,
"action": "newPurchase"
}
}
)async with aiohttp.ClientSession() as session:
await session.post("https://bll.titan.email/partner/notify",
headers={
"Authorization": "API.Key",
"Content-Type": "application/json"
},
json={
"event": "CREDIT_ISSUED",
"data": {
"orderId": "string",
"customerId": "string",
"customerName": "string",
"customerEmailAddress": "string",
"customerCountry": "string",
"planType": "free",
"noOfAccounts": 0,
"expiryDate": "string",
"billingCycle": "monthly",
"source": "string",
"sourceContext": "string",
"metadata": {
"paymentMethod": "string",
"partnerBrand": "string",
"autoRenew": "string",
"associatedOrderExpiryDate": "string",
"associatedOrderPlanType": "string"
},
"paymentTxnId": "qweradsf",
"paymentTxnTimestamp": 1718886400000,
"action": "newPurchase"
}
}
)httpx.post("https://bll.titan.email/partner/notify",
headers={
"Authorization": "API.Key",
"Content-Type": "application/json"
},
json={
"event": "CREDIT_ISSUED",
"data": {
"orderId": "string",
"customerId": "string",
"customerName": "string",
"customerEmailAddress": "string",
"customerCountry": "string",
"planType": "free",
"noOfAccounts": 0,
"expiryDate": "string",
"billingCycle": "monthly",
"source": "string",
"sourceContext": "string",
"metadata": {
"paymentMethod": "string",
"partnerBrand": "string",
"autoRenew": "string",
"associatedOrderExpiryDate": "string",
"associatedOrderPlanType": "string"
},
"paymentTxnId": "qweradsf",
"paymentTxnTimestamp": 1718886400000,
"action": "newPurchase"
}
}
)async with httpx.AsyncClient() as client:
await client.post("https://bll.titan.email/partner/notify",
headers={
"Authorization": "API.Key",
"Content-Type": "application/json"
},
json={
"event": "CREDIT_ISSUED",
"data": {
"orderId": "string",
"customerId": "string",
"customerName": "string",
"customerEmailAddress": "string",
"customerCountry": "string",
"planType": "free",
"noOfAccounts": 0,
"expiryDate": "string",
"billingCycle": "monthly",
"source": "string",
"sourceContext": "string",
"metadata": {
"paymentMethod": "string",
"partnerBrand": "string",
"autoRenew": "string",
"associatedOrderExpiryDate": "string",
"associatedOrderPlanType": "string"
},
"paymentTxnId": "qweradsf",
"paymentTxnTimestamp": 1718886400000,
"action": "newPurchase"
}
}
)library(httr2)
response <- request("https://bll.titan.email/partner/notify") |>
req_method("POST") |>
req_headers(
"Authorization" = "API.Key",
"Content-Type" = "application/json"
) |>
req_body_json(list(
event = "CREDIT_ISSUED",
data = list(
orderId = "string",
customerId = "string",
customerName = "string",
customerEmailAddress = "string",
customerCountry = "string",
planType = "free",
noOfAccounts = 0,
expiryDate = "string",
billingCycle = "monthly",
source = "string",
sourceContext = "string",
metadata = list(
paymentMethod = "string",
partnerBrand = "string",
autoRenew = "string",
associatedOrderExpiryDate = "string",
associatedOrderPlanType = "string"
),
paymentTxnId = "qweradsf",
paymentTxnTimestamp = 1718886400000,
action = "newPurchase"
)
)) |>
req_perform()
resp_body_string(response)require 'uri'
require 'net/http'
url = URI("https://bll.titan.email/partner/notify")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'API.Key'
request["Content-Type"] = 'application/json'
request.body = <<~JSON
{
"event": "CREDIT_ISSUED",
"data": {
"orderId": "string",
"customerId": "string",
"customerName": "string",
"customerEmailAddress": "string",
"customerCountry": "string",
"planType": "free",
"noOfAccounts": 0,
"expiryDate": "string",
"billingCycle": "monthly",
"source": "string",
"sourceContext": "string",
"metadata": {
"paymentMethod": "string",
"partnerBrand": "string",
"autoRenew": "string",
"associatedOrderExpiryDate": "string",
"associatedOrderPlanType": "string"
},
"paymentTxnId": "qweradsf",
"paymentTxnTimestamp": 1718886400000,
"action": "newPurchase"
}
}
JSON
response = http.request(request)
puts response.read_bodylet client = reqwest::Client::new();
let request = client
.post("https://bll.titan.email/partner/notify")
.header("Authorization", "API.Key")
.header("Content-Type", "application/json")
.json(&serde_json::json!({
"event": "CREDIT_ISSUED",
"data": {
"orderId": "string",
"customerId": "string",
"customerName": "string",
"customerEmailAddress": "string",
"customerCountry": "string",
"planType": "free",
"noOfAccounts": 0,
"expiryDate": "string",
"billingCycle": "monthly",
"source": "string",
"sourceContext": "string",
"metadata": {
"paymentMethod": "string",
"partnerBrand": "string",
"autoRenew": "string",
"associatedOrderExpiryDate": "string",
"associatedOrderPlanType": "string"
},
"paymentTxnId": "qweradsf",
"paymentTxnTimestamp": 1718886400000,
"action": "newPurchase"
}
}));
let response = request.send().await?;curl https://bll.titan.email/partner/notify \
--request POST \
--header 'Authorization: API.Key' \
--header 'Content-Type: application/json' \
--data '{
"event": "CREDIT_ISSUED",
"data": {
"orderId": "string",
"customerId": "string",
"customerName": "string",
"customerEmailAddress": "string",
"customerCountry": "string",
"planType": "free",
"noOfAccounts": 0,
"expiryDate": "string",
"billingCycle": "monthly",
"source": "string",
"sourceContext": "string",
"metadata": {
"paymentMethod": "string",
"partnerBrand": "string",
"autoRenew": "string",
"associatedOrderExpiryDate": "string",
"associatedOrderPlanType": "string"
},
"paymentTxnId": "qweradsf",
"paymentTxnTimestamp": 1718886400000,
"action": "newPurchase"
}
}'wget --quiet \
--method POST \
--header 'Authorization: API.Key' \
--header 'Content-Type: application/json' \
--body-data '{
"event": "CREDIT_ISSUED",
"data": {
"orderId": "string",
"customerId": "string",
"customerName": "string",
"customerEmailAddress": "string",
"customerCountry": "string",
"planType": "free",
"noOfAccounts": 0,
"expiryDate": "string",
"billingCycle": "monthly",
"source": "string",
"sourceContext": "string",
"metadata": {
"paymentMethod": "string",
"partnerBrand": "string",
"autoRenew": "string",
"associatedOrderExpiryDate": "string",
"associatedOrderPlanType": "string"
},
"paymentTxnId": "qweradsf",
"paymentTxnTimestamp": 1718886400000,
"action": "newPurchase"
}
}' \
--output-document \
- https://bll.titan.email/partner/notifyhttp --ignore-stdin 'POST' 'https://bll.titan.email/partner/notify' \
'Authorization:API.Key' \
'Content-Type:application/json' \
--raw='{"event":"CREDIT_ISSUED","data":{"orderId":"string","customerId":"string","customerName":"string","customerEmailAddress":"string","customerCountry":"string","planType":"free","noOfAccounts":0,"expiryDate":"string","billingCycle":"monthly","source":"string","sourceContext":"string","metadata":{"paymentMethod":"string","partnerBrand":"string","autoRenew":"string","associatedOrderExpiryDate":"string","associatedOrderPlanType":"string"},"paymentTxnId":"qweradsf","paymentTxnTimestamp":1718886400000,"action":"newPurchase"}}'import Foundation
var request = URLRequest(url: URL(string: "https://bll.titan.email/partner/notify")!)
request.httpMethod = "POST"
request.setValue("API.Key", forHTTPHeaderField: "Authorization")
request.setValue("application/json", forHTTPHeaderField: "Content-Type")
let jsonBody = #"""
{
"event": "CREDIT_ISSUED",
"data": {
"orderId": "string",
"customerId": "string",
"customerName": "string",
"customerEmailAddress": "string",
"customerCountry": "string",
"planType": "free",
"noOfAccounts": 0,
"expiryDate": "string",
"billingCycle": "monthly",
"source": "string",
"sourceContext": "string",
"metadata": {
"paymentMethod": "string",
"partnerBrand": "string",
"autoRenew": "string",
"associatedOrderExpiryDate": "string",
"associatedOrderPlanType": "string"
},
"paymentTxnId": "qweradsf",
"paymentTxnTimestamp": 1718886400000,
"action": "newPurchase"
}
}
"""#
request.httpBody = jsonBody.data(using: .utf8)
let (data, response) = try await URLSession.shared.data(for: request)
guard let httpResponse = response as? HTTPURLResponse,
200..<300 ~= httpResponse.statusCode else {
throw URLError(.badServerResponse)
}
print(String(data: data, encoding: .utf8) ?? "")#include <curl/curl.h>
int main(void) {
curl_global_init(CURL_GLOBAL_DEFAULT);
CURL *curl = curl_easy_init();
if (!curl) {
curl_global_cleanup();
return 1;
}
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(curl, CURLOPT_URL, "https://bll.titan.email/partner/notify");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Authorization: API.Key");
headers = curl_slist_append(headers, "Content-Type: application/json");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_POSTFIELDS,
"{\n"
" \"event\": \"MAIL_ORDER_PURCHASE_CANCELED\",\n"
" \"data\": {\n"
" \"orderId\": \"string\",\n"
" \"customerId\": \"string\"\n"
" }\n"
"}");
CURLcode res = curl_easy_perform(curl);
curl_easy_cleanup(curl);
curl_slist_free_all(headers);
curl_global_cleanup();
return (int)res;
}using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://bll.titan.email/partner/notify");
request.Headers.TryAddWithoutValidation("Authorization", "API.Key");
request.Content = new StringContent(
"""
{
"event": "MAIL_ORDER_PURCHASE_CANCELED",
"data": {
"orderId": "string",
"customerId": "string"
}
}
""",
System.Text.Encoding.UTF8, "application/json");
using var response = await client.SendAsync(request);var client = new RestClient("https://bll.titan.email/partner/notify");
var request = new RestRequest("", Method.Post);
request.AddHeader("Authorization", "API.Key");
request.AddHeader("Content-Type", "application/json");
request.AddStringBody("""
{
"event": "MAIL_ORDER_PURCHASE_CANCELED",
"data": {
"orderId": "string",
"customerId": "string"
}
}
""", ContentType.Json);
var response = await client.ExecuteAsync(request);(require '[clj-http.client :as client])
(client/post "https://bll.titan.email/partner/notify" {:headers {:Authorization "API.Key"}
:content-type :json
:form-params {:event "MAIL_ORDER_PURCHASE_CANCELED"
:data {:orderId "string"
:customerId "string"}}})import 'package:http/http.dart' as http;
void main() async {
final headers = <String,String>{
'Authorization': 'API.Key',
'Content-Type': 'application/json',
};
final body = r'{"event":"MAIL_ORDER_PURCHASE_CANCELED","data":{"orderId":"string","customerId":"string"}}';
final response = await http.post(Uri.parse('https://bll.titan.email/partner/notify'), headers: headers, body: body);
print(response.body);
}let httpRequestMessage = new HttpRequestMessage(
HttpMethod("POST"),
new Uri("https://bll.titan.email/partner/notify")
)
httpRequestMessage.Headers.Add("Authorization", "API.Key")
httpRequestMessage.Headers.Add("Content-Type", "application/json")
let content = new StringContent("""{
"event": "MAIL_ORDER_PURCHASE_CANCELED",
"data": {
"orderId": "string",
"customerId": "string"
}
}""", Encoding.UTF8, "application/json")
httpRequestMessage.Content <- content
let client = new HttpClient()
let! result = client.SendAsync(httpRequestMessage)
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
requestUrl := "https://bll.titan.email/partner/notify"
payload := strings.NewReader(`{
"event": "MAIL_ORDER_PURCHASE_CANCELED",
"data": {
"orderId": "string",
"customerId": "string"
}
}`)
req, _ := http.NewRequest("POST", requestUrl, payload)
req.Header.Add("Authorization", "API.Key")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}POST /partner/notify HTTP/1.1
Host: bll.titan.email
Authorization: API.Key
Content-Type: application/json
{"event":"MAIL_ORDER_PURCHASE_CANCELED","data":{"orderId":"string","customerId":"string"}}POST /bll/partner/notify HTTP/1.1
Host: api-euc1.titan.email
Authorization: API.Key
Content-Type: application/json
{"event":"MAIL_ORDER_PURCHASE_CANCELED","data":{"orderId":"string","customerId":"string"}}java.io.ByteArrayOutputStream body = new java.io.ByteArrayOutputStream();
body.write("{\"event\":\"MAIL_ORDER_PURCHASE_CANCELED\",\"data\":{\"orderId\":\"string\",\"customerId\":\"string\"}}".getBytes(java.nio.charset.StandardCharsets.UTF_8));
try (AsyncHttpClient client = new DefaultAsyncHttpClient()) {
Response response = client.prepare("POST", "https://bll.titan.email/partner/notify")
.addHeader("Authorization", "API.Key")
.addHeader("Content-Type", "application/json")
.setBody(body.toByteArray())
.execute()
.get();
System.out.println(response.getResponseBody());
}java.io.ByteArrayOutputStream body = new java.io.ByteArrayOutputStream();
body.write("{\"event\":\"MAIL_ORDER_PURCHASE_CANCELED\",\"data\":{\"orderId\":\"string\",\"customerId\":\"string\"}}".getBytes(java.nio.charset.StandardCharsets.UTF_8));
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(java.net.URI.create("https://bll.titan.email/partner/notify"))
.header("Authorization", "API.Key")
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofByteArray(body.toByteArray()))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());OkHttpClient client = new OkHttpClient();
RequestBody body = RequestBody.create(MediaType.parse("application/json"), "{\"event\":\"MAIL_ORDER_PURCHASE_CANCELED\",\"data\":{\"orderId\":\"string\",\"customerId\":\"string\"}}");
Request request = new Request.Builder()
.url("https://bll.titan.email/partner/notify")
.method("POST", body)
.addHeader("Authorization", "API.Key")
.addHeader("Content-Type", "application/json")
.build();
try (Response response = client.newCall(request).execute()) {
System.out.println(response.body().string());
}java.io.ByteArrayOutputStream body = new java.io.ByteArrayOutputStream();
body.write("{\"event\":\"MAIL_ORDER_PURCHASE_CANCELED\",\"data\":{\"orderId\":\"string\",\"customerId\":\"string\"}}".getBytes(java.nio.charset.StandardCharsets.UTF_8));
HttpResponse<String> response = Unirest.request("POST", "https://bll.titan.email/partner/notify")
.header("Authorization", "API.Key")
.header("Content-Type", "application/json")
.body(body.toByteArray())
.asString();
System.out.println(response.getBody());fetch('https://bll.titan.email/partner/notify', {
method: 'POST',
headers: {
Authorization: 'API.Key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
event: 'MAIL_ORDER_PURCHASE_CANCELED',
data: {
orderId: 'string',
customerId: 'string'
}
})
})import axios from 'axios'
const options = {
method: 'POST',
url: 'https://bll.titan.email/partner/notify',
headers: {
Authorization: 'API.Key',
'Content-Type': 'application/json'
},
data: {
event: 'MAIL_ORDER_PURCHASE_CANCELED',
data: {
orderId: 'string',
customerId: 'string'
}
}
}
try {
const { data } = await axios.request(options)
console.log(data)
} catch (error) {
console.error(error)
}import { ofetch } from 'ofetch'
ofetch('https://bll.titan.email/partner/notify', {
method: 'POST',
headers: {
Authorization: 'API.Key',
'Content-Type': 'application/json'
},
body: {
event: 'MAIL_ORDER_PURCHASE_CANCELED',
data: {
orderId: 'string',
customerId: 'string'
}
}
})$.ajax({
url: "https://bll.titan.email/partner/notify",
method: "POST",
processData: false,
contentType: false,
beforeSend(xhr) {
xhr.setRequestHeader("Authorization", "API.Key");
xhr.setRequestHeader("Content-Type", "application/json");
},
data: "{\"event\":\"MAIL_ORDER_PURCHASE_CANCELED\",\"data\":{\"orderId\":\"string\",\"customerId\":\"string\"}}"
}).done((response) => console.log(response));const xhr = new XMLHttpRequest();
xhr.open("POST", "https://bll.titan.email/partner/notify");
xhr.withCredentials = true;
xhr.setRequestHeader("Authorization", "API.Key");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.addEventListener("load", () => console.log(xhr.responseText));
xhr.send("{\"event\":\"MAIL_ORDER_PURCHASE_CANCELED\",\"data\":{\"orderId\":\"string\",\"customerId\":\"string\"}}");using HTTP
using JSON
response = HTTP.post(
"https://bll.titan.email/partner/notify",
[
"Authorization" => "API.Key",
"Content-Type" => "application/json"
],
JSON.json(Dict(
"event" => "MAIL_ORDER_PURCHASE_CANCELED",
"data" => Dict(
"orderId" => "string",
"customerId" => "string"
)
))
)
println(String(response.body))val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\"event\":\"MAIL_ORDER_PURCHASE_CANCELED\",\"data\":{\"orderId\":\"string\",\"customerId\":\"string\"}}")
val request = Request.Builder()
.url("https://bll.titan.email/partner/notify")
.post(body)
.addHeader("Authorization", "API.Key")
.addHeader("Content-Type", "application/json")
.build()
val response = client.newCall(request).execute()fetch('https://bll.titan.email/partner/notify', {
method: 'POST',
headers: {
Authorization: 'API.Key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
event: 'MAIL_ORDER_PURCHASE_CANCELED',
data: {
orderId: 'string',
customerId: 'string'
}
})
})import axios from 'axios'
const options = {
method: 'POST',
url: 'https://bll.titan.email/partner/notify',
headers: {
Authorization: 'API.Key',
'Content-Type': 'application/json'
},
data: {
event: 'MAIL_ORDER_PURCHASE_CANCELED',
data: {
orderId: 'string',
customerId: 'string'
}
}
}
try {
const { data } = await axios.request(options)
console.log(data)
} catch (error) {
console.error(error)
}import { ofetch } from 'ofetch'
ofetch('https://bll.titan.email/partner/notify', {
method: 'POST',
headers: {
Authorization: 'API.Key',
'Content-Type': 'application/json'
},
body: {
event: 'MAIL_ORDER_PURCHASE_CANCELED',
data: {
orderId: 'string',
customerId: 'string'
}
}
})import { request } from 'undici'
const { statusCode, body } = await request('https://bll.titan.email/partner/notify', {
method: 'POST',
headers: {
Authorization: 'API.Key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
event: 'MAIL_ORDER_PURCHASE_CANCELED',
data: {
orderId: 'string',
customerId: 'string'
}
})
})#import <Foundation/Foundation.h>
NSDictionary *headers = @{ @"Authorization": @"API.Key",
@"Content-Type": @"application/json" };
NSDictionary *parameters = @{ @"event": @"MAIL_ORDER_PURCHASE_CANCELED",
@"data": @{ @"orderId": @"string", @"customerId": @"string" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://bll.titan.email/partner/notify"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];open Lwt.Infix
let () =
Lwt_main.run (
let uri = Uri.of_string "https://bll.titan.email/partner/notify" in
let headers = Cohttp.Header.of_list [
("Authorization", "API.Key");
("Content-Type", "application/json");
] in
let part0 = "{\"event\":\"MAIL_ORDER_PURCHASE_CANCELED\",\"data\":{\"orderId\":\"string\",\"customerId\":\"string\"}}" in
let body = Cohttp_lwt.Body.of_string (String.concat "" [part0]) in
Cohttp_lwt_unix.Client.call ~headers ~body (Cohttp.Code.method_of_string "POST") uri
>>= fun (_response, body) ->
Cohttp_lwt.Body.to_string body >>= Lwt_io.printl
)$ch = curl_init("https://bll.titan.email/partner/notify");
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: API.Key', 'Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
'event' => 'MAIL_ORDER_PURCHASE_CANCELED',
'data' => [
'orderId' => 'string',
'customerId' => 'string'
]
]));
curl_exec($ch);
curl_close($ch);$client = new GuzzleHttp\Client();
$response = $client->request('POST', 'https://bll.titan.email/partner/notify', [
'headers' => [
'Authorization' => 'API.Key',
'Content-Type' => 'application/json'
],
'json' => [
'event' => 'MAIL_ORDER_PURCHASE_CANCELED',
'data' => [
'orderId' => 'string',
'customerId' => 'string'
]
]
]);use Illuminate\Support\Facades\Http;
$response = Http::withHeaders([
'Authorization' => 'API.Key',
'Content-Type' => 'application/json'
])
->post('https://bll.titan.email/partner/notify', [
'event' => 'MAIL_ORDER_PURCHASE_CANCELED',
'data' => [
'orderId' => 'string',
'customerId' => 'string'
]
]);$headers = @{
'Authorization' = 'API.Key'
'Content-Type' = 'application/json'
}
$body = [System.IO.MemoryStream]::new()
$bytes = [System.Text.Encoding]::UTF8.GetBytes('{"event":"MAIL_ORDER_PURCHASE_CANCELED","data":{"orderId":"string","customerId":"string"}}')
$body.Write($bytes, 0, $bytes.Length)
$response = Invoke-WebRequest -Uri 'https://bll.titan.email/partner/notify' -Method 'POST' -Headers $headers -Body $body.ToArray()
$body.Dispose()
$response$headers = @{
'Authorization' = 'API.Key'
'Content-Type' = 'application/json'
}
$body = [System.IO.MemoryStream]::new()
$bytes = [System.Text.Encoding]::UTF8.GetBytes('{"event":"MAIL_ORDER_PURCHASE_CANCELED","data":{"orderId":"string","customerId":"string"}}')
$body.Write($bytes, 0, $bytes.Length)
$response = Invoke-RestMethod -Uri 'https://bll.titan.email/partner/notify' -Method 'POST' -Headers $headers -Body $body.ToArray()
$body.Dispose()
$responseimport http.client
import json
conn = http.client.HTTPSConnection("bll.titan.email")
payload = json.dumps({
"event": "MAIL_ORDER_PURCHASE_CANCELED",
"data": {
"orderId": "string",
"customerId": "string"
}
})
headers = {
"Authorization": "API.Key",
"Content-Type": "application/json"
}
conn.request(
"POST",
"/partner/notify",
body=payload,
headers=headers,
)
response = conn.getresponse()
print(response.read().decode())
conn.close()import http.client
import json
conn = http.client.HTTPSConnection("api-euc1.titan.email")
payload = json.dumps({
"event": "MAIL_ORDER_PURCHASE_CANCELED",
"data": {
"orderId": "string",
"customerId": "string"
}
})
headers = {
"Authorization": "API.Key",
"Content-Type": "application/json"
}
conn.request(
"POST",
"/bll/partner/notify",
body=payload,
headers=headers,
)
response = conn.getresponse()
print(response.read().decode())
conn.close()requests.post("https://bll.titan.email/partner/notify",
headers={
"Authorization": "API.Key",
"Content-Type": "application/json"
},
json={
"event": "MAIL_ORDER_PURCHASE_CANCELED",
"data": {
"orderId": "string",
"customerId": "string"
}
}
)async with aiohttp.ClientSession() as session:
await session.post("https://bll.titan.email/partner/notify",
headers={
"Authorization": "API.Key",
"Content-Type": "application/json"
},
json={
"event": "MAIL_ORDER_PURCHASE_CANCELED",
"data": {
"orderId": "string",
"customerId": "string"
}
}
)httpx.post("https://bll.titan.email/partner/notify",
headers={
"Authorization": "API.Key",
"Content-Type": "application/json"
},
json={
"event": "MAIL_ORDER_PURCHASE_CANCELED",
"data": {
"orderId": "string",
"customerId": "string"
}
}
)async with httpx.AsyncClient() as client:
await client.post("https://bll.titan.email/partner/notify",
headers={
"Authorization": "API.Key",
"Content-Type": "application/json"
},
json={
"event": "MAIL_ORDER_PURCHASE_CANCELED",
"data": {
"orderId": "string",
"customerId": "string"
}
}
)library(httr2)
response <- request("https://bll.titan.email/partner/notify") |>
req_method("POST") |>
req_headers(
"Authorization" = "API.Key",
"Content-Type" = "application/json"
) |>
req_body_json(list(
event = "MAIL_ORDER_PURCHASE_CANCELED",
data = list(
orderId = "string",
customerId = "string"
)
)) |>
req_perform()
resp_body_string(response)require 'uri'
require 'net/http'
url = URI("https://bll.titan.email/partner/notify")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'API.Key'
request["Content-Type"] = 'application/json'
request.body = <<~JSON
{
"event": "MAIL_ORDER_PURCHASE_CANCELED",
"data": {
"orderId": "string",
"customerId": "string"
}
}
JSON
response = http.request(request)
puts response.read_bodylet client = reqwest::Client::new();
let request = client
.post("https://bll.titan.email/partner/notify")
.header("Authorization", "API.Key")
.header("Content-Type", "application/json")
.json(&serde_json::json!({
"event": "MAIL_ORDER_PURCHASE_CANCELED",
"data": {
"orderId": "string",
"customerId": "string"
}
}));
let response = request.send().await?;curl https://bll.titan.email/partner/notify \
--request POST \
--header 'Authorization: API.Key' \
--header 'Content-Type: application/json' \
--data '{
"event": "MAIL_ORDER_PURCHASE_CANCELED",
"data": {
"orderId": "string",
"customerId": "string"
}
}'wget --quiet \
--method POST \
--header 'Authorization: API.Key' \
--header 'Content-Type: application/json' \
--body-data '{
"event": "MAIL_ORDER_PURCHASE_CANCELED",
"data": {
"orderId": "string",
"customerId": "string"
}
}' \
--output-document \
- https://bll.titan.email/partner/notifyhttp --ignore-stdin 'POST' 'https://bll.titan.email/partner/notify' \
'Authorization:API.Key' \
'Content-Type:application/json' \
--raw='{"event":"MAIL_ORDER_PURCHASE_CANCELED","data":{"orderId":"string","customerId":"string"}}'import Foundation
var request = URLRequest(url: URL(string: "https://bll.titan.email/partner/notify")!)
request.httpMethod = "POST"
request.setValue("API.Key", forHTTPHeaderField: "Authorization")
request.setValue("application/json", forHTTPHeaderField: "Content-Type")
let jsonBody = #"""
{
"event": "MAIL_ORDER_PURCHASE_CANCELED",
"data": {
"orderId": "string",
"customerId": "string"
}
}
"""#
request.httpBody = jsonBody.data(using: .utf8)
let (data, response) = try await URLSession.shared.data(for: request)
guard let httpResponse = response as? HTTPURLResponse,
200..<300 ~= httpResponse.statusCode else {
throw URLError(.badServerResponse)
}
print(String(data: data, encoding: .utf8) ?? "")#include <curl/curl.h>
int main(void) {
curl_global_init(CURL_GLOBAL_DEFAULT);
CURL *curl = curl_easy_init();
if (!curl) {
curl_global_cleanup();
return 1;
}
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(curl, CURLOPT_URL, "https://bll.titan.email/partner/notify");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Authorization: API.Key");
headers = curl_slist_append(headers, "Content-Type: application/json");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_POSTFIELDS,
"{\n"
" \"event\": \"MODIFY_MAIL_ORDER_DETAILS\",\n"
" \"data\": {\n"
" \"titanOrderId\": 0,\n"
" \"paymentMethod\": \"string\",\n"
" \"autoRenew\": true\n"
" }\n"
"}");
CURLcode res = curl_easy_perform(curl);
curl_easy_cleanup(curl);
curl_slist_free_all(headers);
curl_global_cleanup();
return (int)res;
}using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://bll.titan.email/partner/notify");
request.Headers.TryAddWithoutValidation("Authorization", "API.Key");
request.Content = new StringContent(
"""
{
"event": "MODIFY_MAIL_ORDER_DETAILS",
"data": {
"titanOrderId": 0,
"paymentMethod": "string",
"autoRenew": true
}
}
""",
System.Text.Encoding.UTF8, "application/json");
using var response = await client.SendAsync(request);var client = new RestClient("https://bll.titan.email/partner/notify");
var request = new RestRequest("", Method.Post);
request.AddHeader("Authorization", "API.Key");
request.AddHeader("Content-Type", "application/json");
request.AddStringBody("""
{
"event": "MODIFY_MAIL_ORDER_DETAILS",
"data": {
"titanOrderId": 0,
"paymentMethod": "string",
"autoRenew": true
}
}
""", ContentType.Json);
var response = await client.ExecuteAsync(request);(require '[clj-http.client :as client])
(client/post "https://bll.titan.email/partner/notify" {:headers {:Authorization "API.Key"}
:content-type :json
:form-params {:event "MODIFY_MAIL_ORDER_DETAILS"
:data {:titanOrderId 0
:paymentMethod "string"
:autoRenew true}}})import 'package:http/http.dart' as http;
void main() async {
final headers = <String,String>{
'Authorization': 'API.Key',
'Content-Type': 'application/json',
};
final body = r'{"event":"MODIFY_MAIL_ORDER_DETAILS","data":{"titanOrderId":0,"paymentMethod":"string","autoRenew":true}}';
final response = await http.post(Uri.parse('https://bll.titan.email/partner/notify'), headers: headers, body: body);
print(response.body);
}let httpRequestMessage = new HttpRequestMessage(
HttpMethod("POST"),
new Uri("https://bll.titan.email/partner/notify")
)
httpRequestMessage.Headers.Add("Authorization", "API.Key")
httpRequestMessage.Headers.Add("Content-Type", "application/json")
let content = new StringContent("""{
"event": "MODIFY_MAIL_ORDER_DETAILS",
"data": {
"titanOrderId": 0,
"paymentMethod": "string",
"autoRenew": true
}
}""", Encoding.UTF8, "application/json")
httpRequestMessage.Content <- content
let client = new HttpClient()
let! result = client.SendAsync(httpRequestMessage)
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
requestUrl := "https://bll.titan.email/partner/notify"
payload := strings.NewReader(`{
"event": "MODIFY_MAIL_ORDER_DETAILS",
"data": {
"titanOrderId": 0,
"paymentMethod": "string",
"autoRenew": true
}
}`)
req, _ := http.NewRequest("POST", requestUrl, payload)
req.Header.Add("Authorization", "API.Key")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}POST /partner/notify HTTP/1.1
Host: bll.titan.email
Authorization: API.Key
Content-Type: application/json
{"event":"MODIFY_MAIL_ORDER_DETAILS","data":{"titanOrderId":0,"paymentMethod":"string","autoRenew":true}}POST /bll/partner/notify HTTP/1.1
Host: api-euc1.titan.email
Authorization: API.Key
Content-Type: application/json
{"event":"MODIFY_MAIL_ORDER_DETAILS","data":{"titanOrderId":0,"paymentMethod":"string","autoRenew":true}}java.io.ByteArrayOutputStream body = new java.io.ByteArrayOutputStream();
body.write("{\"event\":\"MODIFY_MAIL_ORDER_DETAILS\",\"data\":{\"titanOrderId\":0,\"paymentMethod\":\"string\",\"autoRenew\":true}}".getBytes(java.nio.charset.StandardCharsets.UTF_8));
try (AsyncHttpClient client = new DefaultAsyncHttpClient()) {
Response response = client.prepare("POST", "https://bll.titan.email/partner/notify")
.addHeader("Authorization", "API.Key")
.addHeader("Content-Type", "application/json")
.setBody(body.toByteArray())
.execute()
.get();
System.out.println(response.getResponseBody());
}java.io.ByteArrayOutputStream body = new java.io.ByteArrayOutputStream();
body.write("{\"event\":\"MODIFY_MAIL_ORDER_DETAILS\",\"data\":{\"titanOrderId\":0,\"paymentMethod\":\"string\",\"autoRenew\":true}}".getBytes(java.nio.charset.StandardCharsets.UTF_8));
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(java.net.URI.create("https://bll.titan.email/partner/notify"))
.header("Authorization", "API.Key")
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofByteArray(body.toByteArray()))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());OkHttpClient client = new OkHttpClient();
RequestBody body = RequestBody.create(MediaType.parse("application/json"), "{\"event\":\"MODIFY_MAIL_ORDER_DETAILS\",\"data\":{\"titanOrderId\":0,\"paymentMethod\":\"string\",\"autoRenew\":true}}");
Request request = new Request.Builder()
.url("https://bll.titan.email/partner/notify")
.method("POST", body)
.addHeader("Authorization", "API.Key")
.addHeader("Content-Type", "application/json")
.build();
try (Response response = client.newCall(request).execute()) {
System.out.println(response.body().string());
}java.io.ByteArrayOutputStream body = new java.io.ByteArrayOutputStream();
body.write("{\"event\":\"MODIFY_MAIL_ORDER_DETAILS\",\"data\":{\"titanOrderId\":0,\"paymentMethod\":\"string\",\"autoRenew\":true}}".getBytes(java.nio.charset.StandardCharsets.UTF_8));
HttpResponse<String> response = Unirest.request("POST", "https://bll.titan.email/partner/notify")
.header("Authorization", "API.Key")
.header("Content-Type", "application/json")
.body(body.toByteArray())
.asString();
System.out.println(response.getBody());fetch('https://bll.titan.email/partner/notify', {
method: 'POST',
headers: {
Authorization: 'API.Key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
event: 'MODIFY_MAIL_ORDER_DETAILS',
data: {
titanOrderId: 0,
paymentMethod: 'string',
autoRenew: true
}
})
})import axios from 'axios'
const options = {
method: 'POST',
url: 'https://bll.titan.email/partner/notify',
headers: {
Authorization: 'API.Key',
'Content-Type': 'application/json'
},
data: {
event: 'MODIFY_MAIL_ORDER_DETAILS',
data: {
titanOrderId: 0,
paymentMethod: 'string',
autoRenew: true
}
}
}
try {
const { data } = await axios.request(options)
console.log(data)
} catch (error) {
console.error(error)
}import { ofetch } from 'ofetch'
ofetch('https://bll.titan.email/partner/notify', {
method: 'POST',
headers: {
Authorization: 'API.Key',
'Content-Type': 'application/json'
},
body: {
event: 'MODIFY_MAIL_ORDER_DETAILS',
data: {
titanOrderId: 0,
paymentMethod: 'string',
autoRenew: true
}
}
})$.ajax({
url: "https://bll.titan.email/partner/notify",
method: "POST",
processData: false,
contentType: false,
beforeSend(xhr) {
xhr.setRequestHeader("Authorization", "API.Key");
xhr.setRequestHeader("Content-Type", "application/json");
},
data: "{\"event\":\"MODIFY_MAIL_ORDER_DETAILS\",\"data\":{\"titanOrderId\":0,\"paymentMethod\":\"string\",\"autoRenew\":true}}"
}).done((response) => console.log(response));const xhr = new XMLHttpRequest();
xhr.open("POST", "https://bll.titan.email/partner/notify");
xhr.withCredentials = true;
xhr.setRequestHeader("Authorization", "API.Key");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.addEventListener("load", () => console.log(xhr.responseText));
xhr.send("{\"event\":\"MODIFY_MAIL_ORDER_DETAILS\",\"data\":{\"titanOrderId\":0,\"paymentMethod\":\"string\",\"autoRenew\":true}}");using HTTP
using JSON
response = HTTP.post(
"https://bll.titan.email/partner/notify",
[
"Authorization" => "API.Key",
"Content-Type" => "application/json"
],
JSON.json(Dict(
"event" => "MODIFY_MAIL_ORDER_DETAILS",
"data" => Dict(
"titanOrderId" => 0,
"paymentMethod" => "string",
"autoRenew" => true
)
))
)
println(String(response.body))val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\"event\":\"MODIFY_MAIL_ORDER_DETAILS\",\"data\":{\"titanOrderId\":0,\"paymentMethod\":\"string\",\"autoRenew\":true}}")
val request = Request.Builder()
.url("https://bll.titan.email/partner/notify")
.post(body)
.addHeader("Authorization", "API.Key")
.addHeader("Content-Type", "application/json")
.build()
val response = client.newCall(request).execute()fetch('https://bll.titan.email/partner/notify', {
method: 'POST',
headers: {
Authorization: 'API.Key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
event: 'MODIFY_MAIL_ORDER_DETAILS',
data: {
titanOrderId: 0,
paymentMethod: 'string',
autoRenew: true
}
})
})import axios from 'axios'
const options = {
method: 'POST',
url: 'https://bll.titan.email/partner/notify',
headers: {
Authorization: 'API.Key',
'Content-Type': 'application/json'
},
data: {
event: 'MODIFY_MAIL_ORDER_DETAILS',
data: {
titanOrderId: 0,
paymentMethod: 'string',
autoRenew: true
}
}
}
try {
const { data } = await axios.request(options)
console.log(data)
} catch (error) {
console.error(error)
}import { ofetch } from 'ofetch'
ofetch('https://bll.titan.email/partner/notify', {
method: 'POST',
headers: {
Authorization: 'API.Key',
'Content-Type': 'application/json'
},
body: {
event: 'MODIFY_MAIL_ORDER_DETAILS',
data: {
titanOrderId: 0,
paymentMethod: 'string',
autoRenew: true
}
}
})import { request } from 'undici'
const { statusCode, body } = await request('https://bll.titan.email/partner/notify', {
method: 'POST',
headers: {
Authorization: 'API.Key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
event: 'MODIFY_MAIL_ORDER_DETAILS',
data: {
titanOrderId: 0,
paymentMethod: 'string',
autoRenew: true
}
})
})#import <Foundation/Foundation.h>
NSDictionary *headers = @{ @"Authorization": @"API.Key",
@"Content-Type": @"application/json" };
NSDictionary *parameters = @{ @"event": @"MODIFY_MAIL_ORDER_DETAILS",
@"data": @{ @"titanOrderId": @0, @"paymentMethod": @"string", @"autoRenew": @YES } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://bll.titan.email/partner/notify"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];open Lwt.Infix
let () =
Lwt_main.run (
let uri = Uri.of_string "https://bll.titan.email/partner/notify" in
let headers = Cohttp.Header.of_list [
("Authorization", "API.Key");
("Content-Type", "application/json");
] in
let part0 = "{\"event\":\"MODIFY_MAIL_ORDER_DETAILS\",\"data\":{\"titanOrderId\":0,\"paymentMethod\":\"string\",\"autoRenew\":true}}" in
let body = Cohttp_lwt.Body.of_string (String.concat "" [part0]) in
Cohttp_lwt_unix.Client.call ~headers ~body (Cohttp.Code.method_of_string "POST") uri
>>= fun (_response, body) ->
Cohttp_lwt.Body.to_string body >>= Lwt_io.printl
)$ch = curl_init("https://bll.titan.email/partner/notify");
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: API.Key', 'Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
'event' => 'MODIFY_MAIL_ORDER_DETAILS',
'data' => [
'titanOrderId' => 0,
'paymentMethod' => 'string',
'autoRenew' => true
]
]));
curl_exec($ch);
curl_close($ch);$client = new GuzzleHttp\Client();
$response = $client->request('POST', 'https://bll.titan.email/partner/notify', [
'headers' => [
'Authorization' => 'API.Key',
'Content-Type' => 'application/json'
],
'json' => [
'event' => 'MODIFY_MAIL_ORDER_DETAILS',
'data' => [
'titanOrderId' => 0,
'paymentMethod' => 'string',
'autoRenew' => true
]
]
]);use Illuminate\Support\Facades\Http;
$response = Http::withHeaders([
'Authorization' => 'API.Key',
'Content-Type' => 'application/json'
])
->post('https://bll.titan.email/partner/notify', [
'event' => 'MODIFY_MAIL_ORDER_DETAILS',
'data' => [
'titanOrderId' => 0,
'paymentMethod' => 'string',
'autoRenew' => true
]
]);$headers = @{
'Authorization' = 'API.Key'
'Content-Type' = 'application/json'
}
$body = [System.IO.MemoryStream]::new()
$bytes = [System.Text.Encoding]::UTF8.GetBytes('{"event":"MODIFY_MAIL_ORDER_DETAILS","data":{"titanOrderId":0,"paymentMethod":"string","autoRenew":true}}')
$body.Write($bytes, 0, $bytes.Length)
$response = Invoke-WebRequest -Uri 'https://bll.titan.email/partner/notify' -Method 'POST' -Headers $headers -Body $body.ToArray()
$body.Dispose()
$response$headers = @{
'Authorization' = 'API.Key'
'Content-Type' = 'application/json'
}
$body = [System.IO.MemoryStream]::new()
$bytes = [System.Text.Encoding]::UTF8.GetBytes('{"event":"MODIFY_MAIL_ORDER_DETAILS","data":{"titanOrderId":0,"paymentMethod":"string","autoRenew":true}}')
$body.Write($bytes, 0, $bytes.Length)
$response = Invoke-RestMethod -Uri 'https://bll.titan.email/partner/notify' -Method 'POST' -Headers $headers -Body $body.ToArray()
$body.Dispose()
$responseimport http.client
import json
conn = http.client.HTTPSConnection("bll.titan.email")
payload = json.dumps({
"event": "MODIFY_MAIL_ORDER_DETAILS",
"data": {
"titanOrderId": 0,
"paymentMethod": "string",
"autoRenew": True
}
})
headers = {
"Authorization": "API.Key",
"Content-Type": "application/json"
}
conn.request(
"POST",
"/partner/notify",
body=payload,
headers=headers,
)
response = conn.getresponse()
print(response.read().decode())
conn.close()import http.client
import json
conn = http.client.HTTPSConnection("api-euc1.titan.email")
payload = json.dumps({
"event": "MODIFY_MAIL_ORDER_DETAILS",
"data": {
"titanOrderId": 0,
"paymentMethod": "string",
"autoRenew": True
}
})
headers = {
"Authorization": "API.Key",
"Content-Type": "application/json"
}
conn.request(
"POST",
"/bll/partner/notify",
body=payload,
headers=headers,
)
response = conn.getresponse()
print(response.read().decode())
conn.close()requests.post("https://bll.titan.email/partner/notify",
headers={
"Authorization": "API.Key",
"Content-Type": "application/json"
},
json={
"event": "MODIFY_MAIL_ORDER_DETAILS",
"data": {
"titanOrderId": 0,
"paymentMethod": "string",
"autoRenew": True
}
}
)async with aiohttp.ClientSession() as session:
await session.post("https://bll.titan.email/partner/notify",
headers={
"Authorization": "API.Key",
"Content-Type": "application/json"
},
json={
"event": "MODIFY_MAIL_ORDER_DETAILS",
"data": {
"titanOrderId": 0,
"paymentMethod": "string",
"autoRenew": True
}
}
)httpx.post("https://bll.titan.email/partner/notify",
headers={
"Authorization": "API.Key",
"Content-Type": "application/json"
},
json={
"event": "MODIFY_MAIL_ORDER_DETAILS",
"data": {
"titanOrderId": 0,
"paymentMethod": "string",
"autoRenew": True
}
}
)async with httpx.AsyncClient() as client:
await client.post("https://bll.titan.email/partner/notify",
headers={
"Authorization": "API.Key",
"Content-Type": "application/json"
},
json={
"event": "MODIFY_MAIL_ORDER_DETAILS",
"data": {
"titanOrderId": 0,
"paymentMethod": "string",
"autoRenew": True
}
}
)library(httr2)
response <- request("https://bll.titan.email/partner/notify") |>
req_method("POST") |>
req_headers(
"Authorization" = "API.Key",
"Content-Type" = "application/json"
) |>
req_body_json(list(
event = "MODIFY_MAIL_ORDER_DETAILS",
data = list(
titanOrderId = 0,
paymentMethod = "string",
autoRenew = TRUE
)
)) |>
req_perform()
resp_body_string(response)require 'uri'
require 'net/http'
url = URI("https://bll.titan.email/partner/notify")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'API.Key'
request["Content-Type"] = 'application/json'
request.body = <<~JSON
{
"event": "MODIFY_MAIL_ORDER_DETAILS",
"data": {
"titanOrderId": 0,
"paymentMethod": "string",
"autoRenew": true
}
}
JSON
response = http.request(request)
puts response.read_bodylet client = reqwest::Client::new();
let request = client
.post("https://bll.titan.email/partner/notify")
.header("Authorization", "API.Key")
.header("Content-Type", "application/json")
.json(&serde_json::json!({
"event": "MODIFY_MAIL_ORDER_DETAILS",
"data": {
"titanOrderId": 0,
"paymentMethod": "string",
"autoRenew": true
}
}));
let response = request.send().await?;curl https://bll.titan.email/partner/notify \
--request POST \
--header 'Authorization: API.Key' \
--header 'Content-Type: application/json' \
--data '{
"event": "MODIFY_MAIL_ORDER_DETAILS",
"data": {
"titanOrderId": 0,
"paymentMethod": "string",
"autoRenew": true
}
}'wget --quiet \
--method POST \
--header 'Authorization: API.Key' \
--header 'Content-Type: application/json' \
--body-data '{
"event": "MODIFY_MAIL_ORDER_DETAILS",
"data": {
"titanOrderId": 0,
"paymentMethod": "string",
"autoRenew": true
}
}' \
--output-document \
- https://bll.titan.email/partner/notifyhttp --ignore-stdin 'POST' 'https://bll.titan.email/partner/notify' \
'Authorization:API.Key' \
'Content-Type:application/json' \
--raw='{"event":"MODIFY_MAIL_ORDER_DETAILS","data":{"titanOrderId":0,"paymentMethod":"string","autoRenew":true}}'import Foundation
var request = URLRequest(url: URL(string: "https://bll.titan.email/partner/notify")!)
request.httpMethod = "POST"
request.setValue("API.Key", forHTTPHeaderField: "Authorization")
request.setValue("application/json", forHTTPHeaderField: "Content-Type")
let jsonBody = #"""
{
"event": "MODIFY_MAIL_ORDER_DETAILS",
"data": {
"titanOrderId": 0,
"paymentMethod": "string",
"autoRenew": true
}
}
"""#
request.httpBody = jsonBody.data(using: .utf8)
let (data, response) = try await URLSession.shared.data(for: request)
guard let httpResponse = response as? HTTPURLResponse,
200..<300 ~= httpResponse.statusCode else {
throw URLError(.badServerResponse)
}
print(String(data: data, encoding: .utf8) ?? ""){
"reqID": "string"
}