APi Library

DRC’s solutions include a number of application programming interfaces (API) that are available right out of the box.

DRC's API Library includes restful services for:

  • Get Current User ID
  • Update User
  • List First 20 Customers
  • Get Customer Details
  • New Customer Save
  • Edit Customer
  • Get Customers Quotes
  • Get Agent Details
  • Create Agent
  • Update Agent
  • Deactivate Agent
  • Resources

GET V1/USERS/GETCURRENTUSERID

Get current user id

REQUEST INFORMATION

URI PARAMETERS

None

BODY PARAMETERS

None

RESPONSE INFORMATION

RESOURCE DESCRIPTION

userDto

Name Description Type Additional information
userID integer None.
userName string None.
password string None.
agentID integer None.

RESPONSE FORMATS

APPLICATION/JSON, TEXT/JSON

Sample:

{
"userID": 1,
"userName": "sample string 2",
"password": "sample string 3",
"agentID": 4
}

APPLICATION/XML, TEXT/XML

Sample:

<userDto xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/GCApi.Models">
<agentID>4</agentID>
<password>sample string 3</password>
<userID>1</userID>
<userName>sample string 2</userName>
</userDto>

POST V1/USERS/{ID}

Update User

REQUEST INFORMATION

URI PARAMETERS

Name Description Type Additional information
id integer Required

BODY PARAMETERS

userDto

Name Description Type Additional information
userID integer None.
userName string None.
password string None.
agentID integer None.

REQUEST FORMATS

APPLICATION/JSON, TEXT/JSON

Sample:

APPLICATION/XML, TEXT/XML

Sample:

{
"userID": 1,
"userName": "sample string 2",
"password": "sample string 3",
"agentID": 4
}

APPLICATION/XML, TEXT/XML

Sample:

<userDto xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/GCApi.Models">
<agentID>4</agentID>
<password>sample string 3</password>
<userID>1</userID>
<userName>sample string 2</userName>
</userDto>

APPLICATION/X-WWW-FORM-URLENCODED

Sample:

RESPONSE INFORMATION

RESOURCE DESCRIPTION

userDto

Name Description Type Additional information
userID integer None.
userName string None.
password string None.
agentID integer None.

RESPONSE FORMATS

APPLICATION/JSON, TEXT/JSON

Sample:

{
"userID": 1,
"userName": "sample string 2",
"password": "sample string 3",
"agentID": 4
}

APPLICATION/XML, TEXT/XML

Sample:

<userDto xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/GCApi.Models">
<agentID>4</agentID>
<password>sample string 3</password>
<userID>1</userID>
<userName>sample string 2</userName>
</userDto>

GET V1/CUSTOMERS

List first 20 customers sorted by Id in descending order

REQUEST INFORMATION

URI PARAMETERS

None.

BODY PARAMETERS

None.

RESPONSE INFORMATION

RESOURCE DESCRIPTION

List of customers

customerListDto

Name Description Type Additional information
totalCount integer None.
hasMore boolean None.
data Collection of customerDto None.

RESPONSE FORMATS

APPLICATION/JSON, TEXT/JSON

