Skip to main content

AddVendor

Overview

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

Request Information


Method

POST - api/Vendor/AddVendor

URI Parameters

None.

Body Parameters

AddUpdateVendorViewModel

NameDescriptionTypeAdditional information
VendorIdConditional: Represents the PK of the Vendor. Only populated when calling an Update method.globally unique identifierNone.
NameRequired: Represents the name of the Vendor. Max Length = 50stringNone.
ACSystemIdRequired: Represents the PK of the Access Control System that the Vendor belongs to.globally unique identifierNone.
OccupancyIdOptional: Represents the PK of the Occupancy the Vendor performs work for (if applicable)globally unique identifierNone.
CompanyIdRequired: Represents the PK of the global company that the Vendor is an instance of.globally unique identifierNone.
StreetAddress1Required: Represents the primary street address of the VendorstringNone.
StreetAddress2Optional: Represents the secondary street address of the VendorstringNone.
CityRequired:Represents the city of the VendorstringNone.
RegionIdRequired:Represents the PK of the region (State, Province, County, etc) of the Vendorglobally unique identifierNone.
CountryIdRequired:Represents the PK of the country of the Vendorglobally unique identifierNone.
PostalCodeRequired: Represents the Postal Code/Zip Code of the VendorstringNone.
PhoneOptional: Represents the primary phone number of the VendorstringNone.
VendorNumberOptional: Represents the vendor number used to refer to the vendor (typically from an accounting package)stringNone.
TimeZoneInfoIdRequired: Represents the TimeZone of the FacilitystringNone.
DeletedRepresents the deleted status of the VendorbooleanNone.

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

```json
{
"ResultCode": 1,
"Description": "sample string 2",
"Value": "cfba0ef5-4748-4a38-b157-48c619053e7f"
}
```

#### XML

```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>