POST api/Common/Company/CreateMultiple

Request Information

URI Parameters

None.

Body Parameters

Collection of CompanyCreateViewModel
NameDescriptionTypeAdditional information
Id

integer

None.

CompanyName

string

Required

Email

string

Matching regular expression pattern: ^[a-zA-Z0-9_\.-]+@([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$

Status

string

None.

PhoneNum

string

None.

CompanyAddress

Collection of CompanyAddressCreateViewModel

None.

PipelineStageId

integer

None.

AdminSiteId

integer

None.

Type

Collection of CompanyType

None.

AgentDetailsViewModel

Collection of AgentDetailsViewModel

None.

Request Formats

application/json, text/json

Sample:
[
  {
    "Id": 1,
    "CompanyName": "sample string 2",
    "Email": "sample string 3",
    "Status": "sample string 4",
    "PhoneNum": "sample string 5",
    "CompanyAddress": [
      {
        "Id": 1,
        "Address1": "sample string 2",
        "Address2": "sample string 3",
        "CityId": 1,
        "City": "sample string 4",
        "StateId": 1,
        "State": "sample string 5",
        "ZipCode": "sample string 6",
        "CountryId": 1,
        "Country": "sample string 7"
      },
      {
        "Id": 1,
        "Address1": "sample string 2",
        "Address2": "sample string 3",
        "CityId": 1,
        "City": "sample string 4",
        "StateId": 1,
        "State": "sample string 5",
        "ZipCode": "sample string 6",
        "CountryId": 1,
        "Country": "sample string 7"
      }
    ],
    "PipelineStageId": 1,
    "AdminSiteId": 1,
    "Type": [
      {
        "TypeId": 1,
        "Type": "sample string 2"
      },
      {
        "TypeId": 1,
        "Type": "sample string 2"
      }
    ],
    "AgentDetailsViewModel": [
      {
        "AgentId": 1,
        "CompanyId": 2,
        "CompanyName": "sample string 3"
      },
      {
        "AgentId": 1,
        "CompanyId": 2,
        "CompanyName": "sample string 3"
      }
    ]
  },
  {
    "Id": 1,
    "CompanyName": "sample string 2",
    "Email": "sample string 3",
    "Status": "sample string 4",
    "PhoneNum": "sample string 5",
    "CompanyAddress": [
      {
        "Id": 1,
        "Address1": "sample string 2",
        "Address2": "sample string 3",
        "CityId": 1,
        "City": "sample string 4",
        "StateId": 1,
        "State": "sample string 5",
        "ZipCode": "sample string 6",
        "CountryId": 1,
        "Country": "sample string 7"
      },
      {
        "Id": 1,
        "Address1": "sample string 2",
        "Address2": "sample string 3",
        "CityId": 1,
        "City": "sample string 4",
        "StateId": 1,
        "State": "sample string 5",
        "ZipCode": "sample string 6",
        "CountryId": 1,
        "Country": "sample string 7"
      }
    ],
    "PipelineStageId": 1,
    "AdminSiteId": 1,
    "Type": [
      {
        "TypeId": 1,
        "Type": "sample string 2"
      },
      {
        "TypeId": 1,
        "Type": "sample string 2"
      }
    ],
    "AgentDetailsViewModel": [
      {
        "AgentId": 1,
        "CompanyId": 2,
        "CompanyName": "sample string 3"
      },
      {
        "AgentId": 1,
        "CompanyId": 2,
        "CompanyName": "sample string 3"
      }
    ]
  }
]

application/xml, text/xml

Sample:
<ArrayOfCompanyCreateViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Cyzerg.Model.WMS.InputOutputModels">
  <CompanyCreateViewModel>
    <AdminSiteId>1</AdminSiteId>
    <AgentDetailsViewModel>
      <AgentDetailsViewModel>
        <AgentId>1</AgentId>
        <CompanyId>2</CompanyId>
        <CompanyName>sample string 3</CompanyName>
      </AgentDetailsViewModel>
      <AgentDetailsViewModel>
        <AgentId>1</AgentId>
        <CompanyId>2</CompanyId>
        <CompanyName>sample string 3</CompanyName>
      </AgentDetailsViewModel>
    </AgentDetailsViewModel>
    <CompanyAddress>
      <CompanyAddressCreateViewModel>
        <Address1>sample string 2</Address1>
        <Address2>sample string 3</Address2>
        <City>sample string 4</City>
        <CityId>1</CityId>
        <Country>sample string 7</Country>
        <CountryId>1</CountryId>
        <Id>1</Id>
        <State>sample string 5</State>
        <StateId>1</StateId>
        <ZipCode>sample string 6</ZipCode>
      </CompanyAddressCreateViewModel>
      <CompanyAddressCreateViewModel>
        <Address1>sample string 2</Address1>
        <Address2>sample string 3</Address2>
        <City>sample string 4</City>
        <CityId>1</CityId>
        <Country>sample string 7</Country>
        <CountryId>1</CountryId>
        <Id>1</Id>
        <State>sample string 5</State>
        <StateId>1</StateId>
        <ZipCode>sample string 6</ZipCode>
      </CompanyAddressCreateViewModel>
    </CompanyAddress>
    <CompanyName>sample string 2</CompanyName>
    <Email>sample string 3</Email>
    <Id>1</Id>
    <PhoneNum>sample string 5</PhoneNum>
    <PipelineStageId>1</PipelineStageId>
    <Status>sample string 4</Status>
    <Type>
      <CompanyType>
        <Type>sample string 2</Type>
        <TypeId>1</TypeId>
      </CompanyType>
      <CompanyType>
        <Type>sample string 2</Type>
        <TypeId>1</TypeId>
      </CompanyType>
    </Type>
  </CompanyCreateViewModel>
  <CompanyCreateViewModel>
    <AdminSiteId>1</AdminSiteId>
    <AgentDetailsViewModel>
      <AgentDetailsViewModel>
        <AgentId>1</AgentId>
        <CompanyId>2</CompanyId>
        <CompanyName>sample string 3</CompanyName>
      </AgentDetailsViewModel>
      <AgentDetailsViewModel>
        <AgentId>1</AgentId>
        <CompanyId>2</CompanyId>
        <CompanyName>sample string 3</CompanyName>
      </AgentDetailsViewModel>
    </AgentDetailsViewModel>
    <CompanyAddress>
      <CompanyAddressCreateViewModel>
        <Address1>sample string 2</Address1>
        <Address2>sample string 3</Address2>
        <City>sample string 4</City>
        <CityId>1</CityId>
        <Country>sample string 7</Country>
        <CountryId>1</CountryId>
        <Id>1</Id>
        <State>sample string 5</State>
        <StateId>1</StateId>
        <ZipCode>sample string 6</ZipCode>
      </CompanyAddressCreateViewModel>
      <CompanyAddressCreateViewModel>
        <Address1>sample string 2</Address1>
        <Address2>sample string 3</Address2>
        <City>sample string 4</City>
        <CityId>1</CityId>
        <Country>sample string 7</Country>
        <CountryId>1</CountryId>
        <Id>1</Id>
        <State>sample string 5</State>
        <StateId>1</StateId>
        <ZipCode>sample string 6</ZipCode>
      </CompanyAddressCreateViewModel>
    </CompanyAddress>
    <CompanyName>sample string 2</CompanyName>
    <Email>sample string 3</Email>
    <Id>1</Id>
    <PhoneNum>sample string 5</PhoneNum>
    <PipelineStageId>1</PipelineStageId>
    <Status>sample string 4</Status>
    <Type>
      <CompanyType>
        <Type>sample string 2</Type>
        <TypeId>1</TypeId>
      </CompanyType>
      <CompanyType>
        <Type>sample string 2</Type>
        <TypeId>1</TypeId>
      </CompanyType>
    </Type>
  </CompanyCreateViewModel>
</ArrayOfCompanyCreateViewModel>

application/x-www-form-urlencoded

Sample:

Sample not available.

text/html

Sample:
[{"Id":1,"CompanyName":"sample string 2","Email":"sample string 3","Status":"sample string 4","PhoneNum":"sample string 5","CompanyAddress":[{"Id":1,"Address1":"sample string 2","Address2":"sample string 3","CityId":1,"City":"sample string 4","StateId":1,"State":"sample string 5","ZipCode":"sample string 6","CountryId":1,"Country":"sample string 7"},{"Id":1,"Address1":"sample string 2","Address2":"sample string 3","CityId":1,"City":"sample string 4","StateId":1,"State":"sample string 5","ZipCode":"sample string 6","CountryId":1,"Country":"sample string 7"}],"PipelineStageId":1,"AdminSiteId":1,"Type":[{"TypeId":1,"Type":"sample string 2"},{"TypeId":1,"Type":"sample string 2"}],"AgentDetailsViewModel":[{"AgentId":1,"CompanyId":2,"CompanyName":"sample string 3"},{"AgentId":1,"CompanyId":2,"CompanyName":"sample string 3"}]},{"Id":1,"CompanyName":"sample string 2","Email":"sample string 3","Status":"sample string 4","PhoneNum":"sample string 5","CompanyAddress":[{"Id":1,"Address1":"sample string 2","Address2":"sample string 3","CityId":1,"City":"sample string 4","StateId":1,"State":"sample string 5","ZipCode":"sample string 6","CountryId":1,"Country":"sample string 7"},{"Id":1,"Address1":"sample string 2","Address2":"sample string 3","CityId":1,"City":"sample string 4","StateId":1,"State":"sample string 5","ZipCode":"sample string 6","CountryId":1,"Country":"sample string 7"}],"PipelineStageId":1,"AdminSiteId":1,"Type":[{"TypeId":1,"Type":"sample string 2"},{"TypeId":1,"Type":"sample string 2"}],"AgentDetailsViewModel":[{"AgentId":1,"CompanyId":2,"CompanyName":"sample string 3"},{"AgentId":1,"CompanyId":2,"CompanyName":"sample string 3"}]}]

Response Information

Resource Description

IHttpActionResult

None.

Response Formats

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

Sample:

Sample not available.