Sample:
{
  "totalCount": 1,
  "hasMore": true,
  "data": [
    {
      "FirstName": "sample string 1",
      "LastName": "sample string 2",
      "CommercialName": "sample string 3",
      "Type": "Unknown",
      "RiskAddress": {
        "Id": 1,
        "Address1": "sample string 2",
        "Address2": "sample string 3",
        "City": "sample string 4",
        "State": "sample string 5",
        "Zipcode1": "sample string 6",
        "Zipcode2": "sample string 7"
      },
      "MailingAddress": {
        "Id": 1,
        "Address1": "sample string 2",
        "Address2": "sample string 3",
        "City": "sample string 4",
        "State": "sample string 5",
        "Zipcode1": "sample string 6",
        "Zipcode2": "sample string 7"
      },
      "PrimaryMobilePhone": "sample string 4",
      "HomePhone": "sample string 5",
      "quotes": {
        "totalCount": 1,
        "hasMore": true,
        "data": [
          {
            "quoteNumber": "sample string 1",
            "id": 2,
            "objectType": "sample string 3"
          },
          {
            "quoteNumber": "sample string 1",
            "id": 2,
            "objectType": "sample string 3"
          }
        ]
      },
      "id": 6,
      "objectType": "sample string 7"
    },
    {
      "FirstName": "sample string 1",
      "LastName": "sample string 2",
      "CommercialName": "sample string 3",
      "Type": "Unknown",
      "RiskAddress": {
        "Id": 1,
        "Address1": "sample string 2",
        "Address2": "sample string 3",
        "City": "sample string 4",
        "State": "sample string 5",
        "Zipcode1": "sample string 6",
        "Zipcode2": "sample string 7"
      },
      "MailingAddress": {
        "Id": 1,
        "Address1": "sample string 2",
        "Address2": "sample string 3",
        "City": "sample string 4",
        "State": "sample string 5",
        "Zipcode1": "sample string 6",
        "Zipcode2": "sample string 7"
      },
      "PrimaryMobilePhone": "sample string 4",
      "HomePhone": "sample string 5",
      "quotes": {
        "totalCount": 1,
        "hasMore": true,
        "data": [
          {
            "quoteNumber": "sample string 1",
            "id": 2,
            "objectType": "sample string 3"
          },
          {
            "quoteNumber": "sample string 1",
            "id": 2,
            "objectType": "sample string 3"
          }
        ]
      },
      "id": 6,
      "objectType": "sample string 7"
    }
  ]
}

APPLICATION/XML, TEXT/XML

Sample:
<customerListDto xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/GCApi.Models">
  <data>
    <customerDto>
      <id>6</id>
      <objectType>sample string 7</objectType>
      <CommercialName>sample string 3</CommercialName>
      <FirstName>sample string 1</FirstName>
      <HomePhone>sample string 5</HomePhone>
      <LastName>sample string 2</LastName>
      <MailingAddress>
        <Address1>sample string 2</Address1>
        <Address2>sample string 3</Address2>
        <City>sample string 4</City>
        <Id>1</Id>
        <State>sample string 5</State>
        <Zipcode1>sample string 6</Zipcode1>
        <Zipcode2>sample string 7</Zipcode2>
      </MailingAddress>
      <PrimaryMobilePhone>sample string 4</PrimaryMobilePhone>
      <RiskAddress>
        <Address1>sample string 2</Address1>
        <Address2>sample string 3</Address2>
        <City>sample string 4</City>
        <Id>1</Id>
        <State>sample string 5</State>
        <Zipcode1>sample string 6</Zipcode1>
        <Zipcode2>sample string 7</Zipcode2>
      </RiskAddress>
      <Type>Unknown</Type>
      <quotes>
        <data>
          <quoteDto>
            <id>2</id>
            <objectType>sample string 3</objectType>
            <quoteNumber>sample string 1</quoteNumber>
          </quoteDto>
          <quoteDto>
            <id>2</id>
            <objectType>sample string 3</objectType>
            <quoteNumber>sample string 1</quoteNumber>
          </quoteDto>
        </data>
        <hasMore>true</hasMore>
        <totalCount>1</totalCount>
      </quotes>
    </customerDto>
    <customerDto>
      <id>6</id>
      <objectType>sample string 7</objectType>
      <CommercialName>sample string 3</CommercialName>
      <FirstName>sample string 1</FirstName>
      <HomePhone>sample string 5</HomePhone>
      <LastName>sample string 2</LastName>
      <MailingAddress>
        <Address1>sample string 2</Address1>
        <Address2>sample string 3</Address2>
        <City>sample string 4</City>
        <Id>1</Id>
        <State>sample string 5</State>
        <Zipcode1>sample string 6</Zipcode1>
        <Zipcode2>sample string 7</Zipcode2>
      </MailingAddress>
      <PrimaryMobilePhone>sample string 4</PrimaryMobilePhone>
      <RiskAddress>
        <Address1>sample string 2</Address1>
        <Address2>sample string 3</Address2>
        <City>sample string 4</City>
        <Id>1</Id>
        <State>sample string 5</State>
        <Zipcode1>sample string 6</Zipcode1>
        <Zipcode2>sample string 7</Zipcode2>
      </RiskAddress>
      <Type>Unknown</Type>
      <quotes>
        <data>
          <quoteDto>
            <id>2</id>
            <objectType>sample string 3</objectType>
            <quoteNumber>sample string 1</quoteNumber>
          </quoteDto>
          <quoteDto>
            <id>2</id>
            <objectType>sample string 3</objectType>
            <quoteNumber>sample string 1</quoteNumber>
          </quoteDto>
        </data>
        <hasMore>true</hasMore>
        <totalCount>1</totalCount>
      </quotes>
    </customerDto>
  </data>
  <hasMore>true</hasMore>
  <totalCount>1</totalCount>
