RetroTax

Companies

Companies Overview

{
  "location_name": "foo",
String

Name of the location

  "address_line_1": "foo",
String

Address of the location

  "address_line_2": "foo",
String

Address_2 of the location

  "city": "foo",
String

City of the location

  "state_code": "foo",
String

Associated state code of the location

  "zip_code": "foo",
String

Zip code of the location

  "primary_contact_attributes": {
  "primary_contact_attributes": { ... }
Object

Primary Contact Attributes

    "name": "foo",
String

name of the primary contact

    "email": "foo",
String

email address of the primary contact

    "phone": "foo"
String

contact number of the primary contact

  }
}

GET /companies

Open in API Explorer
GET /companies

Example Request

Format:
curl --request GET \
  --url 'https://api-qa.retrotax-aci.com/companies?integration=foo' \
  --header 'accept: application/json' \
  --header 'x-api-key: foo' \
  --header 'x-auth-iv: foo' \
  --header 'x-auth-token: foo'
require 'uri'
require 'net/http'

url = URI("https://api-qa.retrotax-aci.com/companies?integration=foo")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["accept"] = 'application/json'
request["x-api-key"] = 'foo'
request["x-auth-token"] = 'foo'
request["x-auth-iv"] = 'foo'

response = http.request(request)
puts response.read_body
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "api-qa.retrotax-aci.com",
  "port": null,
  "path": "/companies?integration=foo",
  "headers": {
    "accept": "application/json",
    "x-api-key": "foo",
    "x-auth-token": "foo",
    "x-auth-iv": "foo"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
import http.client

conn = http.client.HTTPSConnection("api-qa.retrotax-aci.com")

headers = {
    'accept': "application/json",
    'x-api-key': "foo",
    'x-auth-token': "foo",
    'x-auth-iv': "foo"
    }

conn.request("GET", "/companies?integration=foo", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api-qa.retrotax-aci.com/companies?integration=foo",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "x-api-key: foo",
    "x-auth-iv: foo",
    "x-auth-token: foo"
  ),
));

$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/ioutil"
)

func main() {

	url := "https://api-qa.retrotax-aci.com/companies?integration=foo"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("accept", "application/json")
	req.Header.Add("x-api-key", "foo")
	req.Header.Add("x-auth-token", "foo")
	req.Header.Add("x-auth-iv", "foo")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Request Headers

Name Type Required Description Example
X-API-KEY String Required foo
X-AUTH-TOKEN String Required foo
X-AUTH-IV String Optional foo

Query Parameters

Name Type Required Description Example
integration String Optional foo

Responses

200 OK

200 response

Companies Companiesresponse
[
  "fein": "foo",
String

Fein

  "id": 42.0,
Number

Id

  "legal_name": "foo"
String

Legal Name

]
400 Bad Request

400 response

(Empty Response)
401 Unauthorized

401 response

(Empty Response)
403 Forbidden

403 response

(Empty Response)
404 Not Found

404 response

(Empty Response)

POST /companies

Open in API Explorer
POST /companies

Example Request

Format:
curl --request POST \
  --url https://api-qa.retrotax-aci.com/companies \
  --header 'accept: application/json' \
  --header 'content-type: foo' \
  --header 'x-api-key: foo' \
  --header 'x-auth-iv: foo' \
  --header 'x-auth-token: foo' \
  --data '{"fein":"foo","legal_name":"foo","client_id":42,"active":42}'
require 'uri'
require 'net/http'

url = URI("https://api-qa.retrotax-aci.com/companies")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["accept"] = 'application/json'
request["content-type"] = 'foo'
request["x-api-key"] = 'foo'
request["x-auth-token"] = 'foo'
request["x-auth-iv"] = 'foo'
request.body = "{\"fein\":\"foo\",\"legal_name\":\"foo\",\"client_id\":42,\"active\":42}"

response = http.request(request)
puts response.read_body
var http = require("https");

var options = {
  "method": "POST",
  "hostname": "api-qa.retrotax-aci.com",
  "port": null,
  "path": "/companies",
  "headers": {
    "accept": "application/json",
    "content-type": "foo",
    "x-api-key": "foo",
    "x-auth-token": "foo",
    "x-auth-iv": "foo"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({ fein: 'foo', legal_name: 'foo', client_id: 42, active: 42 }));
req.end();
import http.client

conn = http.client.HTTPSConnection("api-qa.retrotax-aci.com")

payload = "{\"fein\":\"foo\",\"legal_name\":\"foo\",\"client_id\":42,\"active\":42}"

headers = {
    'accept': "application/json",
    'content-type': "foo",
    'x-api-key': "foo",
    'x-auth-token': "foo",
    'x-auth-iv': "foo"
    }

conn.request("POST", "/companies", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api-qa.retrotax-aci.com/companies",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\"fein\":\"foo\",\"legal_name\":\"foo\",\"client_id\":42,\"active\":42}",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "content-type: foo",
    "x-api-key: foo",
    "x-auth-iv: foo",
    "x-auth-token: foo"
  ),
));

