Companies

Get a list of companies

GET /people/companies

cURL request example

curl -u #:#{password}'\
-H 'User-Agent: #{user_agent}'\	
-X GET https://#{subdomain}.iscriba.com/api/people/companies

XML response example

HTTP Status: 200 OK

<?xml version="1.0" encoding="utf-8"?>
<xml>
	<companies>
		<company>
		...
		</company>
		<company>
		...
		</company>
	</companies>
</xml>


Top


Get a company

GET /people/company/id/#{company_id}

URI arguments

Argument Type Required Value
id integer yes The #{company_id} of the company your are trying to get.

cURL request example

	
curl -u #:#{password}'\
-H 'User-Agent: #{user_agent}'\
-X GET https://#{subdomain}.iscriba.com/api/people/company/id/1

XML response examples

When the #{company_id} is equal to the #{company_id} of your own company:

HTTP Status: 200 OK

<?xml version="1.0" encoding="utf-8"?>
<xml>
	<company>
		<company_id>1</company_id>
		<parent_company_id>0</parent_company_id><!-- always equals 0 when it's your own company -->
		<name>Company Name</name>
		<address>Address part 1</address>
		<address>Address part 2</address>
		<address>Address part 3</address>
		<address>Address part 4</address>
		<city>City</city>
		<state>State</state>
		<postalcode>012345</postalcode>
		<country>FR</country>
		<email>email@companyname.com</email>
		<phone>0134185483</phone>
		<fax>0134185483</fax>
		<webaddress>http://www.company.com</webaddress>
		<tax_id>FR12123123123</tax_id>
		<language>french</language>
		<is_tenant_account>1</is_tenant_account><!-- if equals 1, indicate that it's your own company -->
	</company>
</xml>	

When the #{company_id} is equal to #{company_id} of a client company:

HTTP Status: 200 OK

<?xml version="1.0" encoding="utf-8"?>
<xml>
	<company>
		<company_id>2</company_id>
		<parent_company_id>1</parent_company_id><!-- always equals the #{company_id} of your own company when it's a client company -->
		<name>Client Name</name>
		<address>Address part 1</address>
		<address>Address part 2</address>
		<address>Address part 3</address>
		<address>Address part 4</address>
		<city>City</city>
		<state>State</state>
		<postalcode>012345</postalcode>
		<country>FR</country>
		<email>email@clientname.com</email>
		<phone>0134185483</phone>
		<fax>0134185483</fax>
		<webaddress>http://www.company.com</webaddress>
		<tax_id>FR12123123123</tax_id>
		<language>french</language>
		<is_tenant_account>0</is_tenant_account><!-- if equals 0, indicate that it's a client company -->
	</company>
</xml>

Top


Create a company

POST /people/company

Request fields

Field Type Required Description
name string yes Name.
language string Language. See the possible values ​​of language.
tax_id string Identification number for the taxes.
address1 string Address line 1.
address2 string Address line 2.
address3 string Address line 3.
address4 string Address line 4.
city string City.
state string State/Region.
postalcode string Postal code.
country string Country. By default, the country of your own company. See the possible values ​​of country.
phone string Telephone line.
fax string Fax line.
email string E-mail address.
webaddress string URL of the website.

cURL request example

	
curl -u #:#{password}'\
-H 'User-Agent: #{user_agent}'\
-d "name=Nom de société&country=FR"\
https://#{subdomain}.iscriba.com/api/people/company

XML response example

HTTP Status: 201 Created

<?xml version="1.0" encoding="utf-8"?>
<xml>
	<company_id>1</company_id>
</xml>	

Top


Modify a company

PUT /people/company/id/#{company_id}

URI arguments

Argument Type Required Value
id integer yes The #{company_id} of the company you’d like to modify.

Request fields

Same as create a company except that no field is required.

cURL request example

	
curl -u #:#{password}'\
-H 'User-Agent: #{user_agent}'\
-X PUT\
-d "country=GB"\
https://#{subdomain}.iscriba.com/api/people/company/id/1

XML response example

HTTP Response: 200 OK

<?xml version="1.0" encoding="utf-8"?>
<xml>
	<company_id>1</company_id>
</xml>	

Top


Delete a company

DELETE /people/company/id/#{company_id}

URI arguments

Argument Type Required Value
id integer yes The #{company_id} of the company you’d like to delete.

cURL request example

	
curl -u #:#{password}'\
-H 'User-Agent: #{user_agent}'\
-X DELETE https://#{subdomain}.iscriba.com/api/people/company/id/1

XML response example

HTTP Response: 200 OK

<?xml version="1.0" encoding="utf-8"?>
<xml>
	<company_id>1</company_id>
</xml>	

Top