</customerListDto>

GET V1/CUSTOMERS/{ID}

Get Customer details

REQUEST INFORMATION

URI PARAMETERS

Name Description Type Additional information
id id of customer to load integer Required

BODY PARAMETERS

None.

RESPONSE INFORMATION

RESOURCE DESCRIPTION

Customer details

customerDto

Name Description Type Additional information
FirstName string None.
LastName string None.
CommercialName string None.
Type customerTypeEnum None.
RiskAddress addressDto None.
MailingAddress addressDto None.
PrimaryMobilePhone string None.
HomePhone string None.
quotes quoteListDto None.
id integer None.
objectType string None.

RESPONSE FORMATS

APPLICATION/JSON, TEXT/JSON

Sample:
{
  "FirstName": "sample string 1",
  "LastName": "sample string 2",
  "CommercialName": "sample string 3",
  "Type": "Unknown",
  "RiskAddress": {
    "Id": 1,
    "Address1": "sample string 2",
    "Address2": "sample string 3",
    "City": "sample string 4",
    "State": "sample string 5",
    "Zipcode1": "sample string 6",
    "Zipcode2": "sample string 7"
  },
  "MailingAddress": {
    "Id": 1,
    "Address1": "sample string 2",
    "Address2": "sample string 3",
    "City": "sample string 4",
    "State": "sample string 5",
    "Zipcode1": "sample string 6",
    "Zipcode2": "sample string 7"
  },
  "PrimaryMobilePhone": "sample string 4",
  "HomePhone": "sample string 5",
  "quotes": {
    "totalCount": 1,
    "hasMore": true,
    "data": [
      {
        "quoteNumber": "sample string 1",
        "id": 2,
        "objectType": "sample string 3"
      },
      {
        "quoteNumber": "sample string 1",
        "id": 2,
        "objectType": "sample string 3"
      }
    ]
  },
  "id": 6,
  "objectType": "sample string 7"
}

APPLICATION/XML, TEXT/XML

Sample:
<customerDto xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/GCApi.Models">
  <id>6</id>
  <objectType>sample string 7</objectType>
  <CommercialName>sample string 3</CommercialName>
  <FirstName>sample string 1</FirstName>
  <HomePhone>sample string 5</HomePhone>
  <LastName>sample string 2</LastName>
  <MailingAddress>
    <Address1>sample string 2</Address1>
    <Address2>sample string 3</Address2>
    <City>sample string 4</City>
    <Id>1</Id>
    <State>sample string 5</State>
    <Zipcode1>sample string 6</Zipcode1>
    <Zipcode2>sample string 7</Zipcode2>
  </MailingAddress>
  <PrimaryMobilePhone>sample string 4</PrimaryMobilePhone>
  <RiskAddress>
    <Address1>sample string 2</Address1>
    <Address2>sample string 3</Address2>
    <City>sample string 4</City>
    <Id>1</Id>
    <State>sample string 5</State>
    <Zipcode1>sample string 6</Zipcode1>
    <Zipcode2>sample string 7</Zipcode2>
  </RiskAddress>
  <Type>Unknown</Type>
  <quotes>
    <data>
      <quoteDto>
        <id>2</id>
        <objectType>sample string 3</objectType>
        <quoteNumber>sample string 1</quoteNumber>
      </quoteDto>
      <quoteDto>
        <id>2</id>
        <objectType>sample string 3</objectType>
        <quoteNumber>sample string 1</quoteNumber>
      </quoteDto>
    </data>
    <hasMore>true</hasMore>
    <totalCount>1</totalCount>
  </quotes>