$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/ioutil"
)

func main() {

	url := "https://api-qa.retrotax-aci.com/companies"

	payload := strings.NewReader("{\"fein\":\"foo\",\"legal_name\":\"foo\",\"client_id\":42,\"active\":42}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("accept", "application/json")
	req.Header.Add("content-type", "foo")
	req.Header.Add("x-api-key", "foo")
	req.Header.Add("x-auth-token", "foo")
	req.Header.Add("x-auth-iv", "foo")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Request Headers

Name Type Required Description Example
Content-Type String Required foo
X-API-KEY String Required foo
X-AUTH-TOKEN String Required foo
X-AUTH-IV String Optional foo

Request Body

Name Type Required Description Example
CompanyRequest Object Required
{
  "fein": "foo",
String

Federal Employer Identification Number of the company

  "legal_name": "foo",
String

Name of the company

  "client_id": 42,
Integer

Associated client id of company

  "active": 42
Integer

This field indicates whether the company is active OR not.

}

Responses

200 OK

200 response

Companies Company info
{
  "id": 42,
Integer

Identification number of company

  "fein": "foo",
String

Federal Employer Identification Number of the company

  "legal_name": "foo"
String

Name of the company

}
400 Bad Request

400 response

(Empty Response)
401 Unauthorized

401 response

(Empty Response)
403 Forbidden

403 response

(Empty Response)
404 Not Found

404 response

(Empty Response)

GET /companies/{company_id}

Open in API Explorer
GET /companies/{company_id}

Example Request

Format:
curl --request GET \
  --url https://api-qa.retrotax-aci.com/companies/foo \
  --header 'accept: application/json' \
  --header 'x-api-key: foo' \
  --header 'x-auth-iv: foo' \
  --header 'x-auth-token: foo'
require 'uri'
require 'net/http'

url = URI("https://api-qa.retrotax-aci.com/companies/foo")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["accept"] = 'application/json'
request["x-api-key"] = 'foo'
request["x-auth-token"] = 'foo'
request["x-auth-iv"] = 'foo'

response = http.request(request)
puts response.read_body
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "api-qa.retrotax-aci.com",
  "port": null,
  "path": "/companies/foo",
  "headers": {
    "accept": "application/json",
    "x-api-key": "foo",
    "x-auth-token": "foo",
    "x-auth-iv": "foo"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
import http.client

conn = http.client.HTTPSConnection("api-qa.retrotax-aci.com")

headers = {
    'accept': "application/json",
    'x-api-key': "foo",
    'x-auth-token': "foo",
    'x-auth-iv': "foo"
    }

conn.request("GET", "/companies/foo", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api-qa.retrotax-aci.com/companies/foo",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "x-api-key: foo",
    "x-auth-iv: foo",
    "x-auth-token: foo"
  ),
));

$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/ioutil"
)

