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
AddUpdateVendorViewModelName | Description | Type | Additional 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
{ "VendorId": "0f0a2302-3823-4719-a20d-4f23220084e2", "Name": "sample string 1", "ACSystemId": "0f75bd4d-ef39-4626-b80c-f7fab8999071", "OccupancyId": "5778e4b7-f967-49da-b8b7-26148f9a9071", "FacilityId": "8994a2df-2434-413c-9dc6-11737cb31a8c", "CompanyId": "5d889b75-932f-484a-8d40-08a9772cb2cc", "StreetAddress1": "sample string 3", "StreetAddress2": "sample string 4", "City": "sample string 5", "RegionId": "15abe108-4e73-4ce1-9ef5-1bcff691b6dc", "CountryId": "9bbd933d-a698-4f9b-98cb-0f6d322be3b2", "PostalCode": "sample string 8", "Phone": "sample string 9", "VendorNumber": "sample string 10", "TimeZoneInfoId": "sample string 11", "Deleted": true }
application/xml, text/xml
<AddUpdateVendorViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/APIWebRole.Controllers"> <ACSystemId>0f75bd4d-ef39-4626-b80c-f7fab8999071</ACSystemId> <City>sample string 5</City> <CompanyId>5d889b75-932f-484a-8d40-08a9772cb2cc</CompanyId> <CountryId>9bbd933d-a698-4f9b-98cb-0f6d322be3b2</CountryId> <Deleted>true</Deleted> <FacilityId>8994a2df-2434-413c-9dc6-11737cb31a8c</FacilityId> <Name>sample string 1</Name> <OccupancyId>5778e4b7-f967-49da-b8b7-26148f9a9071</OccupancyId> <Phone>sample string 9</Phone> <PostalCode>sample string 8</PostalCode> <RegionId>15abe108-4e73-4ce1-9ef5-1bcff691b6dc</RegionId> <StreetAddress1>sample string 3</StreetAddress1> <StreetAddress2>sample string 4</StreetAddress2> <TimeZoneInfoId>sample string 11</TimeZoneInfoId> <VendorId>0f0a2302-3823-4719-a20d-4f23220084e2</VendorId> <VendorNumber>sample string 10</VendorNumber> </AddUpdateVendorViewModel>
application/x-www-form-urlencoded
Sample not available.
Response Information
Resource Description
ResultWithGuidName | Description | Type | Additional 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
{ "Value": "b914b4a1-f965-486a-a193-7028b64471b7", "ResultCode": 2, "Description": "sample string 3" }
application/xml, text/xml
<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>b914b4a1-f965-486a-a193-7028b64471b7</Value> </ResultWithGuid>