POST api/Admin/UpsertCustomer

Request Information

URI Parameters

None.

Body Parameters

CustomersDto
NameDescriptionTypeAdditional information
CustomerId

integer

None.

OrgId

integer

None.

Name

string

None.

LandlineNo

string

None.

MobileNo

string

None.

Fax

string

None.

Email

string

None.

Website

string

None.

LabId

Collection of integer

None.

Address1

string

None.

Address2

string

None.

City

string

None.

State

string

None.

CountryId

integer

None.

Country

CountryDto

None.

CountryName

string

None.

Zip

string

None.

ContactPersonName

string

None.

ContactNumber

string

None.

ContactEmail

string

None.

CreatedBy

integer

None.

CreatedDate

date

None.

UpdatedBy

integer

None.

UpdatedDate

date

None.

StatusTypeId

byte

None.

CustomerContact

CustomerContactPersonDto

None.

CustomerAddress

CustomerAddressDto

None.

ReportTemplateTypeId

integer

None.

GraphTemplateTypeId

integer

None.

PoNumber

string

None.

PoStartDate

date

None.

PoEndDate

date

None.

lstCustomerChars

Collection of CharacteristicsDto

None.

lstCharIds

Collection of integer

None.

CustomerLogoDetails

FileDetailsDto

None.

HasCustomerLogo

boolean

None.

IsAlongWithPetrolabsLogo

boolean

None.

Request Formats

application/json, text/json