func main() {

	url := "https://api-qa.retrotax-aci.com/companies/foo"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("accept", "application/json")
	req.Header.Add("x-api-key", "foo")
	req.Header.Add("x-auth-token", "foo")
	req.Header.Add("x-auth-iv", "foo")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Request Headers

Name Type Required Description Example
X-API-KEY String Required foo
X-AUTH-TOKEN String Required foo
X-AUTH-IV String Optional foo

Path Parameters

Name Type Required Description Example
company_id String Required foo

Responses

200 OK

200 response

Companies Company info
{
  "id": 42,
Integer

Identification number of company

  "fein": "foo",
String

Federal Employer Identification Number of the company

  "legal_name": "foo"
String

Name of the company

}
400 Bad Request

400 response

(Empty Response)
401 Unauthorized

401 response

(Empty Response)
403 Forbidden

403 response

(Empty Response)
404 Not Found

404 response

(Empty Response)

PUT /companies/{company_id}

Open in API Explorer
PUT /companies/{company_id}

Example Request

Format:
curl --request PUT \
  --url https://api-qa.retrotax-aci.com/companies/foo \
  --header 'accept: application/json' \
  --header 'content-type: multipart/form-data; boundary=---011000010111000001101001' \
  --header 'contenttype: foo' \
  --header 'x-api-key: foo' \
  --header 'x-auth-iv: foo' \
  --header 'x-auth-token: foo'
require 'uri'
require 'net/http'

url = URI("https://api-qa.retrotax-aci.com/companies/foo")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Put.new(url)
request["accept"] = 'application/json'
request["content-type"] = 'multipart/form-data; boundary=---011000010111000001101001'
request["x-api-key"] = 'foo'
request["x-auth-token"] = 'foo'
request["contenttype"] = 'foo'
request["x-auth-iv"] = 'foo'

response = http.request(request)
puts response.read_body
var http = require("https");

var options = {
  "method": "PUT",
  "hostname": "api-qa.retrotax-aci.com",
  "port": null,
  "path": "/companies/foo",
  "headers": {
    "accept": "application/json",
    "content-type": "multipart/form-data; boundary=---011000010111000001101001",
    "x-api-key": "foo",
    "x-auth-token": "foo",
    "contenttype": "foo",
    "x-auth-iv": "foo"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
import http.client

conn = http.client.HTTPSConnection("api-qa.retrotax-aci.com")

payload = ""

headers = {
    'accept': "application/json",
    'content-type': "multipart/form-data; boundary=---011000010111000001101001",
    'x-api-key': "foo",
    'x-auth-token': "foo",
    'contenttype': "foo",
    'x-auth-iv': "foo"
    }

conn.request("PUT", "/companies/foo", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api-qa.retrotax-aci.com/companies/foo",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PUT",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "content-type: multipart/form-data; boundary=---011000010111000001101001",
    "contenttype: foo",
    "x-api-key: foo",
    "x-auth-iv: foo",
    "x-auth-token: foo"
  ),
));

$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/ioutil"
)

