Google Workspace Reseller API
GET
reseller.customers.get
{{baseUrl}}/apps/reseller/v1/customers/:customerId
QUERY PARAMS
customerId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/apps/reseller/v1/customers/:customerId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/apps/reseller/v1/customers/:customerId")
require "http/client"
url = "{{baseUrl}}/apps/reseller/v1/customers/:customerId"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/apps/reseller/v1/customers/:customerId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/apps/reseller/v1/customers/:customerId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/apps/reseller/v1/customers/:customerId"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/apps/reseller/v1/customers/:customerId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/apps/reseller/v1/customers/:customerId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/apps/reseller/v1/customers/:customerId"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/apps/reseller/v1/customers/:customerId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/apps/reseller/v1/customers/:customerId")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/apps/reseller/v1/customers/:customerId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/apps/reseller/v1/customers/:customerId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/apps/reseller/v1/customers/:customerId';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/apps/reseller/v1/customers/:customerId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/apps/reseller/v1/customers/:customerId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/apps/reseller/v1/customers/:customerId',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/apps/reseller/v1/customers/:customerId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/apps/reseller/v1/customers/:customerId');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/apps/reseller/v1/customers/:customerId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/apps/reseller/v1/customers/:customerId';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/apps/reseller/v1/customers/:customerId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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 Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/apps/reseller/v1/customers/:customerId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/apps/reseller/v1/customers/:customerId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/apps/reseller/v1/customers/:customerId');
echo $response->getBody();
setUrl('{{baseUrl}}/apps/reseller/v1/customers/:customerId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/apps/reseller/v1/customers/:customerId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/apps/reseller/v1/customers/:customerId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/apps/reseller/v1/customers/:customerId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/apps/reseller/v1/customers/:customerId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/apps/reseller/v1/customers/:customerId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/apps/reseller/v1/customers/:customerId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/apps/reseller/v1/customers/:customerId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/apps/reseller/v1/customers/:customerId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/apps/reseller/v1/customers/:customerId";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/apps/reseller/v1/customers/:customerId
http GET {{baseUrl}}/apps/reseller/v1/customers/:customerId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/apps/reseller/v1/customers/:customerId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/apps/reseller/v1/customers/:customerId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
reseller.customers.insert
{{baseUrl}}/apps/reseller/v1/customers
BODY json
{
"alternateEmail": "",
"customerDomain": "",
"customerDomainVerified": false,
"customerId": "",
"customerType": "",
"kind": "",
"phoneNumber": "",
"postalAddress": {
"addressLine1": "",
"addressLine2": "",
"addressLine3": "",
"contactName": "",
"countryCode": "",
"kind": "",
"locality": "",
"organizationName": "",
"postalCode": "",
"region": ""
},
"primaryAdmin": {
"primaryEmail": ""
},
"resourceUiUrl": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/apps/reseller/v1/customers");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"alternateEmail\": \"\",\n \"customerDomain\": \"\",\n \"customerDomainVerified\": false,\n \"customerId\": \"\",\n \"customerType\": \"\",\n \"kind\": \"\",\n \"phoneNumber\": \"\",\n \"postalAddress\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"addressLine3\": \"\",\n \"contactName\": \"\",\n \"countryCode\": \"\",\n \"kind\": \"\",\n \"locality\": \"\",\n \"organizationName\": \"\",\n \"postalCode\": \"\",\n \"region\": \"\"\n },\n \"primaryAdmin\": {\n \"primaryEmail\": \"\"\n },\n \"resourceUiUrl\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/apps/reseller/v1/customers" {:content-type :json
:form-params {:alternateEmail ""
:customerDomain ""
:customerDomainVerified false
:customerId ""
:customerType ""
:kind ""
:phoneNumber ""
:postalAddress {:addressLine1 ""
:addressLine2 ""
:addressLine3 ""
:contactName ""
:countryCode ""
:kind ""
:locality ""
:organizationName ""
:postalCode ""
:region ""}
:primaryAdmin {:primaryEmail ""}
:resourceUiUrl ""}})
require "http/client"
url = "{{baseUrl}}/apps/reseller/v1/customers"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"alternateEmail\": \"\",\n \"customerDomain\": \"\",\n \"customerDomainVerified\": false,\n \"customerId\": \"\",\n \"customerType\": \"\",\n \"kind\": \"\",\n \"phoneNumber\": \"\",\n \"postalAddress\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"addressLine3\": \"\",\n \"contactName\": \"\",\n \"countryCode\": \"\",\n \"kind\": \"\",\n \"locality\": \"\",\n \"organizationName\": \"\",\n \"postalCode\": \"\",\n \"region\": \"\"\n },\n \"primaryAdmin\": {\n \"primaryEmail\": \"\"\n },\n \"resourceUiUrl\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/apps/reseller/v1/customers"),
Content = new StringContent("{\n \"alternateEmail\": \"\",\n \"customerDomain\": \"\",\n \"customerDomainVerified\": false,\n \"customerId\": \"\",\n \"customerType\": \"\",\n \"kind\": \"\",\n \"phoneNumber\": \"\",\n \"postalAddress\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"addressLine3\": \"\",\n \"contactName\": \"\",\n \"countryCode\": \"\",\n \"kind\": \"\",\n \"locality\": \"\",\n \"organizationName\": \"\",\n \"postalCode\": \"\",\n \"region\": \"\"\n },\n \"primaryAdmin\": {\n \"primaryEmail\": \"\"\n },\n \"resourceUiUrl\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/apps/reseller/v1/customers");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"alternateEmail\": \"\",\n \"customerDomain\": \"\",\n \"customerDomainVerified\": false,\n \"customerId\": \"\",\n \"customerType\": \"\",\n \"kind\": \"\",\n \"phoneNumber\": \"\",\n \"postalAddress\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"addressLine3\": \"\",\n \"contactName\": \"\",\n \"countryCode\": \"\",\n \"kind\": \"\",\n \"locality\": \"\",\n \"organizationName\": \"\",\n \"postalCode\": \"\",\n \"region\": \"\"\n },\n \"primaryAdmin\": {\n \"primaryEmail\": \"\"\n },\n \"resourceUiUrl\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/apps/reseller/v1/customers"
payload := strings.NewReader("{\n \"alternateEmail\": \"\",\n \"customerDomain\": \"\",\n \"customerDomainVerified\": false,\n \"customerId\": \"\",\n \"customerType\": \"\",\n \"kind\": \"\",\n \"phoneNumber\": \"\",\n \"postalAddress\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"addressLine3\": \"\",\n \"contactName\": \"\",\n \"countryCode\": \"\",\n \"kind\": \"\",\n \"locality\": \"\",\n \"organizationName\": \"\",\n \"postalCode\": \"\",\n \"region\": \"\"\n },\n \"primaryAdmin\": {\n \"primaryEmail\": \"\"\n },\n \"resourceUiUrl\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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 /baseUrl/apps/reseller/v1/customers HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 480
{
"alternateEmail": "",
"customerDomain": "",
"customerDomainVerified": false,
"customerId": "",
"customerType": "",
"kind": "",
"phoneNumber": "",
"postalAddress": {
"addressLine1": "",
"addressLine2": "",
"addressLine3": "",
"contactName": "",
"countryCode": "",
"kind": "",
"locality": "",
"organizationName": "",
"postalCode": "",
"region": ""
},
"primaryAdmin": {
"primaryEmail": ""
},
"resourceUiUrl": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/apps/reseller/v1/customers")
.setHeader("content-type", "application/json")
.setBody("{\n \"alternateEmail\": \"\",\n \"customerDomain\": \"\",\n \"customerDomainVerified\": false,\n \"customerId\": \"\",\n \"customerType\": \"\",\n \"kind\": \"\",\n \"phoneNumber\": \"\",\n \"postalAddress\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"addressLine3\": \"\",\n \"contactName\": \"\",\n \"countryCode\": \"\",\n \"kind\": \"\",\n \"locality\": \"\",\n \"organizationName\": \"\",\n \"postalCode\": \"\",\n \"region\": \"\"\n },\n \"primaryAdmin\": {\n \"primaryEmail\": \"\"\n },\n \"resourceUiUrl\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/apps/reseller/v1/customers"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"alternateEmail\": \"\",\n \"customerDomain\": \"\",\n \"customerDomainVerified\": false,\n \"customerId\": \"\",\n \"customerType\": \"\",\n \"kind\": \"\",\n \"phoneNumber\": \"\",\n \"postalAddress\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"addressLine3\": \"\",\n \"contactName\": \"\",\n \"countryCode\": \"\",\n \"kind\": \"\",\n \"locality\": \"\",\n \"organizationName\": \"\",\n \"postalCode\": \"\",\n \"region\": \"\"\n },\n \"primaryAdmin\": {\n \"primaryEmail\": \"\"\n },\n \"resourceUiUrl\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"alternateEmail\": \"\",\n \"customerDomain\": \"\",\n \"customerDomainVerified\": false,\n \"customerId\": \"\",\n \"customerType\": \"\",\n \"kind\": \"\",\n \"phoneNumber\": \"\",\n \"postalAddress\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"addressLine3\": \"\",\n \"contactName\": \"\",\n \"countryCode\": \"\",\n \"kind\": \"\",\n \"locality\": \"\",\n \"organizationName\": \"\",\n \"postalCode\": \"\",\n \"region\": \"\"\n },\n \"primaryAdmin\": {\n \"primaryEmail\": \"\"\n },\n \"resourceUiUrl\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/apps/reseller/v1/customers")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/apps/reseller/v1/customers")
.header("content-type", "application/json")
.body("{\n \"alternateEmail\": \"\",\n \"customerDomain\": \"\",\n \"customerDomainVerified\": false,\n \"customerId\": \"\",\n \"customerType\": \"\",\n \"kind\": \"\",\n \"phoneNumber\": \"\",\n \"postalAddress\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"addressLine3\": \"\",\n \"contactName\": \"\",\n \"countryCode\": \"\",\n \"kind\": \"\",\n \"locality\": \"\",\n \"organizationName\": \"\",\n \"postalCode\": \"\",\n \"region\": \"\"\n },\n \"primaryAdmin\": {\n \"primaryEmail\": \"\"\n },\n \"resourceUiUrl\": \"\"\n}")
.asString();
const data = JSON.stringify({
alternateEmail: '',
customerDomain: '',
customerDomainVerified: false,
customerId: '',
customerType: '',
kind: '',
phoneNumber: '',
postalAddress: {
addressLine1: '',
addressLine2: '',
addressLine3: '',
contactName: '',
countryCode: '',
kind: '',
locality: '',
organizationName: '',
postalCode: '',
region: ''
},
primaryAdmin: {
primaryEmail: ''
},
resourceUiUrl: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/apps/reseller/v1/customers');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/apps/reseller/v1/customers',
headers: {'content-type': 'application/json'},
data: {
alternateEmail: '',
customerDomain: '',
customerDomainVerified: false,
customerId: '',
customerType: '',
kind: '',
phoneNumber: '',
postalAddress: {
addressLine1: '',
addressLine2: '',
addressLine3: '',
contactName: '',
countryCode: '',
kind: '',
locality: '',
organizationName: '',
postalCode: '',
region: ''
},
primaryAdmin: {primaryEmail: ''},
resourceUiUrl: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/apps/reseller/v1/customers';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"alternateEmail":"","customerDomain":"","customerDomainVerified":false,"customerId":"","customerType":"","kind":"","phoneNumber":"","postalAddress":{"addressLine1":"","addressLine2":"","addressLine3":"","contactName":"","countryCode":"","kind":"","locality":"","organizationName":"","postalCode":"","region":""},"primaryAdmin":{"primaryEmail":""},"resourceUiUrl":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/apps/reseller/v1/customers',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "alternateEmail": "",\n "customerDomain": "",\n "customerDomainVerified": false,\n "customerId": "",\n "customerType": "",\n "kind": "",\n "phoneNumber": "",\n "postalAddress": {\n "addressLine1": "",\n "addressLine2": "",\n "addressLine3": "",\n "contactName": "",\n "countryCode": "",\n "kind": "",\n "locality": "",\n "organizationName": "",\n "postalCode": "",\n "region": ""\n },\n "primaryAdmin": {\n "primaryEmail": ""\n },\n "resourceUiUrl": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"alternateEmail\": \"\",\n \"customerDomain\": \"\",\n \"customerDomainVerified\": false,\n \"customerId\": \"\",\n \"customerType\": \"\",\n \"kind\": \"\",\n \"phoneNumber\": \"\",\n \"postalAddress\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"addressLine3\": \"\",\n \"contactName\": \"\",\n \"countryCode\": \"\",\n \"kind\": \"\",\n \"locality\": \"\",\n \"organizationName\": \"\",\n \"postalCode\": \"\",\n \"region\": \"\"\n },\n \"primaryAdmin\": {\n \"primaryEmail\": \"\"\n },\n \"resourceUiUrl\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/apps/reseller/v1/customers")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/apps/reseller/v1/customers',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
alternateEmail: '',
customerDomain: '',
customerDomainVerified: false,
customerId: '',
customerType: '',
kind: '',
phoneNumber: '',
postalAddress: {
addressLine1: '',
addressLine2: '',
addressLine3: '',
contactName: '',
countryCode: '',
kind: '',
locality: '',
organizationName: '',
postalCode: '',
region: ''
},
primaryAdmin: {primaryEmail: ''},
resourceUiUrl: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/apps/reseller/v1/customers',
headers: {'content-type': 'application/json'},
body: {
alternateEmail: '',
customerDomain: '',
customerDomainVerified: false,
customerId: '',
customerType: '',
kind: '',
phoneNumber: '',
postalAddress: {
addressLine1: '',
addressLine2: '',
addressLine3: '',
contactName: '',
countryCode: '',
kind: '',
locality: '',
organizationName: '',
postalCode: '',
region: ''
},
primaryAdmin: {primaryEmail: ''},
resourceUiUrl: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/apps/reseller/v1/customers');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
alternateEmail: '',
customerDomain: '',
customerDomainVerified: false,
customerId: '',
customerType: '',
kind: '',
phoneNumber: '',
postalAddress: {
addressLine1: '',
addressLine2: '',
addressLine3: '',
contactName: '',
countryCode: '',
kind: '',
locality: '',
organizationName: '',
postalCode: '',
region: ''
},
primaryAdmin: {
primaryEmail: ''
},
resourceUiUrl: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/apps/reseller/v1/customers',
headers: {'content-type': 'application/json'},
data: {
alternateEmail: '',
customerDomain: '',
customerDomainVerified: false,
customerId: '',
customerType: '',
kind: '',
phoneNumber: '',
postalAddress: {
addressLine1: '',
addressLine2: '',
addressLine3: '',
contactName: '',
countryCode: '',
kind: '',
locality: '',
organizationName: '',
postalCode: '',
region: ''
},
primaryAdmin: {primaryEmail: ''},
resourceUiUrl: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/apps/reseller/v1/customers';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"alternateEmail":"","customerDomain":"","customerDomainVerified":false,"customerId":"","customerType":"","kind":"","phoneNumber":"","postalAddress":{"addressLine1":"","addressLine2":"","addressLine3":"","contactName":"","countryCode":"","kind":"","locality":"","organizationName":"","postalCode":"","region":""},"primaryAdmin":{"primaryEmail":""},"resourceUiUrl":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"alternateEmail": @"",
@"customerDomain": @"",
@"customerDomainVerified": @NO,
@"customerId": @"",
@"customerType": @"",
@"kind": @"",
@"phoneNumber": @"",
@"postalAddress": @{ @"addressLine1": @"", @"addressLine2": @"", @"addressLine3": @"", @"contactName": @"", @"countryCode": @"", @"kind": @"", @"locality": @"", @"organizationName": @"", @"postalCode": @"", @"region": @"" },
@"primaryAdmin": @{ @"primaryEmail": @"" },
@"resourceUiUrl": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/apps/reseller/v1/customers"]
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 Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/apps/reseller/v1/customers" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"alternateEmail\": \"\",\n \"customerDomain\": \"\",\n \"customerDomainVerified\": false,\n \"customerId\": \"\",\n \"customerType\": \"\",\n \"kind\": \"\",\n \"phoneNumber\": \"\",\n \"postalAddress\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"addressLine3\": \"\",\n \"contactName\": \"\",\n \"countryCode\": \"\",\n \"kind\": \"\",\n \"locality\": \"\",\n \"organizationName\": \"\",\n \"postalCode\": \"\",\n \"region\": \"\"\n },\n \"primaryAdmin\": {\n \"primaryEmail\": \"\"\n },\n \"resourceUiUrl\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/apps/reseller/v1/customers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'alternateEmail' => '',
'customerDomain' => '',
'customerDomainVerified' => null,
'customerId' => '',
'customerType' => '',
'kind' => '',
'phoneNumber' => '',
'postalAddress' => [
'addressLine1' => '',
'addressLine2' => '',
'addressLine3' => '',
'contactName' => '',
'countryCode' => '',
'kind' => '',
'locality' => '',
'organizationName' => '',
'postalCode' => '',
'region' => ''
],
'primaryAdmin' => [
'primaryEmail' => ''
],
'resourceUiUrl' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/apps/reseller/v1/customers', [
'body' => '{
"alternateEmail": "",
"customerDomain": "",
"customerDomainVerified": false,
"customerId": "",
"customerType": "",
"kind": "",
"phoneNumber": "",
"postalAddress": {
"addressLine1": "",
"addressLine2": "",
"addressLine3": "",
"contactName": "",
"countryCode": "",
"kind": "",
"locality": "",
"organizationName": "",
"postalCode": "",
"region": ""
},
"primaryAdmin": {
"primaryEmail": ""
},
"resourceUiUrl": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/apps/reseller/v1/customers');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'alternateEmail' => '',
'customerDomain' => '',
'customerDomainVerified' => null,
'customerId' => '',
'customerType' => '',
'kind' => '',
'phoneNumber' => '',
'postalAddress' => [
'addressLine1' => '',
'addressLine2' => '',
'addressLine3' => '',
'contactName' => '',
'countryCode' => '',
'kind' => '',
'locality' => '',
'organizationName' => '',
'postalCode' => '',
'region' => ''
],
'primaryAdmin' => [
'primaryEmail' => ''
],
'resourceUiUrl' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'alternateEmail' => '',
'customerDomain' => '',
'customerDomainVerified' => null,
'customerId' => '',
'customerType' => '',
'kind' => '',
'phoneNumber' => '',
'postalAddress' => [
'addressLine1' => '',
'addressLine2' => '',
'addressLine3' => '',
'contactName' => '',
'countryCode' => '',
'kind' => '',
'locality' => '',
'organizationName' => '',
'postalCode' => '',
'region' => ''
],
'primaryAdmin' => [
'primaryEmail' => ''
],
'resourceUiUrl' => ''
]));
$request->setRequestUrl('{{baseUrl}}/apps/reseller/v1/customers');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/apps/reseller/v1/customers' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"alternateEmail": "",
"customerDomain": "",
"customerDomainVerified": false,
"customerId": "",
"customerType": "",
"kind": "",
"phoneNumber": "",
"postalAddress": {
"addressLine1": "",
"addressLine2": "",
"addressLine3": "",
"contactName": "",
"countryCode": "",
"kind": "",
"locality": "",
"organizationName": "",
"postalCode": "",
"region": ""
},
"primaryAdmin": {
"primaryEmail": ""
},
"resourceUiUrl": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/apps/reseller/v1/customers' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"alternateEmail": "",
"customerDomain": "",
"customerDomainVerified": false,
"customerId": "",
"customerType": "",
"kind": "",
"phoneNumber": "",
"postalAddress": {
"addressLine1": "",
"addressLine2": "",
"addressLine3": "",
"contactName": "",
"countryCode": "",
"kind": "",
"locality": "",
"organizationName": "",
"postalCode": "",
"region": ""
},
"primaryAdmin": {
"primaryEmail": ""
},
"resourceUiUrl": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"alternateEmail\": \"\",\n \"customerDomain\": \"\",\n \"customerDomainVerified\": false,\n \"customerId\": \"\",\n \"customerType\": \"\",\n \"kind\": \"\",\n \"phoneNumber\": \"\",\n \"postalAddress\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"addressLine3\": \"\",\n \"contactName\": \"\",\n \"countryCode\": \"\",\n \"kind\": \"\",\n \"locality\": \"\",\n \"organizationName\": \"\",\n \"postalCode\": \"\",\n \"region\": \"\"\n },\n \"primaryAdmin\": {\n \"primaryEmail\": \"\"\n },\n \"resourceUiUrl\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/apps/reseller/v1/customers", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/apps/reseller/v1/customers"
payload = {
"alternateEmail": "",
"customerDomain": "",
"customerDomainVerified": False,
"customerId": "",
"customerType": "",
"kind": "",
"phoneNumber": "",
"postalAddress": {
"addressLine1": "",
"addressLine2": "",
"addressLine3": "",
"contactName": "",
"countryCode": "",
"kind": "",
"locality": "",
"organizationName": "",
"postalCode": "",
"region": ""
},
"primaryAdmin": { "primaryEmail": "" },
"resourceUiUrl": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/apps/reseller/v1/customers"
payload <- "{\n \"alternateEmail\": \"\",\n \"customerDomain\": \"\",\n \"customerDomainVerified\": false,\n \"customerId\": \"\",\n \"customerType\": \"\",\n \"kind\": \"\",\n \"phoneNumber\": \"\",\n \"postalAddress\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"addressLine3\": \"\",\n \"contactName\": \"\",\n \"countryCode\": \"\",\n \"kind\": \"\",\n \"locality\": \"\",\n \"organizationName\": \"\",\n \"postalCode\": \"\",\n \"region\": \"\"\n },\n \"primaryAdmin\": {\n \"primaryEmail\": \"\"\n },\n \"resourceUiUrl\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/apps/reseller/v1/customers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"alternateEmail\": \"\",\n \"customerDomain\": \"\",\n \"customerDomainVerified\": false,\n \"customerId\": \"\",\n \"customerType\": \"\",\n \"kind\": \"\",\n \"phoneNumber\": \"\",\n \"postalAddress\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"addressLine3\": \"\",\n \"contactName\": \"\",\n \"countryCode\": \"\",\n \"kind\": \"\",\n \"locality\": \"\",\n \"organizationName\": \"\",\n \"postalCode\": \"\",\n \"region\": \"\"\n },\n \"primaryAdmin\": {\n \"primaryEmail\": \"\"\n },\n \"resourceUiUrl\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/apps/reseller/v1/customers') do |req|
req.body = "{\n \"alternateEmail\": \"\",\n \"customerDomain\": \"\",\n \"customerDomainVerified\": false,\n \"customerId\": \"\",\n \"customerType\": \"\",\n \"kind\": \"\",\n \"phoneNumber\": \"\",\n \"postalAddress\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"addressLine3\": \"\",\n \"contactName\": \"\",\n \"countryCode\": \"\",\n \"kind\": \"\",\n \"locality\": \"\",\n \"organizationName\": \"\",\n \"postalCode\": \"\",\n \"region\": \"\"\n },\n \"primaryAdmin\": {\n \"primaryEmail\": \"\"\n },\n \"resourceUiUrl\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/apps/reseller/v1/customers";
let payload = json!({
"alternateEmail": "",
"customerDomain": "",
"customerDomainVerified": false,
"customerId": "",
"customerType": "",
"kind": "",
"phoneNumber": "",
"postalAddress": json!({
"addressLine1": "",
"addressLine2": "",
"addressLine3": "",
"contactName": "",
"countryCode": "",
"kind": "",
"locality": "",
"organizationName": "",
"postalCode": "",
"region": ""
}),
"primaryAdmin": json!({"primaryEmail": ""}),
"resourceUiUrl": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/apps/reseller/v1/customers \
--header 'content-type: application/json' \
--data '{
"alternateEmail": "",
"customerDomain": "",
"customerDomainVerified": false,
"customerId": "",
"customerType": "",
"kind": "",
"phoneNumber": "",
"postalAddress": {
"addressLine1": "",
"addressLine2": "",
"addressLine3": "",
"contactName": "",
"countryCode": "",
"kind": "",
"locality": "",
"organizationName": "",
"postalCode": "",
"region": ""
},
"primaryAdmin": {
"primaryEmail": ""
},
"resourceUiUrl": ""
}'
echo '{
"alternateEmail": "",
"customerDomain": "",
"customerDomainVerified": false,
"customerId": "",
"customerType": "",
"kind": "",
"phoneNumber": "",
"postalAddress": {
"addressLine1": "",
"addressLine2": "",
"addressLine3": "",
"contactName": "",
"countryCode": "",
"kind": "",
"locality": "",
"organizationName": "",
"postalCode": "",
"region": ""
},
"primaryAdmin": {
"primaryEmail": ""
},
"resourceUiUrl": ""
}' | \
http POST {{baseUrl}}/apps/reseller/v1/customers \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "alternateEmail": "",\n "customerDomain": "",\n "customerDomainVerified": false,\n "customerId": "",\n "customerType": "",\n "kind": "",\n "phoneNumber": "",\n "postalAddress": {\n "addressLine1": "",\n "addressLine2": "",\n "addressLine3": "",\n "contactName": "",\n "countryCode": "",\n "kind": "",\n "locality": "",\n "organizationName": "",\n "postalCode": "",\n "region": ""\n },\n "primaryAdmin": {\n "primaryEmail": ""\n },\n "resourceUiUrl": ""\n}' \
--output-document \
- {{baseUrl}}/apps/reseller/v1/customers
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"alternateEmail": "",
"customerDomain": "",
"customerDomainVerified": false,
"customerId": "",
"customerType": "",
"kind": "",
"phoneNumber": "",
"postalAddress": [
"addressLine1": "",
"addressLine2": "",
"addressLine3": "",
"contactName": "",
"countryCode": "",
"kind": "",
"locality": "",
"organizationName": "",
"postalCode": "",
"region": ""
],
"primaryAdmin": ["primaryEmail": ""],
"resourceUiUrl": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/apps/reseller/v1/customers")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PATCH
reseller.customers.patch
{{baseUrl}}/apps/reseller/v1/customers/:customerId
QUERY PARAMS
customerId
BODY json
{
"alternateEmail": "",
"customerDomain": "",
"customerDomainVerified": false,
"customerId": "",
"customerType": "",
"kind": "",
"phoneNumber": "",
"postalAddress": {
"addressLine1": "",
"addressLine2": "",
"addressLine3": "",
"contactName": "",
"countryCode": "",
"kind": "",
"locality": "",
"organizationName": "",
"postalCode": "",
"region": ""
},
"primaryAdmin": {
"primaryEmail": ""
},
"resourceUiUrl": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/apps/reseller/v1/customers/:customerId");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"alternateEmail\": \"\",\n \"customerDomain\": \"\",\n \"customerDomainVerified\": false,\n \"customerId\": \"\",\n \"customerType\": \"\",\n \"kind\": \"\",\n \"phoneNumber\": \"\",\n \"postalAddress\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"addressLine3\": \"\",\n \"contactName\": \"\",\n \"countryCode\": \"\",\n \"kind\": \"\",\n \"locality\": \"\",\n \"organizationName\": \"\",\n \"postalCode\": \"\",\n \"region\": \"\"\n },\n \"primaryAdmin\": {\n \"primaryEmail\": \"\"\n },\n \"resourceUiUrl\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/apps/reseller/v1/customers/:customerId" {:content-type :json
:form-params {:alternateEmail ""
:customerDomain ""
:customerDomainVerified false
:customerId ""
:customerType ""
:kind ""
:phoneNumber ""
:postalAddress {:addressLine1 ""
:addressLine2 ""
:addressLine3 ""
:contactName ""
:countryCode ""
:kind ""
:locality ""
:organizationName ""
:postalCode ""
:region ""}
:primaryAdmin {:primaryEmail ""}
:resourceUiUrl ""}})
require "http/client"
url = "{{baseUrl}}/apps/reseller/v1/customers/:customerId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"alternateEmail\": \"\",\n \"customerDomain\": \"\",\n \"customerDomainVerified\": false,\n \"customerId\": \"\",\n \"customerType\": \"\",\n \"kind\": \"\",\n \"phoneNumber\": \"\",\n \"postalAddress\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"addressLine3\": \"\",\n \"contactName\": \"\",\n \"countryCode\": \"\",\n \"kind\": \"\",\n \"locality\": \"\",\n \"organizationName\": \"\",\n \"postalCode\": \"\",\n \"region\": \"\"\n },\n \"primaryAdmin\": {\n \"primaryEmail\": \"\"\n },\n \"resourceUiUrl\": \"\"\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/apps/reseller/v1/customers/:customerId"),
Content = new StringContent("{\n \"alternateEmail\": \"\",\n \"customerDomain\": \"\",\n \"customerDomainVerified\": false,\n \"customerId\": \"\",\n \"customerType\": \"\",\n \"kind\": \"\",\n \"phoneNumber\": \"\",\n \"postalAddress\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"addressLine3\": \"\",\n \"contactName\": \"\",\n \"countryCode\": \"\",\n \"kind\": \"\",\n \"locality\": \"\",\n \"organizationName\": \"\",\n \"postalCode\": \"\",\n \"region\": \"\"\n },\n \"primaryAdmin\": {\n \"primaryEmail\": \"\"\n },\n \"resourceUiUrl\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/apps/reseller/v1/customers/:customerId");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"alternateEmail\": \"\",\n \"customerDomain\": \"\",\n \"customerDomainVerified\": false,\n \"customerId\": \"\",\n \"customerType\": \"\",\n \"kind\": \"\",\n \"phoneNumber\": \"\",\n \"postalAddress\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"addressLine3\": \"\",\n \"contactName\": \"\",\n \"countryCode\": \"\",\n \"kind\": \"\",\n \"locality\": \"\",\n \"organizationName\": \"\",\n \"postalCode\": \"\",\n \"region\": \"\"\n },\n \"primaryAdmin\": {\n \"primaryEmail\": \"\"\n },\n \"resourceUiUrl\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/apps/reseller/v1/customers/:customerId"
payload := strings.NewReader("{\n \"alternateEmail\": \"\",\n \"customerDomain\": \"\",\n \"customerDomainVerified\": false,\n \"customerId\": \"\",\n \"customerType\": \"\",\n \"kind\": \"\",\n \"phoneNumber\": \"\",\n \"postalAddress\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"addressLine3\": \"\",\n \"contactName\": \"\",\n \"countryCode\": \"\",\n \"kind\": \"\",\n \"locality\": \"\",\n \"organizationName\": \"\",\n \"postalCode\": \"\",\n \"region\": \"\"\n },\n \"primaryAdmin\": {\n \"primaryEmail\": \"\"\n },\n \"resourceUiUrl\": \"\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
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))
}
PATCH /baseUrl/apps/reseller/v1/customers/:customerId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 480
{
"alternateEmail": "",
"customerDomain": "",
"customerDomainVerified": false,
"customerId": "",
"customerType": "",
"kind": "",
"phoneNumber": "",
"postalAddress": {
"addressLine1": "",
"addressLine2": "",
"addressLine3": "",
"contactName": "",
"countryCode": "",
"kind": "",
"locality": "",
"organizationName": "",
"postalCode": "",
"region": ""
},
"primaryAdmin": {
"primaryEmail": ""
},
"resourceUiUrl": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/apps/reseller/v1/customers/:customerId")
.setHeader("content-type", "application/json")
.setBody("{\n \"alternateEmail\": \"\",\n \"customerDomain\": \"\",\n \"customerDomainVerified\": false,\n \"customerId\": \"\",\n \"customerType\": \"\",\n \"kind\": \"\",\n \"phoneNumber\": \"\",\n \"postalAddress\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"addressLine3\": \"\",\n \"contactName\": \"\",\n \"countryCode\": \"\",\n \"kind\": \"\",\n \"locality\": \"\",\n \"organizationName\": \"\",\n \"postalCode\": \"\",\n \"region\": \"\"\n },\n \"primaryAdmin\": {\n \"primaryEmail\": \"\"\n },\n \"resourceUiUrl\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/apps/reseller/v1/customers/:customerId"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"alternateEmail\": \"\",\n \"customerDomain\": \"\",\n \"customerDomainVerified\": false,\n \"customerId\": \"\",\n \"customerType\": \"\",\n \"kind\": \"\",\n \"phoneNumber\": \"\",\n \"postalAddress\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"addressLine3\": \"\",\n \"contactName\": \"\",\n \"countryCode\": \"\",\n \"kind\": \"\",\n \"locality\": \"\",\n \"organizationName\": \"\",\n \"postalCode\": \"\",\n \"region\": \"\"\n },\n \"primaryAdmin\": {\n \"primaryEmail\": \"\"\n },\n \"resourceUiUrl\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"alternateEmail\": \"\",\n \"customerDomain\": \"\",\n \"customerDomainVerified\": false,\n \"customerId\": \"\",\n \"customerType\": \"\",\n \"kind\": \"\",\n \"phoneNumber\": \"\",\n \"postalAddress\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"addressLine3\": \"\",\n \"contactName\": \"\",\n \"countryCode\": \"\",\n \"kind\": \"\",\n \"locality\": \"\",\n \"organizationName\": \"\",\n \"postalCode\": \"\",\n \"region\": \"\"\n },\n \"primaryAdmin\": {\n \"primaryEmail\": \"\"\n },\n \"resourceUiUrl\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/apps/reseller/v1/customers/:customerId")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/apps/reseller/v1/customers/:customerId")
.header("content-type", "application/json")
.body("{\n \"alternateEmail\": \"\",\n \"customerDomain\": \"\",\n \"customerDomainVerified\": false,\n \"customerId\": \"\",\n \"customerType\": \"\",\n \"kind\": \"\",\n \"phoneNumber\": \"\",\n \"postalAddress\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"addressLine3\": \"\",\n \"contactName\": \"\",\n \"countryCode\": \"\",\n \"kind\": \"\",\n \"locality\": \"\",\n \"organizationName\": \"\",\n \"postalCode\": \"\",\n \"region\": \"\"\n },\n \"primaryAdmin\": {\n \"primaryEmail\": \"\"\n },\n \"resourceUiUrl\": \"\"\n}")
.asString();
const data = JSON.stringify({
alternateEmail: '',
customerDomain: '',
customerDomainVerified: false,
customerId: '',
customerType: '',
kind: '',
phoneNumber: '',
postalAddress: {
addressLine1: '',
addressLine2: '',
addressLine3: '',
contactName: '',
countryCode: '',
kind: '',
locality: '',
organizationName: '',
postalCode: '',
region: ''
},
primaryAdmin: {
primaryEmail: ''
},
resourceUiUrl: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/apps/reseller/v1/customers/:customerId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/apps/reseller/v1/customers/:customerId',
headers: {'content-type': 'application/json'},
data: {
alternateEmail: '',
customerDomain: '',
customerDomainVerified: false,
customerId: '',
customerType: '',
kind: '',
phoneNumber: '',
postalAddress: {
addressLine1: '',
addressLine2: '',
addressLine3: '',
contactName: '',
countryCode: '',
kind: '',
locality: '',
organizationName: '',
postalCode: '',
region: ''
},
primaryAdmin: {primaryEmail: ''},
resourceUiUrl: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/apps/reseller/v1/customers/:customerId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"alternateEmail":"","customerDomain":"","customerDomainVerified":false,"customerId":"","customerType":"","kind":"","phoneNumber":"","postalAddress":{"addressLine1":"","addressLine2":"","addressLine3":"","contactName":"","countryCode":"","kind":"","locality":"","organizationName":"","postalCode":"","region":""},"primaryAdmin":{"primaryEmail":""},"resourceUiUrl":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/apps/reseller/v1/customers/:customerId',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "alternateEmail": "",\n "customerDomain": "",\n "customerDomainVerified": false,\n "customerId": "",\n "customerType": "",\n "kind": "",\n "phoneNumber": "",\n "postalAddress": {\n "addressLine1": "",\n "addressLine2": "",\n "addressLine3": "",\n "contactName": "",\n "countryCode": "",\n "kind": "",\n "locality": "",\n "organizationName": "",\n "postalCode": "",\n "region": ""\n },\n "primaryAdmin": {\n "primaryEmail": ""\n },\n "resourceUiUrl": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"alternateEmail\": \"\",\n \"customerDomain\": \"\",\n \"customerDomainVerified\": false,\n \"customerId\": \"\",\n \"customerType\": \"\",\n \"kind\": \"\",\n \"phoneNumber\": \"\",\n \"postalAddress\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"addressLine3\": \"\",\n \"contactName\": \"\",\n \"countryCode\": \"\",\n \"kind\": \"\",\n \"locality\": \"\",\n \"organizationName\": \"\",\n \"postalCode\": \"\",\n \"region\": \"\"\n },\n \"primaryAdmin\": {\n \"primaryEmail\": \"\"\n },\n \"resourceUiUrl\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/apps/reseller/v1/customers/:customerId")
.patch(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/apps/reseller/v1/customers/:customerId',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
alternateEmail: '',
customerDomain: '',
customerDomainVerified: false,
customerId: '',
customerType: '',
kind: '',
phoneNumber: '',
postalAddress: {
addressLine1: '',
addressLine2: '',
addressLine3: '',
contactName: '',
countryCode: '',
kind: '',
locality: '',
organizationName: '',
postalCode: '',
region: ''
},
primaryAdmin: {primaryEmail: ''},
resourceUiUrl: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/apps/reseller/v1/customers/:customerId',
headers: {'content-type': 'application/json'},
body: {
alternateEmail: '',
customerDomain: '',
customerDomainVerified: false,
customerId: '',
customerType: '',
kind: '',
phoneNumber: '',
postalAddress: {
addressLine1: '',
addressLine2: '',
addressLine3: '',
contactName: '',
countryCode: '',
kind: '',
locality: '',
organizationName: '',
postalCode: '',
region: ''
},
primaryAdmin: {primaryEmail: ''},
resourceUiUrl: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PATCH', '{{baseUrl}}/apps/reseller/v1/customers/:customerId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
alternateEmail: '',
customerDomain: '',
customerDomainVerified: false,
customerId: '',
customerType: '',
kind: '',
phoneNumber: '',
postalAddress: {
addressLine1: '',
addressLine2: '',
addressLine3: '',
contactName: '',
countryCode: '',
kind: '',
locality: '',
organizationName: '',
postalCode: '',
region: ''
},
primaryAdmin: {
primaryEmail: ''
},
resourceUiUrl: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PATCH',
url: '{{baseUrl}}/apps/reseller/v1/customers/:customerId',
headers: {'content-type': 'application/json'},
data: {
alternateEmail: '',
customerDomain: '',
customerDomainVerified: false,
customerId: '',
customerType: '',
kind: '',
phoneNumber: '',
postalAddress: {
addressLine1: '',
addressLine2: '',
addressLine3: '',
contactName: '',
countryCode: '',
kind: '',
locality: '',
organizationName: '',
postalCode: '',
region: ''
},
primaryAdmin: {primaryEmail: ''},
resourceUiUrl: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/apps/reseller/v1/customers/:customerId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"alternateEmail":"","customerDomain":"","customerDomainVerified":false,"customerId":"","customerType":"","kind":"","phoneNumber":"","postalAddress":{"addressLine1":"","addressLine2":"","addressLine3":"","contactName":"","countryCode":"","kind":"","locality":"","organizationName":"","postalCode":"","region":""},"primaryAdmin":{"primaryEmail":""},"resourceUiUrl":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"alternateEmail": @"",
@"customerDomain": @"",
@"customerDomainVerified": @NO,
@"customerId": @"",
@"customerType": @"",
@"kind": @"",
@"phoneNumber": @"",
@"postalAddress": @{ @"addressLine1": @"", @"addressLine2": @"", @"addressLine3": @"", @"contactName": @"", @"countryCode": @"", @"kind": @"", @"locality": @"", @"organizationName": @"", @"postalCode": @"", @"region": @"" },
@"primaryAdmin": @{ @"primaryEmail": @"" },
@"resourceUiUrl": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/apps/reseller/v1/customers/:customerId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[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 Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/apps/reseller/v1/customers/:customerId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"alternateEmail\": \"\",\n \"customerDomain\": \"\",\n \"customerDomainVerified\": false,\n \"customerId\": \"\",\n \"customerType\": \"\",\n \"kind\": \"\",\n \"phoneNumber\": \"\",\n \"postalAddress\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"addressLine3\": \"\",\n \"contactName\": \"\",\n \"countryCode\": \"\",\n \"kind\": \"\",\n \"locality\": \"\",\n \"organizationName\": \"\",\n \"postalCode\": \"\",\n \"region\": \"\"\n },\n \"primaryAdmin\": {\n \"primaryEmail\": \"\"\n },\n \"resourceUiUrl\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/apps/reseller/v1/customers/:customerId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'alternateEmail' => '',
'customerDomain' => '',
'customerDomainVerified' => null,
'customerId' => '',
'customerType' => '',
'kind' => '',
'phoneNumber' => '',
'postalAddress' => [
'addressLine1' => '',
'addressLine2' => '',
'addressLine3' => '',
'contactName' => '',
'countryCode' => '',
'kind' => '',
'locality' => '',
'organizationName' => '',
'postalCode' => '',
'region' => ''
],
'primaryAdmin' => [
'primaryEmail' => ''
],
'resourceUiUrl' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/apps/reseller/v1/customers/:customerId', [
'body' => '{
"alternateEmail": "",
"customerDomain": "",
"customerDomainVerified": false,
"customerId": "",
"customerType": "",
"kind": "",
"phoneNumber": "",
"postalAddress": {
"addressLine1": "",
"addressLine2": "",
"addressLine3": "",
"contactName": "",
"countryCode": "",
"kind": "",
"locality": "",
"organizationName": "",
"postalCode": "",
"region": ""
},
"primaryAdmin": {
"primaryEmail": ""
},
"resourceUiUrl": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/apps/reseller/v1/customers/:customerId');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'alternateEmail' => '',
'customerDomain' => '',
'customerDomainVerified' => null,
'customerId' => '',
'customerType' => '',
'kind' => '',
'phoneNumber' => '',
'postalAddress' => [
'addressLine1' => '',
'addressLine2' => '',
'addressLine3' => '',
'contactName' => '',
'countryCode' => '',
'kind' => '',
'locality' => '',
'organizationName' => '',
'postalCode' => '',
'region' => ''
],
'primaryAdmin' => [
'primaryEmail' => ''
],
'resourceUiUrl' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'alternateEmail' => '',
'customerDomain' => '',
'customerDomainVerified' => null,
'customerId' => '',
'customerType' => '',
'kind' => '',
'phoneNumber' => '',
'postalAddress' => [
'addressLine1' => '',
'addressLine2' => '',
'addressLine3' => '',
'contactName' => '',
'countryCode' => '',
'kind' => '',
'locality' => '',
'organizationName' => '',
'postalCode' => '',
'region' => ''
],
'primaryAdmin' => [
'primaryEmail' => ''
],
'resourceUiUrl' => ''
]));
$request->setRequestUrl('{{baseUrl}}/apps/reseller/v1/customers/:customerId');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/apps/reseller/v1/customers/:customerId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"alternateEmail": "",
"customerDomain": "",
"customerDomainVerified": false,
"customerId": "",
"customerType": "",
"kind": "",
"phoneNumber": "",
"postalAddress": {
"addressLine1": "",
"addressLine2": "",
"addressLine3": "",
"contactName": "",
"countryCode": "",
"kind": "",
"locality": "",
"organizationName": "",
"postalCode": "",
"region": ""
},
"primaryAdmin": {
"primaryEmail": ""
},
"resourceUiUrl": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/apps/reseller/v1/customers/:customerId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"alternateEmail": "",
"customerDomain": "",
"customerDomainVerified": false,
"customerId": "",
"customerType": "",
"kind": "",
"phoneNumber": "",
"postalAddress": {
"addressLine1": "",
"addressLine2": "",
"addressLine3": "",
"contactName": "",
"countryCode": "",
"kind": "",
"locality": "",
"organizationName": "",
"postalCode": "",
"region": ""
},
"primaryAdmin": {
"primaryEmail": ""
},
"resourceUiUrl": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"alternateEmail\": \"\",\n \"customerDomain\": \"\",\n \"customerDomainVerified\": false,\n \"customerId\": \"\",\n \"customerType\": \"\",\n \"kind\": \"\",\n \"phoneNumber\": \"\",\n \"postalAddress\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"addressLine3\": \"\",\n \"contactName\": \"\",\n \"countryCode\": \"\",\n \"kind\": \"\",\n \"locality\": \"\",\n \"organizationName\": \"\",\n \"postalCode\": \"\",\n \"region\": \"\"\n },\n \"primaryAdmin\": {\n \"primaryEmail\": \"\"\n },\n \"resourceUiUrl\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/apps/reseller/v1/customers/:customerId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/apps/reseller/v1/customers/:customerId"
payload = {
"alternateEmail": "",
"customerDomain": "",
"customerDomainVerified": False,
"customerId": "",
"customerType": "",
"kind": "",
"phoneNumber": "",
"postalAddress": {
"addressLine1": "",
"addressLine2": "",
"addressLine3": "",
"contactName": "",
"countryCode": "",
"kind": "",
"locality": "",
"organizationName": "",
"postalCode": "",
"region": ""
},
"primaryAdmin": { "primaryEmail": "" },
"resourceUiUrl": ""
}
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/apps/reseller/v1/customers/:customerId"
payload <- "{\n \"alternateEmail\": \"\",\n \"customerDomain\": \"\",\n \"customerDomainVerified\": false,\n \"customerId\": \"\",\n \"customerType\": \"\",\n \"kind\": \"\",\n \"phoneNumber\": \"\",\n \"postalAddress\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"addressLine3\": \"\",\n \"contactName\": \"\",\n \"countryCode\": \"\",\n \"kind\": \"\",\n \"locality\": \"\",\n \"organizationName\": \"\",\n \"postalCode\": \"\",\n \"region\": \"\"\n },\n \"primaryAdmin\": {\n \"primaryEmail\": \"\"\n },\n \"resourceUiUrl\": \"\"\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/apps/reseller/v1/customers/:customerId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"alternateEmail\": \"\",\n \"customerDomain\": \"\",\n \"customerDomainVerified\": false,\n \"customerId\": \"\",\n \"customerType\": \"\",\n \"kind\": \"\",\n \"phoneNumber\": \"\",\n \"postalAddress\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"addressLine3\": \"\",\n \"contactName\": \"\",\n \"countryCode\": \"\",\n \"kind\": \"\",\n \"locality\": \"\",\n \"organizationName\": \"\",\n \"postalCode\": \"\",\n \"region\": \"\"\n },\n \"primaryAdmin\": {\n \"primaryEmail\": \"\"\n },\n \"resourceUiUrl\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.patch('/baseUrl/apps/reseller/v1/customers/:customerId') do |req|
req.body = "{\n \"alternateEmail\": \"\",\n \"customerDomain\": \"\",\n \"customerDomainVerified\": false,\n \"customerId\": \"\",\n \"customerType\": \"\",\n \"kind\": \"\",\n \"phoneNumber\": \"\",\n \"postalAddress\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"addressLine3\": \"\",\n \"contactName\": \"\",\n \"countryCode\": \"\",\n \"kind\": \"\",\n \"locality\": \"\",\n \"organizationName\": \"\",\n \"postalCode\": \"\",\n \"region\": \"\"\n },\n \"primaryAdmin\": {\n \"primaryEmail\": \"\"\n },\n \"resourceUiUrl\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/apps/reseller/v1/customers/:customerId";
let payload = json!({
"alternateEmail": "",
"customerDomain": "",
"customerDomainVerified": false,
"customerId": "",
"customerType": "",
"kind": "",
"phoneNumber": "",
"postalAddress": json!({
"addressLine1": "",
"addressLine2": "",
"addressLine3": "",
"contactName": "",
"countryCode": "",
"kind": "",
"locality": "",
"organizationName": "",
"postalCode": "",
"region": ""
}),
"primaryAdmin": json!({"primaryEmail": ""}),
"resourceUiUrl": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/apps/reseller/v1/customers/:customerId \
--header 'content-type: application/json' \
--data '{
"alternateEmail": "",
"customerDomain": "",
"customerDomainVerified": false,
"customerId": "",
"customerType": "",
"kind": "",
"phoneNumber": "",
"postalAddress": {
"addressLine1": "",
"addressLine2": "",
"addressLine3": "",
"contactName": "",
"countryCode": "",
"kind": "",
"locality": "",
"organizationName": "",
"postalCode": "",
"region": ""
},
"primaryAdmin": {
"primaryEmail": ""
},
"resourceUiUrl": ""
}'
echo '{
"alternateEmail": "",
"customerDomain": "",
"customerDomainVerified": false,
"customerId": "",
"customerType": "",
"kind": "",
"phoneNumber": "",
"postalAddress": {
"addressLine1": "",
"addressLine2": "",
"addressLine3": "",
"contactName": "",
"countryCode": "",
"kind": "",
"locality": "",
"organizationName": "",
"postalCode": "",
"region": ""
},
"primaryAdmin": {
"primaryEmail": ""
},
"resourceUiUrl": ""
}' | \
http PATCH {{baseUrl}}/apps/reseller/v1/customers/:customerId \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "alternateEmail": "",\n "customerDomain": "",\n "customerDomainVerified": false,\n "customerId": "",\n "customerType": "",\n "kind": "",\n "phoneNumber": "",\n "postalAddress": {\n "addressLine1": "",\n "addressLine2": "",\n "addressLine3": "",\n "contactName": "",\n "countryCode": "",\n "kind": "",\n "locality": "",\n "organizationName": "",\n "postalCode": "",\n "region": ""\n },\n "primaryAdmin": {\n "primaryEmail": ""\n },\n "resourceUiUrl": ""\n}' \
--output-document \
- {{baseUrl}}/apps/reseller/v1/customers/:customerId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"alternateEmail": "",
"customerDomain": "",
"customerDomainVerified": false,
"customerId": "",
"customerType": "",
"kind": "",
"phoneNumber": "",
"postalAddress": [
"addressLine1": "",
"addressLine2": "",
"addressLine3": "",
"contactName": "",
"countryCode": "",
"kind": "",
"locality": "",
"organizationName": "",
"postalCode": "",
"region": ""
],
"primaryAdmin": ["primaryEmail": ""],
"resourceUiUrl": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/apps/reseller/v1/customers/:customerId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
reseller.customers.update
{{baseUrl}}/apps/reseller/v1/customers/:customerId
QUERY PARAMS
customerId
BODY json
{
"alternateEmail": "",
"customerDomain": "",
"customerDomainVerified": false,
"customerId": "",
"customerType": "",
"kind": "",
"phoneNumber": "",
"postalAddress": {
"addressLine1": "",
"addressLine2": "",
"addressLine3": "",
"contactName": "",
"countryCode": "",
"kind": "",
"locality": "",
"organizationName": "",
"postalCode": "",
"region": ""
},
"primaryAdmin": {
"primaryEmail": ""
},
"resourceUiUrl": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/apps/reseller/v1/customers/:customerId");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"alternateEmail\": \"\",\n \"customerDomain\": \"\",\n \"customerDomainVerified\": false,\n \"customerId\": \"\",\n \"customerType\": \"\",\n \"kind\": \"\",\n \"phoneNumber\": \"\",\n \"postalAddress\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"addressLine3\": \"\",\n \"contactName\": \"\",\n \"countryCode\": \"\",\n \"kind\": \"\",\n \"locality\": \"\",\n \"organizationName\": \"\",\n \"postalCode\": \"\",\n \"region\": \"\"\n },\n \"primaryAdmin\": {\n \"primaryEmail\": \"\"\n },\n \"resourceUiUrl\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/apps/reseller/v1/customers/:customerId" {:content-type :json
:form-params {:alternateEmail ""
:customerDomain ""
:customerDomainVerified false
:customerId ""
:customerType ""
:kind ""
:phoneNumber ""
:postalAddress {:addressLine1 ""
:addressLine2 ""
:addressLine3 ""
:contactName ""
:countryCode ""
:kind ""
:locality ""
:organizationName ""
:postalCode ""
:region ""}
:primaryAdmin {:primaryEmail ""}
:resourceUiUrl ""}})
require "http/client"
url = "{{baseUrl}}/apps/reseller/v1/customers/:customerId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"alternateEmail\": \"\",\n \"customerDomain\": \"\",\n \"customerDomainVerified\": false,\n \"customerId\": \"\",\n \"customerType\": \"\",\n \"kind\": \"\",\n \"phoneNumber\": \"\",\n \"postalAddress\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"addressLine3\": \"\",\n \"contactName\": \"\",\n \"countryCode\": \"\",\n \"kind\": \"\",\n \"locality\": \"\",\n \"organizationName\": \"\",\n \"postalCode\": \"\",\n \"region\": \"\"\n },\n \"primaryAdmin\": {\n \"primaryEmail\": \"\"\n },\n \"resourceUiUrl\": \"\"\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/apps/reseller/v1/customers/:customerId"),
Content = new StringContent("{\n \"alternateEmail\": \"\",\n \"customerDomain\": \"\",\n \"customerDomainVerified\": false,\n \"customerId\": \"\",\n \"customerType\": \"\",\n \"kind\": \"\",\n \"phoneNumber\": \"\",\n \"postalAddress\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"addressLine3\": \"\",\n \"contactName\": \"\",\n \"countryCode\": \"\",\n \"kind\": \"\",\n \"locality\": \"\",\n \"organizationName\": \"\",\n \"postalCode\": \"\",\n \"region\": \"\"\n },\n \"primaryAdmin\": {\n \"primaryEmail\": \"\"\n },\n \"resourceUiUrl\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/apps/reseller/v1/customers/:customerId");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"alternateEmail\": \"\",\n \"customerDomain\": \"\",\n \"customerDomainVerified\": false,\n \"customerId\": \"\",\n \"customerType\": \"\",\n \"kind\": \"\",\n \"phoneNumber\": \"\",\n \"postalAddress\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"addressLine3\": \"\",\n \"contactName\": \"\",\n \"countryCode\": \"\",\n \"kind\": \"\",\n \"locality\": \"\",\n \"organizationName\": \"\",\n \"postalCode\": \"\",\n \"region\": \"\"\n },\n \"primaryAdmin\": {\n \"primaryEmail\": \"\"\n },\n \"resourceUiUrl\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/apps/reseller/v1/customers/:customerId"
payload := strings.NewReader("{\n \"alternateEmail\": \"\",\n \"customerDomain\": \"\",\n \"customerDomainVerified\": false,\n \"customerId\": \"\",\n \"customerType\": \"\",\n \"kind\": \"\",\n \"phoneNumber\": \"\",\n \"postalAddress\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"addressLine3\": \"\",\n \"contactName\": \"\",\n \"countryCode\": \"\",\n \"kind\": \"\",\n \"locality\": \"\",\n \"organizationName\": \"\",\n \"postalCode\": \"\",\n \"region\": \"\"\n },\n \"primaryAdmin\": {\n \"primaryEmail\": \"\"\n },\n \"resourceUiUrl\": \"\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
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))
}
PUT /baseUrl/apps/reseller/v1/customers/:customerId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 480
{
"alternateEmail": "",
"customerDomain": "",
"customerDomainVerified": false,
"customerId": "",
"customerType": "",
"kind": "",
"phoneNumber": "",
"postalAddress": {
"addressLine1": "",
"addressLine2": "",
"addressLine3": "",
"contactName": "",
"countryCode": "",
"kind": "",
"locality": "",
"organizationName": "",
"postalCode": "",
"region": ""
},
"primaryAdmin": {
"primaryEmail": ""
},
"resourceUiUrl": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/apps/reseller/v1/customers/:customerId")
.setHeader("content-type", "application/json")
.setBody("{\n \"alternateEmail\": \"\",\n \"customerDomain\": \"\",\n \"customerDomainVerified\": false,\n \"customerId\": \"\",\n \"customerType\": \"\",\n \"kind\": \"\",\n \"phoneNumber\": \"\",\n \"postalAddress\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"addressLine3\": \"\",\n \"contactName\": \"\",\n \"countryCode\": \"\",\n \"kind\": \"\",\n \"locality\": \"\",\n \"organizationName\": \"\",\n \"postalCode\": \"\",\n \"region\": \"\"\n },\n \"primaryAdmin\": {\n \"primaryEmail\": \"\"\n },\n \"resourceUiUrl\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/apps/reseller/v1/customers/:customerId"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"alternateEmail\": \"\",\n \"customerDomain\": \"\",\n \"customerDomainVerified\": false,\n \"customerId\": \"\",\n \"customerType\": \"\",\n \"kind\": \"\",\n \"phoneNumber\": \"\",\n \"postalAddress\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"addressLine3\": \"\",\n \"contactName\": \"\",\n \"countryCode\": \"\",\n \"kind\": \"\",\n \"locality\": \"\",\n \"organizationName\": \"\",\n \"postalCode\": \"\",\n \"region\": \"\"\n },\n \"primaryAdmin\": {\n \"primaryEmail\": \"\"\n },\n \"resourceUiUrl\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"alternateEmail\": \"\",\n \"customerDomain\": \"\",\n \"customerDomainVerified\": false,\n \"customerId\": \"\",\n \"customerType\": \"\",\n \"kind\": \"\",\n \"phoneNumber\": \"\",\n \"postalAddress\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"addressLine3\": \"\",\n \"contactName\": \"\",\n \"countryCode\": \"\",\n \"kind\": \"\",\n \"locality\": \"\",\n \"organizationName\": \"\",\n \"postalCode\": \"\",\n \"region\": \"\"\n },\n \"primaryAdmin\": {\n \"primaryEmail\": \"\"\n },\n \"resourceUiUrl\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/apps/reseller/v1/customers/:customerId")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/apps/reseller/v1/customers/:customerId")
.header("content-type", "application/json")
.body("{\n \"alternateEmail\": \"\",\n \"customerDomain\": \"\",\n \"customerDomainVerified\": false,\n \"customerId\": \"\",\n \"customerType\": \"\",\n \"kind\": \"\",\n \"phoneNumber\": \"\",\n \"postalAddress\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"addressLine3\": \"\",\n \"contactName\": \"\",\n \"countryCode\": \"\",\n \"kind\": \"\",\n \"locality\": \"\",\n \"organizationName\": \"\",\n \"postalCode\": \"\",\n \"region\": \"\"\n },\n \"primaryAdmin\": {\n \"primaryEmail\": \"\"\n },\n \"resourceUiUrl\": \"\"\n}")
.asString();
const data = JSON.stringify({
alternateEmail: '',
customerDomain: '',
customerDomainVerified: false,
customerId: '',
customerType: '',
kind: '',
phoneNumber: '',
postalAddress: {
addressLine1: '',
addressLine2: '',
addressLine3: '',
contactName: '',
countryCode: '',
kind: '',
locality: '',
organizationName: '',
postalCode: '',
region: ''
},
primaryAdmin: {
primaryEmail: ''
},
resourceUiUrl: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/apps/reseller/v1/customers/:customerId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/apps/reseller/v1/customers/:customerId',
headers: {'content-type': 'application/json'},
data: {
alternateEmail: '',
customerDomain: '',
customerDomainVerified: false,
customerId: '',
customerType: '',
kind: '',
phoneNumber: '',
postalAddress: {
addressLine1: '',
addressLine2: '',
addressLine3: '',
contactName: '',
countryCode: '',
kind: '',
locality: '',
organizationName: '',
postalCode: '',
region: ''
},
primaryAdmin: {primaryEmail: ''},
resourceUiUrl: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/apps/reseller/v1/customers/:customerId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"alternateEmail":"","customerDomain":"","customerDomainVerified":false,"customerId":"","customerType":"","kind":"","phoneNumber":"","postalAddress":{"addressLine1":"","addressLine2":"","addressLine3":"","contactName":"","countryCode":"","kind":"","locality":"","organizationName":"","postalCode":"","region":""},"primaryAdmin":{"primaryEmail":""},"resourceUiUrl":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/apps/reseller/v1/customers/:customerId',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "alternateEmail": "",\n "customerDomain": "",\n "customerDomainVerified": false,\n "customerId": "",\n "customerType": "",\n "kind": "",\n "phoneNumber": "",\n "postalAddress": {\n "addressLine1": "",\n "addressLine2": "",\n "addressLine3": "",\n "contactName": "",\n "countryCode": "",\n "kind": "",\n "locality": "",\n "organizationName": "",\n "postalCode": "",\n "region": ""\n },\n "primaryAdmin": {\n "primaryEmail": ""\n },\n "resourceUiUrl": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"alternateEmail\": \"\",\n \"customerDomain\": \"\",\n \"customerDomainVerified\": false,\n \"customerId\": \"\",\n \"customerType\": \"\",\n \"kind\": \"\",\n \"phoneNumber\": \"\",\n \"postalAddress\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"addressLine3\": \"\",\n \"contactName\": \"\",\n \"countryCode\": \"\",\n \"kind\": \"\",\n \"locality\": \"\",\n \"organizationName\": \"\",\n \"postalCode\": \"\",\n \"region\": \"\"\n },\n \"primaryAdmin\": {\n \"primaryEmail\": \"\"\n },\n \"resourceUiUrl\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/apps/reseller/v1/customers/:customerId")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/apps/reseller/v1/customers/:customerId',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
alternateEmail: '',
customerDomain: '',
customerDomainVerified: false,
customerId: '',
customerType: '',
kind: '',
phoneNumber: '',
postalAddress: {
addressLine1: '',
addressLine2: '',
addressLine3: '',
contactName: '',
countryCode: '',
kind: '',
locality: '',
organizationName: '',
postalCode: '',
region: ''
},
primaryAdmin: {primaryEmail: ''},
resourceUiUrl: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/apps/reseller/v1/customers/:customerId',
headers: {'content-type': 'application/json'},
body: {
alternateEmail: '',
customerDomain: '',
customerDomainVerified: false,
customerId: '',
customerType: '',
kind: '',
phoneNumber: '',
postalAddress: {
addressLine1: '',
addressLine2: '',
addressLine3: '',
contactName: '',
countryCode: '',
kind: '',
locality: '',
organizationName: '',
postalCode: '',
region: ''
},
primaryAdmin: {primaryEmail: ''},
resourceUiUrl: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/apps/reseller/v1/customers/:customerId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
alternateEmail: '',
customerDomain: '',
customerDomainVerified: false,
customerId: '',
customerType: '',
kind: '',
phoneNumber: '',
postalAddress: {
addressLine1: '',
addressLine2: '',
addressLine3: '',
contactName: '',
countryCode: '',
kind: '',
locality: '',
organizationName: '',
postalCode: '',
region: ''
},
primaryAdmin: {
primaryEmail: ''
},
resourceUiUrl: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/apps/reseller/v1/customers/:customerId',
headers: {'content-type': 'application/json'},
data: {
alternateEmail: '',
customerDomain: '',
customerDomainVerified: false,
customerId: '',
customerType: '',
kind: '',
phoneNumber: '',
postalAddress: {
addressLine1: '',
addressLine2: '',
addressLine3: '',
contactName: '',
countryCode: '',
kind: '',
locality: '',
organizationName: '',
postalCode: '',
region: ''
},
primaryAdmin: {primaryEmail: ''},
resourceUiUrl: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/apps/reseller/v1/customers/:customerId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"alternateEmail":"","customerDomain":"","customerDomainVerified":false,"customerId":"","customerType":"","kind":"","phoneNumber":"","postalAddress":{"addressLine1":"","addressLine2":"","addressLine3":"","contactName":"","countryCode":"","kind":"","locality":"","organizationName":"","postalCode":"","region":""},"primaryAdmin":{"primaryEmail":""},"resourceUiUrl":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"alternateEmail": @"",
@"customerDomain": @"",
@"customerDomainVerified": @NO,
@"customerId": @"",
@"customerType": @"",
@"kind": @"",
@"phoneNumber": @"",
@"postalAddress": @{ @"addressLine1": @"", @"addressLine2": @"", @"addressLine3": @"", @"contactName": @"", @"countryCode": @"", @"kind": @"", @"locality": @"", @"organizationName": @"", @"postalCode": @"", @"region": @"" },
@"primaryAdmin": @{ @"primaryEmail": @"" },
@"resourceUiUrl": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/apps/reseller/v1/customers/:customerId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[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 Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/apps/reseller/v1/customers/:customerId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"alternateEmail\": \"\",\n \"customerDomain\": \"\",\n \"customerDomainVerified\": false,\n \"customerId\": \"\",\n \"customerType\": \"\",\n \"kind\": \"\",\n \"phoneNumber\": \"\",\n \"postalAddress\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"addressLine3\": \"\",\n \"contactName\": \"\",\n \"countryCode\": \"\",\n \"kind\": \"\",\n \"locality\": \"\",\n \"organizationName\": \"\",\n \"postalCode\": \"\",\n \"region\": \"\"\n },\n \"primaryAdmin\": {\n \"primaryEmail\": \"\"\n },\n \"resourceUiUrl\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/apps/reseller/v1/customers/:customerId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'alternateEmail' => '',
'customerDomain' => '',
'customerDomainVerified' => null,
'customerId' => '',
'customerType' => '',
'kind' => '',
'phoneNumber' => '',
'postalAddress' => [
'addressLine1' => '',
'addressLine2' => '',
'addressLine3' => '',
'contactName' => '',
'countryCode' => '',
'kind' => '',
'locality' => '',
'organizationName' => '',
'postalCode' => '',
'region' => ''
],
'primaryAdmin' => [
'primaryEmail' => ''
],
'resourceUiUrl' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/apps/reseller/v1/customers/:customerId', [
'body' => '{
"alternateEmail": "",
"customerDomain": "",
"customerDomainVerified": false,
"customerId": "",
"customerType": "",
"kind": "",
"phoneNumber": "",
"postalAddress": {
"addressLine1": "",
"addressLine2": "",
"addressLine3": "",
"contactName": "",
"countryCode": "",
"kind": "",
"locality": "",
"organizationName": "",
"postalCode": "",
"region": ""
},
"primaryAdmin": {
"primaryEmail": ""
},
"resourceUiUrl": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/apps/reseller/v1/customers/:customerId');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'alternateEmail' => '',
'customerDomain' => '',
'customerDomainVerified' => null,
'customerId' => '',
'customerType' => '',
'kind' => '',
'phoneNumber' => '',
'postalAddress' => [
'addressLine1' => '',
'addressLine2' => '',
'addressLine3' => '',
'contactName' => '',
'countryCode' => '',
'kind' => '',
'locality' => '',
'organizationName' => '',
'postalCode' => '',
'region' => ''
],
'primaryAdmin' => [
'primaryEmail' => ''
],
'resourceUiUrl' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'alternateEmail' => '',
'customerDomain' => '',
'customerDomainVerified' => null,
'customerId' => '',
'customerType' => '',
'kind' => '',
'phoneNumber' => '',
'postalAddress' => [
'addressLine1' => '',
'addressLine2' => '',
'addressLine3' => '',
'contactName' => '',
'countryCode' => '',
'kind' => '',
'locality' => '',
'organizationName' => '',
'postalCode' => '',
'region' => ''
],
'primaryAdmin' => [
'primaryEmail' => ''
],
'resourceUiUrl' => ''
]));
$request->setRequestUrl('{{baseUrl}}/apps/reseller/v1/customers/:customerId');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/apps/reseller/v1/customers/:customerId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"alternateEmail": "",
"customerDomain": "",
"customerDomainVerified": false,
"customerId": "",
"customerType": "",
"kind": "",
"phoneNumber": "",
"postalAddress": {
"addressLine1": "",
"addressLine2": "",
"addressLine3": "",
"contactName": "",
"countryCode": "",
"kind": "",
"locality": "",
"organizationName": "",
"postalCode": "",
"region": ""
},
"primaryAdmin": {
"primaryEmail": ""
},
"resourceUiUrl": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/apps/reseller/v1/customers/:customerId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"alternateEmail": "",
"customerDomain": "",
"customerDomainVerified": false,
"customerId": "",
"customerType": "",
"kind": "",
"phoneNumber": "",
"postalAddress": {
"addressLine1": "",
"addressLine2": "",
"addressLine3": "",
"contactName": "",
"countryCode": "",
"kind": "",
"locality": "",
"organizationName": "",
"postalCode": "",
"region": ""
},
"primaryAdmin": {
"primaryEmail": ""
},
"resourceUiUrl": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"alternateEmail\": \"\",\n \"customerDomain\": \"\",\n \"customerDomainVerified\": false,\n \"customerId\": \"\",\n \"customerType\": \"\",\n \"kind\": \"\",\n \"phoneNumber\": \"\",\n \"postalAddress\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"addressLine3\": \"\",\n \"contactName\": \"\",\n \"countryCode\": \"\",\n \"kind\": \"\",\n \"locality\": \"\",\n \"organizationName\": \"\",\n \"postalCode\": \"\",\n \"region\": \"\"\n },\n \"primaryAdmin\": {\n \"primaryEmail\": \"\"\n },\n \"resourceUiUrl\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/apps/reseller/v1/customers/:customerId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/apps/reseller/v1/customers/:customerId"
payload = {
"alternateEmail": "",
"customerDomain": "",
"customerDomainVerified": False,
"customerId": "",
"customerType": "",
"kind": "",
"phoneNumber": "",
"postalAddress": {
"addressLine1": "",
"addressLine2": "",
"addressLine3": "",
"contactName": "",
"countryCode": "",
"kind": "",
"locality": "",
"organizationName": "",
"postalCode": "",
"region": ""
},
"primaryAdmin": { "primaryEmail": "" },
"resourceUiUrl": ""
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/apps/reseller/v1/customers/:customerId"
payload <- "{\n \"alternateEmail\": \"\",\n \"customerDomain\": \"\",\n \"customerDomainVerified\": false,\n \"customerId\": \"\",\n \"customerType\": \"\",\n \"kind\": \"\",\n \"phoneNumber\": \"\",\n \"postalAddress\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"addressLine3\": \"\",\n \"contactName\": \"\",\n \"countryCode\": \"\",\n \"kind\": \"\",\n \"locality\": \"\",\n \"organizationName\": \"\",\n \"postalCode\": \"\",\n \"region\": \"\"\n },\n \"primaryAdmin\": {\n \"primaryEmail\": \"\"\n },\n \"resourceUiUrl\": \"\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/apps/reseller/v1/customers/:customerId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"alternateEmail\": \"\",\n \"customerDomain\": \"\",\n \"customerDomainVerified\": false,\n \"customerId\": \"\",\n \"customerType\": \"\",\n \"kind\": \"\",\n \"phoneNumber\": \"\",\n \"postalAddress\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"addressLine3\": \"\",\n \"contactName\": \"\",\n \"countryCode\": \"\",\n \"kind\": \"\",\n \"locality\": \"\",\n \"organizationName\": \"\",\n \"postalCode\": \"\",\n \"region\": \"\"\n },\n \"primaryAdmin\": {\n \"primaryEmail\": \"\"\n },\n \"resourceUiUrl\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/apps/reseller/v1/customers/:customerId') do |req|
req.body = "{\n \"alternateEmail\": \"\",\n \"customerDomain\": \"\",\n \"customerDomainVerified\": false,\n \"customerId\": \"\",\n \"customerType\": \"\",\n \"kind\": \"\",\n \"phoneNumber\": \"\",\n \"postalAddress\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"addressLine3\": \"\",\n \"contactName\": \"\",\n \"countryCode\": \"\",\n \"kind\": \"\",\n \"locality\": \"\",\n \"organizationName\": \"\",\n \"postalCode\": \"\",\n \"region\": \"\"\n },\n \"primaryAdmin\": {\n \"primaryEmail\": \"\"\n },\n \"resourceUiUrl\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/apps/reseller/v1/customers/:customerId";
let payload = json!({
"alternateEmail": "",
"customerDomain": "",
"customerDomainVerified": false,
"customerId": "",
"customerType": "",
"kind": "",
"phoneNumber": "",
"postalAddress": json!({
"addressLine1": "",
"addressLine2": "",
"addressLine3": "",
"contactName": "",
"countryCode": "",
"kind": "",
"locality": "",
"organizationName": "",
"postalCode": "",
"region": ""
}),
"primaryAdmin": json!({"primaryEmail": ""}),
"resourceUiUrl": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/apps/reseller/v1/customers/:customerId \
--header 'content-type: application/json' \
--data '{
"alternateEmail": "",
"customerDomain": "",
"customerDomainVerified": false,
"customerId": "",
"customerType": "",
"kind": "",
"phoneNumber": "",
"postalAddress": {
"addressLine1": "",
"addressLine2": "",
"addressLine3": "",
"contactName": "",
"countryCode": "",
"kind": "",
"locality": "",
"organizationName": "",
"postalCode": "",
"region": ""
},
"primaryAdmin": {
"primaryEmail": ""
},
"resourceUiUrl": ""
}'
echo '{
"alternateEmail": "",
"customerDomain": "",
"customerDomainVerified": false,
"customerId": "",
"customerType": "",
"kind": "",
"phoneNumber": "",
"postalAddress": {
"addressLine1": "",
"addressLine2": "",
"addressLine3": "",
"contactName": "",
"countryCode": "",
"kind": "",
"locality": "",
"organizationName": "",
"postalCode": "",
"region": ""
},
"primaryAdmin": {
"primaryEmail": ""
},
"resourceUiUrl": ""
}' | \
http PUT {{baseUrl}}/apps/reseller/v1/customers/:customerId \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "alternateEmail": "",\n "customerDomain": "",\n "customerDomainVerified": false,\n "customerId": "",\n "customerType": "",\n "kind": "",\n "phoneNumber": "",\n "postalAddress": {\n "addressLine1": "",\n "addressLine2": "",\n "addressLine3": "",\n "contactName": "",\n "countryCode": "",\n "kind": "",\n "locality": "",\n "organizationName": "",\n "postalCode": "",\n "region": ""\n },\n "primaryAdmin": {\n "primaryEmail": ""\n },\n "resourceUiUrl": ""\n}' \
--output-document \
- {{baseUrl}}/apps/reseller/v1/customers/:customerId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"alternateEmail": "",
"customerDomain": "",
"customerDomainVerified": false,
"customerId": "",
"customerType": "",
"kind": "",
"phoneNumber": "",
"postalAddress": [
"addressLine1": "",
"addressLine2": "",
"addressLine3": "",
"contactName": "",
"countryCode": "",
"kind": "",
"locality": "",
"organizationName": "",
"postalCode": "",
"region": ""
],
"primaryAdmin": ["primaryEmail": ""],
"resourceUiUrl": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/apps/reseller/v1/customers/:customerId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
reseller.resellernotify.getwatchdetails
{{baseUrl}}/apps/reseller/v1/resellernotify/getwatchdetails
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/apps/reseller/v1/resellernotify/getwatchdetails");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/apps/reseller/v1/resellernotify/getwatchdetails")
require "http/client"
url = "{{baseUrl}}/apps/reseller/v1/resellernotify/getwatchdetails"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/apps/reseller/v1/resellernotify/getwatchdetails"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/apps/reseller/v1/resellernotify/getwatchdetails");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/apps/reseller/v1/resellernotify/getwatchdetails"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/apps/reseller/v1/resellernotify/getwatchdetails HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/apps/reseller/v1/resellernotify/getwatchdetails")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/apps/reseller/v1/resellernotify/getwatchdetails"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/apps/reseller/v1/resellernotify/getwatchdetails")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/apps/reseller/v1/resellernotify/getwatchdetails")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/apps/reseller/v1/resellernotify/getwatchdetails');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/apps/reseller/v1/resellernotify/getwatchdetails'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/apps/reseller/v1/resellernotify/getwatchdetails';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/apps/reseller/v1/resellernotify/getwatchdetails',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/apps/reseller/v1/resellernotify/getwatchdetails")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/apps/reseller/v1/resellernotify/getwatchdetails',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/apps/reseller/v1/resellernotify/getwatchdetails'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/apps/reseller/v1/resellernotify/getwatchdetails');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/apps/reseller/v1/resellernotify/getwatchdetails'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/apps/reseller/v1/resellernotify/getwatchdetails';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/apps/reseller/v1/resellernotify/getwatchdetails"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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 Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/apps/reseller/v1/resellernotify/getwatchdetails" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/apps/reseller/v1/resellernotify/getwatchdetails",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/apps/reseller/v1/resellernotify/getwatchdetails');
echo $response->getBody();
setUrl('{{baseUrl}}/apps/reseller/v1/resellernotify/getwatchdetails');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/apps/reseller/v1/resellernotify/getwatchdetails');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/apps/reseller/v1/resellernotify/getwatchdetails' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/apps/reseller/v1/resellernotify/getwatchdetails' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/apps/reseller/v1/resellernotify/getwatchdetails")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/apps/reseller/v1/resellernotify/getwatchdetails"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/apps/reseller/v1/resellernotify/getwatchdetails"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/apps/reseller/v1/resellernotify/getwatchdetails")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/apps/reseller/v1/resellernotify/getwatchdetails') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/apps/reseller/v1/resellernotify/getwatchdetails";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/apps/reseller/v1/resellernotify/getwatchdetails
http GET {{baseUrl}}/apps/reseller/v1/resellernotify/getwatchdetails
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/apps/reseller/v1/resellernotify/getwatchdetails
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/apps/reseller/v1/resellernotify/getwatchdetails")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
reseller.resellernotify.register
{{baseUrl}}/apps/reseller/v1/resellernotify/register
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/apps/reseller/v1/resellernotify/register");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/apps/reseller/v1/resellernotify/register")
require "http/client"
url = "{{baseUrl}}/apps/reseller/v1/resellernotify/register"
response = HTTP::Client.post url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/apps/reseller/v1/resellernotify/register"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/apps/reseller/v1/resellernotify/register");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/apps/reseller/v1/resellernotify/register"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/apps/reseller/v1/resellernotify/register HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/apps/reseller/v1/resellernotify/register")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/apps/reseller/v1/resellernotify/register"))
.method("POST", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/apps/reseller/v1/resellernotify/register")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/apps/reseller/v1/resellernotify/register")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/apps/reseller/v1/resellernotify/register');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/apps/reseller/v1/resellernotify/register'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/apps/reseller/v1/resellernotify/register';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/apps/reseller/v1/resellernotify/register',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/apps/reseller/v1/resellernotify/register")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/apps/reseller/v1/resellernotify/register',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/apps/reseller/v1/resellernotify/register'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/apps/reseller/v1/resellernotify/register');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/apps/reseller/v1/resellernotify/register'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/apps/reseller/v1/resellernotify/register';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/apps/reseller/v1/resellernotify/register"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
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 Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/apps/reseller/v1/resellernotify/register" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/apps/reseller/v1/resellernotify/register",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/apps/reseller/v1/resellernotify/register');
echo $response->getBody();
setUrl('{{baseUrl}}/apps/reseller/v1/resellernotify/register');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/apps/reseller/v1/resellernotify/register');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/apps/reseller/v1/resellernotify/register' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/apps/reseller/v1/resellernotify/register' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/apps/reseller/v1/resellernotify/register")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/apps/reseller/v1/resellernotify/register"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/apps/reseller/v1/resellernotify/register"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/apps/reseller/v1/resellernotify/register")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.post('/baseUrl/apps/reseller/v1/resellernotify/register') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/apps/reseller/v1/resellernotify/register";
let client = reqwest::Client::new();
let response = client.post(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/apps/reseller/v1/resellernotify/register
http POST {{baseUrl}}/apps/reseller/v1/resellernotify/register
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/apps/reseller/v1/resellernotify/register
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/apps/reseller/v1/resellernotify/register")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
reseller.resellernotify.unregister
{{baseUrl}}/apps/reseller/v1/resellernotify/unregister
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/apps/reseller/v1/resellernotify/unregister");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/apps/reseller/v1/resellernotify/unregister")
require "http/client"
url = "{{baseUrl}}/apps/reseller/v1/resellernotify/unregister"
response = HTTP::Client.post url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/apps/reseller/v1/resellernotify/unregister"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/apps/reseller/v1/resellernotify/unregister");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/apps/reseller/v1/resellernotify/unregister"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/apps/reseller/v1/resellernotify/unregister HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/apps/reseller/v1/resellernotify/unregister")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/apps/reseller/v1/resellernotify/unregister"))
.method("POST", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/apps/reseller/v1/resellernotify/unregister")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/apps/reseller/v1/resellernotify/unregister")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/apps/reseller/v1/resellernotify/unregister');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/apps/reseller/v1/resellernotify/unregister'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/apps/reseller/v1/resellernotify/unregister';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/apps/reseller/v1/resellernotify/unregister',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/apps/reseller/v1/resellernotify/unregister")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/apps/reseller/v1/resellernotify/unregister',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/apps/reseller/v1/resellernotify/unregister'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/apps/reseller/v1/resellernotify/unregister');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/apps/reseller/v1/resellernotify/unregister'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/apps/reseller/v1/resellernotify/unregister';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/apps/reseller/v1/resellernotify/unregister"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
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 Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/apps/reseller/v1/resellernotify/unregister" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/apps/reseller/v1/resellernotify/unregister",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/apps/reseller/v1/resellernotify/unregister');
echo $response->getBody();
setUrl('{{baseUrl}}/apps/reseller/v1/resellernotify/unregister');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/apps/reseller/v1/resellernotify/unregister');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/apps/reseller/v1/resellernotify/unregister' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/apps/reseller/v1/resellernotify/unregister' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/apps/reseller/v1/resellernotify/unregister")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/apps/reseller/v1/resellernotify/unregister"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/apps/reseller/v1/resellernotify/unregister"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/apps/reseller/v1/resellernotify/unregister")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.post('/baseUrl/apps/reseller/v1/resellernotify/unregister') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/apps/reseller/v1/resellernotify/unregister";
let client = reqwest::Client::new();
let response = client.post(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/apps/reseller/v1/resellernotify/unregister
http POST {{baseUrl}}/apps/reseller/v1/resellernotify/unregister
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/apps/reseller/v1/resellernotify/unregister
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/apps/reseller/v1/resellernotify/unregister")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
reseller.subscriptions.activate
{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/activate
QUERY PARAMS
customerId
subscriptionId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/activate");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/activate")
require "http/client"
url = "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/activate"
response = HTTP::Client.post url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/activate"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/activate");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/activate"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/activate HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/activate")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/activate"))
.method("POST", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/activate")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/activate")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/activate');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/activate'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/activate';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/activate',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/activate")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/activate',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/activate'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/activate');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/activate'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/activate';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/activate"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
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 Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/activate" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/activate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/activate');
echo $response->getBody();
setUrl('{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/activate');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/activate');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/activate' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/activate' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/activate")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/activate"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/activate"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/activate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.post('/baseUrl/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/activate') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/activate";
let client = reqwest::Client::new();
let response = client.post(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/activate
http POST {{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/activate
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/activate
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/activate")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
reseller.subscriptions.changePlan
{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changePlan
QUERY PARAMS
customerId
subscriptionId
BODY json
{
"dealCode": "",
"kind": "",
"planName": "",
"purchaseOrderId": "",
"seats": {
"kind": "",
"licensedNumberOfSeats": 0,
"maximumNumberOfSeats": 0,
"numberOfSeats": 0
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changePlan");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"dealCode\": \"\",\n \"kind\": \"\",\n \"planName\": \"\",\n \"purchaseOrderId\": \"\",\n \"seats\": {\n \"kind\": \"\",\n \"licensedNumberOfSeats\": 0,\n \"maximumNumberOfSeats\": 0,\n \"numberOfSeats\": 0\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changePlan" {:content-type :json
:form-params {:dealCode ""
:kind ""
:planName ""
:purchaseOrderId ""
:seats {:kind ""
:licensedNumberOfSeats 0
:maximumNumberOfSeats 0
:numberOfSeats 0}}})
require "http/client"
url = "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changePlan"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"dealCode\": \"\",\n \"kind\": \"\",\n \"planName\": \"\",\n \"purchaseOrderId\": \"\",\n \"seats\": {\n \"kind\": \"\",\n \"licensedNumberOfSeats\": 0,\n \"maximumNumberOfSeats\": 0,\n \"numberOfSeats\": 0\n }\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changePlan"),
Content = new StringContent("{\n \"dealCode\": \"\",\n \"kind\": \"\",\n \"planName\": \"\",\n \"purchaseOrderId\": \"\",\n \"seats\": {\n \"kind\": \"\",\n \"licensedNumberOfSeats\": 0,\n \"maximumNumberOfSeats\": 0,\n \"numberOfSeats\": 0\n }\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changePlan");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"dealCode\": \"\",\n \"kind\": \"\",\n \"planName\": \"\",\n \"purchaseOrderId\": \"\",\n \"seats\": {\n \"kind\": \"\",\n \"licensedNumberOfSeats\": 0,\n \"maximumNumberOfSeats\": 0,\n \"numberOfSeats\": 0\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changePlan"
payload := strings.NewReader("{\n \"dealCode\": \"\",\n \"kind\": \"\",\n \"planName\": \"\",\n \"purchaseOrderId\": \"\",\n \"seats\": {\n \"kind\": \"\",\n \"licensedNumberOfSeats\": 0,\n \"maximumNumberOfSeats\": 0,\n \"numberOfSeats\": 0\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
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 /baseUrl/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changePlan HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 197
{
"dealCode": "",
"kind": "",
"planName": "",
"purchaseOrderId": "",
"seats": {
"kind": "",
"licensedNumberOfSeats": 0,
"maximumNumberOfSeats": 0,
"numberOfSeats": 0
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changePlan")
.setHeader("content-type", "application/json")
.setBody("{\n \"dealCode\": \"\",\n \"kind\": \"\",\n \"planName\": \"\",\n \"purchaseOrderId\": \"\",\n \"seats\": {\n \"kind\": \"\",\n \"licensedNumberOfSeats\": 0,\n \"maximumNumberOfSeats\": 0,\n \"numberOfSeats\": 0\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changePlan"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"dealCode\": \"\",\n \"kind\": \"\",\n \"planName\": \"\",\n \"purchaseOrderId\": \"\",\n \"seats\": {\n \"kind\": \"\",\n \"licensedNumberOfSeats\": 0,\n \"maximumNumberOfSeats\": 0,\n \"numberOfSeats\": 0\n }\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"dealCode\": \"\",\n \"kind\": \"\",\n \"planName\": \"\",\n \"purchaseOrderId\": \"\",\n \"seats\": {\n \"kind\": \"\",\n \"licensedNumberOfSeats\": 0,\n \"maximumNumberOfSeats\": 0,\n \"numberOfSeats\": 0\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changePlan")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changePlan")
.header("content-type", "application/json")
.body("{\n \"dealCode\": \"\",\n \"kind\": \"\",\n \"planName\": \"\",\n \"purchaseOrderId\": \"\",\n \"seats\": {\n \"kind\": \"\",\n \"licensedNumberOfSeats\": 0,\n \"maximumNumberOfSeats\": 0,\n \"numberOfSeats\": 0\n }\n}")
.asString();
const data = JSON.stringify({
dealCode: '',
kind: '',
planName: '',
purchaseOrderId: '',
seats: {
kind: '',
licensedNumberOfSeats: 0,
maximumNumberOfSeats: 0,
numberOfSeats: 0
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changePlan');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changePlan',
headers: {'content-type': 'application/json'},
data: {
dealCode: '',
kind: '',
planName: '',
purchaseOrderId: '',
seats: {kind: '', licensedNumberOfSeats: 0, maximumNumberOfSeats: 0, numberOfSeats: 0}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changePlan';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"dealCode":"","kind":"","planName":"","purchaseOrderId":"","seats":{"kind":"","licensedNumberOfSeats":0,"maximumNumberOfSeats":0,"numberOfSeats":0}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changePlan',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "dealCode": "",\n "kind": "",\n "planName": "",\n "purchaseOrderId": "",\n "seats": {\n "kind": "",\n "licensedNumberOfSeats": 0,\n "maximumNumberOfSeats": 0,\n "numberOfSeats": 0\n }\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"dealCode\": \"\",\n \"kind\": \"\",\n \"planName\": \"\",\n \"purchaseOrderId\": \"\",\n \"seats\": {\n \"kind\": \"\",\n \"licensedNumberOfSeats\": 0,\n \"maximumNumberOfSeats\": 0,\n \"numberOfSeats\": 0\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changePlan")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changePlan',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
dealCode: '',
kind: '',
planName: '',
purchaseOrderId: '',
seats: {kind: '', licensedNumberOfSeats: 0, maximumNumberOfSeats: 0, numberOfSeats: 0}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changePlan',
headers: {'content-type': 'application/json'},
body: {
dealCode: '',
kind: '',
planName: '',
purchaseOrderId: '',
seats: {kind: '', licensedNumberOfSeats: 0, maximumNumberOfSeats: 0, numberOfSeats: 0}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changePlan');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
dealCode: '',
kind: '',
planName: '',
purchaseOrderId: '',
seats: {
kind: '',
licensedNumberOfSeats: 0,
maximumNumberOfSeats: 0,
numberOfSeats: 0
}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changePlan',
headers: {'content-type': 'application/json'},
data: {
dealCode: '',
kind: '',
planName: '',
purchaseOrderId: '',
seats: {kind: '', licensedNumberOfSeats: 0, maximumNumberOfSeats: 0, numberOfSeats: 0}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changePlan';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"dealCode":"","kind":"","planName":"","purchaseOrderId":"","seats":{"kind":"","licensedNumberOfSeats":0,"maximumNumberOfSeats":0,"numberOfSeats":0}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"dealCode": @"",
@"kind": @"",
@"planName": @"",
@"purchaseOrderId": @"",
@"seats": @{ @"kind": @"", @"licensedNumberOfSeats": @0, @"maximumNumberOfSeats": @0, @"numberOfSeats": @0 } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changePlan"]
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 Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changePlan" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"dealCode\": \"\",\n \"kind\": \"\",\n \"planName\": \"\",\n \"purchaseOrderId\": \"\",\n \"seats\": {\n \"kind\": \"\",\n \"licensedNumberOfSeats\": 0,\n \"maximumNumberOfSeats\": 0,\n \"numberOfSeats\": 0\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changePlan",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'dealCode' => '',
'kind' => '',
'planName' => '',
'purchaseOrderId' => '',
'seats' => [
'kind' => '',
'licensedNumberOfSeats' => 0,
'maximumNumberOfSeats' => 0,
'numberOfSeats' => 0
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changePlan', [
'body' => '{
"dealCode": "",
"kind": "",
"planName": "",
"purchaseOrderId": "",
"seats": {
"kind": "",
"licensedNumberOfSeats": 0,
"maximumNumberOfSeats": 0,
"numberOfSeats": 0
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changePlan');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'dealCode' => '',
'kind' => '',
'planName' => '',
'purchaseOrderId' => '',
'seats' => [
'kind' => '',
'licensedNumberOfSeats' => 0,
'maximumNumberOfSeats' => 0,
'numberOfSeats' => 0
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'dealCode' => '',
'kind' => '',
'planName' => '',
'purchaseOrderId' => '',
'seats' => [
'kind' => '',
'licensedNumberOfSeats' => 0,
'maximumNumberOfSeats' => 0,
'numberOfSeats' => 0
]
]));
$request->setRequestUrl('{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changePlan');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changePlan' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"dealCode": "",
"kind": "",
"planName": "",
"purchaseOrderId": "",
"seats": {
"kind": "",
"licensedNumberOfSeats": 0,
"maximumNumberOfSeats": 0,
"numberOfSeats": 0
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changePlan' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"dealCode": "",
"kind": "",
"planName": "",
"purchaseOrderId": "",
"seats": {
"kind": "",
"licensedNumberOfSeats": 0,
"maximumNumberOfSeats": 0,
"numberOfSeats": 0
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"dealCode\": \"\",\n \"kind\": \"\",\n \"planName\": \"\",\n \"purchaseOrderId\": \"\",\n \"seats\": {\n \"kind\": \"\",\n \"licensedNumberOfSeats\": 0,\n \"maximumNumberOfSeats\": 0,\n \"numberOfSeats\": 0\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changePlan", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changePlan"
payload = {
"dealCode": "",
"kind": "",
"planName": "",
"purchaseOrderId": "",
"seats": {
"kind": "",
"licensedNumberOfSeats": 0,
"maximumNumberOfSeats": 0,
"numberOfSeats": 0
}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changePlan"
payload <- "{\n \"dealCode\": \"\",\n \"kind\": \"\",\n \"planName\": \"\",\n \"purchaseOrderId\": \"\",\n \"seats\": {\n \"kind\": \"\",\n \"licensedNumberOfSeats\": 0,\n \"maximumNumberOfSeats\": 0,\n \"numberOfSeats\": 0\n }\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changePlan")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"dealCode\": \"\",\n \"kind\": \"\",\n \"planName\": \"\",\n \"purchaseOrderId\": \"\",\n \"seats\": {\n \"kind\": \"\",\n \"licensedNumberOfSeats\": 0,\n \"maximumNumberOfSeats\": 0,\n \"numberOfSeats\": 0\n }\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changePlan') do |req|
req.body = "{\n \"dealCode\": \"\",\n \"kind\": \"\",\n \"planName\": \"\",\n \"purchaseOrderId\": \"\",\n \"seats\": {\n \"kind\": \"\",\n \"licensedNumberOfSeats\": 0,\n \"maximumNumberOfSeats\": 0,\n \"numberOfSeats\": 0\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changePlan";
let payload = json!({
"dealCode": "",
"kind": "",
"planName": "",
"purchaseOrderId": "",
"seats": json!({
"kind": "",
"licensedNumberOfSeats": 0,
"maximumNumberOfSeats": 0,
"numberOfSeats": 0
})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changePlan \
--header 'content-type: application/json' \
--data '{
"dealCode": "",
"kind": "",
"planName": "",
"purchaseOrderId": "",
"seats": {
"kind": "",
"licensedNumberOfSeats": 0,
"maximumNumberOfSeats": 0,
"numberOfSeats": 0
}
}'
echo '{
"dealCode": "",
"kind": "",
"planName": "",
"purchaseOrderId": "",
"seats": {
"kind": "",
"licensedNumberOfSeats": 0,
"maximumNumberOfSeats": 0,
"numberOfSeats": 0
}
}' | \
http POST {{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changePlan \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "dealCode": "",\n "kind": "",\n "planName": "",\n "purchaseOrderId": "",\n "seats": {\n "kind": "",\n "licensedNumberOfSeats": 0,\n "maximumNumberOfSeats": 0,\n "numberOfSeats": 0\n }\n}' \
--output-document \
- {{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changePlan
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"dealCode": "",
"kind": "",
"planName": "",
"purchaseOrderId": "",
"seats": [
"kind": "",
"licensedNumberOfSeats": 0,
"maximumNumberOfSeats": 0,
"numberOfSeats": 0
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changePlan")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
reseller.subscriptions.changeRenewalSettings
{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeRenewalSettings
QUERY PARAMS
customerId
subscriptionId
BODY json
{
"kind": "",
"renewalType": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeRenewalSettings");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"kind\": \"\",\n \"renewalType\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeRenewalSettings" {:content-type :json
:form-params {:kind ""
:renewalType ""}})
require "http/client"
url = "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeRenewalSettings"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"kind\": \"\",\n \"renewalType\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeRenewalSettings"),
Content = new StringContent("{\n \"kind\": \"\",\n \"renewalType\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeRenewalSettings");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"kind\": \"\",\n \"renewalType\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeRenewalSettings"
payload := strings.NewReader("{\n \"kind\": \"\",\n \"renewalType\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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 /baseUrl/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeRenewalSettings HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 37
{
"kind": "",
"renewalType": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeRenewalSettings")
.setHeader("content-type", "application/json")
.setBody("{\n \"kind\": \"\",\n \"renewalType\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeRenewalSettings"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"kind\": \"\",\n \"renewalType\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"kind\": \"\",\n \"renewalType\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeRenewalSettings")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeRenewalSettings")
.header("content-type", "application/json")
.body("{\n \"kind\": \"\",\n \"renewalType\": \"\"\n}")
.asString();
const data = JSON.stringify({
kind: '',
renewalType: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeRenewalSettings');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeRenewalSettings',
headers: {'content-type': 'application/json'},
data: {kind: '', renewalType: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeRenewalSettings';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"kind":"","renewalType":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeRenewalSettings',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "kind": "",\n "renewalType": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"kind\": \"\",\n \"renewalType\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeRenewalSettings")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeRenewalSettings',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({kind: '', renewalType: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeRenewalSettings',
headers: {'content-type': 'application/json'},
body: {kind: '', renewalType: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeRenewalSettings');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
kind: '',
renewalType: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeRenewalSettings',
headers: {'content-type': 'application/json'},
data: {kind: '', renewalType: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeRenewalSettings';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"kind":"","renewalType":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"kind": @"",
@"renewalType": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeRenewalSettings"]
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 Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeRenewalSettings" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"kind\": \"\",\n \"renewalType\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeRenewalSettings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'kind' => '',
'renewalType' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeRenewalSettings', [
'body' => '{
"kind": "",
"renewalType": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeRenewalSettings');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'kind' => '',
'renewalType' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'kind' => '',
'renewalType' => ''
]));
$request->setRequestUrl('{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeRenewalSettings');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeRenewalSettings' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"kind": "",
"renewalType": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeRenewalSettings' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"kind": "",
"renewalType": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"kind\": \"\",\n \"renewalType\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeRenewalSettings", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeRenewalSettings"
payload = {
"kind": "",
"renewalType": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeRenewalSettings"
payload <- "{\n \"kind\": \"\",\n \"renewalType\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeRenewalSettings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"kind\": \"\",\n \"renewalType\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeRenewalSettings') do |req|
req.body = "{\n \"kind\": \"\",\n \"renewalType\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeRenewalSettings";
let payload = json!({
"kind": "",
"renewalType": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeRenewalSettings \
--header 'content-type: application/json' \
--data '{
"kind": "",
"renewalType": ""
}'
echo '{
"kind": "",
"renewalType": ""
}' | \
http POST {{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeRenewalSettings \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "kind": "",\n "renewalType": ""\n}' \
--output-document \
- {{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeRenewalSettings
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"kind": "",
"renewalType": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeRenewalSettings")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
reseller.subscriptions.changeSeats
{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeSeats
QUERY PARAMS
customerId
subscriptionId
BODY json
{
"kind": "",
"licensedNumberOfSeats": 0,
"maximumNumberOfSeats": 0,
"numberOfSeats": 0
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeSeats");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"kind\": \"\",\n \"licensedNumberOfSeats\": 0,\n \"maximumNumberOfSeats\": 0,\n \"numberOfSeats\": 0\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeSeats" {:content-type :json
:form-params {:kind ""
:licensedNumberOfSeats 0
:maximumNumberOfSeats 0
:numberOfSeats 0}})
require "http/client"
url = "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeSeats"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"kind\": \"\",\n \"licensedNumberOfSeats\": 0,\n \"maximumNumberOfSeats\": 0,\n \"numberOfSeats\": 0\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeSeats"),
Content = new StringContent("{\n \"kind\": \"\",\n \"licensedNumberOfSeats\": 0,\n \"maximumNumberOfSeats\": 0,\n \"numberOfSeats\": 0\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeSeats");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"kind\": \"\",\n \"licensedNumberOfSeats\": 0,\n \"maximumNumberOfSeats\": 0,\n \"numberOfSeats\": 0\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeSeats"
payload := strings.NewReader("{\n \"kind\": \"\",\n \"licensedNumberOfSeats\": 0,\n \"maximumNumberOfSeats\": 0,\n \"numberOfSeats\": 0\n}")
req, _ := http.NewRequest("POST", url, payload)
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 /baseUrl/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeSeats HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 97
{
"kind": "",
"licensedNumberOfSeats": 0,
"maximumNumberOfSeats": 0,
"numberOfSeats": 0
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeSeats")
.setHeader("content-type", "application/json")
.setBody("{\n \"kind\": \"\",\n \"licensedNumberOfSeats\": 0,\n \"maximumNumberOfSeats\": 0,\n \"numberOfSeats\": 0\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeSeats"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"kind\": \"\",\n \"licensedNumberOfSeats\": 0,\n \"maximumNumberOfSeats\": 0,\n \"numberOfSeats\": 0\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"kind\": \"\",\n \"licensedNumberOfSeats\": 0,\n \"maximumNumberOfSeats\": 0,\n \"numberOfSeats\": 0\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeSeats")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeSeats")
.header("content-type", "application/json")
.body("{\n \"kind\": \"\",\n \"licensedNumberOfSeats\": 0,\n \"maximumNumberOfSeats\": 0,\n \"numberOfSeats\": 0\n}")
.asString();
const data = JSON.stringify({
kind: '',
licensedNumberOfSeats: 0,
maximumNumberOfSeats: 0,
numberOfSeats: 0
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeSeats');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeSeats',
headers: {'content-type': 'application/json'},
data: {kind: '', licensedNumberOfSeats: 0, maximumNumberOfSeats: 0, numberOfSeats: 0}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeSeats';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"kind":"","licensedNumberOfSeats":0,"maximumNumberOfSeats":0,"numberOfSeats":0}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeSeats',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "kind": "",\n "licensedNumberOfSeats": 0,\n "maximumNumberOfSeats": 0,\n "numberOfSeats": 0\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"kind\": \"\",\n \"licensedNumberOfSeats\": 0,\n \"maximumNumberOfSeats\": 0,\n \"numberOfSeats\": 0\n}")
val request = Request.Builder()
.url("{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeSeats")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeSeats',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({kind: '', licensedNumberOfSeats: 0, maximumNumberOfSeats: 0, numberOfSeats: 0}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeSeats',
headers: {'content-type': 'application/json'},
body: {kind: '', licensedNumberOfSeats: 0, maximumNumberOfSeats: 0, numberOfSeats: 0},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeSeats');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
kind: '',
licensedNumberOfSeats: 0,
maximumNumberOfSeats: 0,
numberOfSeats: 0
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeSeats',
headers: {'content-type': 'application/json'},
data: {kind: '', licensedNumberOfSeats: 0, maximumNumberOfSeats: 0, numberOfSeats: 0}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeSeats';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"kind":"","licensedNumberOfSeats":0,"maximumNumberOfSeats":0,"numberOfSeats":0}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"kind": @"",
@"licensedNumberOfSeats": @0,
@"maximumNumberOfSeats": @0,
@"numberOfSeats": @0 };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeSeats"]
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 Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeSeats" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"kind\": \"\",\n \"licensedNumberOfSeats\": 0,\n \"maximumNumberOfSeats\": 0,\n \"numberOfSeats\": 0\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeSeats",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'kind' => '',
'licensedNumberOfSeats' => 0,
'maximumNumberOfSeats' => 0,
'numberOfSeats' => 0
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeSeats', [
'body' => '{
"kind": "",
"licensedNumberOfSeats": 0,
"maximumNumberOfSeats": 0,
"numberOfSeats": 0
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeSeats');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'kind' => '',
'licensedNumberOfSeats' => 0,
'maximumNumberOfSeats' => 0,
'numberOfSeats' => 0
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'kind' => '',
'licensedNumberOfSeats' => 0,
'maximumNumberOfSeats' => 0,
'numberOfSeats' => 0
]));
$request->setRequestUrl('{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeSeats');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeSeats' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"kind": "",
"licensedNumberOfSeats": 0,
"maximumNumberOfSeats": 0,
"numberOfSeats": 0
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeSeats' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"kind": "",
"licensedNumberOfSeats": 0,
"maximumNumberOfSeats": 0,
"numberOfSeats": 0
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"kind\": \"\",\n \"licensedNumberOfSeats\": 0,\n \"maximumNumberOfSeats\": 0,\n \"numberOfSeats\": 0\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeSeats", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeSeats"
payload = {
"kind": "",
"licensedNumberOfSeats": 0,
"maximumNumberOfSeats": 0,
"numberOfSeats": 0
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeSeats"
payload <- "{\n \"kind\": \"\",\n \"licensedNumberOfSeats\": 0,\n \"maximumNumberOfSeats\": 0,\n \"numberOfSeats\": 0\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeSeats")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"kind\": \"\",\n \"licensedNumberOfSeats\": 0,\n \"maximumNumberOfSeats\": 0,\n \"numberOfSeats\": 0\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeSeats') do |req|
req.body = "{\n \"kind\": \"\",\n \"licensedNumberOfSeats\": 0,\n \"maximumNumberOfSeats\": 0,\n \"numberOfSeats\": 0\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeSeats";
let payload = json!({
"kind": "",
"licensedNumberOfSeats": 0,
"maximumNumberOfSeats": 0,
"numberOfSeats": 0
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeSeats \
--header 'content-type: application/json' \
--data '{
"kind": "",
"licensedNumberOfSeats": 0,
"maximumNumberOfSeats": 0,
"numberOfSeats": 0
}'
echo '{
"kind": "",
"licensedNumberOfSeats": 0,
"maximumNumberOfSeats": 0,
"numberOfSeats": 0
}' | \
http POST {{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeSeats \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "kind": "",\n "licensedNumberOfSeats": 0,\n "maximumNumberOfSeats": 0,\n "numberOfSeats": 0\n}' \
--output-document \
- {{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeSeats
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"kind": "",
"licensedNumberOfSeats": 0,
"maximumNumberOfSeats": 0,
"numberOfSeats": 0
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/changeSeats")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE
reseller.subscriptions.delete
{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId
QUERY PARAMS
deletionType
customerId
subscriptionId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId?deletionType=");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId" {:query-params {:deletionType ""}})
require "http/client"
url = "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId?deletionType="
response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId?deletionType="),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId?deletionType=");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId?deletionType="
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId?deletionType= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId?deletionType=")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId?deletionType="))
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId?deletionType=")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId?deletionType=")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('DELETE', '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId?deletionType=');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId',
params: {deletionType: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId?deletionType=';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId?deletionType=',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId?deletionType=")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId?deletionType=',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'DELETE',
url: '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId',
qs: {deletionType: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId');
req.query({
deletionType: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'DELETE',
url: '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId',
params: {deletionType: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId?deletionType=';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId?deletionType="]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
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 Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId?deletionType=" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId?deletionType=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId?deletionType=');
echo $response->getBody();
setUrl('{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId');
$request->setMethod(HTTP_METH_DELETE);
$request->setQueryData([
'deletionType' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId');
$request->setRequestMethod('DELETE');
$request->setQuery(new http\QueryString([
'deletionType' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId?deletionType=' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId?deletionType=' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId?deletionType=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId"
querystring = {"deletionType":""}
response = requests.delete(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId"
queryString <- list(deletionType = "")
response <- VERB("DELETE", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId?deletionType=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId') do |req|
req.params['deletionType'] = ''
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId";
let querystring = [
("deletionType", ""),
];
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.query(&querystring)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId?deletionType='
http DELETE '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId?deletionType='
wget --quiet \
--method DELETE \
--output-document \
- '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId?deletionType='
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId?deletionType=")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
reseller.subscriptions.get
{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId
QUERY PARAMS
customerId
subscriptionId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId")
require "http/client"
url = "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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 Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId');
echo $response->getBody();
setUrl('{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId
http GET {{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
reseller.subscriptions.insert
{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions
QUERY PARAMS
customerId
BODY json
{
"billingMethod": "",
"creationTime": "",
"customerDomain": "",
"customerId": "",
"dealCode": "",
"kind": "",
"plan": {
"commitmentInterval": {
"endTime": "",
"startTime": ""
},
"isCommitmentPlan": false,
"planName": ""
},
"purchaseOrderId": "",
"renewalSettings": {
"kind": "",
"renewalType": ""
},
"resourceUiUrl": "",
"seats": {
"kind": "",
"licensedNumberOfSeats": 0,
"maximumNumberOfSeats": 0,
"numberOfSeats": 0
},
"skuId": "",
"skuName": "",
"status": "",
"subscriptionId": "",
"suspensionReasons": [],
"transferInfo": {
"currentLegacySkuId": "",
"minimumTransferableSeats": 0,
"transferabilityExpirationTime": ""
},
"trialSettings": {
"isInTrial": false,
"trialEndTime": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"billingMethod\": \"\",\n \"creationTime\": \"\",\n \"customerDomain\": \"\",\n \"customerId\": \"\",\n \"dealCode\": \"\",\n \"kind\": \"\",\n \"plan\": {\n \"commitmentInterval\": {\n \"endTime\": \"\",\n \"startTime\": \"\"\n },\n \"isCommitmentPlan\": false,\n \"planName\": \"\"\n },\n \"purchaseOrderId\": \"\",\n \"renewalSettings\": {\n \"kind\": \"\",\n \"renewalType\": \"\"\n },\n \"resourceUiUrl\": \"\",\n \"seats\": {\n \"kind\": \"\",\n \"licensedNumberOfSeats\": 0,\n \"maximumNumberOfSeats\": 0,\n \"numberOfSeats\": 0\n },\n \"skuId\": \"\",\n \"skuName\": \"\",\n \"status\": \"\",\n \"subscriptionId\": \"\",\n \"suspensionReasons\": [],\n \"transferInfo\": {\n \"currentLegacySkuId\": \"\",\n \"minimumTransferableSeats\": 0,\n \"transferabilityExpirationTime\": \"\"\n },\n \"trialSettings\": {\n \"isInTrial\": false,\n \"trialEndTime\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions" {:content-type :json
:form-params {:billingMethod ""
:creationTime ""
:customerDomain ""
:customerId ""
:dealCode ""
:kind ""
:plan {:commitmentInterval {:endTime ""
:startTime ""}
:isCommitmentPlan false
:planName ""}
:purchaseOrderId ""
:renewalSettings {:kind ""
:renewalType ""}
:resourceUiUrl ""
:seats {:kind ""
:licensedNumberOfSeats 0
:maximumNumberOfSeats 0
:numberOfSeats 0}
:skuId ""
:skuName ""
:status ""
:subscriptionId ""
:suspensionReasons []
:transferInfo {:currentLegacySkuId ""
:minimumTransferableSeats 0
:transferabilityExpirationTime ""}
:trialSettings {:isInTrial false
:trialEndTime ""}}})
require "http/client"
url = "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"billingMethod\": \"\",\n \"creationTime\": \"\",\n \"customerDomain\": \"\",\n \"customerId\": \"\",\n \"dealCode\": \"\",\n \"kind\": \"\",\n \"plan\": {\n \"commitmentInterval\": {\n \"endTime\": \"\",\n \"startTime\": \"\"\n },\n \"isCommitmentPlan\": false,\n \"planName\": \"\"\n },\n \"purchaseOrderId\": \"\",\n \"renewalSettings\": {\n \"kind\": \"\",\n \"renewalType\": \"\"\n },\n \"resourceUiUrl\": \"\",\n \"seats\": {\n \"kind\": \"\",\n \"licensedNumberOfSeats\": 0,\n \"maximumNumberOfSeats\": 0,\n \"numberOfSeats\": 0\n },\n \"skuId\": \"\",\n \"skuName\": \"\",\n \"status\": \"\",\n \"subscriptionId\": \"\",\n \"suspensionReasons\": [],\n \"transferInfo\": {\n \"currentLegacySkuId\": \"\",\n \"minimumTransferableSeats\": 0,\n \"transferabilityExpirationTime\": \"\"\n },\n \"trialSettings\": {\n \"isInTrial\": false,\n \"trialEndTime\": \"\"\n }\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions"),
Content = new StringContent("{\n \"billingMethod\": \"\",\n \"creationTime\": \"\",\n \"customerDomain\": \"\",\n \"customerId\": \"\",\n \"dealCode\": \"\",\n \"kind\": \"\",\n \"plan\": {\n \"commitmentInterval\": {\n \"endTime\": \"\",\n \"startTime\": \"\"\n },\n \"isCommitmentPlan\": false,\n \"planName\": \"\"\n },\n \"purchaseOrderId\": \"\",\n \"renewalSettings\": {\n \"kind\": \"\",\n \"renewalType\": \"\"\n },\n \"resourceUiUrl\": \"\",\n \"seats\": {\n \"kind\": \"\",\n \"licensedNumberOfSeats\": 0,\n \"maximumNumberOfSeats\": 0,\n \"numberOfSeats\": 0\n },\n \"skuId\": \"\",\n \"skuName\": \"\",\n \"status\": \"\",\n \"subscriptionId\": \"\",\n \"suspensionReasons\": [],\n \"transferInfo\": {\n \"currentLegacySkuId\": \"\",\n \"minimumTransferableSeats\": 0,\n \"transferabilityExpirationTime\": \"\"\n },\n \"trialSettings\": {\n \"isInTrial\": false,\n \"trialEndTime\": \"\"\n }\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"billingMethod\": \"\",\n \"creationTime\": \"\",\n \"customerDomain\": \"\",\n \"customerId\": \"\",\n \"dealCode\": \"\",\n \"kind\": \"\",\n \"plan\": {\n \"commitmentInterval\": {\n \"endTime\": \"\",\n \"startTime\": \"\"\n },\n \"isCommitmentPlan\": false,\n \"planName\": \"\"\n },\n \"purchaseOrderId\": \"\",\n \"renewalSettings\": {\n \"kind\": \"\",\n \"renewalType\": \"\"\n },\n \"resourceUiUrl\": \"\",\n \"seats\": {\n \"kind\": \"\",\n \"licensedNumberOfSeats\": 0,\n \"maximumNumberOfSeats\": 0,\n \"numberOfSeats\": 0\n },\n \"skuId\": \"\",\n \"skuName\": \"\",\n \"status\": \"\",\n \"subscriptionId\": \"\",\n \"suspensionReasons\": [],\n \"transferInfo\": {\n \"currentLegacySkuId\": \"\",\n \"minimumTransferableSeats\": 0,\n \"transferabilityExpirationTime\": \"\"\n },\n \"trialSettings\": {\n \"isInTrial\": false,\n \"trialEndTime\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions"
payload := strings.NewReader("{\n \"billingMethod\": \"\",\n \"creationTime\": \"\",\n \"customerDomain\": \"\",\n \"customerId\": \"\",\n \"dealCode\": \"\",\n \"kind\": \"\",\n \"plan\": {\n \"commitmentInterval\": {\n \"endTime\": \"\",\n \"startTime\": \"\"\n },\n \"isCommitmentPlan\": false,\n \"planName\": \"\"\n },\n \"purchaseOrderId\": \"\",\n \"renewalSettings\": {\n \"kind\": \"\",\n \"renewalType\": \"\"\n },\n \"resourceUiUrl\": \"\",\n \"seats\": {\n \"kind\": \"\",\n \"licensedNumberOfSeats\": 0,\n \"maximumNumberOfSeats\": 0,\n \"numberOfSeats\": 0\n },\n \"skuId\": \"\",\n \"skuName\": \"\",\n \"status\": \"\",\n \"subscriptionId\": \"\",\n \"suspensionReasons\": [],\n \"transferInfo\": {\n \"currentLegacySkuId\": \"\",\n \"minimumTransferableSeats\": 0,\n \"transferabilityExpirationTime\": \"\"\n },\n \"trialSettings\": {\n \"isInTrial\": false,\n \"trialEndTime\": \"\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
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 /baseUrl/apps/reseller/v1/customers/:customerId/subscriptions HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 804
{
"billingMethod": "",
"creationTime": "",
"customerDomain": "",
"customerId": "",
"dealCode": "",
"kind": "",
"plan": {
"commitmentInterval": {
"endTime": "",
"startTime": ""
},
"isCommitmentPlan": false,
"planName": ""
},
"purchaseOrderId": "",
"renewalSettings": {
"kind": "",
"renewalType": ""
},
"resourceUiUrl": "",
"seats": {
"kind": "",
"licensedNumberOfSeats": 0,
"maximumNumberOfSeats": 0,
"numberOfSeats": 0
},
"skuId": "",
"skuName": "",
"status": "",
"subscriptionId": "",
"suspensionReasons": [],
"transferInfo": {
"currentLegacySkuId": "",
"minimumTransferableSeats": 0,
"transferabilityExpirationTime": ""
},
"trialSettings": {
"isInTrial": false,
"trialEndTime": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions")
.setHeader("content-type", "application/json")
.setBody("{\n \"billingMethod\": \"\",\n \"creationTime\": \"\",\n \"customerDomain\": \"\",\n \"customerId\": \"\",\n \"dealCode\": \"\",\n \"kind\": \"\",\n \"plan\": {\n \"commitmentInterval\": {\n \"endTime\": \"\",\n \"startTime\": \"\"\n },\n \"isCommitmentPlan\": false,\n \"planName\": \"\"\n },\n \"purchaseOrderId\": \"\",\n \"renewalSettings\": {\n \"kind\": \"\",\n \"renewalType\": \"\"\n },\n \"resourceUiUrl\": \"\",\n \"seats\": {\n \"kind\": \"\",\n \"licensedNumberOfSeats\": 0,\n \"maximumNumberOfSeats\": 0,\n \"numberOfSeats\": 0\n },\n \"skuId\": \"\",\n \"skuName\": \"\",\n \"status\": \"\",\n \"subscriptionId\": \"\",\n \"suspensionReasons\": [],\n \"transferInfo\": {\n \"currentLegacySkuId\": \"\",\n \"minimumTransferableSeats\": 0,\n \"transferabilityExpirationTime\": \"\"\n },\n \"trialSettings\": {\n \"isInTrial\": false,\n \"trialEndTime\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"billingMethod\": \"\",\n \"creationTime\": \"\",\n \"customerDomain\": \"\",\n \"customerId\": \"\",\n \"dealCode\": \"\",\n \"kind\": \"\",\n \"plan\": {\n \"commitmentInterval\": {\n \"endTime\": \"\",\n \"startTime\": \"\"\n },\n \"isCommitmentPlan\": false,\n \"planName\": \"\"\n },\n \"purchaseOrderId\": \"\",\n \"renewalSettings\": {\n \"kind\": \"\",\n \"renewalType\": \"\"\n },\n \"resourceUiUrl\": \"\",\n \"seats\": {\n \"kind\": \"\",\n \"licensedNumberOfSeats\": 0,\n \"maximumNumberOfSeats\": 0,\n \"numberOfSeats\": 0\n },\n \"skuId\": \"\",\n \"skuName\": \"\",\n \"status\": \"\",\n \"subscriptionId\": \"\",\n \"suspensionReasons\": [],\n \"transferInfo\": {\n \"currentLegacySkuId\": \"\",\n \"minimumTransferableSeats\": 0,\n \"transferabilityExpirationTime\": \"\"\n },\n \"trialSettings\": {\n \"isInTrial\": false,\n \"trialEndTime\": \"\"\n }\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"billingMethod\": \"\",\n \"creationTime\": \"\",\n \"customerDomain\": \"\",\n \"customerId\": \"\",\n \"dealCode\": \"\",\n \"kind\": \"\",\n \"plan\": {\n \"commitmentInterval\": {\n \"endTime\": \"\",\n \"startTime\": \"\"\n },\n \"isCommitmentPlan\": false,\n \"planName\": \"\"\n },\n \"purchaseOrderId\": \"\",\n \"renewalSettings\": {\n \"kind\": \"\",\n \"renewalType\": \"\"\n },\n \"resourceUiUrl\": \"\",\n \"seats\": {\n \"kind\": \"\",\n \"licensedNumberOfSeats\": 0,\n \"maximumNumberOfSeats\": 0,\n \"numberOfSeats\": 0\n },\n \"skuId\": \"\",\n \"skuName\": \"\",\n \"status\": \"\",\n \"subscriptionId\": \"\",\n \"suspensionReasons\": [],\n \"transferInfo\": {\n \"currentLegacySkuId\": \"\",\n \"minimumTransferableSeats\": 0,\n \"transferabilityExpirationTime\": \"\"\n },\n \"trialSettings\": {\n \"isInTrial\": false,\n \"trialEndTime\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions")
.header("content-type", "application/json")
.body("{\n \"billingMethod\": \"\",\n \"creationTime\": \"\",\n \"customerDomain\": \"\",\n \"customerId\": \"\",\n \"dealCode\": \"\",\n \"kind\": \"\",\n \"plan\": {\n \"commitmentInterval\": {\n \"endTime\": \"\",\n \"startTime\": \"\"\n },\n \"isCommitmentPlan\": false,\n \"planName\": \"\"\n },\n \"purchaseOrderId\": \"\",\n \"renewalSettings\": {\n \"kind\": \"\",\n \"renewalType\": \"\"\n },\n \"resourceUiUrl\": \"\",\n \"seats\": {\n \"kind\": \"\",\n \"licensedNumberOfSeats\": 0,\n \"maximumNumberOfSeats\": 0,\n \"numberOfSeats\": 0\n },\n \"skuId\": \"\",\n \"skuName\": \"\",\n \"status\": \"\",\n \"subscriptionId\": \"\",\n \"suspensionReasons\": [],\n \"transferInfo\": {\n \"currentLegacySkuId\": \"\",\n \"minimumTransferableSeats\": 0,\n \"transferabilityExpirationTime\": \"\"\n },\n \"trialSettings\": {\n \"isInTrial\": false,\n \"trialEndTime\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
billingMethod: '',
creationTime: '',
customerDomain: '',
customerId: '',
dealCode: '',
kind: '',
plan: {
commitmentInterval: {
endTime: '',
startTime: ''
},
isCommitmentPlan: false,
planName: ''
},
purchaseOrderId: '',
renewalSettings: {
kind: '',
renewalType: ''
},
resourceUiUrl: '',
seats: {
kind: '',
licensedNumberOfSeats: 0,
maximumNumberOfSeats: 0,
numberOfSeats: 0
},
skuId: '',
skuName: '',
status: '',
subscriptionId: '',
suspensionReasons: [],
transferInfo: {
currentLegacySkuId: '',
minimumTransferableSeats: 0,
transferabilityExpirationTime: ''
},
trialSettings: {
isInTrial: false,
trialEndTime: ''
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions',
headers: {'content-type': 'application/json'},
data: {
billingMethod: '',
creationTime: '',
customerDomain: '',
customerId: '',
dealCode: '',
kind: '',
plan: {
commitmentInterval: {endTime: '', startTime: ''},
isCommitmentPlan: false,
planName: ''
},
purchaseOrderId: '',
renewalSettings: {kind: '', renewalType: ''},
resourceUiUrl: '',
seats: {kind: '', licensedNumberOfSeats: 0, maximumNumberOfSeats: 0, numberOfSeats: 0},
skuId: '',
skuName: '',
status: '',
subscriptionId: '',
suspensionReasons: [],
transferInfo: {
currentLegacySkuId: '',
minimumTransferableSeats: 0,
transferabilityExpirationTime: ''
},
trialSettings: {isInTrial: false, trialEndTime: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"billingMethod":"","creationTime":"","customerDomain":"","customerId":"","dealCode":"","kind":"","plan":{"commitmentInterval":{"endTime":"","startTime":""},"isCommitmentPlan":false,"planName":""},"purchaseOrderId":"","renewalSettings":{"kind":"","renewalType":""},"resourceUiUrl":"","seats":{"kind":"","licensedNumberOfSeats":0,"maximumNumberOfSeats":0,"numberOfSeats":0},"skuId":"","skuName":"","status":"","subscriptionId":"","suspensionReasons":[],"transferInfo":{"currentLegacySkuId":"","minimumTransferableSeats":0,"transferabilityExpirationTime":""},"trialSettings":{"isInTrial":false,"trialEndTime":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "billingMethod": "",\n "creationTime": "",\n "customerDomain": "",\n "customerId": "",\n "dealCode": "",\n "kind": "",\n "plan": {\n "commitmentInterval": {\n "endTime": "",\n "startTime": ""\n },\n "isCommitmentPlan": false,\n "planName": ""\n },\n "purchaseOrderId": "",\n "renewalSettings": {\n "kind": "",\n "renewalType": ""\n },\n "resourceUiUrl": "",\n "seats": {\n "kind": "",\n "licensedNumberOfSeats": 0,\n "maximumNumberOfSeats": 0,\n "numberOfSeats": 0\n },\n "skuId": "",\n "skuName": "",\n "status": "",\n "subscriptionId": "",\n "suspensionReasons": [],\n "transferInfo": {\n "currentLegacySkuId": "",\n "minimumTransferableSeats": 0,\n "transferabilityExpirationTime": ""\n },\n "trialSettings": {\n "isInTrial": false,\n "trialEndTime": ""\n }\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"billingMethod\": \"\",\n \"creationTime\": \"\",\n \"customerDomain\": \"\",\n \"customerId\": \"\",\n \"dealCode\": \"\",\n \"kind\": \"\",\n \"plan\": {\n \"commitmentInterval\": {\n \"endTime\": \"\",\n \"startTime\": \"\"\n },\n \"isCommitmentPlan\": false,\n \"planName\": \"\"\n },\n \"purchaseOrderId\": \"\",\n \"renewalSettings\": {\n \"kind\": \"\",\n \"renewalType\": \"\"\n },\n \"resourceUiUrl\": \"\",\n \"seats\": {\n \"kind\": \"\",\n \"licensedNumberOfSeats\": 0,\n \"maximumNumberOfSeats\": 0,\n \"numberOfSeats\": 0\n },\n \"skuId\": \"\",\n \"skuName\": \"\",\n \"status\": \"\",\n \"subscriptionId\": \"\",\n \"suspensionReasons\": [],\n \"transferInfo\": {\n \"currentLegacySkuId\": \"\",\n \"minimumTransferableSeats\": 0,\n \"transferabilityExpirationTime\": \"\"\n },\n \"trialSettings\": {\n \"isInTrial\": false,\n \"trialEndTime\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/apps/reseller/v1/customers/:customerId/subscriptions',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
billingMethod: '',
creationTime: '',
customerDomain: '',
customerId: '',
dealCode: '',
kind: '',
plan: {
commitmentInterval: {endTime: '', startTime: ''},
isCommitmentPlan: false,
planName: ''
},
purchaseOrderId: '',
renewalSettings: {kind: '', renewalType: ''},
resourceUiUrl: '',
seats: {kind: '', licensedNumberOfSeats: 0, maximumNumberOfSeats: 0, numberOfSeats: 0},
skuId: '',
skuName: '',
status: '',
subscriptionId: '',
suspensionReasons: [],
transferInfo: {
currentLegacySkuId: '',
minimumTransferableSeats: 0,
transferabilityExpirationTime: ''
},
trialSettings: {isInTrial: false, trialEndTime: ''}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions',
headers: {'content-type': 'application/json'},
body: {
billingMethod: '',
creationTime: '',
customerDomain: '',
customerId: '',
dealCode: '',
kind: '',
plan: {
commitmentInterval: {endTime: '', startTime: ''},
isCommitmentPlan: false,
planName: ''
},
purchaseOrderId: '',
renewalSettings: {kind: '', renewalType: ''},
resourceUiUrl: '',
seats: {kind: '', licensedNumberOfSeats: 0, maximumNumberOfSeats: 0, numberOfSeats: 0},
skuId: '',
skuName: '',
status: '',
subscriptionId: '',
suspensionReasons: [],
transferInfo: {
currentLegacySkuId: '',
minimumTransferableSeats: 0,
transferabilityExpirationTime: ''
},
trialSettings: {isInTrial: false, trialEndTime: ''}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
billingMethod: '',
creationTime: '',
customerDomain: '',
customerId: '',
dealCode: '',
kind: '',
plan: {
commitmentInterval: {
endTime: '',
startTime: ''
},
isCommitmentPlan: false,
planName: ''
},
purchaseOrderId: '',
renewalSettings: {
kind: '',
renewalType: ''
},
resourceUiUrl: '',
seats: {
kind: '',
licensedNumberOfSeats: 0,
maximumNumberOfSeats: 0,
numberOfSeats: 0
},
skuId: '',
skuName: '',
status: '',
subscriptionId: '',
suspensionReasons: [],
transferInfo: {
currentLegacySkuId: '',
minimumTransferableSeats: 0,
transferabilityExpirationTime: ''
},
trialSettings: {
isInTrial: false,
trialEndTime: ''
}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions',
headers: {'content-type': 'application/json'},
data: {
billingMethod: '',
creationTime: '',
customerDomain: '',
customerId: '',
dealCode: '',
kind: '',
plan: {
commitmentInterval: {endTime: '', startTime: ''},
isCommitmentPlan: false,
planName: ''
},
purchaseOrderId: '',
renewalSettings: {kind: '', renewalType: ''},
resourceUiUrl: '',
seats: {kind: '', licensedNumberOfSeats: 0, maximumNumberOfSeats: 0, numberOfSeats: 0},
skuId: '',
skuName: '',
status: '',
subscriptionId: '',
suspensionReasons: [],
transferInfo: {
currentLegacySkuId: '',
minimumTransferableSeats: 0,
transferabilityExpirationTime: ''
},
trialSettings: {isInTrial: false, trialEndTime: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"billingMethod":"","creationTime":"","customerDomain":"","customerId":"","dealCode":"","kind":"","plan":{"commitmentInterval":{"endTime":"","startTime":""},"isCommitmentPlan":false,"planName":""},"purchaseOrderId":"","renewalSettings":{"kind":"","renewalType":""},"resourceUiUrl":"","seats":{"kind":"","licensedNumberOfSeats":0,"maximumNumberOfSeats":0,"numberOfSeats":0},"skuId":"","skuName":"","status":"","subscriptionId":"","suspensionReasons":[],"transferInfo":{"currentLegacySkuId":"","minimumTransferableSeats":0,"transferabilityExpirationTime":""},"trialSettings":{"isInTrial":false,"trialEndTime":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"billingMethod": @"",
@"creationTime": @"",
@"customerDomain": @"",
@"customerId": @"",
@"dealCode": @"",
@"kind": @"",
@"plan": @{ @"commitmentInterval": @{ @"endTime": @"", @"startTime": @"" }, @"isCommitmentPlan": @NO, @"planName": @"" },
@"purchaseOrderId": @"",
@"renewalSettings": @{ @"kind": @"", @"renewalType": @"" },
@"resourceUiUrl": @"",
@"seats": @{ @"kind": @"", @"licensedNumberOfSeats": @0, @"maximumNumberOfSeats": @0, @"numberOfSeats": @0 },
@"skuId": @"",
@"skuName": @"",
@"status": @"",
@"subscriptionId": @"",
@"suspensionReasons": @[ ],
@"transferInfo": @{ @"currentLegacySkuId": @"", @"minimumTransferableSeats": @0, @"transferabilityExpirationTime": @"" },
@"trialSettings": @{ @"isInTrial": @NO, @"trialEndTime": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions"]
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 Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"billingMethod\": \"\",\n \"creationTime\": \"\",\n \"customerDomain\": \"\",\n \"customerId\": \"\",\n \"dealCode\": \"\",\n \"kind\": \"\",\n \"plan\": {\n \"commitmentInterval\": {\n \"endTime\": \"\",\n \"startTime\": \"\"\n },\n \"isCommitmentPlan\": false,\n \"planName\": \"\"\n },\n \"purchaseOrderId\": \"\",\n \"renewalSettings\": {\n \"kind\": \"\",\n \"renewalType\": \"\"\n },\n \"resourceUiUrl\": \"\",\n \"seats\": {\n \"kind\": \"\",\n \"licensedNumberOfSeats\": 0,\n \"maximumNumberOfSeats\": 0,\n \"numberOfSeats\": 0\n },\n \"skuId\": \"\",\n \"skuName\": \"\",\n \"status\": \"\",\n \"subscriptionId\": \"\",\n \"suspensionReasons\": [],\n \"transferInfo\": {\n \"currentLegacySkuId\": \"\",\n \"minimumTransferableSeats\": 0,\n \"transferabilityExpirationTime\": \"\"\n },\n \"trialSettings\": {\n \"isInTrial\": false,\n \"trialEndTime\": \"\"\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'billingMethod' => '',
'creationTime' => '',
'customerDomain' => '',
'customerId' => '',
'dealCode' => '',
'kind' => '',
'plan' => [
'commitmentInterval' => [
'endTime' => '',
'startTime' => ''
],
'isCommitmentPlan' => null,
'planName' => ''
],
'purchaseOrderId' => '',
'renewalSettings' => [
'kind' => '',
'renewalType' => ''
],
'resourceUiUrl' => '',
'seats' => [
'kind' => '',
'licensedNumberOfSeats' => 0,
'maximumNumberOfSeats' => 0,
'numberOfSeats' => 0
],
'skuId' => '',
'skuName' => '',
'status' => '',
'subscriptionId' => '',
'suspensionReasons' => [
],
'transferInfo' => [
'currentLegacySkuId' => '',
'minimumTransferableSeats' => 0,
'transferabilityExpirationTime' => ''
],
'trialSettings' => [
'isInTrial' => null,
'trialEndTime' => ''
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions', [
'body' => '{
"billingMethod": "",
"creationTime": "",
"customerDomain": "",
"customerId": "",
"dealCode": "",
"kind": "",
"plan": {
"commitmentInterval": {
"endTime": "",
"startTime": ""
},
"isCommitmentPlan": false,
"planName": ""
},
"purchaseOrderId": "",
"renewalSettings": {
"kind": "",
"renewalType": ""
},
"resourceUiUrl": "",
"seats": {
"kind": "",
"licensedNumberOfSeats": 0,
"maximumNumberOfSeats": 0,
"numberOfSeats": 0
},
"skuId": "",
"skuName": "",
"status": "",
"subscriptionId": "",
"suspensionReasons": [],
"transferInfo": {
"currentLegacySkuId": "",
"minimumTransferableSeats": 0,
"transferabilityExpirationTime": ""
},
"trialSettings": {
"isInTrial": false,
"trialEndTime": ""
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'billingMethod' => '',
'creationTime' => '',
'customerDomain' => '',
'customerId' => '',
'dealCode' => '',
'kind' => '',
'plan' => [
'commitmentInterval' => [
'endTime' => '',
'startTime' => ''
],
'isCommitmentPlan' => null,
'planName' => ''
],
'purchaseOrderId' => '',
'renewalSettings' => [
'kind' => '',
'renewalType' => ''
],
'resourceUiUrl' => '',
'seats' => [
'kind' => '',
'licensedNumberOfSeats' => 0,
'maximumNumberOfSeats' => 0,
'numberOfSeats' => 0
],
'skuId' => '',
'skuName' => '',
'status' => '',
'subscriptionId' => '',
'suspensionReasons' => [
],
'transferInfo' => [
'currentLegacySkuId' => '',
'minimumTransferableSeats' => 0,
'transferabilityExpirationTime' => ''
],
'trialSettings' => [
'isInTrial' => null,
'trialEndTime' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'billingMethod' => '',
'creationTime' => '',
'customerDomain' => '',
'customerId' => '',
'dealCode' => '',
'kind' => '',
'plan' => [
'commitmentInterval' => [
'endTime' => '',
'startTime' => ''
],
'isCommitmentPlan' => null,
'planName' => ''
],
'purchaseOrderId' => '',
'renewalSettings' => [
'kind' => '',
'renewalType' => ''
],
'resourceUiUrl' => '',
'seats' => [
'kind' => '',
'licensedNumberOfSeats' => 0,
'maximumNumberOfSeats' => 0,
'numberOfSeats' => 0
],
'skuId' => '',
'skuName' => '',
'status' => '',
'subscriptionId' => '',
'suspensionReasons' => [
],
'transferInfo' => [
'currentLegacySkuId' => '',
'minimumTransferableSeats' => 0,
'transferabilityExpirationTime' => ''
],
'trialSettings' => [
'isInTrial' => null,
'trialEndTime' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"billingMethod": "",
"creationTime": "",
"customerDomain": "",
"customerId": "",
"dealCode": "",
"kind": "",
"plan": {
"commitmentInterval": {
"endTime": "",
"startTime": ""
},
"isCommitmentPlan": false,
"planName": ""
},
"purchaseOrderId": "",
"renewalSettings": {
"kind": "",
"renewalType": ""
},
"resourceUiUrl": "",
"seats": {
"kind": "",
"licensedNumberOfSeats": 0,
"maximumNumberOfSeats": 0,
"numberOfSeats": 0
},
"skuId": "",
"skuName": "",
"status": "",
"subscriptionId": "",
"suspensionReasons": [],
"transferInfo": {
"currentLegacySkuId": "",
"minimumTransferableSeats": 0,
"transferabilityExpirationTime": ""
},
"trialSettings": {
"isInTrial": false,
"trialEndTime": ""
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"billingMethod": "",
"creationTime": "",
"customerDomain": "",
"customerId": "",
"dealCode": "",
"kind": "",
"plan": {
"commitmentInterval": {
"endTime": "",
"startTime": ""
},
"isCommitmentPlan": false,
"planName": ""
},
"purchaseOrderId": "",
"renewalSettings": {
"kind": "",
"renewalType": ""
},
"resourceUiUrl": "",
"seats": {
"kind": "",
"licensedNumberOfSeats": 0,
"maximumNumberOfSeats": 0,
"numberOfSeats": 0
},
"skuId": "",
"skuName": "",
"status": "",
"subscriptionId": "",
"suspensionReasons": [],
"transferInfo": {
"currentLegacySkuId": "",
"minimumTransferableSeats": 0,
"transferabilityExpirationTime": ""
},
"trialSettings": {
"isInTrial": false,
"trialEndTime": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"billingMethod\": \"\",\n \"creationTime\": \"\",\n \"customerDomain\": \"\",\n \"customerId\": \"\",\n \"dealCode\": \"\",\n \"kind\": \"\",\n \"plan\": {\n \"commitmentInterval\": {\n \"endTime\": \"\",\n \"startTime\": \"\"\n },\n \"isCommitmentPlan\": false,\n \"planName\": \"\"\n },\n \"purchaseOrderId\": \"\",\n \"renewalSettings\": {\n \"kind\": \"\",\n \"renewalType\": \"\"\n },\n \"resourceUiUrl\": \"\",\n \"seats\": {\n \"kind\": \"\",\n \"licensedNumberOfSeats\": 0,\n \"maximumNumberOfSeats\": 0,\n \"numberOfSeats\": 0\n },\n \"skuId\": \"\",\n \"skuName\": \"\",\n \"status\": \"\",\n \"subscriptionId\": \"\",\n \"suspensionReasons\": [],\n \"transferInfo\": {\n \"currentLegacySkuId\": \"\",\n \"minimumTransferableSeats\": 0,\n \"transferabilityExpirationTime\": \"\"\n },\n \"trialSettings\": {\n \"isInTrial\": false,\n \"trialEndTime\": \"\"\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/apps/reseller/v1/customers/:customerId/subscriptions", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions"
payload = {
"billingMethod": "",
"creationTime": "",
"customerDomain": "",
"customerId": "",
"dealCode": "",
"kind": "",
"plan": {
"commitmentInterval": {
"endTime": "",
"startTime": ""
},
"isCommitmentPlan": False,
"planName": ""
},
"purchaseOrderId": "",
"renewalSettings": {
"kind": "",
"renewalType": ""
},
"resourceUiUrl": "",
"seats": {
"kind": "",
"licensedNumberOfSeats": 0,
"maximumNumberOfSeats": 0,
"numberOfSeats": 0
},
"skuId": "",
"skuName": "",
"status": "",
"subscriptionId": "",
"suspensionReasons": [],
"transferInfo": {
"currentLegacySkuId": "",
"minimumTransferableSeats": 0,
"transferabilityExpirationTime": ""
},
"trialSettings": {
"isInTrial": False,
"trialEndTime": ""
}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions"
payload <- "{\n \"billingMethod\": \"\",\n \"creationTime\": \"\",\n \"customerDomain\": \"\",\n \"customerId\": \"\",\n \"dealCode\": \"\",\n \"kind\": \"\",\n \"plan\": {\n \"commitmentInterval\": {\n \"endTime\": \"\",\n \"startTime\": \"\"\n },\n \"isCommitmentPlan\": false,\n \"planName\": \"\"\n },\n \"purchaseOrderId\": \"\",\n \"renewalSettings\": {\n \"kind\": \"\",\n \"renewalType\": \"\"\n },\n \"resourceUiUrl\": \"\",\n \"seats\": {\n \"kind\": \"\",\n \"licensedNumberOfSeats\": 0,\n \"maximumNumberOfSeats\": 0,\n \"numberOfSeats\": 0\n },\n \"skuId\": \"\",\n \"skuName\": \"\",\n \"status\": \"\",\n \"subscriptionId\": \"\",\n \"suspensionReasons\": [],\n \"transferInfo\": {\n \"currentLegacySkuId\": \"\",\n \"minimumTransferableSeats\": 0,\n \"transferabilityExpirationTime\": \"\"\n },\n \"trialSettings\": {\n \"isInTrial\": false,\n \"trialEndTime\": \"\"\n }\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"billingMethod\": \"\",\n \"creationTime\": \"\",\n \"customerDomain\": \"\",\n \"customerId\": \"\",\n \"dealCode\": \"\",\n \"kind\": \"\",\n \"plan\": {\n \"commitmentInterval\": {\n \"endTime\": \"\",\n \"startTime\": \"\"\n },\n \"isCommitmentPlan\": false,\n \"planName\": \"\"\n },\n \"purchaseOrderId\": \"\",\n \"renewalSettings\": {\n \"kind\": \"\",\n \"renewalType\": \"\"\n },\n \"resourceUiUrl\": \"\",\n \"seats\": {\n \"kind\": \"\",\n \"licensedNumberOfSeats\": 0,\n \"maximumNumberOfSeats\": 0,\n \"numberOfSeats\": 0\n },\n \"skuId\": \"\",\n \"skuName\": \"\",\n \"status\": \"\",\n \"subscriptionId\": \"\",\n \"suspensionReasons\": [],\n \"transferInfo\": {\n \"currentLegacySkuId\": \"\",\n \"minimumTransferableSeats\": 0,\n \"transferabilityExpirationTime\": \"\"\n },\n \"trialSettings\": {\n \"isInTrial\": false,\n \"trialEndTime\": \"\"\n }\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/apps/reseller/v1/customers/:customerId/subscriptions') do |req|
req.body = "{\n \"billingMethod\": \"\",\n \"creationTime\": \"\",\n \"customerDomain\": \"\",\n \"customerId\": \"\",\n \"dealCode\": \"\",\n \"kind\": \"\",\n \"plan\": {\n \"commitmentInterval\": {\n \"endTime\": \"\",\n \"startTime\": \"\"\n },\n \"isCommitmentPlan\": false,\n \"planName\": \"\"\n },\n \"purchaseOrderId\": \"\",\n \"renewalSettings\": {\n \"kind\": \"\",\n \"renewalType\": \"\"\n },\n \"resourceUiUrl\": \"\",\n \"seats\": {\n \"kind\": \"\",\n \"licensedNumberOfSeats\": 0,\n \"maximumNumberOfSeats\": 0,\n \"numberOfSeats\": 0\n },\n \"skuId\": \"\",\n \"skuName\": \"\",\n \"status\": \"\",\n \"subscriptionId\": \"\",\n \"suspensionReasons\": [],\n \"transferInfo\": {\n \"currentLegacySkuId\": \"\",\n \"minimumTransferableSeats\": 0,\n \"transferabilityExpirationTime\": \"\"\n },\n \"trialSettings\": {\n \"isInTrial\": false,\n \"trialEndTime\": \"\"\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions";
let payload = json!({
"billingMethod": "",
"creationTime": "",
"customerDomain": "",
"customerId": "",
"dealCode": "",
"kind": "",
"plan": json!({
"commitmentInterval": json!({
"endTime": "",
"startTime": ""
}),
"isCommitmentPlan": false,
"planName": ""
}),
"purchaseOrderId": "",
"renewalSettings": json!({
"kind": "",
"renewalType": ""
}),
"resourceUiUrl": "",
"seats": json!({
"kind": "",
"licensedNumberOfSeats": 0,
"maximumNumberOfSeats": 0,
"numberOfSeats": 0
}),
"skuId": "",
"skuName": "",
"status": "",
"subscriptionId": "",
"suspensionReasons": (),
"transferInfo": json!({
"currentLegacySkuId": "",
"minimumTransferableSeats": 0,
"transferabilityExpirationTime": ""
}),
"trialSettings": json!({
"isInTrial": false,
"trialEndTime": ""
})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions \
--header 'content-type: application/json' \
--data '{
"billingMethod": "",
"creationTime": "",
"customerDomain": "",
"customerId": "",
"dealCode": "",
"kind": "",
"plan": {
"commitmentInterval": {
"endTime": "",
"startTime": ""
},
"isCommitmentPlan": false,
"planName": ""
},
"purchaseOrderId": "",
"renewalSettings": {
"kind": "",
"renewalType": ""
},
"resourceUiUrl": "",
"seats": {
"kind": "",
"licensedNumberOfSeats": 0,
"maximumNumberOfSeats": 0,
"numberOfSeats": 0
},
"skuId": "",
"skuName": "",
"status": "",
"subscriptionId": "",
"suspensionReasons": [],
"transferInfo": {
"currentLegacySkuId": "",
"minimumTransferableSeats": 0,
"transferabilityExpirationTime": ""
},
"trialSettings": {
"isInTrial": false,
"trialEndTime": ""
}
}'
echo '{
"billingMethod": "",
"creationTime": "",
"customerDomain": "",
"customerId": "",
"dealCode": "",
"kind": "",
"plan": {
"commitmentInterval": {
"endTime": "",
"startTime": ""
},
"isCommitmentPlan": false,
"planName": ""
},
"purchaseOrderId": "",
"renewalSettings": {
"kind": "",
"renewalType": ""
},
"resourceUiUrl": "",
"seats": {
"kind": "",
"licensedNumberOfSeats": 0,
"maximumNumberOfSeats": 0,
"numberOfSeats": 0
},
"skuId": "",
"skuName": "",
"status": "",
"subscriptionId": "",
"suspensionReasons": [],
"transferInfo": {
"currentLegacySkuId": "",
"minimumTransferableSeats": 0,
"transferabilityExpirationTime": ""
},
"trialSettings": {
"isInTrial": false,
"trialEndTime": ""
}
}' | \
http POST {{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "billingMethod": "",\n "creationTime": "",\n "customerDomain": "",\n "customerId": "",\n "dealCode": "",\n "kind": "",\n "plan": {\n "commitmentInterval": {\n "endTime": "",\n "startTime": ""\n },\n "isCommitmentPlan": false,\n "planName": ""\n },\n "purchaseOrderId": "",\n "renewalSettings": {\n "kind": "",\n "renewalType": ""\n },\n "resourceUiUrl": "",\n "seats": {\n "kind": "",\n "licensedNumberOfSeats": 0,\n "maximumNumberOfSeats": 0,\n "numberOfSeats": 0\n },\n "skuId": "",\n "skuName": "",\n "status": "",\n "subscriptionId": "",\n "suspensionReasons": [],\n "transferInfo": {\n "currentLegacySkuId": "",\n "minimumTransferableSeats": 0,\n "transferabilityExpirationTime": ""\n },\n "trialSettings": {\n "isInTrial": false,\n "trialEndTime": ""\n }\n}' \
--output-document \
- {{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"billingMethod": "",
"creationTime": "",
"customerDomain": "",
"customerId": "",
"dealCode": "",
"kind": "",
"plan": [
"commitmentInterval": [
"endTime": "",
"startTime": ""
],
"isCommitmentPlan": false,
"planName": ""
],
"purchaseOrderId": "",
"renewalSettings": [
"kind": "",
"renewalType": ""
],
"resourceUiUrl": "",
"seats": [
"kind": "",
"licensedNumberOfSeats": 0,
"maximumNumberOfSeats": 0,
"numberOfSeats": 0
],
"skuId": "",
"skuName": "",
"status": "",
"subscriptionId": "",
"suspensionReasons": [],
"transferInfo": [
"currentLegacySkuId": "",
"minimumTransferableSeats": 0,
"transferabilityExpirationTime": ""
],
"trialSettings": [
"isInTrial": false,
"trialEndTime": ""
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
reseller.subscriptions.list
{{baseUrl}}/apps/reseller/v1/subscriptions
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/apps/reseller/v1/subscriptions");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/apps/reseller/v1/subscriptions")
require "http/client"
url = "{{baseUrl}}/apps/reseller/v1/subscriptions"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/apps/reseller/v1/subscriptions"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/apps/reseller/v1/subscriptions");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/apps/reseller/v1/subscriptions"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/apps/reseller/v1/subscriptions HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/apps/reseller/v1/subscriptions")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/apps/reseller/v1/subscriptions"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/apps/reseller/v1/subscriptions")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/apps/reseller/v1/subscriptions")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/apps/reseller/v1/subscriptions');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/apps/reseller/v1/subscriptions'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/apps/reseller/v1/subscriptions';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/apps/reseller/v1/subscriptions',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/apps/reseller/v1/subscriptions")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/apps/reseller/v1/subscriptions',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/apps/reseller/v1/subscriptions'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/apps/reseller/v1/subscriptions');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/apps/reseller/v1/subscriptions'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/apps/reseller/v1/subscriptions';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/apps/reseller/v1/subscriptions"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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 Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/apps/reseller/v1/subscriptions" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/apps/reseller/v1/subscriptions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/apps/reseller/v1/subscriptions');
echo $response->getBody();
setUrl('{{baseUrl}}/apps/reseller/v1/subscriptions');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/apps/reseller/v1/subscriptions');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/apps/reseller/v1/subscriptions' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/apps/reseller/v1/subscriptions' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/apps/reseller/v1/subscriptions")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/apps/reseller/v1/subscriptions"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/apps/reseller/v1/subscriptions"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/apps/reseller/v1/subscriptions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/apps/reseller/v1/subscriptions') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/apps/reseller/v1/subscriptions";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/apps/reseller/v1/subscriptions
http GET {{baseUrl}}/apps/reseller/v1/subscriptions
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/apps/reseller/v1/subscriptions
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/apps/reseller/v1/subscriptions")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
reseller.subscriptions.startPaidService
{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/startPaidService
QUERY PARAMS
customerId
subscriptionId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/startPaidService");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/startPaidService")
require "http/client"
url = "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/startPaidService"
response = HTTP::Client.post url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/startPaidService"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/startPaidService");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/startPaidService"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/startPaidService HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/startPaidService")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/startPaidService"))
.method("POST", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/startPaidService")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/startPaidService")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/startPaidService');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/startPaidService'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/startPaidService';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/startPaidService',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/startPaidService")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/startPaidService',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/startPaidService'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/startPaidService');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/startPaidService'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/startPaidService';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/startPaidService"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
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 Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/startPaidService" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/startPaidService",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/startPaidService');
echo $response->getBody();
setUrl('{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/startPaidService');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/startPaidService');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/startPaidService' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/startPaidService' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/startPaidService")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/startPaidService"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/startPaidService"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/startPaidService")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.post('/baseUrl/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/startPaidService') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/startPaidService";
let client = reqwest::Client::new();
let response = client.post(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/startPaidService
http POST {{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/startPaidService
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/startPaidService
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/startPaidService")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
reseller.subscriptions.suspend
{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/suspend
QUERY PARAMS
customerId
subscriptionId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/suspend");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/suspend")
require "http/client"
url = "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/suspend"
response = HTTP::Client.post url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/suspend"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/suspend");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/suspend"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/suspend HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/suspend")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/suspend"))
.method("POST", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/suspend")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/suspend")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/suspend');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/suspend'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/suspend';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/suspend',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/suspend")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/suspend',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/suspend'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/suspend');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/suspend'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/suspend';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/suspend"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
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 Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/suspend" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/suspend",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/suspend');
echo $response->getBody();
setUrl('{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/suspend');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/suspend');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/suspend' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/suspend' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/suspend")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/suspend"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/suspend"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/suspend")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.post('/baseUrl/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/suspend') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/suspend";
let client = reqwest::Client::new();
let response = client.post(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/suspend
http POST {{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/suspend
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/suspend
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/apps/reseller/v1/customers/:customerId/subscriptions/:subscriptionId/suspend")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()