Delete Vendor operation
The Delete Vendor operation deletes the details of a vendor.
Delete wrappers can delete only a single record. If information provided in the request refers to zero or more than one record, then no record is deleted. The entry to be deleted is first located by executing a logical AND operation using the elements provided in request. The located entry is then deleted.
The following table describes the elements of the <items>
XML element and the adapter request. If not specified, the valid value for an element should be assumed to be a string.
Elements for the <items> XML element and adapter request for the Delete Vendor operation
Element |
Definition |
Required |
---|---|---|
|
Specifies the name of the operation: |
Yes |
|
Contains the other elements in the request |
Yes |
|
Contains elements that uniquely identify a record |
Yes |
|
Specifies a unique record |
Yes |
|
Specifies the vendor name. |
Yes |
|
Specifies the location information for the vendor |
No |
|
Specifies the address of the vendor; is an array-type element |
No |
|
Specifies the city where the vendor is located |
No |
|
Specifies the zip code of the place where the vendor is located |
No |
|
Specifies details about the sales representative |
No |
|
Specifies the name of the sales manager |
No |
|
Specifies the phone number of the sales manager |
No |
|
Specifies the details of the service contact for the vendor |
No |
|
Specifies the service phone number of the vendor |
No |
|
Specifies the phone number of the vendor to contact after working hours |
No |
|
Specifies the opening time for the service |
No |
|
Specifies the date and time of closing the vendor details |
No |
|
Specifies the phone number of the sales representative |
No |
|
Specifies the country in which the vendor is located |
No |
|
Specifies the email ID of the vendor |
No |
|
Specifies the identification number of the vendor |
No |
|
Specifies the contact number of the vendor |
No |
|
Specifies the name of the contract person |
No |
|
Specifies the phone number of the contract person |
No |
|
Specifies the name of the person associated with the order |
No |
|
Specifies the phone number of the person associated with the order |
No |
|
Specifies whether the record is for a vendor |
No |
|
Specifies whether the record is for a manufacturer |
No |
|
Specifies the URL associated with the record |
No |
The following figure displays the sample adapter request for the Delete Vendor operation.
Sample adapter request for the Delete Vendor operation
<hp-service-manager-request>
<entity>configurationitem</entity>
<entity-type>vendor</entity-type>
<request>
<operation-name>delete-vendor</operation-name>
<parameters>
<delete-vendor-request>
<model>
<keys>
<vendor-name>
<value>MyVendorName10</value>
<type>String</type>
</vendor-name>
<location>
<value>location10</value>
<type>String</type>
</location>
</keys>
<instance>
<vendor-name>
<value>MyVendorName10</value>
<type>String</type>
</vendor-name>
<location>
<value>location10</value>
<type>String</type>
</location>
<address>
<type>Array</type>
<address>
<element>
<value>Address</value>
<type>String</type>
</element>
</address>
</address>
<city>
<value>Noida-updated</value>
<type>String</type>
</city>
<zip-code>
<value>111111</value>
<type>String</type>
</zip-code>
<sales-rep>
<value>Sales Rep</value>
<type>String</type>
</sales-rep>
<sales-manager>
<value>Sales Manager</value>
<type>String</type>
</sales-manager>
<sales-manager-phone>
<value>Phone</value>
<type>String</type>
</sales-manager-phone>
<service-contact>
<value>Technician</value>
<type>String</type>
</service-contact>
<service-phone>
<value>Phone</value>
<type>String</type>
</service-phone>
<after-hours-phone>
<value>Phone</value>
<type>String</type>
</after-hours-phone>
<open-time>
<value>08:00:00</value>
<type>Time</type>
</open-time>
<close-time>
<value>09:00:00</value>
<type>Time</type>
</close-time>
<sales-rep-phone>
<value>Phone</value>
<type>String</type>
</sales-rep-phone>
<country>
<value>Country</value>
<type>String</type>
</country>
<email>
<value>Email</value>
<type>String</type>
</email>
<vendor-i-d>
<value>ID</value>
<type>String</type>
</vendor-i-d>
<contract-number>
<value>Contact No</value>
<type>String</type>
</contract-number>
<contract-phone>
<value>Phone</value>
<type>String</type>
</contract-phone>
<order-person>
<value>Order Contact</value>
<type>String</type>
</order-person>
<order-phone>
<value>Phone</value>
<type>String</type>
</order-phone>
<contract-person>
<value>Contact Person</value>
<type>String</type>
</contract-person>
<URL>
<value>URL</value>
<type>String</type>
</URL>
<is-vendor>
<value>true</value>
<type>Boolean</type>
</is-vendor>
<is-manufacturer>
<value>false</value>
<type>Boolean</type>
</is-manufacturer>
<u-r-l>
<value>u r l</value>
<type>String</type>
</u-r-l>
</instance>
</model>
</delete-vendor-request>
</parameters>
</request>
</hp-service-manager-request>
The following figure displays an adapter response for the Delete Vendor operation.
Sample adapter response for the Delete Vendor operation
<hp-service-manager-response>
<metadata>
<count>1</count>
</metadata>
<responses>
<response>
<metadata>
<count>1</count>
</metadata>
<item>
<metadata>
<status>success</status>
</metadata>
<parameters>
<model>
<keys>
<vendor-name>
<value>MyVendorName10</value>
<type>String</type>
</vendor-name>
<location>
<value>location10</value>
<type>String</type>
</location>
</keys>
<instance>
<vendor-name>
<value>MyVendorName10</value>
<type>String</type>
</vendor-name>
<location>
<value>location10</value>
<type>String</type>
</location>
<address>
<type>Array</type>
<address>
<element>
<value>Address</value>
<type>String</type>
</element>
</address>
</address>
<city>
<value>Noida-updated</value>
<type>String</type>
</city>
<zip-code>
<value>111111</value>
<type>String</type>
</zip-code>
<sales-rep>
<value>Sales Rep</value>
<type>String</type>
</sales-rep>
<sales-manager>
<value>Sales Manager</value>
<type>String</type>
</sales-manager>
<sales-manager-phone>
<value>Phone</value>
<type>String</type>
</sales-manager-phone>
<service-contact>
<value>Technician</value>
<type>String</type>
</service-contact>
<service-phone>
<value>Phone</value>
<type>String</type>
</service-phone>
<after-hours-phone>
<value>Phone</value>
<type>String</type>
</after-hours-phone>
<open-time>
<value>08:00:00.000Z</value>
<type>Time</type>
</open-time>
<close-time>
<value>09:00:00.000Z</value>
<type>Time</type>
</close-time>
<sales-rep-phone>
<value>Phone</value>
<type>String</type>
</sales-rep-phone>
<country>
<value>Country</value>
<type>String</type>
</country>
<email>
<value>Email</value>
<type>String</type>
</email>
<vendor-i-d>
<value>ID</value>
<type>String</type>
</vendor-i-d>
<contract-number>
<value>Contact No</value>
<type>String</type>
</contract-number>
<contract-phone>
<value>Phone</value>
<type>String</type>
</contract-phone>
<order-person>
<value>Order Contact</value>
<type>String</type>
</order-person>
<order-phone>
<value>Phone</value>
<type>String</type>
</order-phone>
<contract-person>
<value>Contact Person</value>
<type>String</type>
</contract-person>
<URL>
<value>u r l</value>
<type>String</type>
</URL>
<is-vendor>
<value>true</value>
<type>Boolean</type>
</is-vendor>
<is-manufacturer>
<value>false</value>
<type>Boolean</type>
</is-manufacturer>
<uniquequery>vendor="MyVendorName10" and location="location10"</uniquequery>
<recordid>MyVendorName10 - location10</recordid>
<u-r-l>
<value>u r l</value>
<type>String</type>
</u-r-l>
</instance>
</model>
<messages>
<element>
<value>Vendor record deleted.</value>
</element>
</messages>
<status>SUCCESS</status>
<message>Success</message>
<schema-revision-date>2010.01.20 00:00:00</schema-revision-date>
<schema-revision-level>0</schema-revision-level>
<return-code>0</return-code>
</parameters>
</item>
</response>
</responses>
</hp-service-manager-response>
Comments
Log in or register to comment.