POST api/v1/Vendors

Adds a single Vendor to the system. Returns Success/Error code plus primary key of Vendor added.

Request Information

URI Parameters

None.

Body Parameters

AddUpdateVendorViewModel
NameDescriptionTypeAdditional information
VendorId

Conditional: Represents the PK of the Vendor. Only populated when calling an Update method.

globally unique identifier

None.

Name

Required: Represents the name of the Vendor. Max Length = 50

string

Max length: 50

ACSystemId

Required: Represents the PK of the Access Control System that the Vendor belongs to.

globally unique identifier

None.

OccupancyId

Optional: Represents the PK of the Occupancy the Vendor performs work for (if applicable)

globally unique identifier

None.

FacilityId

Optional: Represents the FacilityId Id where the Vendor will be created, if the address info is NOT passed, then we will take the address from the Building otherwise we take it from the Address Info

globally unique identifier

None.

CompanyId

Conditional: Represents the PK of the global company that the Vendor is an instance of, if passed NOT then the company is created on the Fly.

globally unique identifier

None.

StreetAddress1

Required: Represents the primary street address of the Vendor

string

None.

StreetAddress2

Optional: Represents the secondary street address of the Vendor

string

None.

City

Required:Represents the city of the Vendor

string

None.

RegionId

Required:Represents the PK of the region (State, Province, County, etc) of the Vendor

globally unique identifier

None.

CountryId

Required:Represents the PK of the country of the Vendor

globally unique identifier

None.

PostalCode

Required: Represents the Postal Code/Zip Code of the Vendor

string

None.

Phone

Optional: Represents the primary phone number of the Vendor

string

None.

VendorNumber

Optional: Represents the vendor number used to refer to the vendor (typically from an accounting package)

string

None.

TimeZoneInfoId

Required: Represents the TimeZone of the Facility

string

None.

Deleted

Represents the deleted status of the Vendor

boolean

None.

Request Formats

application/json, text/json

Sample:
{
  "VendorId": "150b3c71-466f-40cf-8f2f-c9006778e1cb",
  "Name": "sample string 1",
  "ACSystemId": "07e2038b-f7ea-4d2e-8638-734e2b4395a3",
  "OccupancyId": "b2438bd7-5b36-42c6-9e9f-b8dd7ebf8a5a",
  "FacilityId": "0b95eb9a-a593-4902-b198-3a89146ce312",
  "CompanyId": "fe175547-b3b1-4195-a536-d39651a83a26",
  "StreetAddress1": "sample string 3",
  "StreetAddress2": "sample string 4",
  "City": "sample string 5",
  "RegionId": "e3beb49e-b623-4cdd-9918-7315bff93208",
  "CountryId": "afa9c389-5e1b-43de-a576-a4a51c90de51",
  "PostalCode": "sample string 8",
  "Phone": "sample string 9",
  "VendorNumber": "sample string 10",
  "TimeZoneInfoId": "sample string 11",
  "Deleted": true
}

application/xml, text/xml

Sample:
<AddUpdateVendorViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/APIWebRole.Controllers">
  <ACSystemId>07e2038b-f7ea-4d2e-8638-734e2b4395a3</ACSystemId>
  <City>sample string 5</City>
  <CompanyId>fe175547-b3b1-4195-a536-d39651a83a26</CompanyId>
  <CountryId>afa9c389-5e1b-43de-a576-a4a51c90de51</CountryId>
  <Deleted>true</Deleted>
  <FacilityId>0b95eb9a-a593-4902-b198-3a89146ce312</FacilityId>
  <Name>sample string 1</Name>
  <OccupancyId>b2438bd7-5b36-42c6-9e9f-b8dd7ebf8a5a</OccupancyId>
  <Phone>sample string 9</Phone>
  <PostalCode>sample string 8</PostalCode>
  <RegionId>e3beb49e-b623-4cdd-9918-7315bff93208</RegionId>
  <StreetAddress1>sample string 3</StreetAddress1>
  <StreetAddress2>sample string 4</StreetAddress2>
  <TimeZoneInfoId>sample string 11</TimeZoneInfoId>
  <VendorId>150b3c71-466f-40cf-8f2f-c9006778e1cb</VendorId>
  <VendorNumber>sample string 10</VendorNumber>
</AddUpdateVendorViewModel>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

ResultWithGuid
NameDescriptionTypeAdditional information
Value

Represents the PK value that was created as a result of an add

globally unique identifier

None.

ResultCode

Represents the result code

integer

None.

Description

Represents a description of the result code

string

None.

Response Formats

application/json, text/json

Sample:
{
  "Value": "a6c2f372-9cdd-4a20-8d49-69a0fd02b269",
  "ResultCode": 2,
  "Description": "sample string 3"
}

application/xml, text/xml

Sample:
<ResultWithGuid xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/APIWebRole.Controllers">
  <Description>sample string 3</Description>
  <HttpStatusCode>Continue</HttpStatusCode>
  <ResultCode>2</ResultCode>
  <Value>a6c2f372-9cdd-4a20-8d49-69a0fd02b269</Value>
</ResultWithGuid>