</customerDto>

POST V1/CUSTOMERS

Create Customer

REQUEST INFORMATION

URI PARAMETERS

None.

BODY PARAMETERS

customerDto

Name Description Type Additional information
FirstName string None.
LastName string None.
CommercialName string None.
Type customerTypeEnum None.
RiskAddress addressDto None.
MailingAddress addressDto None.
PrimaryMobilePhone string None.
HomePhone string None.
quotes quoteListDto None.
id integer None.
objectType string None.

REQUEST FORMATS

APPLICATION/JSON, TEXT/JSON

Sample:

<customerDto xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/GCApi.Models">
  <id>6</id>
  <objectType>sample string 7</objectType>
  <CommercialName>sample string 3</CommercialName>
  <FirstName>sample string 1</FirstName>
  <HomePhone>sample string 5</HomePhone>
  <LastName>sample string 2</LastName>
  <MailingAddress>
    <Address1>sample string 2</Address1>
    <Address2>sample string 3</Address2>
    <City>sample string 4</City>
    <Id>1</Id>
    <State>sample string 5</State>
    <Zipcode1>sample string 6</Zipcode1>
    <Zipcode2>sample string 7</Zipcode2>
  </MailingAddress>
  <PrimaryMobilePhone>sample string 4</PrimaryMobilePhone>
  <RiskAddress>
    <Address1>sample string 2</Address1>
    <Address2>sample string 3</Address2>
    <City>sample string 4</City>
    <Id>1</Id>
    <State>sample string 5</State>
    <Zipcode1>sample string 6</Zipcode1>
    <Zipcode2>sample string 7</Zipcode2>
  </RiskAddress>
  <Type>Unknown</Type>
  <quotes>
    <data>
      <quoteDto>
        <id>2</id>
        <objectType>sample string 3</objectType>
        <quoteNumber>sample string 1</quoteNumber>
      </quoteDto>
      <quoteDto>
        <id>2</id>
        <objectType>sample string 3</objectType>
        <quoteNumber>sample string 1</quoteNumber>
      </quoteDto>
    </data>
    <hasMore>true</hasMore>
    <totalCount>1</totalCount>
  </quotes>
</customerDto>

APPLICATION/XML, TEXT/XML

Sample:
<customerDto xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/GCApi.Models">
  <id>6</id>
  <objectType>sample string 7</objectType>
  <CommercialName>sample string 3</CommercialName>
  <FirstName>sample string 1</FirstName>
  <HomePhone>sample string 5</HomePhone>
  <LastName>sample string 2</LastName>
  <MailingAddress>
    <Address1>sample string 2</Address1>
    <Address2>sample string 3</Address2>
    <City>sample string 4</City>
    <Id>1</Id>
    <State>sample string 5</State>
    <Zipcode1>sample string 6</Zipcode1>
    <Zipcode2>sample string 7</Zipcode2>
  </MailingAddress>
  <PrimaryMobilePhone>sample string 4</PrimaryMobilePhone>
  <RiskAddress>
    <Address1>sample string 2</Address1>
    <Address2>sample string 3</Address2>
    <City>sample string 4</City>
    <Id>1</Id>
    <State>sample string 5</State>
    <Zipcode1>sample string 6</Zipcode1>
    <Zipcode2>sample string 7</Zipcode2>
  </RiskAddress>
  <Type>Unknown</Type>
  <quotes>
    <data>
      <quoteDto>
        <id>2</id>
        <objectType>sample string 3</objectType>
        <quoteNumber>sample string 1</quoteNumber>
      </quoteDto>
      <quoteDto>
        <id>2</id>
        <objectType>sample string 3</objectType>
        <quoteNumber>sample string 1</quoteNumber>
      </quoteDto>
    </data>
    <hasMore>true</hasMore>
    <totalCount>1</totalCount>
  </quotes>
