POST api/order/Service/{OrderServiceID}/StockNumber
This API method creates a new range of CLIs that are reserved for an order.
Limited to 1000 numbers per range, but repeated POST requests of 1000 can be made so that more than 1000 can be added to a single service.
The area code must exist. If the area code exists but there are not enough numbers in the range, a 'null' range will be added.
Notes
- Numbers can not overlap and must be unique
- The order must be in the quote stage
- The service must have the requisite inventory property
- The OrderServiceID used must be an Endpoint compatible service
Error Messages that may be encountered
- OrderServices.OrderServiceID = Error retrieving the Order Service with ID X.
- OrderServices.OrderServiceID = OrderServiceID X not found - The specified Order Service ID does not exist.
- Order.Status = Only quotes may be updated - This ID is linked to an order and not a quote. Only quotes can be updated.
- Order.OrderServiceID = OrderServiceID X must contain a NumberSelection control - This order Service ID must have a number Selection Control assigned to it.
- StockNumber.Quantity = Quantity must be between 1 and X.
- StockNumber.AreaCode = AreaCode `X` is not valid./li>
- StockNumber.StartRange = Error getting number range.
- StockNumber.ID = Error saving numbers.
Request Information
URI Parameters
Name | Description | Type | Additional information |
---|---|---|---|
OrderServiceID | The Order Service ID | integer |
Required |
Body Parameters
StockNumberBase area code and quantity to be created
StockNumberBaseName | Description | Type | Additional information |
---|---|---|---|
AreaCode | Area code prefix | string |
Required String length: inclusive between 0 and 11 |
Quantity | Number of continious CLIs in sequence | integer |
Required |
Request Formats
application/json, text/json
Sample:
{ "AreaCode": "sample string 1", "Quantity": 2 }
application/xml, text/xml
Sample:
<StockNumberBase xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/aBILLity.API.Models"> <AreaCode>sample string 1</AreaCode> <Quantity>2</Quantity> </StockNumberBase>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
StockNumberView of new record
StockNumberViewName | Description | Type | Additional information |
---|---|---|---|
StockNumberID | The unique number of the selected CLI range | integer |
None. |
FirstNumber | First CLI in the sequence | string |
None. |
LastNumber | Last CLI in the sequence | string |
None. |
AreaCode | Area code prefix | string |
Required String length: inclusive between 0 and 11 |
Quantity | Number of continious CLIs in sequence | integer |
Required |
Response Formats
application/json, text/json
Sample:
{ "StockNumberID": 1, "FirstNumber": "sample string 2", "LastNumber": "sample string 3", "AreaCode": "sample string 4", "Quantity": 5 }
application/xml, text/xml
Sample:
<StockNumberView xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/aBILLity.API.Models"> <AreaCode>sample string 4</AreaCode> <Quantity>5</Quantity> <FirstNumber>sample string 2</FirstNumber> <LastNumber>sample string 3</LastNumber> <StockNumberID>1</StockNumberID> </StockNumberView>