POST api/order/quote/{QuoteID}/Service
This API method creates a service Inventory for a company and, if succesful, returns an ID.
There are a few things to make note of
- QuoteId - Must exist and be provided
- InventoryId - Must exist and be provided
- SiteId - Must be part of company and be provided
- SiteId and Quote Site must match
- Quote must not be expired
- Quote must have status In Creation
- The serviceinventoryId must be active on the respective customer's catalogue
Error Messages
- 500/Internal Server Error - ID Error retrieving quote with id x
- 403/Forbidden - Error retrieving quote with id - Specified ID is not assigned to an existing quote.
- 404/NotFound - Site with id x not found - Specified ID for the site does not match any existing sites.
- 403/Forbidden - Site must be a member of the order`s company- The specified site ID does not belong to the company assigned to the order.
- 404/NotFound - Inventory with ID x not found - The specified ID is not assigned to an existing inventory.
Request Information
URI Parameters
Name | Description | Type | Additional information |
---|---|---|---|
QuoteID | Filter by QuoteID | integer |
Required |
Body Parameters
add service object
QuoteServiceCreateName | Description | Type | Additional information |
---|---|---|---|
InventoryId | Mandatory. Service type | integer |
None. |
SiteId | Mandatory. ID of the site to use where the new service will reside | integer |
None. |
Request Formats
application/json, text/json
Sample:
{ "InventoryId": 1, "SiteId": 2 }
application/xml, text/xml
Sample:
<QuoteServiceCreate xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/aBILLity.API.Models"> <InventoryId>1</InventoryId> <SiteId>2</SiteId> </QuoteServiceCreate>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
newly created serviceID
QuoteServiceCreateResponseName | Description | Type | Additional information |
---|---|---|---|
Id | integer |
None. |
Response Formats
application/json, text/json
Sample:
{ "Id": 1 }
application/xml, text/xml
Sample:
<QuoteServiceCreateResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/aBILLity.API.Models"> <Id>1</Id> </QuoteServiceCreateResponse>