</customerDto>

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 ‘customerDto’.

RESPONSE INFORMATION

RESOURCE DESCRIPTION

Id (integer) of newly created customer, with Http Status Code 201 when created, 404 if not found or 400/500 with error details

integer

RESPONSE FORMATS

application/json, text/json

Sample:

1

APPLICATION/XML, TEXT/XML

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

PUT V1/CUSTOMERS/{ID}

Update Customer

REQUEST INFORMATION

URI PARAMETERS

Name Description Type Additional information
id Id of customer to Update integer Required

BODY PARAMETERS

customerDto

Name Description Type Additional information
FirstName string None.
LastName string None.
CommercialName string None.
Type CustomerTypeEnum None.
RiskAddress addressDto None.
MailingAddress addressDto None.
PrimaryMobilePhone string None.
HomePhone string None.
quotes quoteListDto None.
id integer None.
objectType string None.

REQUEST FORMATS

APPLICATION/JSON, TEXT/JSON

Sample:
{
  "FirstName": "sample string 1",
  "LastName": "sample string 2",
  "CommercialName": "sample string 3",
  "Type": "Unknown",
  "RiskAddress": {
    "Id": 1,
    "Address1": "sample string 2",
    "Address2": "sample string 3",
    "City": "sample string 4",
    "State": "sample string 5",
    "Zipcode1": "sample string 6",
    "Zipcode2": "sample string 7"
  },
  "MailingAddress": {
    "Id": 1,
    "Address1": "sample string 2",
    "Address2": "sample string 3",
    "City": "sample string 4",
    "State": "sample string 5",
    "Zipcode1": "sample string 6",
    "Zipcode2": "sample string 7"
  },
  "PrimaryMobilePhone": "sample string 4",
  "HomePhone": "sample string 5",
  "quotes": {
    "totalCount": 1,
    "hasMore": true,
    "data": [
      {
        "quoteNumber": "sample string 1",
        "id": 2,
        "objectType": "sample string 3"
      },
      {
        "quoteNumber": "sample string 1",
        "id": 2,
        "objectType": "sample string 3"
      }
    ]
  },
  "id": 6,
  "objectType": "sample string 7"
}

APPLICATION/XML, TEXT/XML

Sample:
<customerDto xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/GCApi.Models">
  <id>6</id>
  <objectType>sample string 7</objectType>
  <CommercialName>sample string 3</CommercialName>
  <FirstName>sample string 1</FirstName>
  <HomePhone>sample string 5</HomePhone>
  <LastName>sample string 2</LastName>
  <MailingAddress>
    <Address1>sample string 2</Address1>
    <Address2>sample string 3</Address2>
    <City>sample string 4</City>
    <Id>1</Id>
    <State>sample string 5</State>
    <Zipcode1>sample string 6</Zipcode1>
    <Zipcode2>sample string 7</Zipcode2>
  </MailingAddress>
  <PrimaryMobilePhone>sample string 4</PrimaryMobilePhone>
  <RiskAddress>
    <Address1>sample string 2</Address1>
    <Address2>sample string 3</Address2>
    <City>sample string 4</City>
    <Id>1</Id>
    <State>sample string 5</State>
    <Zipcode1>sample string 6</Zipcode1>
    <Zipcode2>sample string 7</Zipcode2>
  </RiskAddress>
  <Type>Unknown</Type>
  <quotes>
    <data>
      <quoteDto>
        <id>2</id>
        <objectType>sample string 3</objectType>
        <quoteNumber>sample string 1</quoteNumber>
      </quoteDto>
      <quoteDto>
        <id>2</id>
        <objectType>sample string 3</objectType>
        <quoteNumber>sample string 1</quoteNumber>
      </quoteDto>
    </data>
    <hasMore>true</hasMore>
    <totalCount>1</totalCount>
  </quotes>
