Clients
Creates a client (and its default location) for the service provider.
POST
/
v1
/
clients
Creates a client (and its default location) for the service provider.
curl --request POST \
--url https://api.usw.gorelo.io/v1/clients \
--header 'Content-Type: application/json-patch+json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"Name": "Contoso Ltd",
"Location": {
"Name": "Head Office",
"PhoneCountryCode": "<string>",
"Phone": "<string>",
"PhoneExt": "<string>",
"Address1": "<string>",
"Address2": "<string>",
"City": "<string>",
"State": "<string>",
"Country": "<string>",
"PostalCode": "<string>",
"TimeZone": "<string>"
},
"BillingName": "<string>",
"AlternateName": "<string>",
"Domain": "<string>",
"ClientTypeId": 123
}
'import requests
url = "https://api.usw.gorelo.io/v1/clients"
payload = {
"Name": "Contoso Ltd",
"Location": {
"Name": "Head Office",
"PhoneCountryCode": "<string>",
"Phone": "<string>",
"PhoneExt": "<string>",
"Address1": "<string>",
"Address2": "<string>",
"City": "<string>",
"State": "<string>",
"Country": "<string>",
"PostalCode": "<string>",
"TimeZone": "<string>"
},
"BillingName": "<string>",
"AlternateName": "<string>",
"Domain": "<string>",
"ClientTypeId": 123
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json-patch+json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json-patch+json'},
body: JSON.stringify({
Name: 'Contoso Ltd',
Location: {
Name: 'Head Office',
PhoneCountryCode: '<string>',
Phone: '<string>',
PhoneExt: '<string>',
Address1: '<string>',
Address2: '<string>',
City: '<string>',
State: '<string>',
Country: '<string>',
PostalCode: '<string>',
TimeZone: '<string>'
},
BillingName: '<string>',
AlternateName: '<string>',
Domain: '<string>',
ClientTypeId: 123
})
};
fetch('https://api.usw.gorelo.io/v1/clients', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.usw.gorelo.io/v1/clients",
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([
'Name' => 'Contoso Ltd',
'Location' => [
'Name' => 'Head Office',
'PhoneCountryCode' => '<string>',
'Phone' => '<string>',
'PhoneExt' => '<string>',
'Address1' => '<string>',
'Address2' => '<string>',
'City' => '<string>',
'State' => '<string>',
'Country' => '<string>',
'PostalCode' => '<string>',
'TimeZone' => '<string>'
],
'BillingName' => '<string>',
'AlternateName' => '<string>',
'Domain' => '<string>',
'ClientTypeId' => 123
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json-patch+json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.usw.gorelo.io/v1/clients"
payload := strings.NewReader("{\n \"Name\": \"Contoso Ltd\",\n \"Location\": {\n \"Name\": \"Head Office\",\n \"PhoneCountryCode\": \"<string>\",\n \"Phone\": \"<string>\",\n \"PhoneExt\": \"<string>\",\n \"Address1\": \"<string>\",\n \"Address2\": \"<string>\",\n \"City\": \"<string>\",\n \"State\": \"<string>\",\n \"Country\": \"<string>\",\n \"PostalCode\": \"<string>\",\n \"TimeZone\": \"<string>\"\n },\n \"BillingName\": \"<string>\",\n \"AlternateName\": \"<string>\",\n \"Domain\": \"<string>\",\n \"ClientTypeId\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json-patch+json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.usw.gorelo.io/v1/clients")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json-patch+json")
.body("{\n \"Name\": \"Contoso Ltd\",\n \"Location\": {\n \"Name\": \"Head Office\",\n \"PhoneCountryCode\": \"<string>\",\n \"Phone\": \"<string>\",\n \"PhoneExt\": \"<string>\",\n \"Address1\": \"<string>\",\n \"Address2\": \"<string>\",\n \"City\": \"<string>\",\n \"State\": \"<string>\",\n \"Country\": \"<string>\",\n \"PostalCode\": \"<string>\",\n \"TimeZone\": \"<string>\"\n },\n \"BillingName\": \"<string>\",\n \"AlternateName\": \"<string>\",\n \"Domain\": \"<string>\",\n \"ClientTypeId\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.usw.gorelo.io/v1/clients")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json-patch+json'
request.body = "{\n \"Name\": \"Contoso Ltd\",\n \"Location\": {\n \"Name\": \"Head Office\",\n \"PhoneCountryCode\": \"<string>\",\n \"Phone\": \"<string>\",\n \"PhoneExt\": \"<string>\",\n \"Address1\": \"<string>\",\n \"Address2\": \"<string>\",\n \"City\": \"<string>\",\n \"State\": \"<string>\",\n \"Country\": \"<string>\",\n \"PostalCode\": \"<string>\",\n \"TimeZone\": \"<string>\"\n },\n \"BillingName\": \"<string>\",\n \"AlternateName\": \"<string>\",\n \"Domain\": \"<string>\",\n \"ClientTypeId\": 123\n}"
response = http.request(request)
puts response.read_body{
"StatusCode": 100,
"IsSuccess": true,
"Data": {
"CustomProperties": [
{
"Id": 123,
"Variable": "<string>",
"Name": "<string>",
"Type": {
"Id": 1,
"Name": "<string>"
},
"Value": "<string>",
"IsSet": true,
"IsHidden": true
}
],
"Id": 123,
"Name": "<string>",
"Status": {
"Id": 1,
"Name": "<string>"
},
"CreatedOn": "2023-11-07T05:31:56Z",
"UpdatedOn": "2023-11-07T05:31:56Z",
"BillingName": "<string>",
"AlternateName": "<string>",
"IsDefault": true,
"Domains": [
{
"Id": 123,
"Name": "<string>",
"CreatedOn": "2023-11-07T05:31:56Z",
"UpdatedOn": "2023-11-07T05:31:56Z",
"ExpirationDate": "2023-12-25",
"IsDateSetManually": true,
"Status": {
"Id": 1,
"Name": "<string>"
}
}
],
"GroupIds": [
123
],
"ClientTypeId": 123
},
"DataContext": null,
"Notifications": [
{
"Code": "070101",
"Message": "<string>",
"PropertyName": "<string>",
"ActionHint": "<string>",
"DocUrl": "<string>"
}
]
}{
"StatusCode": 100,
"IsSuccess": true,
"Data": null,
"DataContext": {
"TraceId": "<string>"
},
"Notifications": [
{
"Code": "070101",
"Message": "<string>",
"PropertyName": "<string>",
"ActionHint": "<string>",
"DocUrl": "<string>"
}
]
}{
"StatusCode": 100,
"IsSuccess": true,
"Data": null,
"DataContext": {
"TraceId": "<string>"
},
"Notifications": [
{
"Code": "070101",
"Message": "<string>",
"PropertyName": "<string>",
"ActionHint": "<string>",
"DocUrl": "<string>"
}
]
}{
"StatusCode": 100,
"IsSuccess": true,
"Data": null,
"DataContext": {
"TraceId": "<string>"
},
"Notifications": [
{
"Code": "070101",
"Message": "<string>",
"PropertyName": "<string>",
"ActionHint": "<string>",
"DocUrl": "<string>"
}
]
}Authorizations
Your Gorelo API key. See Generate API key. If your data is hosted in Australia, click the base URL at the top of this page and select https://api.aue.gorelo.io.
Body
application/json-patch+jsonapplication/jsontext/jsonapplication/*+json
Client details.
Request body for creating a client, along with its default location.
Response
OK
Available options:
100, 101, 102, 103, 200, 201, 202, 203, 204, 205, 206, 207, 208, 226, 300, 301, 302, 303, 304, 305, 306, 307, 308, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 421, 422, 423, 424, 426, 428, 429, 431, 451, 500, 501, 502, 503, 504, 505, 506, 507, 508, 510, 511 Was this page helpful?
⌘I
Creates a client (and its default location) for the service provider.
curl --request POST \
--url https://api.usw.gorelo.io/v1/clients \
--header 'Content-Type: application/json-patch+json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"Name": "Contoso Ltd",
"Location": {
"Name": "Head Office",
"PhoneCountryCode": "<string>",
"Phone": "<string>",
"PhoneExt": "<string>",
"Address1": "<string>",
"Address2": "<string>",
"City": "<string>",
"State": "<string>",
"Country": "<string>",
"PostalCode": "<string>",
"TimeZone": "<string>"
},
"BillingName": "<string>",
"AlternateName": "<string>",
"Domain": "<string>",
"ClientTypeId": 123
}
'import requests
url = "https://api.usw.gorelo.io/v1/clients"
payload = {
"Name": "Contoso Ltd",
"Location": {
"Name": "Head Office",
"PhoneCountryCode": "<string>",
"Phone": "<string>",
"PhoneExt": "<string>",
"Address1": "<string>",
"Address2": "<string>",
"City": "<string>",
"State": "<string>",
"Country": "<string>",
"PostalCode": "<string>",
"TimeZone": "<string>"
},
"BillingName": "<string>",
"AlternateName": "<string>",
"Domain": "<string>",
"ClientTypeId": 123
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json-patch+json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json-patch+json'},
body: JSON.stringify({
Name: 'Contoso Ltd',
Location: {
Name: 'Head Office',
PhoneCountryCode: '<string>',
Phone: '<string>',
PhoneExt: '<string>',
Address1: '<string>',
Address2: '<string>',
City: '<string>',
State: '<string>',
Country: '<string>',
PostalCode: '<string>',
TimeZone: '<string>'
},
BillingName: '<string>',
AlternateName: '<string>',
Domain: '<string>',
ClientTypeId: 123
})
};
fetch('https://api.usw.gorelo.io/v1/clients', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.usw.gorelo.io/v1/clients",
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([
'Name' => 'Contoso Ltd',
'Location' => [
'Name' => 'Head Office',
'PhoneCountryCode' => '<string>',
'Phone' => '<string>',
'PhoneExt' => '<string>',
'Address1' => '<string>',
'Address2' => '<string>',
'City' => '<string>',
'State' => '<string>',
'Country' => '<string>',
'PostalCode' => '<string>',
'TimeZone' => '<string>'
],
'BillingName' => '<string>',
'AlternateName' => '<string>',
'Domain' => '<string>',
'ClientTypeId' => 123
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json-patch+json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.usw.gorelo.io/v1/clients"
payload := strings.NewReader("{\n \"Name\": \"Contoso Ltd\",\n \"Location\": {\n \"Name\": \"Head Office\",\n \"PhoneCountryCode\": \"<string>\",\n \"Phone\": \"<string>\",\n \"PhoneExt\": \"<string>\",\n \"Address1\": \"<string>\",\n \"Address2\": \"<string>\",\n \"City\": \"<string>\",\n \"State\": \"<string>\",\n \"Country\": \"<string>\",\n \"PostalCode\": \"<string>\",\n \"TimeZone\": \"<string>\"\n },\n \"BillingName\": \"<string>\",\n \"AlternateName\": \"<string>\",\n \"Domain\": \"<string>\",\n \"ClientTypeId\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json-patch+json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.usw.gorelo.io/v1/clients")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json-patch+json")
.body("{\n \"Name\": \"Contoso Ltd\",\n \"Location\": {\n \"Name\": \"Head Office\",\n \"PhoneCountryCode\": \"<string>\",\n \"Phone\": \"<string>\",\n \"PhoneExt\": \"<string>\",\n \"Address1\": \"<string>\",\n \"Address2\": \"<string>\",\n \"City\": \"<string>\",\n \"State\": \"<string>\",\n \"Country\": \"<string>\",\n \"PostalCode\": \"<string>\",\n \"TimeZone\": \"<string>\"\n },\n \"BillingName\": \"<string>\",\n \"AlternateName\": \"<string>\",\n \"Domain\": \"<string>\",\n \"ClientTypeId\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.usw.gorelo.io/v1/clients")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json-patch+json'
request.body = "{\n \"Name\": \"Contoso Ltd\",\n \"Location\": {\n \"Name\": \"Head Office\",\n \"PhoneCountryCode\": \"<string>\",\n \"Phone\": \"<string>\",\n \"PhoneExt\": \"<string>\",\n \"Address1\": \"<string>\",\n \"Address2\": \"<string>\",\n \"City\": \"<string>\",\n \"State\": \"<string>\",\n \"Country\": \"<string>\",\n \"PostalCode\": \"<string>\",\n \"TimeZone\": \"<string>\"\n },\n \"BillingName\": \"<string>\",\n \"AlternateName\": \"<string>\",\n \"Domain\": \"<string>\",\n \"ClientTypeId\": 123\n}"
response = http.request(request)
puts response.read_body{
"StatusCode": 100,
"IsSuccess": true,
"Data": {
"CustomProperties": [
{
"Id": 123,
"Variable": "<string>",
"Name": "<string>",
"Type": {
"Id": 1,
"Name": "<string>"
},
"Value": "<string>",
"IsSet": true,
"IsHidden": true
}
],
"Id": 123,
"Name": "<string>",
"Status": {
"Id": 1,
"Name": "<string>"
},
"CreatedOn": "2023-11-07T05:31:56Z",
"UpdatedOn": "2023-11-07T05:31:56Z",
"BillingName": "<string>",
"AlternateName": "<string>",
"IsDefault": true,
"Domains": [
{
"Id": 123,
"Name": "<string>",
"CreatedOn": "2023-11-07T05:31:56Z",
"UpdatedOn": "2023-11-07T05:31:56Z",
"ExpirationDate": "2023-12-25",
"IsDateSetManually": true,
"Status": {
"Id": 1,
"Name": "<string>"
}
}
],
"GroupIds": [
123
],
"ClientTypeId": 123
},
"DataContext": null,
"Notifications": [
{
"Code": "070101",
"Message": "<string>",
"PropertyName": "<string>",
"ActionHint": "<string>",
"DocUrl": "<string>"
}
]
}{
"StatusCode": 100,
"IsSuccess": true,
"Data": null,
"DataContext": {
"TraceId": "<string>"
},
"Notifications": [
{
"Code": "070101",
"Message": "<string>",
"PropertyName": "<string>",
"ActionHint": "<string>",
"DocUrl": "<string>"
}
]
}{
"StatusCode": 100,
"IsSuccess": true,
"Data": null,
"DataContext": {
"TraceId": "<string>"
},
"Notifications": [
{
"Code": "070101",
"Message": "<string>",
"PropertyName": "<string>",
"ActionHint": "<string>",
"DocUrl": "<string>"
}
]
}{
"StatusCode": 100,
"IsSuccess": true,
"Data": null,
"DataContext": {
"TraceId": "<string>"
},
"Notifications": [
{
"Code": "070101",
"Message": "<string>",
"PropertyName": "<string>",
"ActionHint": "<string>",
"DocUrl": "<string>"
}
]
}