PUT api/v1/Vendors/{id}
Updates a single Vendor that is already in the system. Returns Success/Error code.
Request Information
URI Parameters
Name | Description | Type | Additional information |
---|---|---|---|
id |
Represents the PK of the Vendor |
globally unique identifier |
Required |
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": "c62cee94-1101-444c-b07a-60a653bd5ebc", "Name": "sample string 1", "ACSystemId": "ce51cde1-8ea9-4cc5-94c2-41982dd4b9d1", "OccupancyId": "b31cae0f-6925-46bf-80a1-6ca2bef38ed3", "FacilityId": "1bef9ae2-9e1f-4199-8120-6f50257d898a", "CompanyId": "b0b13912-05cb-4e41-b864-bdced7723ef6", "StreetAddress1": "sample string 3", "StreetAddress2": "sample string 4", "City": "sample string 5", "RegionId": "117aaa34-92c8-4884-baaf-e1ca013e24ee", "CountryId": "5fd9ce1f-d268-4fd1-844d-678473a5c4f0", "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>ce51cde1-8ea9-4cc5-94c2-41982dd4b9d1</ACSystemId> <City>sample string 5</City> <CompanyId>b0b13912-05cb-4e41-b864-bdced7723ef6</CompanyId> <CountryId>5fd9ce1f-d268-4fd1-844d-678473a5c4f0</CountryId> <Deleted>true</Deleted> <FacilityId>1bef9ae2-9e1f-4199-8120-6f50257d898a</FacilityId> <Name>sample string 1</Name> <OccupancyId>b31cae0f-6925-46bf-80a1-6ca2bef38ed3</OccupancyId> <Phone>sample string 9</Phone> <PostalCode>sample string 8</PostalCode> <RegionId>117aaa34-92c8-4884-baaf-e1ca013e24ee</RegionId> <StreetAddress1>sample string 3</StreetAddress1> <StreetAddress2>sample string 4</StreetAddress2> <TimeZoneInfoId>sample string 11</TimeZoneInfoId> <VendorId>c62cee94-1101-444c-b07a-60a653bd5ebc</VendorId> <VendorNumber>sample string 10</VendorNumber> </AddUpdateVendorViewModel>
application/x-www-form-urlencoded
Sample not available.
Response Information
Resource Description
ResultName | Description | Type | Additional information |
---|---|---|---|
ResultCode |
Represents the result code |
integer |
None. |
Description |
Represents a description of the result code |
string |
None. |
Response Formats
application/json, text/json
{ "ResultCode": 1, "Description": "sample string 2" }
application/xml, text/xml
<Result xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/APIWebRole.Controllers"> <Description>sample string 2</Description> <HttpStatusCode>Continue</HttpStatusCode> <ResultCode>1</ResultCode> </Result>