</customerDto>

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 ‘customerDto’.

RESPONSE INFORMATION

RESOURCE DESCRIPTION

Http Status Code 200 when success, 404 if not found or 500 with error details

HttpResponseMessage

Name Description Type Additional information
Version Version None.
Content HttpContent None.
StatusCode HttpStatusCode None.
ReasonPhrase string None.
Headers Collection of Object None.
RequestMessage HttpRequestMessage None.
IsSuccessStatusCode boolean None.

GET V1/CUSTOMERS/{CUSTOMERID}/QUOTES

REQUEST INFORMATION

URI PARAMETERS

Name Description Type Additional information
customerId integer Required

BODY PARAMETERS

None.

RESPONSE INFORMATION

RESOURCE DESCRIPTION

Collection of quoteDto

Name Description Type Additional information
quoteNumber string None.
id integer None.
objectType string None.

RESPONSE FORMATS

APPLICATION/JSON, TEXT/JSON

Sample:
[
  {
    "quoteNumber": "sample string 1",
    "id": 2,
    "objectType": "sample string 3"
  },
  {
    "quoteNumber": "sample string 1",
    "id": 2,
    "objectType": "sample string 3"
  }
]

APPLICATION/XML, TEXT/XML

Sample:
<ArrayOfquoteDto xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/GCApi.Models">
  <quoteDto>
    <id>2</id>
    <objectType>sample string 3</objectType>
    <quoteNumber>sample string 1</quoteNumber>
  </quoteDto>
  <quoteDto>
    <id>2</id>
    <objectType>sample string 3</objectType>
    <quoteNumber>sample string 1</quoteNumber>
  </quoteDto>
</ArrayOfquoteDto>

GET V1/AGENTS/{ID}

Request Information

URI PARAMETERS

Name Description Type Additional information
id integer Required

BODY PARAMETERS

None.

RESPONSE INFORMATION

RESOURCE DESCRIPTION

agentDto

Name Description Type Additional information
Id integer None.
FirstName string None.
LastName string None.
CommercialName string None.
UserName string None.
Email string None.
Role string None.
ParentAgentId integer None.
IsActive boolean None.
Commissions Collection of commissionDto None.
ParentAgent agentDto None.
RESPONSE FORMATS
APPLICATION/JSON, TEXT/JSON
Sample:
{
  "Id": 1,
  "FirstName": "sample string 2",
  "LastName": "sample string 3",
  "CommercialName": "sample string 4",
  "UserName": "sample string 5",
  "Email": "sample string 6",
  "Role": "sample string 7",
  "ParentAgentId": 1,
  "IsActive": true,
  "Commissions": [
    {
      "rate": 1.0,
      "lob": "sample string 1",
      "state": "sample string 2",
      "commissionOverride": "sample string 3",
      "id": 4,
      "objectType": "sample string 5"
    },
    {
      "rate": 1.0,
      "lob": "sample string 1",
      "state": "sample string 2",
      "commissionOverride": "sample string 3",
      "id": 4,
      "objectType": "sample string 5"
    }
  ]
}
APPLICATION/XML

Sample:

An exception has occurred while using the formatter ‘XmlMediaTypeFormatter’ to generate sample for media type ‘application/xml’. Exception message: Object graph for type ‘GCApi.Models.agentDto’ contains cycles and cannot be serialized if reference tracking is disabled.

TEXT/XML

Sample:

An exception has occurred while using the formatter ‘XmlMediaTypeFormatter’ to generate sample for media type ‘text/xml’. Exception message: Object graph for type ‘GCApi.Models.agentDto’ contains cycles and cannot be serialized if reference tracking is disabled

