POST api/SubCategories/AddSubCategory

Request Information

URI Parameters

None.

Body Parameters

Collection of StoneFactoryAPI.Models.SubCategoriesModel+AddSubCategory
NameDescriptionTypeAdditional information
categoryId

integer

None.

subCategoryName

string

None.

addedBy

string

None.

createdDate

string

None.

userId

integer

None.

thumbnail

string

None.

thumbnailSrc

boolean

None.

Request Formats

application/json, text/json

Sample:
[
  {
    "categoryId": 1,
    "subCategoryName": "sample string 2",
    "addedBy": "sample string 3",
    "createdDate": "sample string 4",
    "userId": 5,
    "thumbnail": "sample string 6",
    "thumbnailSrc": true
  },
  {
    "categoryId": 1,
    "subCategoryName": "sample string 2",
    "addedBy": "sample string 3",
    "createdDate": "sample string 4",
    "userId": 5,
    "thumbnail": "sample string 6",
    "thumbnailSrc": true
  }
]

application/xml, text/xml

Sample:
<ArrayOfSubCategoriesModel.AddSubCategory xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/StoneFactoryAPI.Models">
  <SubCategoriesModel.AddSubCategory>
    <addedBy>sample string 3</addedBy>
    <categoryId>1</categoryId>
    <createdDate>sample string 4</createdDate>
    <subCategoryName>sample string 2</subCategoryName>
    <thumbnail>sample string 6</thumbnail>
    <thumbnailSrc>true</thumbnailSrc>
    <userId>5</userId>
  </SubCategoriesModel.AddSubCategory>
  <SubCategoriesModel.AddSubCategory>
    <addedBy>sample string 3</addedBy>
    <categoryId>1</categoryId>
    <createdDate>sample string 4</createdDate>
    <subCategoryName>sample string 2</subCategoryName>
    <thumbnail>sample string 6</thumbnail>
    <thumbnailSrc>true</thumbnailSrc>
    <userId>5</userId>
  </SubCategoriesModel.AddSubCategory>
</ArrayOfSubCategoriesModel.AddSubCategory>

multipart/form-data

Sample:
<ArrayOfSubCategoriesModel.AddSubCategory xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/StoneFactoryAPI.Models"><SubCategoriesModel.AddSubCategory><addedBy>sample string 3</addedBy><categoryId>1</categoryId><createdDate>sample string 4</createdDate><subCategoryName>sample string 2</subCategoryName><thumbnail>sample string 6</thumbnail><thumbnailSrc>true</thumbnailSrc><userId>5</userId></SubCategoriesModel.AddSubCategory><SubCategoriesModel.AddSubCategory><addedBy>sample string 3</addedBy><categoryId>1</categoryId><createdDate>sample string 4</createdDate><subCategoryName>sample string 2</subCategoryName><thumbnail>sample string 6</thumbnail><thumbnailSrc>true</thumbnailSrc><userId>5</userId></SubCategoriesModel.AddSubCategory></ArrayOfSubCategoriesModel.AddSubCategory>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'List`1'.

Response Information

Resource Description

System.Net.Http.HttpResponseMessage
NameDescriptionTypeAdditional information
Version

System.Version

None.

Content

System.Net.Http.HttpContent

None.

StatusCode

System.Net.HttpStatusCode

None.

ReasonPhrase

string

None.

Headers

Collection of Object

None.

RequestMessage

System.Net.Http.HttpRequestMessage

None.

IsSuccessStatusCode

boolean

None.