POST api/Service/Add

Request Information

URI Parameters

None.

Body Parameters

ServiceModel
NameDescriptionTypeAdditional information
name

string

None.

spanish_name

string

None.

code

string

None.

unit_id

integer

None.

unit

string

None.

kg_price

decimal number

None.

kg_value

integer

None.

color_code

string

None.

branch_id

integer

None.

image_path

Object

None.

show_on_app

boolean

None.

ServiceCloth

Collection of ServiceClothModel

None.

id

integer

None.

text

string

None.

is_active

boolean

None.

created_by

integer

None.

created_date

date

None.

updated_by

integer

None.

updated_date

date

None.

TotalRows

integer

None.

Request Formats

application/json, text/json

Sample:
{
  "name": "sample string 1",
  "spanish_name": "sample string 2",
  "code": "sample string 3",
  "unit_id": 4,
  "unit": "sample string 5",
  "kg_price": 6.0,
  "kg_value": 7,
  "color_code": "sample string 8",
  "branch_id": 9,
  "image_path": {},
  "show_on_app": true,
  "ServiceCloth": [
    {
      "id": 1,
      "cloth_id": 2,
      "cloth": "sample string 3",
      "service_id": 4,
      "service": 5,
      "price": 6.0,
      "unit_value": 7.0,
      "urgent_price": 8.0
    },
    {
      "id": 1,
      "cloth_id": 2,
      "cloth": "sample string 3",
      "service_id": 4,
      "service": 5,
      "price": 6.0,
      "unit_value": 7.0,
      "urgent_price": 8.0
    }
  ],
  "id": 12,
  "text": "sample string 13",
  "is_active": true,
  "created_by": 15,
  "created_date": "2025-12-18T16:07:47.7079177+05:00",
  "updated_by": 17,
  "updated_date": "2025-12-18T16:07:47.7079177+05:00",
  "TotalRows": 19
}

application/xml, text/xml

Sample:
<ServiceModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SpoonRocket.Models">
  <TotalRows>19</TotalRows>
  <created_by>15</created_by>
  <created_date>2025-12-18T16:07:47.7079177+05:00</created_date>
  <id>12</id>
  <is_active>true</is_active>
  <text>sample string 13</text>
  <updated_by>17</updated_by>
  <updated_date>2025-12-18T16:07:47.7079177+05:00</updated_date>
  <ServiceCloth>
    <ServiceClothModel>
      <cloth>sample string 3</cloth>
      <cloth_id>2</cloth_id>
      <id>1</id>
      <price>6</price>
      <service>5</service>
      <service_id>4</service_id>
      <unit_value>7</unit_value>
      <urgent_price>8</urgent_price>
    </ServiceClothModel>
    <ServiceClothModel>
      <cloth>sample string 3</cloth>
      <cloth_id>2</cloth_id>
      <id>1</id>
      <price>6</price>
      <service>5</service>
      <service_id>4</service_id>
      <unit_value>7</unit_value>
      <urgent_price>8</urgent_price>
    </ServiceClothModel>
  </ServiceCloth>
  <branch_id>9</branch_id>
  <code>sample string 3</code>
  <color_code>sample string 8</color_code>
  <image_path />
  <kg_price>6</kg_price>
  <kg_value>7</kg_value>
  <name>sample string 1</name>
  <show_on_app>true</show_on_app>
  <spanish_name>sample string 2</spanish_name>
  <unit>sample string 5</unit>
  <unit_id>4</unit_id>
</ServiceModel>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

IHttpActionResult

None.

Response Formats

application/json, text/json, application/xml, text/xml

Sample:

Sample not available.