func main() {

	url := "https://api-qa.retrotax-aci.com/companies/foo"

	req, _ := http.NewRequest("PUT", url, nil)

	req.Header.Add("accept", "application/json")
	req.Header.Add("content-type", "multipart/form-data; boundary=---011000010111000001101001")
	req.Header.Add("x-api-key", "foo")
	req.Header.Add("x-auth-token", "foo")
	req.Header.Add("contenttype", "foo")
	req.Header.Add("x-auth-iv", "foo")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Request Headers

Name Type Required Description Example
X-API-KEY String Required foo
X-AUTH-TOKEN String Required foo
ContentType String Required foo
X-AUTH-IV String Optional foo

Path Parameters

Name Type Required Description Example
company_id String Required foo

Responses

200 OK

200 response

Companies Company info
{
  "id": 42,
Integer

Identification number of company

  "fein": "foo",
String

Federal Employer Identification Number of the company

  "legal_name": "foo"
String

Name of the company

}
400 Bad Request

400 response

(Empty Response)
401 Unauthorized

401 response

(Empty Response)
403 Forbidden

403 response

(Empty Response)
404 Not Found

404 response

(Empty Response)

GET /companies/{company_id}/locations

Open in API Explorer
GET /companies/{company_id}/locations

Example Request

Format:
curl --request GET \
  --url 'https://api-qa.retrotax-aci.com/companies/foo/locations?integration=foo' \
  --header 'accept: application/json' \
  --header 'x-api-key: foo' \
  --header 'x-auth-iv: foo' \
  --header 'x-auth-token: foo'
require 'uri'
require 'net/http'

url = URI("https://api-qa.retrotax-aci.com/companies/foo/locations?integration=foo")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["accept"] = 'application/json'
request["x-api-key"] = 'foo'
request["x-auth-token"] = 'foo'
request["x-auth-iv"] = 'foo'

response = http.request(request)
puts response.read_body
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "api-qa.retrotax-aci.com",
  "port": null,
  "path": "/companies/foo/locations?integration=foo",
  "headers": {
    "accept": "application/json",
    "x-api-key": "foo",
    "x-auth-token": "foo",
    "x-auth-iv": "foo"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
import http.client

conn = http.client.HTTPSConnection("api-qa.retrotax-aci.com")

headers = {
    'accept': "application/json",
    'x-api-key': "foo",
    'x-auth-token': "foo",
    'x-auth-iv': "foo"
    }

conn.request("GET", "/companies/foo/locations?integration=foo", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api-qa.retrotax-aci.com/companies/foo/locations?integration=foo",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "x-api-key: foo",
    "x-auth-iv: foo",
    "x-auth-token: foo"
  ),
));

$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/ioutil"
)

