AddVendor
Overview
Request Information
Method
POST - api/Vendor/AddVendor
URI Parameters
None.
Body Parameters
AddUpdateVendorViewModel
Name | 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 |
None. |
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. |
CompanyId |
Required: Represents the PK of the global company that the Vendor is an instance of. |
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. |
JSON
{ "VendorId": "4cb4b352-ed48-4119-aaaa-39c64469625a", "Name": "sample string 1", "ACSystemId": "2d074777-5f3d-450a-b8ac-dd9eca3d69d0", "OccupancyId": "23b2bf1b-8471-4943-9c97-c924f8199a3e", "CompanyId": "9231569c-5adc-490e-8ac8-bb2b93204a8a", "StreetAddress1": "sample string 4", "StreetAddress2": "sample string 5", "City": "sample string 6", "RegionId": "43c3d508-7ed2-475c-84b6-3bcf4d49afd2", "CountryId": "4dc0c503-0bc8-4d31-b02b-727cd98de517", "PostalCode": "sample string 9", "Phone": "sample string 10", "VendorNumber": "sample string 11", "TimeZoneInfoId": "sample string 12", "Deleted": true }
XML
<AddUpdateVendorViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BluSKYWebAPI.Controllers"> <ACSystemId>2d074777-5f3d-450a-b8ac-dd9eca3d69d0</ACSystemId> <City>sample string 6</City> <CompanyId>9231569c-5adc-490e-8ac8-bb2b93204a8a</CompanyId> <CountryId>4dc0c503-0bc8-4d31-b02b-727cd98de517</CountryId> <Deleted>true</Deleted> <Name>sample string 1</Name> <OccupancyId>23b2bf1b-8471-4943-9c97-c924f8199a3e</OccupancyId> <Phone>sample string 10</Phone> <PostalCode>sample string 9</PostalCode> <RegionId>43c3d508-7ed2-475c-84b6-3bcf4d49afd2</RegionId> <StreetAddress1>sample string 4</StreetAddress1> <StreetAddress2>sample string 5</StreetAddress2> <TimeZoneInfoId>sample string 12</TimeZoneInfoId> <VendorId>4cb4b352-ed48-4119-aaaa-39c64469625a</VendorId> <VendorNumber>sample string 11</VendorNumber> </AddUpdateVendorViewModel>
Response Information
Resource Description
ResultWithGuid
Name | Description | Type | Additional information |
---|---|---|---|
ResultCode |
Represents the result code |
integer |
None. |
Description |
Represents a description of the result code |
string |
None. |
Value |
Represents the PK value that was created as a result of an add |
globally unique identifier |
None. |
Response Formats
JSON
{ "ResultCode": 1, "Description": "sample string 2", "Value": "cfba0ef5-4748-4a38-b157-48c619053e7f" }
XML
<ResultWithGuid xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BluSKYWebAPI.Controllers"> <Description>sample string 2</Description> <ResultCode>1</ResultCode> <Value>cfba0ef5-4748-4a38-b157-48c619053e7f</Value> </ResultWithGuid>