PUT api/Vendors/{vendorId}

Update vendor

Request Information

URI Parameters

NameDescriptionTypeAdditional information
vendorId

integer

Required

Body Parameters

VendorUpdateViewModel
NameDescriptionTypeAdditional information
Name

Name

string

Required

Matching regular expression pattern: ^[a-zA-Z0-9 ]*$

Max length: 100

LegalName

Legal Name

string

Required

Matching regular expression pattern: ^[a-zA-Z0-9 ]*$

Max length: 100

IsActive

Is Active

boolean

None.

VendorTypeId

Vendor type id

integer

Range: inclusive between 1 and 2147483647

VendorServiceId

integer

None.

Irs1099ClassId

IRS 1099 class id

integer

None.

FederalTaxId

Federal tax id

string

Max length: 50

Contact

Contact Name

string

Matching regular expression pattern: ^[a-zA-Z ]*$

Max length: 50

Email

Email

string

Data type: EmailAddress

Phone

Phone Number

string

Matching regular expression pattern: (^$)|(^\d{3}-\d{3}-\d{4})

FaxNumber

Fax Number

string

Matching regular expression pattern: (^$)|(^\d{3}-\d{3}-\d{4})

IsSeparateChecks

Is Separate Checks

boolean

None.

IsAllowDuplicateInvoices

Allowes duplicate invoices

boolean

None.

IsDirectCredit

Is direct credit

boolean

None.

IsPartner

Is partner

boolean

None.

IsInsuranceRequired

Is insurance required

boolean

None.

GlExpenseAccount

GL Expense Account

string

None.

GlSubAccountId

GL sub account id

integer

None.

Address

Vendor address

AddressViewModel

Required

PhysicalAddress

Vendor physical address

AddressBaseViewModel

None.

PhysicalAddressSameAsMailingAddress

Physical Address Same As Mailing Address

boolean

None.

ComplianceInsurances

Collection of UpdateComplianceInsuranceViewModel

None.

Request Formats

application/json, text/json

Sample:
{
  "complianceInsurances": [
    {
      "complianceInsuranceId": 1,
      "insuranceTypeId": 1,
      "expirationDate": "2024-10-14T04:26:27.1781513-04:00"
    },
    {
      "complianceInsuranceId": 1,
      "insuranceTypeId": 1,
      "expirationDate": "2024-10-14T04:26:27.1781513-04:00"
    }
  ],
  "name": "sample string 1",
  "legalName": "sample string 2",
  "isActive": true,
  "vendorTypeId": 4,
  "vendorServiceId": 1,
  "irs1099ClassId": 1,
  "federalTaxId": "sample string 5",
  "contact": "sample string 6",
  "email": "sample string 7",
  "phone": "sample string 8",
  "faxNumber": "sample string 9",
  "isSeparateChecks": true,
  "isAllowDuplicateInvoices": true,
  "isDirectCredit": true,
  "isPartner": true,
  "isInsuranceRequired": true,
  "glExpenseAccount": "sample string 15",
  "glSubAccountId": 1,
  "address": {
    "addressId": 1,
    "address1": "sample string 2",
    "address2": "sample string 3",
    "city": "sample string 4",
    "state": "sample string 5",
    "zipCode": "sample string 6",
    "country": "sample string 7"
  },
  "physicalAddress": {
    "address1": "sample string 1",
    "address2": "sample string 2",
    "city": "sample string 3",
    "state": "sample string 4",
    "zipCode": "sample string 5",
    "country": "sample string 6"
  },
  "physicalAddressSameAsMailingAddress": true
}

application/xml, text/xml

Sample:
<VendorUpdateViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CamAcctApi.ViewModels.Vendor">
  <Address xmlns:d2p1="http://schemas.datacontract.org/2004/07/CamAcctApi.ViewModels">
    <Address1 xmlns="http://schemas.datacontract.org/2004/07/CamAcctApi.ViewModels.Address">sample string 2</Address1>
    <Address2 xmlns="http://schemas.datacontract.org/2004/07/CamAcctApi.ViewModels.Address">sample string 3</Address2>
    <City xmlns="http://schemas.datacontract.org/2004/07/CamAcctApi.ViewModels.Address">sample string 4</City>
    <Country xmlns="http://schemas.datacontract.org/2004/07/CamAcctApi.ViewModels.Address">sample string 7</Country>
    <State xmlns="http://schemas.datacontract.org/2004/07/CamAcctApi.ViewModels.Address">sample string 5</State>
    <ZipCode xmlns="http://schemas.datacontract.org/2004/07/CamAcctApi.ViewModels.Address">sample string 6</ZipCode>
    <d2p1:AddressId>1</d2p1:AddressId>
  </Address>
  <Contact>sample string 6</Contact>
  <Email>sample string 7</Email>
  <FaxNumber>sample string 9</FaxNumber>
  <FederalTaxId>sample string 5</FederalTaxId>
  <GlExpenseAccount>sample string 15</GlExpenseAccount>
  <GlSubAccountId>1</GlSubAccountId>
  <Irs1099ClassId>1</Irs1099ClassId>
  <IsActive>true</IsActive>
  <IsAllowDuplicateInvoices>true</IsAllowDuplicateInvoices>
  <IsDirectCredit>true</IsDirectCredit>
  <IsInsuranceRequired>true</IsInsuranceRequired>
  <IsPartner>true</IsPartner>
  <IsSeparateChecks>true</IsSeparateChecks>
  <LegalName>sample string 2</LegalName>
  <Name>sample string 1</Name>
  <Phone>sample string 8</Phone>
  <PhysicalAddress xmlns:d2p1="http://schemas.datacontract.org/2004/07/CamAcctApi.ViewModels.Address">
    <d2p1:Address1>sample string 1</d2p1:Address1>
    <d2p1:Address2>sample string 2</d2p1:Address2>
    <d2p1:City>sample string 3</d2p1:City>
    <d2p1:Country>sample string 6</d2p1:Country>
    <d2p1:State>sample string 4</d2p1:State>
    <d2p1:ZipCode>sample string 5</d2p1:ZipCode>
  </PhysicalAddress>
  <PhysicalAddressSameAsMailingAddress>true</PhysicalAddressSameAsMailingAddress>
  <VendorServiceId>1</VendorServiceId>
  <VendorTypeId>4</VendorTypeId>
  <ComplianceInsurances xmlns:d2p1="http://schemas.datacontract.org/2004/07/CamAcctApi.ViewModels">
    <d2p1:UpdateComplianceInsuranceViewModel>
      <d2p1:ExpirationDate>2024-10-14T04:26:27.1781513-04:00</d2p1:ExpirationDate>
      <d2p1:InsuranceTypeId>1</d2p1:InsuranceTypeId>
      <d2p1:ComplianceInsuranceId>1</d2p1:ComplianceInsuranceId>
    </d2p1:UpdateComplianceInsuranceViewModel>
    <d2p1:UpdateComplianceInsuranceViewModel>
      <d2p1:ExpirationDate>2024-10-14T04:26:27.1781513-04:00</d2p1:ExpirationDate>
      <d2p1:InsuranceTypeId>1</d2p1:InsuranceTypeId>
      <d2p1:ComplianceInsuranceId>1</d2p1:ComplianceInsuranceId>
    </d2p1:UpdateComplianceInsuranceViewModel>
  </ComplianceInsurances>
</VendorUpdateViewModel>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'VendorUpdateViewModel'.

Response Information

Resource Description

IHttpActionResult

None.

Response Formats

application/json, text/json, application/xml, text/xml

Sample:

Sample not available.