func main() {

	url := "https://api-qa.retrotax-aci.com/companies/foo/locations?integration=foo"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("accept", "application/json")
	req.Header.Add("x-api-key", "foo")
	req.Header.Add("x-auth-token", "foo")
	req.Header.Add("x-auth-iv", "foo")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Request Headers

Name Type Required Description Example
X-API-KEY String Required foo
X-AUTH-TOKEN String Required foo
X-AUTH-IV String Optional foo

Path Parameters

Name Type Required Description Example
company_id String Required foo

Query Parameters

Name Type Required Description Example
integration String Optional foo

Responses

200 OK

200 response

Companies Locationsresponse
{
  list: [
Array

List

    {
    { ... }
Object
      "id": 42.0,
Number

Id

      "location_name": "foo",
String

Location Name

      "city": "foo",
String

City

      "address1": "foo",
String

Address1

      "address2": "foo",
String

Address2

      "zip": "foo",
String

Zip

      "primary_contact_extension": "foo",
String

Primary Contact Extension

      "primary_contact_email": "foo",
String

Primary Contact Email

      "primary_contact_phone": "foo",
String

Primary Contact Phone

      "primary_contact_name": "foo",
String

Primary Contact Name

      "default_position": {
      "default_position": { ... }
Object

Default Position

        "code": "foo",
String

Code of the occupation.

        "name": "foo"
String

Name of the occupation.

      },
      "default_wage": 42
Integer

Default wage of location.

    }
  ]
}
400 Bad Request

400 response

(Empty Response)
401 Unauthorized

401 response

(Empty Response)
403 Forbidden

403 response

(Empty Response)
404 Not Found

404 response

(Empty Response)

POST /companies/{company_id}/locations

Open in API Explorer
POST /companies/{company_id}/locations

Example Request

Format:
curl --request POST \
  --url https://api-qa.retrotax-aci.com/companies/foo/locations \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  --header 'x-api-key: foo' \
  --header 'x-auth-iv: foo' \
  --header 'x-auth-token: foo' \
  --data '{"location_name":"foo","address_line_1":"foo","address_line_2":"foo","city":"foo","state_code":"foo","zip_code":"foo","primary_contact_attributes":{"name":"foo","email":"foo","phone":"foo"}}'
require 'uri'
require 'net/http'

url = URI("https://api-qa.retrotax-aci.com/companies/foo/locations")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["accept"] = 'application/json'
request["content-type"] = 'application/json'
request["x-api-key"] = 'foo'
request["x-auth-token"] = 'foo'
request["x-auth-iv"] = 'foo'
request.body = "{\"location_name\":\"foo\",\"address_line_1\":\"foo\",\"address_line_2\":\"foo\",\"city\":\"foo\",\"state_code\":\"foo\",\"zip_code\":\"foo\",\"primary_contact_attributes\":{\"name\":\"foo\",\"email\":\"foo\",\"phone\":\"foo\"}}"

response = http.request(request)
puts response.read_body
var http = require("https");

var options = {
  "method": "POST",
  "hostname": "api-qa.retrotax-aci.com",
  "port": null,
  "path": "/companies/foo/locations",
  "headers": {
    "accept": "application/json",
    "content-type": "application/json",
    "x-api-key": "foo",
    "x-auth-token": "foo",
    "x-auth-iv": "foo"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({ location_name: 'foo',
  address_line_1: 'foo',
  address_line_2: 'foo',
  city: 'foo',
  state_code: 'foo',
  zip_code: 'foo',
  primary_contact_attributes: { name: 'foo', email: 'foo', phone: 'foo' } }));
req.end();
import http.client

conn = http.client.HTTPSConnection("api-qa.retrotax-aci.com")

payload = "{\"location_name\":\"foo\",\"address_line_1\":\"foo\",\"address_line_2\":\"foo\",\"city\":\"foo\",\"state_code\":\"foo\",\"zip_code\":\"foo\",\"primary_contact_attributes\":{\"name\":\"foo\",\"email\":\"foo\",\"phone\":\"foo\"}}"

headers = {
    'accept': "application/json",
    'content-type': "application/json",
    'x-api-key': "foo",
    'x-auth-token': "foo",
    'x-auth-iv': "foo"
    }

conn.request("POST", "/companies/foo/locations", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api-qa.retrotax-aci.com/companies/foo/locations",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\"location_name\":\"foo\",\"address_line_1\":\"foo\",\"address_line_2\":\"foo\",\"city\":\"foo\",\"state_code\":\"foo\",\"zip_code\":\"foo\",\"primary_contact_attributes\":{\"name\":\"foo\",\"email\":\"foo\",\"phone\":\"foo\"}}",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "content-type: application/json",
    "x-api-key: foo",
    "x-auth-iv: foo",
    "x-auth-token: foo"
  ),
));

$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/ioutil"
)

