POST api/sparepart/insert

Request Information

URI Parameters

None.

Body Parameters

InsertSparepartRequestModel
NameDescriptionTypeAdditional information
SparepartID

integer

None.

BranchID

integer

None.

FinancialYearID

integer

None.

SparepartCode

string

None.

SparepartName

string

None.

Brand

string

None.

MachineID

integer

None.

UnitID

integer

None.

UnitPrice

decimal number

None.

OpeningStock

decimal number

None.

LowQuantity

integer

None.

Remarks

string

None.

IsTool

string

None.

UserID

integer

None.

HSNCodeID

integer

None.

ProductCategoryID

integer

None.

TrackLife

boolean

None.

LifeUnit

string

None.

LifeExpectancy

decimal number

None.

Request Formats

application/json, text/json

Sample:
{
  "SparepartID": 1,
  "BranchID": 2,
  "FinancialYearID": 3,
  "SparepartCode": "sample string 4",
  "SparepartName": "sample string 5",
  "Brand": "sample string 6",
  "MachineID": 7,
  "UnitID": 8,
  "UnitPrice": 9.0,
  "OpeningStock": 10.0,
  "LowQuantity": 11,
  "Remarks": "sample string 12",
  "IsTool": "sample string 13",
  "UserID": 14,
  "HSNCodeID": 15,
  "ProductCategoryID": 16,
  "TrackLife": true,
  "LifeUnit": "sample string 18",
  "LifeExpectancy": 1.0
}

application/xml, text/xml

Sample:
<InsertSparepartRequestModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CrushMateBackendAPI.Controllers">
  <BranchID>2</BranchID>
  <Brand>sample string 6</Brand>
  <FinancialYearID>3</FinancialYearID>
  <HSNCodeID>15</HSNCodeID>
  <IsTool>sample string 13</IsTool>
  <LifeExpectancy>1</LifeExpectancy>
  <LifeUnit>sample string 18</LifeUnit>
  <LowQuantity>11</LowQuantity>
  <MachineID>7</MachineID>
  <OpeningStock>10</OpeningStock>
  <ProductCategoryID>16</ProductCategoryID>
  <Remarks>sample string 12</Remarks>
  <SparepartCode>sample string 4</SparepartCode>
  <SparepartID>1</SparepartID>
  <SparepartName>sample string 5</SparepartName>
  <TrackLife>true</TrackLife>
  <UnitID>8</UnitID>
  <UnitPrice>9</UnitPrice>
  <UserID>14</UserID>
</InsertSparepartRequestModel>

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

Response Information

Resource Description

IHttpActionResult

None.

Response Formats

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

Sample:

Sample not available.