PUT v1/Customers/{id}?updateIfNull={updateIfNull}

Update Customer

Request Information

URI Parameters

NameDescriptionTypeAdditional information
id

Customer Id

integer

Required

updateIfNull

Update customer info only if the database fields are either null or empty

boolean

Default value is False

Body Parameters

Updated customer info

CustomerInboundDTO
NameDescriptionTypeAdditional information
FirstName

Customer first name

string

String length: inclusive between 0 and 30

Id

Customer Id

integer

None.

LastName

Customer last name

string

String length: inclusive between 0 and 30

CommercialName

Customer commercial name

string

String length: inclusive between 0 and 500

Type

Customer type (Personal / Commercial)

CustomerTypeEnum

Required

LegalStatus

Customer legal status

LegalStatusEnum

None.

RiskAddress

Customer risk address

EntityAddressDTO

None.

MailingAddress

Customer mailing address

EntityAddressDTO

None.

MobilePhone

Customer mobile phone

string

String length: inclusive between 0 and 25

HomePhone

Customer home phone

string

String length: inclusive between 0 and 25

WorkPhone

Customer work phone

string

String length: inclusive between 0 and 25

SecondaryMobilePhone

Customer work phone

string

String length: inclusive between 0 and 25

FaxNumber

Customer Fax number

string

String length: inclusive between 0 and 25

Email

Customer e-mail

string

String length: inclusive between 0 and 60

Expand

Comma separated list of expansions to include in results

string

None.

Request Formats

application/json, text/json

Sample:
{
  "FirstName": "sample string 1",
  "Id": 2,
  "LastName": "sample string 3",
  "CommercialName": "sample string 4",
  "Type": "Unknown",
  "LegalStatus": "Unknown",
  "RiskAddress": {
    "Type": "Unknown",
    "Address1": "sample string 1",
    "Address2": "sample string 2",
    "City": "sample string 3",
    "State": "sample string 4",
    "County": "sample string 5",
    "Country": "sample string 6",
    "Zipcode1": "sample string 7",
    "Zipcode2": "sample string 8",
    "Id": 9
  },
  "MailingAddress": {
    "Type": "Unknown",
    "Address1": "sample string 1",
    "Address2": "sample string 2",
    "City": "sample string 3",
    "State": "sample string 4",
    "County": "sample string 5",
    "Country": "sample string 6",
    "Zipcode1": "sample string 7",
    "Zipcode2": "sample string 8",
    "Id": 9
  },
  "MobilePhone": "sample string 5",
  "HomePhone": "sample string 6",
  "WorkPhone": "sample string 7",
  "SecondaryMobilePhone": "sample string 8",
  "FaxNumber": "sample string 9",
  "Email": "sample string 10",
  "Expand": ""
}

application/xml, text/xml

Sample:
<CustomerInboundDTO xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/GCApi.Models.Inbound">
  <Expand></Expand>
  <Expansions xmlns:d2p1="http://schemas.datacontract.org/2004/07/GCApi.Enums" />
  <Id>2</Id>
  <CommercialName>sample string 4</CommercialName>
  <Email>sample string 10</Email>
  <FaxNumber>sample string 9</FaxNumber>
  <FirstName>sample string 1</FirstName>
  <HomePhone>sample string 6</HomePhone>
  <LastName>sample string 3</LastName>
  <LegalStatus>Unknown</LegalStatus>
  <MailingAddress xmlns:d2p1="http://schemas.datacontract.org/2004/07/GCApi.Models">
    <d2p1:Expand></d2p1:Expand>
    <d2p1:Expansions xmlns:d3p1="http://schemas.datacontract.org/2004/07/GCApi.Enums" />
    <d2p1:Id>9</d2p1:Id>
    <d2p1:Address1>sample string 1</d2p1:Address1>
    <d2p1:Address2>sample string 2</d2p1:Address2>
    <d2p1:City>sample string 3</d2p1:City>
    <d2p1:Country>sample string 6</d2p1:Country>
    <d2p1:County>sample string 5</d2p1:County>
    <d2p1:State>sample string 4</d2p1:State>
    <d2p1:Zipcode1>sample string 7</d2p1:Zipcode1>
    <d2p1:Zipcode2>sample string 8</d2p1:Zipcode2>
    <d2p1:Type>Unknown</d2p1:Type>
  </MailingAddress>
  <MobilePhone>sample string 5</MobilePhone>
  <RiskAddress xmlns:d2p1="http://schemas.datacontract.org/2004/07/GCApi.Models">
    <d2p1:Expand></d2p1:Expand>
    <d2p1:Expansions xmlns:d3p1="http://schemas.datacontract.org/2004/07/GCApi.Enums" />
    <d2p1:Id>9</d2p1:Id>
    <d2p1:Address1>sample string 1</d2p1:Address1>
    <d2p1:Address2>sample string 2</d2p1:Address2>
    <d2p1:City>sample string 3</d2p1:City>
    <d2p1:Country>sample string 6</d2p1:Country>
    <d2p1:County>sample string 5</d2p1:County>
    <d2p1:State>sample string 4</d2p1:State>
    <d2p1:Zipcode1>sample string 7</d2p1:Zipcode1>
    <d2p1:Zipcode2>sample string 8</d2p1:Zipcode2>
    <d2p1:Type>Unknown</d2p1:Type>
  </RiskAddress>
  <SecondaryMobilePhone>sample string 8</SecondaryMobilePhone>
  <Type>Unknown</Type>
  <WorkPhone>sample string 7</WorkPhone>
</CustomerInboundDTO>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

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

IHttpActionResult

None.

Response Formats

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

Sample:

Sample not available.