GET Current Company
curl --request GET \
--url https://api.rippling.com/platform/api/companies/current \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.rippling.com/platform/api/companies/current"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.rippling.com/platform/api/companies/current', 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.rippling.com/platform/api/companies/current",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.rippling.com/platform/api/companies/current"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.rippling.com/platform/api/companies/current")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rippling.com/platform/api/companies/current")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "string",
"address": {
"city": "string",
"streetLine1": "string",
"zip": "string",
"country": "string",
"state": "string",
"streetLine2": "string"
},
"workLocations": [
{
"id": "string",
"nickname": "string",
"address": {
"city": "string",
"streetLine1": "string",
"zip": "string",
"country": "string",
"state": "string",
"streetLine2": "string"
}
}
],
"primaryEmail": "string",
"phone": "string",
"name": "string"
}A. Companies
GET Current Company
Returns the currently accessible company for the given token. Please note, the returned fields depend on the scopes that are enabled for your access token or API key.
GET
/
platform
/
api
/
companies
/
current
GET Current Company
curl --request GET \
--url https://api.rippling.com/platform/api/companies/current \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.rippling.com/platform/api/companies/current"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.rippling.com/platform/api/companies/current', 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.rippling.com/platform/api/companies/current",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.rippling.com/platform/api/companies/current"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.rippling.com/platform/api/companies/current")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rippling.com/platform/api/companies/current")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "string",
"address": {
"city": "string",
"streetLine1": "string",
"zip": "string",
"country": "string",
"state": "string",
"streetLine2": "string"
},
"workLocations": [
{
"id": "string",
"nickname": "string",
"address": {
"city": "string",
"streetLine1": "string",
"zip": "string",
"country": "string",
"state": "string",
"streetLine2": "string"
}
}
],
"primaryEmail": "string",
"phone": "string",
"name": "string"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Response
200 - application/json
OK
A company object as represented within Rippling.
An address object as stored within Rippling.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
This model represents the legal entities inside of a given company. Legal entities based in Canada (CA) are currently supported at this time.
Show child attributes
Show child attributes
⌘I