Sample:
{
  "CustomerId": 1,
  "OrgId": 1,
  "Name": "sample string 2",
  "LandlineNo": "sample string 3",
  "MobileNo": "sample string 4",
  "Fax": "sample string 5",
  "Email": "sample string 6",
  "Website": "sample string 7",
  "LabId": [
    1,
    2
  ],
  "Address1": "sample string 8",
  "Address2": "sample string 9",
  "City": "sample string 10",
  "State": "sample string 11",
  "CountryId": 12,
  "Country": {
    "CountryId": 1,
    "Name": "sample string 2"
  },
  "CountryName": "sample string 13",
  "Zip": "sample string 14",
  "ContactPersonName": "sample string 15",
  "ContactNumber": "sample string 16",
  "ContactEmail": "sample string 17",
  "CreatedBy": 18,
  "CreatedDate": "2026-07-29T08:48:42.0577166-06:00",
  "UpdatedBy": 1,
  "UpdatedDate": "2026-07-29T08:48:42.0587142-06:00",
  "StatusTypeId": 64,
  "CustomerContact": {
    "CustomerId": 1,
    "Name": "sample string 2",
    "CreatedBy": 3,
    "CreatedDate": "2026-07-29T08:48:42.0587142-06:00",
    "UpdatedBy": 1,
    "UpdatedDate": "2026-07-29T08:48:42.0597116-06:00"
  },
  "CustomerAddress": {
    "CustomerId": 1,
    "Address1": "sample string 2",
    "Address2": "sample string 3",
    "City": "sample string 4",
    "State": "sample string 5",
    "CountryId": 6,
    "Zip": "sample string 7"
  },
  "ReportTemplateTypeId": 21,
  "GraphTemplateTypeId": 22,
  "PoNumber": "sample string 23",
  "PoStartDate": "2026-07-29T08:48:42.0607087-06:00",
  "PoEndDate": "2026-07-29T08:48:42.0607087-06:00",
  "lstCustomerChars": [
    {
      "CharacteristicId": 1,
      "Name": "sample string 2",
      "Description": "sample string 3",
      "UnitId": 1,
      "TestMethodId": 1,
      "CreatedBy": 4,
      "CreatedDate": "2026-07-29T08:48:42.0607087-06:00",
      "UpdateBy": 1,
      "UpdatedDate": "2026-07-29T08:48:42.0607087-06:00",
      "StatusTypeId": 64,
      "OrgId": 7,
      "RoleId": 8,
      "UserTypeId": 64,
      "UnitName": "sample string 10",
      "TestMethodName": "sample string 11",
      "IsChecked": true,
      "HasAnalysisGraph": true,
      "CharacteristicOrderId": 1,
      "AnalysisElementTypeId": 14,
      "ShowInOilGrades": true,
      "ShowInGeneralSamples": true,
      "ShowInFerrographySamples": true,
      "ShowInTataSamples": true,
      "IsLabelOnly": true,
      "ShowInTransformerSamples": true,
      "ParentCharId": 1,
      "SpIdChar": {
        "SpidChariId": 1,
        "Spid": 2,
        "CharacteristicId": 3,
        "CreatedBy": 4,
        "CreatedDate": "2026-07-29T08:48:42.0607087-06:00"
      },
      "CustomerChar": {
        "CustomerCharId": 1,
        "CustomerId": 2,
        "CharacteristicId": 3,
        "CreatedBy": 4,
        "CreatedDate": "2026-07-29T08:48:42.0607087-06:00"
      },
      "JobCardChar": {
        "JobCardCharId": 1,
        "JobCardId": 2,
        "CharacteristicId": 3,
        "CreatedBy": 4,
        "CreatedDate": "2026-07-29T08:48:42.0607087-06:00"
      },
      "LubricantChar": {
        "LubricantCharId": 1,
        "LubricantTypeId": 2,
        "CharacteristicId": 3,
        "IsChecked": true,
        "CreatedBy": 5,
        "CreatedDate": "2026-07-29T08:48:42.0607087-06:00",
        "UpdatedBy": 1,
        "UpdatedDate": "2026-07-29T08:48:42.0607087-06:00"
      },
      "AliasName": "sample string 15",
      "SubCharcteristics": [],
      "Collapsed": true,
      "IsIntermediate": true
    },
    {
      "CharacteristicId": 1,
      "Name": "sample string 2",
      "Description": "sample string 3",
      "UnitId": 1,
      "TestMethodId": 1,
      "CreatedBy": 4,
      "CreatedDate": "2026-07-29T08:48:42.0607087-06:00",
      "UpdateBy": 1,
      "UpdatedDate": "2026-07-29T08:48:42.0607087-06:00",
      "StatusTypeId": 64,
      "OrgId": 7,
      "RoleId": 8,
      "UserTypeId": 64,
      "UnitName": "sample string 10",
      "TestMethodName": "sample string 11",
      "IsChecked": true,
      "HasAnalysisGraph": true,
      "CharacteristicOrderId": 1,
      "AnalysisElementTypeId": 14,
      "ShowInOilGrades": true,
      "ShowInGeneralSamples": true,
      "ShowInFerrographySamples": true,
      "ShowInTataSamples": true,
      "IsLabelOnly": true,
      "ShowInTransformerSamples": true,
      "ParentCharId": 1,
      "SpIdChar": {
        "SpidChariId": 1,
        "Spid": 2,
        "CharacteristicId": 3,
        "CreatedBy": 4,
        "CreatedDate": "2026-07-29T08:48:42.0607087-06:00"
      },
      "CustomerChar": {
        "CustomerCharId": 1,
        "CustomerId": 2,
        "CharacteristicId": 3,
        "CreatedBy": 4,
        "CreatedDate": "2026-07-29T08:48:42.0607087-06:00"
      },
      "JobCardChar": {
        "JobCardCharId": 1,
        "JobCardId": 2,
        "CharacteristicId": 3,
        "CreatedBy": 4,
        "CreatedDate": "2026-07-29T08:48:42.0607087-06:00"
      },
      "LubricantChar": {
        "LubricantCharId": 1,
        "LubricantTypeId": 2,
        "CharacteristicId": 3,
        "IsChecked": true,
        "CreatedBy": 5,
        "CreatedDate": "2026-07-29T08:48:42.0607087-06:00",
        "UpdatedBy": 1,
        "UpdatedDate": "2026-07-29T08:48:42.0607087-06:00"
      },
      "AliasName": "sample string 15",
      "SubCharcteristics": [],
      "Collapsed": true,
      "IsIntermediate": true
    }
  ],
  "lstCharIds": [
    1,
    2
  ],
  "CustomerLogoDetails": {
    "ImgBinary": "sample string 1",
    "FileName": "sample string 2",
    "FileExtension": "sample string 3",
    "ImgData": "QEA=",
    "FilePath": "sample string 4",
    "Count": 5
  },
  "HasCustomerLogo": true,
  "IsAlongWithPetrolabsLogo": true
}

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.