func main() {

	url := "https://api-qa.retrotax-aci.com/companies/foo/locations"

	payload := strings.NewReader("{\"location_name\":\"foo\",\"address_line_1\":\"foo\",\"address_line_2\":\"foo\",\"city\":\"foo\",\"state_code\":\"foo\",\"zip_code\":\"foo\",\"primary_contact_attributes\":{\"name\":\"foo\",\"email\":\"foo\",\"phone\":\"foo\"}}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("accept", "application/json")
	req.Header.Add("content-type", "application/json")
	req.Header.Add("x-api-key", "foo")
	req.Header.Add("x-auth-token", "foo")
	req.Header.Add("x-auth-iv", "foo")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Request Headers

Name Type Required Description Example
X-API-KEY String Optional foo
X-AUTH-TOKEN String Optional foo
X-AUTH-IV String Optional foo

Path Parameters

Name Type Required Description Example
company_id String Required foo

Request Body

Name Type Required Description Example
LocationPost Object Required
{
  "location_name": "foo",
String

Name of the location

  "address_line_1": "foo",
String

Address of the location

  "address_line_2": "foo",
String

Address_2 of the location

  "city": "foo",
String

City of the location

  "state_code": "foo",
String

Associated state code of the location

  "zip_code": "foo",
String

Zip code of the location

  "primary_contact_attributes": {
  "primary_contact_attributes": { ... }
Object

Primary Contact Attributes

    "name": "foo",
String

name of the primary contact

    "email": "foo",
String

email address of the primary contact

    "phone": "foo"
String

contact number of the primary contact

  }
}

Responses

200 OK

200 response

Companies Locationresponse
{
  "id": 42.0,
Number

Id

  "location_name": "foo",
String

Location Name

  "city": "foo",
String

City

  "address1": "foo",
String

Address1

  "address2": "foo",
String

Address2

  "zip": "foo",
String

Zip

  "primary_contact_extension": "foo",
String

Primary Contact Extension

  "primary_contact_email": "foo",
String

Primary Contact Email

  "primary_contact_phone": "foo",
String

Primary Contact Phone

  "primary_contact_name": "foo",
String

Primary Contact Name

  "default_position": {
  "default_position": { ... }
Object

Default Position

    "code": "foo",
String

Code of the occupation.

    "name": "foo"
String

Name of the occupation.

  },
  "default_wage": 42
Integer

Default wage of location.

}
400 Bad Request

400 response

(Empty Response)
401 Unauthorized

401 response

(Empty Response)
403 Forbidden

403 response

(Empty Response)
404 Not Found

404 response

(Empty Response)

GET /companies/{company_id}/locations/{location_id}

Open in API Explorer
GET /companies/{company_id}/locations/{location_id}

Example Request

Format:
curl --request GET \
  --url https://api-qa.retrotax-aci.com/companies/foo/locations/foo \
  --header 'accept: application/json' \
  --header 'x-api-key: foo' \
  --header 'x-auth-iv: foo' \
  --header 'x-auth-token: foo'
require 'uri'
require 'net/http'

url = URI("https://api-qa.retrotax-aci.com/companies/foo/locations/foo")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["accept"] = 'application/json'
request["x-api-key"] = 'foo'
request["x-auth-token"] = 'foo'
request["x-auth-iv"] = 'foo'

response = http.request(request)
puts response.read_body
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "api-qa.retrotax-aci.com",
  "port": null,
  "path": "/companies/foo/locations/foo",
  "headers": {
    "accept": "application/json",
    "x-api-key": "foo",
    "x-auth-token": "foo",
    "x-auth-iv": "foo"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
import http.client

conn = http.client.HTTPSConnection("api-qa.retrotax-aci.com")

headers = {
    'accept': "application/json",
    'x-api-key': "foo",
    'x-auth-token': "foo",
    'x-auth-iv': "foo"
    }

conn.request("GET", "/companies/foo/locations/foo", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api-qa.retrotax-aci.com/companies/foo/locations/foo",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "x-api-key: foo",
    "x-auth-iv: foo",
    "x-auth-token: foo"
  ),
));

$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/ioutil"
)

