company location

operations about company locations

Creates a company location for a specific company passed in

Request
Request Body schema: application/json
name
required
string

Sets the name for your company location

companyUniqueID
required
string <uuid>

The unique identifier of the company for which you want to add the location

isHeadquarters
boolean

set to true if you want to mark the location as headquarrter. If the company already has a headquarter and you want to make the new location as headquaters, set to true and all other locations that were added before will be reset to false immediately

street1
string
street2
string
city
string
state
string
zipCode
string
fax
string
phoneNumber
string
Responses
200

Created a company location

400

Invalid Company id or Invalid Company Location

402

Location already exists

post/companyl.ocation/create
Request samples
application/json
{
  • "name": "Smartapp HQ",
  • "companyUniqueID": "00000000-0000-0000-0000-000000000000",
  • "isHeadquarters": true,
  • "street1": "1350 division road",
  • "street2": null,
  • "city": "West Warwick",
  • "state": "Rhode Island",
  • "zipCode": 2893,
  • "fax": "+1-212-9876543",
  • "phoneNumber": 8002544050
}
Response samples
application/json
{
  • "name": "smartapp.com",
  • "uniqueID": "00000000-0000-0000-0000-000000000000",
  • "companyUniqueID": "00000000-0000-0000-0000-000000000000",
  • "isHeadquarters": true,
  • "street1": "1350 Division Road",
  • "street2": "string",
  • "city": "West Warwick",
  • "state": "Rhode Island",
  • "country": "USA",
  • "zip": "02818",
  • "fax": "555-123-4567",
  • "phone": "800-254-4050",
  • "createdBy": {
    },
  • "modifiedBy": {
    }
}

Returns a company location from the location's unique ID

Request
query Parameters
UniqueID
required
string <uuid>

The unique identifier of the location to be retrieved

Example: UniqueID=00000000-0000-0000-0000-000000000000
Responses
200

Company location object

400

Invalid company location Id

get/companylocation/get/uniqueid
Request samples
Response samples
application/json
{
  • "name": "smartapp.com",
  • "uniqueID": "00000000-0000-0000-0000-000000000000",
  • "companyUniqueID": "00000000-0000-0000-0000-000000000000",
  • "isHeadquarters": true,
  • "street1": "1350 Division Road",
  • "street2": "string",
  • "city": "West Warwick",
  • "state": "Rhode Island",
  • "country": "USA",
  • "zip": "02818",
  • "fax": "555-123-4567",
  • "phone": "800-254-4050",
  • "createdBy": {
    },
  • "modifiedBy": {
    }
}

Gets a company location from the company's unique ID

You can see the list of locations associated to an existing company. You need only supply the unique company identifier that was returned upon company creation.

Request
query Parameters
companyUniqueID
required
string <uuid>

The unique identifier of the comany whose locations will be retrieved

Example: companyUniqueID=00000000-0000-0000-0000-000000000000
Responses
200

Company location object

400

Invalid company Id

get/companylocation/getbycompany/uniqueid
Request samples
Response samples
application/json
[
  • {
    }
]

deletes a company location

Request
query Parameters
UniqueID
required
string <uuid>
Example: UniqueID=00000000-0000-0000-0000-000000000000
Responses
200

Deleted the company location

400

Invalid company location Id

post/companylocation/delete/uniqueid
Request samples

updates a company's location

Updates the specified company location by setting the values for the parameters passed. Any parameters not provided will be left unchanged. For example, if you pass the street1 parameter, that becomes street1 and is usedin the future

Request
query Parameters
UniqueID
required
string <uuid>

The unique identifier of the locatino to be updated

Example: UniqueID=00000000-0000-0000-0000-000000000000
name
string
Example: name=Post Office Location
IsHeadquarters
boolean

Set to true if you want to mark the location as headquarters. If the company already has a headquarters and you want to make this locatoin the headquarters, set it to true and all other locations will have isHeadquarters set to false.

Street 1
string
Example: Street 1=1600 Pennsylvania Avenue
Street 2
string
Example: Street 2=Oval office
city
string
Example: city=Washington DC
state
string
Example: state=Washington DC
country
string
Example: country=United States of America
Zip
string
Example: Zip=37188
fax
string
Example: fax=202-456-2461
phone
string
Example: phone=202-456-1111
Responses
200

company location was updated

400

Invalid company location Id or Invalid Company Location

402

Location already exists.

post/companyl.ocation/update
Request samples
Response samples
application/json
{
  • "name": "smartapp.com",
  • "uniqueID": "00000000-0000-0000-0000-000000000000",
  • "companyUniqueID": "00000000-0000-0000-0000-000000000000",
  • "isHeadquarters": true,
  • "street1": "1350 Division Road",
  • "street2": "string",
  • "city": "West Warwick",
  • "state": "Rhode Island",
  • "country": "USA",
  • "zip": "02818",
  • "fax": "555-123-4567",
  • "phone": "800-254-4050",
  • "createdBy": {
    },
  • "modifiedBy": {
    }
}