PUT api/crm/company/put

Puts a single organization for insert or update.

Request Information

URI Parameters

None.

Body Parameters

A valid JSON or XML

Company
NameDescriptionTypeAdditional information
CustomerCode

An unique customer code for this organization. This is to identify your organization in our database.

string

Max length: 50

Must be unique

Required

Name

The name of the organization.

string

Max length: 100

Required

Email

The global email address of the organization.

string

Max length: 50

Info

Optional information about the organization.

string

None.

Vat

The VAT number.

string

Max length: 30

VatTransfer

Indicates if VAT can be transfered for this organization according to EU regulations. Enter 0 for no, 1 for yes

integer

None.

Website

The website of your organization.

string

Max length: 100

Fax

The faxnumber of your organization.

string

Max length: 50

Phone

The global phone number of your organization.

string

Max length: 50

Status

The status of your organization.

ContactStates

Enumeration type
Possible values : closed, active

None.

Type

The type of your organization. See type for more details.

CompanyTypes

Enumeration type
Possible values : other, prospect, partner, supplier, customer

None.

Contacts

The collection of contacts for this relation.
See Contact for more info

Collection of Contact

None.

Addresses

The collection of addresses for this relation.
See CompanyAddress for more info

Collection of CompanyAddress

None.

CustomFields

Dictionary of string [key] and Object [value]

Only applicable for custom development fields. Please contact support@expodoc.com for additional information.

Request Formats

application/json, text/json

Sample:
{
  "CustomerCode": "12345",
  "Name": "Venue Ltd.",
  "Email": "info@venue.com",
  "Info": "Specalist in venues.",
  "Vat": "BE123.456.789",
  "VatTransfer": 0,
  "Website": "http://www.venue.com",
  "Fax": "",
  "Phone": "555.123.456",
  "Status": "active",
  "Type": "prospect",
  "Contacts": [
    {
      "Reference": "C01248",
      "Gender": "female",
      "FirstName": "Gertrude",
      "LastName": "Marczyk",
      "Title": "Ceo",
      "PrimaryMail": "Edna@venues.com",
      "SecondaryMail": "",
      "Phone": "555.123.457",
      "Mobile": "",
      "LanguageCode": "EN",
      "Type": "invoice"
    },
    {
      "Reference": "C01248",
      "Gender": "female",
      "FirstName": "Ida",
      "LastName": "Kleisle",
      "Title": "Ceo",
      "PrimaryMail": "Ida@venues.com",
      "SecondaryMail": "",
      "Phone": "555.123.457",
      "Mobile": "",
      "LanguageCode": "EN",
      "Type": "contact"
    }
  ],
  "Addresses": [
    {
      "AddressType": "office",
      "AddressLineOne": "Road to venue 12",
      "AddressLineTwo": "",
      "PostalCode": "1234",
      "City": "Sarma",
      "CountryCode": "GB",
      "State": ""
    },
    {
      "AddressType": "invoice",
      "AddressLineOne": "Road to venue 12",
      "AddressLineTwo": "",
      "PostalCode": "1234",
      "City": "Sarma",
      "CountryCode": "GB",
      "State": ""
    }
  ],
  "CustomFields": {
    "companycode": "12321"
  }
}

application/xml, text/xml

Sample:
<Company xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Expodoc.Api.Classes.Contracts.Crm">
  <Addresses>
    <CompanyAddress>
      <AddressLineOne>Road to venue 12</AddressLineOne>
      <AddressLineTwo></AddressLineTwo>
      <AddressType>office</AddressType>
      <City>Sarma</City>
      <CountryCode>GB</CountryCode>
      <PostalCode>1234</PostalCode>
      <State></State>
    </CompanyAddress>
    <CompanyAddress>
      <AddressLineOne>Road to venue 12</AddressLineOne>
      <AddressLineTwo></AddressLineTwo>
      <AddressType>invoice</AddressType>
      <City>Sarma</City>
      <CountryCode>GB</CountryCode>
      <PostalCode>1234</PostalCode>
      <State></State>
    </CompanyAddress>
  </Addresses>
  <Contacts>
    <Contact>
      <FirstName>Gertrude</FirstName>
      <Gender>female</Gender>
      <LanguageCode>EN</LanguageCode>
      <LastName>Marczyk</LastName>
      <Mobile></Mobile>
      <Phone>555.123.457</Phone>
      <PrimaryMail>Edna@venues.com</PrimaryMail>
      <Reference>C01248</Reference>
      <SecondaryMail></SecondaryMail>
      <Title>Ceo</Title>
      <Type>invoice</Type>
    </Contact>
    <Contact>
      <FirstName>Ida</FirstName>
      <Gender>female</Gender>
      <LanguageCode>EN</LanguageCode>
      <LastName>Kleisle</LastName>
      <Mobile></Mobile>
      <Phone>555.123.457</Phone>
      <PrimaryMail>Ida@venues.com</PrimaryMail>
      <Reference>C01248</Reference>
      <SecondaryMail></SecondaryMail>
      <Title>Ceo</Title>
      <Type>contact</Type>
    </Contact>
  </Contacts>
  <CustomFields xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:KeyValueOfstringanyType>
      <d2p1:Key>companycode</d2p1:Key>
      <d2p1:Value xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:string">12321</d2p1:Value>
    </d2p1:KeyValueOfstringanyType>
  </CustomFields>
  <CustomerCode>12345</CustomerCode>
  <Email>info@venue.com</Email>
  <Fax></Fax>
  <Info>Specalist in venues.</Info>
  <Name>Venue Ltd.</Name>
  <Phone>555.123.456</Phone>
  <Status>active</Status>
  <Type>prospect</Type>
  <Vat>BE123.456.789</Vat>
  <VatTransfer>0</VatTransfer>
  <Website>http://www.venue.com</Website>
</Company>