POST V1/AGENTS

Create Agent

REQUEST INFORMATION

URI PARAMETERS

None.

BODY PARAMETERS

agentDto

Name Description Type Additional information
Id integer None.
FirstName string None.
LastName string None.
CommercialName string None.
UserName string None.
Email string None.
Role string None.
ParentAgentId integer None.
IsActive boolean None.
Commissions Collection of commissionDto None.
ParentAgent agentDto None.

REQUEST FORMATS

APPLICATION/JSON, TEXT/JSON

Sample:

APPLICATION/XML, TEXT/XML

Sample:
{
  "Id": 1,
  "FirstName": "sample string 2",
  "LastName": "sample string 3",
  "CommercialName": "sample string 4",
  "UserName": "sample string 5",
  "Email": "sample string 6",
  "Role": "sample string 7",
  "ParentAgentId": 1,
  "IsActive": true,
  "Commissions": [
    {
      "rate": 1.0,
      "lob": "sample string 1",
      "state": "sample string 2",
      "commissionOverride": "sample string 3",
      "id": 4,
      "objectType": "sample string 5"
    },
    {
      "rate": 1.0,
      "lob": "sample string 1",
      "state": "sample string 2",
      "commissionOverride": "sample string 3",
      "id": 4,
      "objectType": "sample string 5"
    }
  ]
}

APPLICATION/XML

Sample:

An exception has occurred while using the formatter ‘XmlMediaTypeFormatter’ to generate sample for media type ‘application/xml’. Exception message: Object graph for type ‘GCApi.Models.agentDto’ contains cycles and cannot be serialized if reference tracking is disabled.

TEXT/XML

Sample:

An exception has occurred while using the formatter ‘XmlMediaTypeFormatter’ to generate sample for media type ‘text/xml’. Exception message: Object graph for type ‘GCApi.Models.agentDto’ contains cycles and cannot be serialized if reference tracking is disabled.

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 ‘agentDto’.

RESPONSE INFORMATION

RESOURCE DESCRIPTION

INTEGER

RESPONSE FORMATS

APPLICATION/JSON, TEXT/JSON

Sample:

1

APPLICATION/XML, TEXT/XML

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

PUT V1/AGENTS/{ID}

Update Agent

REQUEST INFORMATION

URI PARAMETERS

Name Description Type Additional information
id integer Required

BODY PARAMETERS

agentDto

Name Description Type Additional information
Id integer None.
FirstName string None.
LastName string None.
CommercialName string None.
UserName string None.
Email string None.
Role string None.
ParentAgentId integer None.
IsActive boolean None.
Commissions Collection of commissionDto None.
ParentAgent agentDto None.

REQUEST FORMATS

APPLICATION/JSON, TEXT/JSON

Sample:
{
  "Id": 1,
  "FirstName": "sample string 2",
  "LastName": "sample string 3",
  "CommercialName": "sample string 4",
  "UserName": "sample string 5",
  "Email": "sample string 6",
  "Role": "sample string 7",
  "ParentAgentId": 1,
  "IsActive": true,
  "Commissions": [
    {
      "rate": 1.0,
      "lob": "sample string 1",
      "state": "sample string 2",
      "commissionOverride": "sample string 3",
      "id": 4,
      "objectType": "sample string 5"
    },
    {
      "rate": 1.0,
      "lob": "sample string 1",
      "state": "sample string 2",
      "commissionOverride": "sample string 3",
      "id": 4,
      "objectType": "sample string 5"
    }
  ]
}

APPLICATION/XML

Sample:

An exception has occurred while using the formatter ‘XmlMediaTypeFormatter’ to generate sample for media type ‘application/xml’. Exception message: Object graph for type ‘GCApi.Models.agentDto’ contains cycles and cannot be serialized if reference tracking is disabled.

TEXT/XML

Sample:

