POST api/Service/AddService

Request Information

URI Parameters

None.

Body Parameters

ServiceDTO
NameDescriptionTypeAdditional information
id

integer

None.

title

string

None.

imageName

string

None.

imageBase64

string

None.

imageUrl

string

None.

iconName

string

None.

iconBase64

string

None.

iconUrl

string

None.

pagePath

string

None.

description

string

None.

titleDescription

string

None.

iconDescription

string

None.

showService

boolean

None.

min

integer

None.

max

integer

None.

ServicePrice

ServicePriceDTO

None.

ListServicePrice

Collection of ServicePriceDTO

None.

Request Formats

application/json, text/json

Sample:
{
  "id": 1,
  "title": "sample string 2",
  "imageName": "sample string 3",
  "imageBase64": "sample string 4",
  "imageUrl": "sample string 5",
  "iconName": "sample string 6",
  "iconBase64": "sample string 7",
  "iconUrl": "sample string 8",
  "pagePath": "sample string 9",
  "description": "sample string 10",
  "titleDescription": "sample string 11",
  "iconDescription": "sample string 12",
  "showService": true,
  "min": 14,
  "max": 15,
  "ServicePrice": {
    "id": 1,
    "servicesId": 2,
    "price": "sample string 3",
    "isActive": true,
    "serviceTax": "sample string 5",
    "serviceTaxAmount": "sample string 6"
  },
  "ListServicePrice": [
    {
      "id": 1,
      "servicesId": 2,
      "price": "sample string 3",
      "isActive": true,
      "serviceTax": "sample string 5",
      "serviceTaxAmount": "sample string 6"
    },
    {
      "id": 1,
      "servicesId": 2,
      "price": "sample string 3",
      "isActive": true,
      "serviceTax": "sample string 5",
      "serviceTaxAmount": "sample string 6"
    }
  ]
}

application/xml, text/xml

Sample:
<ServiceDTO xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Application.DTOs">
  <ListServicePrice>
    <ServicePriceDTO>
      <id>1</id>
      <isActive>true</isActive>
      <price>sample string 3</price>
      <serviceTax>sample string 5</serviceTax>
      <serviceTaxAmount>sample string 6</serviceTaxAmount>
      <servicesId>2</servicesId>
    </ServicePriceDTO>
    <ServicePriceDTO>
      <id>1</id>
      <isActive>true</isActive>
      <price>sample string 3</price>
      <serviceTax>sample string 5</serviceTax>
      <serviceTaxAmount>sample string 6</serviceTaxAmount>
      <servicesId>2</servicesId>
    </ServicePriceDTO>
  </ListServicePrice>
  <ServicePrice>
    <id>1</id>
    <isActive>true</isActive>
    <price>sample string 3</price>
    <serviceTax>sample string 5</serviceTax>
    <serviceTaxAmount>sample string 6</serviceTaxAmount>
    <servicesId>2</servicesId>
  </ServicePrice>
  <description>sample string 10</description>
  <iconBase64>sample string 7</iconBase64>
  <iconDescription>sample string 12</iconDescription>
  <iconName>sample string 6</iconName>
  <iconUrl>sample string 8</iconUrl>
  <id>1</id>
  <imageBase64>sample string 4</imageBase64>
  <imageName>sample string 3</imageName>
  <imageUrl>sample string 5</imageUrl>
  <max>15</max>
  <min>14</min>
  <pagePath>sample string 9</pagePath>
  <showService>true</showService>
  <title>sample string 2</title>
  <titleDescription>sample string 11</titleDescription>
</ServiceDTO>

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 'ServiceDTO'.

Response Information

Resource Description

boolean

Response Formats

application/json, text/json

Sample:
true

application/xml, text/xml

Sample:
<boolean xmlns="http://schemas.microsoft.com/2003/10/Serialization/">true</boolean>