func main() {

	url := "https://api-qa.retrotax-aci.com/companies/foo/locations/foo"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("accept", "application/json")
	req.Header.Add("x-api-key", "foo")
	req.Header.Add("x-auth-token", "foo")
	req.Header.Add("x-auth-iv", "foo")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Path Parameters

Name Type Required Description Example
location_id String Required foo
company_id String Required foo

Request Headers

Name Type Required Description Example
X-API-KEY String Required foo
X-AUTH-TOKEN String Required foo
X-AUTH-IV String Optional foo

Responses

200 OK

200 response

Companies Locationresponse
{
  "id": 42.0,
Number

Id

  "location_name": "foo",
String

Location Name

  "city": "foo",
String

City

  "address1": "foo",
String

Address1

  "address2": "foo",
String

Address2

  "zip": "foo",
String

Zip

  "primary_contact_extension": "foo",
String

Primary Contact Extension

  "primary_contact_email": "foo",
String

Primary Contact Email

  "primary_contact_phone": "foo",
String

Primary Contact Phone

  "primary_contact_name": "foo",
String

Primary Contact Name

  "default_position": {
  "default_position": { ... }
Object

Default Position

    "code": "foo",
String

Code of the occupation.

    "name": "foo"
String

Name of the occupation.

  },
  "default_wage": 42
Integer

Default wage of location.

}
400 Bad Request

400 response

(Empty Response)
401 Unauthorized

401 response

(Empty Response)
403 Forbidden

403 response

(Empty Response)
404 Not Found

404 response

(Empty Response)

PUT /companies/{company_id}/locations/{location_id}

Open in API Explorer
PUT /companies/{company_id}/locations/{location_id}

Example Request

Format:
curl --request PUT \
  --url https://api-qa.retrotax-aci.com/companies/foo/locations/foo \
  --header 'accept: application/json' \
  --header 'content-type: multipart/form-data; boundary=---011000010111000001101001' \
  --header 'x-api-key: YOUR API KEY HERE' \
  --header 'x-auth-iv: foo' \
  --header 'x-auth-token: foo'
require 'uri'
require 'net/http'

url = URI("https://api-qa.retrotax-aci.com/companies/foo/locations/foo")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Put.new(url)
request["accept"] = 'application/json'
request["x-api-key"] = 'YOUR API KEY HERE'
request["content-type"] = 'multipart/form-data; boundary=---011000010111000001101001'
request["x-auth-token"] = 'foo'
request["x-auth-iv"] = 'foo'

response = http.request(request)
puts response.read_body
var http = require("https");

var options = {
  "method": "PUT",
  "hostname": "api-qa.retrotax-aci.com",
  "port": null,
  "path": "/companies/foo/locations/foo",
  "headers": {
    "accept": "application/json",
    "x-api-key": "YOUR API KEY HERE",
    "content-type": "multipart/form-data; boundary=---011000010111000001101001",
    "x-auth-token": "foo",
    "x-auth-iv": "foo"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
import http.client

conn = http.client.HTTPSConnection("api-qa.retrotax-aci.com")

payload = ""

headers = {
    'accept': "application/json",
    'x-api-key': "YOUR API KEY HERE",
    'content-type': "multipart/form-data; boundary=---011000010111000001101001",
    'x-auth-token': "foo",
    'x-auth-iv': "foo"
    }

conn.request("PUT", "/companies/foo/locations/foo", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api-qa.retrotax-aci.com/companies/foo/locations/foo",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PUT",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "content-type: multipart/form-data; boundary=---011000010111000001101001",
    "x-api-key: YOUR API KEY HERE",
    "x-auth-iv: foo",
    "x-auth-token: foo"
  ),
));

$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/ioutil"
)

func main() {

	url := "https://api-qa.retrotax-aci.com/companies/foo/locations/foo"

	req, _ := http.NewRequest("PUT", url, nil)

	req.Header.Add("accept", "application/json")
	req.Header.Add("x-api-key", "YOUR API KEY HERE")
	req.Header.Add("content-type", "multipart/form-data; boundary=---011000010111000001101001")
	req.Header.Add("x-auth-token", "foo")
	req.Header.Add("x-auth-iv", "foo")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Path Parameters

Name Type Required Description Example
location_id String Required foo
company_id String Required foo

Request Headers

Name Type Required Description Example
X-AUTH-TOKEN String Optional foo
X-AUTH-IV String Optional foo

Responses

200 OK

200 response

(Empty Response)
400 Bad Request

400 response

(Empty Response)
401 Unauthorized

401 response

(Empty Response)
403 Forbidden

403 response

(Empty Response)
404 Not Found

404 response

(Empty Response)