An exception has occurred while using the formatter ‘XmlMediaTypeFormatter’ to generate sample for media type ‘text/xml’. Exception message: Object graph for type ‘GCApi.Models.agentDto’ contains cycles and cannot be serialized if reference tracking is disabled.

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 ‘agentDto’.

RESPONSE INFORMATION

RESOURCE DESCRIPTION

None.

POST V1/AGENTS/DEACTIVATE?ID={ID}

Deactivate agent

REQUEST INFORMATION

URI PARAMETERS

Name Description Type Additional information
id integer Required

BODY PARAMETERS

None.

RESPONSE INFORMATION

RESOURCE DESCRIPTION

HttpResponseMessage

Name Description Type Additional information
Version Version None.
Content HttpContent None.
StatusCode HttpStatusCode None.
ReasonPhrase string None.
Headers Collection of Object None.
RequestMessage HttpRequestMessage None.
IsSuccessStatusCode boolean None.

Resources

userDto

Name Description Type Additional information
userID integer None.
userName string None.
password string None.
agentID integer None.

customerListDto

Name Description Type Additional information
totalCount integer None.
hasMore boolean None.
data Collection of customerDto

CustomerTypeEnum

Possible enumeration values:

Name Value Description
Personal 412
Commercial 413
Unknown 0

addressDto

Name Description Type Additional information
Id integer None.
Address1 string None.
Address2 string None.
City string None.
State string None.
Zipcode1 string None.
Zipcode2 string None.

quoteListDto

Name Description Type Additional information
totalCount integer None.
hasMore boolean None.
data Collection of quoteDto None.

HttpResponseMessage

Name Description Type Additional information
Version Version None.
Content HttpContent None.
StatusCode HttpStatusCode None.
ReasonPhrase string None.
Headers Collection of Object None.
RequestMessage HttpRequestMessage None.
IsSuccessStatusCode boolean None.

Version

Name Description Type Additional information
Major integer None.
Minor integer None.
Build integer None.
Revision integer None.
MajorRevision integer None.
MinorRevision integer None.

HttpContent

Name Description Type Additional information
Headers Collection of Object None.

HttpStatusCode

Possible enumeration values:

Name Value Description
Continue 100
SwitchingProtocols 101
OK 200
Created 201
Accepted 202
NonAuthoritativeInformation 203
NoContent 204
ResetContent 205
PartialContent 206
MultipleChoices 300
Ambiguous 300
MovedPermanently 301
Moved 301
Found 302
Redirect 302
SeeOther 303
RedirectMethod 303
NotModified 304
UseProxy 305
Unused 306
TemporaryRedirect 307
RedirectKeepVerb 307
BadRequest 400
Unauthorized 401
PaymentRequired 402
Forbidden 403
NotFound 404
MethodNotAllowed 405
NotAcceptable 406
ProxyAuthenticationRequired 407
RequestTimeout 408
Conflict 409
Gone 410
LengthRequired 411
PreconditionFailed 412
RequestEntityTooLarge 413
RequestUriTooLong 414
UnsupportedMediaType 415
RequestedRangeNotSatisfiable 416
ExpectationFailed 417
UpgradeRequired 426
InternalServerError 500
NotImplemented 501
BadGateway 502
ServiceUnavailable 503
GatewayTimeout 504
HttpVersionNotSupported 505

HttpRequestMessage

Name Description Type Additional information
Version Version None.
Content HttpContent None.
Method HttpMethod None.
RequestUri URI None.
Headers Collection of Object None.
Properties Dictionary of string [key] and Object [value] None.

HttpMethod

Name Description Type Additional information
Method string None.

commissionDto

Name Description Type Additional information
rate decimal number None.
lob string None.
state string None.
commissionOverride string None.
id integer None.
objectType string None.

agentDto

Name Description Type Additional information
Id integer None.
FirstName string None.
LastName string None.
CommercialName string None.
UserName string None.
Email string None.
Role string None.
ParentAgentId integer None.
IsActive boolean None.
Commissions Collection of commissionDto None.
ParentAgent agentDto None.

Conventions