POST api/Project/SaveOrUpdateProject

API method to save or update the project details

Request Information

URI Parameters

None.

Body Parameters

Project object which contains the details to save or update Project

Project
NameDescriptionTypeAdditional information
ProjectId

ProjectId, primary key for the Project table

integer

None.

ProjectCode

Code of the project

string

None.

ProjectName

Name of the project

string

None.

IsProjectUsed

Flag that indicates whether a project is used for any invoice or not

boolean

None.

ContractorId

ContractorId for which the project is mapped with

integer

None.

ContractorName

Contractor Name for whom the project is mapped with

string

None.

CourseId

CourseId, for which the project might be created for

integer

None.

CourseName

Course Name, for which the project might be created for

string

None.

CreatedBy

By whom the project is created

integer

None.

CreatedByUserName

string

None.

IsActive

Status of the project whether it is active or not

boolean

None.

LstProjectSetRate

List of the tasks that are mapped to the project with set rates

Collection of ProjectSetRate

None.

LstProjectDocument

Contains the list of documents mapped for the project

Collection of ProjectDocument

None.

Request Formats

application/json, text/json

Sample:
{
  "projectId": 1,
  "projectCode": "sample string 2",
  "projectName": "sample string 3",
  "isProjectUsed": true,
  "contractorId": 5,
  "contractorName": "sample string 6",
  "courseId": 1,
  "courseName": "sample string 7",
  "createdBy": 8,
  "createdByUserName": "sample string 9",
  "isActive": true,
  "lstProjectSetRate": [
    {
      "projectSetRateId": 1,
      "projectId": 2,
      "ratePerUnit": 3.0,
      "taskId": 4,
      "isSelected": true,
      "objTask": {
        "taskId": 1,
        "name": "sample string 2",
        "code": "sample string 3",
        "units": "sample string 4",
        "isActive": true,
        "rate": 6.0
      }
    },
    {
      "projectSetRateId": 1,
      "projectId": 2,
      "ratePerUnit": 3.0,
      "taskId": 4,
      "isSelected": true,
      "objTask": {
        "taskId": 1,
        "name": "sample string 2",
        "code": "sample string 3",
        "units": "sample string 4",
        "isActive": true,
        "rate": 6.0
      }
    }
  ],
  "lstProjectDocument": [
    {
      "projectDocumentId": 1,
      "projectId": 2,
      "documentName": "sample string 3",
      "blobDocumentPath": "sample string 4"
    },
    {
      "projectDocumentId": 1,
      "projectId": 2,
      "documentName": "sample string 3",
      "blobDocumentPath": "sample string 4"
    }
  ]
}

text/html

Sample:
{"projectId":1,"projectCode":"sample string 2","projectName":"sample string 3","isProjectUsed":true,"contractorId":5,"contractorName":"sample string 6","courseId":1,"courseName":"sample string 7","createdBy":8,"createdByUserName":"sample string 9","isActive":true,"lstProjectSetRate":[{"projectSetRateId":1,"projectId":2,"ratePerUnit":3.0,"taskId":4,"isSelected":true,"objTask":{"taskId":1,"name":"sample string 2","code":"sample string 3","units":"sample string 4","isActive":true,"rate":6.0}},{"projectSetRateId":1,"projectId":2,"ratePerUnit":3.0,"taskId":4,"isSelected":true,"objTask":{"taskId":1,"name":"sample string 2","code":"sample string 3","units":"sample string 4","isActive":true,"rate":6.0}}],"lstProjectDocument":[{"projectDocumentId":1,"projectId":2,"documentName":"sample string 3","blobDocumentPath":"sample string 4"},{"projectDocumentId":1,"projectId":2,"documentName":"sample string 3","blobDocumentPath":"sample string 4"}]}

application/xml, text/xml

Sample:
<Project xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CapApi.Models">
  <ContractorId>5</ContractorId>
  <ContractorName>sample string 6</ContractorName>
  <CourseId>1</CourseId>
  <CourseName>sample string 7</CourseName>
  <CreatedBy>8</CreatedBy>
  <CreatedByUserName>sample string 9</CreatedByUserName>
  <IsActive>true</IsActive>
  <IsProjectUsed>true</IsProjectUsed>
  <LstProjectDocument>
    <ProjectDocument>
      <BlobDocumentPath>sample string 4</BlobDocumentPath>
      <DocumentName>sample string 3</DocumentName>
      <ProjectDocumentId>1</ProjectDocumentId>
      <ProjectId>2</ProjectId>
    </ProjectDocument>
    <ProjectDocument>
      <BlobDocumentPath>sample string 4</BlobDocumentPath>
      <DocumentName>sample string 3</DocumentName>
      <ProjectDocumentId>1</ProjectDocumentId>
      <ProjectId>2</ProjectId>
    </ProjectDocument>
  </LstProjectDocument>
  <LstProjectSetRate>
    <ProjectSetRate>
      <IsSelected>true</IsSelected>
      <ObjTask>
        <Code>sample string 3</Code>
        <IsActive>true</IsActive>
        <Name>sample string 2</Name>
        <Rate>6</Rate>
        <TaskId>1</TaskId>
        <Units>sample string 4</Units>
      </ObjTask>
      <ProjectId>2</ProjectId>
      <ProjectSetRateId>1</ProjectSetRateId>
      <RatePerUnit>3</RatePerUnit>
      <TaskId>4</TaskId>
    </ProjectSetRate>
    <ProjectSetRate>
      <IsSelected>true</IsSelected>
      <ObjTask>
        <Code>sample string 3</Code>
        <IsActive>true</IsActive>
        <Name>sample string 2</Name>
        <Rate>6</Rate>
        <TaskId>1</TaskId>
        <Units>sample string 4</Units>
      </ObjTask>
      <ProjectId>2</ProjectId>
      <ProjectSetRateId>1</ProjectSetRateId>
      <RatePerUnit>3</RatePerUnit>
      <TaskId>4</TaskId>
    </ProjectSetRate>
  </LstProjectSetRate>
  <ProjectCode>sample string 2</ProjectCode>
  <ProjectId>1</ProjectId>
  <ProjectName>sample string 3</ProjectName>
</Project>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

HttpResponseMessage
NameDescriptionTypeAdditional information
Version

Version

None.

Content

HttpContent

None.

StatusCode

HttpStatusCode

None.

ReasonPhrase

string

None.

Headers

Collection of Object

None.

RequestMessage

HttpRequestMessage

None.

IsSuccessStatusCode

boolean

None.