POST api/package
The purpose of this method is create a new package.
Error Messages
- 409/Conflict - Name must have value - The Name is empty. Please specify a name for the package
- 409/Conflict - Package already exists - The name for the package already exists. Please specify a new one.
Request Information
URI Parameters
None.
Body Parameters
Package| Name | Description | Type | Additional information |
|---|---|---|---|
| Name | The name of the new package | string |
None. |
| IsConsumer | Indicates whether the package is a consumer package | boolean |
None. |
Request Formats
application/json, text/json
Sample:
{
"Name": "sample string 1",
"IsConsumer": true
}
application/xml, text/xml
Sample:
<Package xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/aBILLity.API.Models.Config"> <IsConsumer>true</IsConsumer> <Name>sample string 1</Name> </Package>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
PackagePostResponse| Name | Description | Type | Additional information |
|---|---|---|---|
| Id | The ID of the new package | integer |
None. |
Response Formats
application/json, text/json
Sample:
{
"Id": 1
}
application/xml, text/xml
Sample:
<PackagePostResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/aBILLity.API.Models.Config"> <Id>1</Id> </PackagePostResponse>