PATCH api/order/quote/{QuoteID}
The purpose of this method is to allow updating and submission of a quote. The settings within a quote that can be updated using this method are:
- Quote Name
- Default Site ID
- Contact ID
- The submit status
When submitting a quote the following needs to be true:
- The quote must have a service assigned.
- The quote must be in creation.
- The quote must not be expired.
- The quote must contain all fields with validation properties.
- The quote must have a contact.
Notes:
- The contact must belong to the company, however, they can belong to another site within that company.
- The default site must be part of the company site list.
- For Resellers, if the company is not passed in, set to the reseller`s company id.
- The quote will only be submitted if SubmitOrder is true
Error Messages
- 500/InternalServerError - Error retrieving order with ID x
- 404/Not Found - No Quote Found with ID x - No quote exists with specified ID.
- 403/Forbidden - Only Quotes may be updated - The ID is linked to an order and not a quote.
- 404/Not Found - Site with ID x not found - No site matches to the specified ID.
- 403/Forbidden - Site with id x must be a member of the same company as the order - The Site ID specified is not on the same company as the order.
- 404/Not Found - OrdercontactID Contact Not found with ID x - The contact ID was not found with the specified ID.
- 403/Forbidden - Contact with id x must be member of the same company as the order - The ID of the contact specified is not related to the ID of the company specified.
- 403/Forbidden - ContactID must be populated for quote to be submitted - A contact ID has to be specified before a quote is submitted.
Request Information
URI Parameters
Name | Description | Type | Additional information |
---|---|---|---|
QuoteID | Quote to be updated | integer |
Required |
Body Parameters
Update object
QuoteUpdateName | Description | Type | Additional information |
---|---|---|---|
QuoteName | Name or description of the quote | string |
String length: inclusive between 0 and 100 |
DefaultSiteID | Identity number of site that is associated with the quote | integer |
None. |
ContactID | Contract reference associated with the quote | integer |
None. |
SubmitOrder | Select whether to submit the order | boolean |
None. |
Request Formats
application/json, text/json
Sample:
{ "QuoteName": "sample string 1", "DefaultSiteID": 2, "ContactID": 3, "SubmitOrder": true }
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
exception or http 202
None.