using System.Collections.Generic;
using System.Text.Json.Serialization;
public static async void Main()
var idSerasa = "6050f0ea8b8a5f474c8c92ca";
var secretSerasa = "9c29c8c474f5a8b8ae0f0506";
var hostUrl = "https://uat-api.serasaexperian.com.br";
var basicToken = Convert.ToBase64String(Encoding.UTF8.GetBytes(idSerasa + ":" + secretSerasa));
var client = new HttpClient();
client.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Basic", basicToken);
var content = new StringContent(string.Empty, Encoding.UTF8, "application/json");
var response = await client.PostAsync(hostUrl + "/security/iam/v1/client-identities/login", content);
Console.WriteLine("Hello World");
public class NegativeNotesResponse
[JsonPropertyName("occurrenceDate")]
public DateTimeOffset OccurrenceDate { get; set; }
[JsonPropertyName("legalNatureId")]
public string LegalNatureId { get; set; }
[JsonPropertyName("legalNature")]
public string LegalNature { get; set; }
[JsonPropertyName("contractId")]
public string ContractId { get; set; }
[JsonPropertyName("creditorName")]
public string CreditorName { get; set; }
[JsonPropertyName("amount")]
public double Amount { get; set; }
[JsonPropertyName("principal")]
public bool Principal { get; set; }
public class RelatorioIntermediarioPessoaFisica
public class RegistrationDto
[JsonPropertyName("documentNumber")]
public string DocumentNumber { get; set; }
[JsonPropertyName("consumerName")]
public string ConsumerName { get; set; }
[JsonPropertyName("motherName")]
public string MotherName { get; set; }
[JsonPropertyName("birthDate")]
public DateTimeOffset BirthDate { get; set; }
[JsonPropertyName("statusRegistration")]
public string StatusRegistration { get; set; }
[JsonPropertyName("statusDate")]
public DateTimeOffset StatusDate { get; set; }
public class NegativeDataDto
public class PefinResponseDto : NegativeNotesResponse
[JsonPropertyName("federalUnit")]
public string FederalUnit { get; set; }
[JsonPropertyName("pefinResponse")]
public List<PefinResponseDto> PefinResponse { get; set; }
[JsonPropertyName("summary")]
public SummaryDto Summary { get; set; }
public class RefinResponseDto : NegativeNotesResponse
[JsonPropertyName("federalUnit")]
public string FederalUnit { get; set; }
[JsonPropertyName("refinResponse")]
public List<RefinResponseDto> RefinResponse { get; set; }
[JsonPropertyName("summary")]
public SummaryDto Summary { get; set; }
public class NotaryResponseDto
[JsonPropertyName("occurrenceDate")]
public DateTimeOffset OccurrenceDate { get; set; }
[JsonPropertyName("amount")]
public long Amount { get; set; }
[JsonPropertyName("officeNumber")]
public string OfficeNumber { get; set; }
[JsonPropertyName("city")]
public string City { get; set; }
[JsonPropertyName("federalUnit")]
public string FederalUnit { get; set; }
[JsonPropertyName("notaryResponse")]
public List<NotaryResponseDto> NotaryResponse { get; set; }
[JsonPropertyName("summary")]
public SummaryDto Summary { get; set; }
public class CheckResponseDto
[JsonPropertyName("occurrenceDate")]
public DateTimeOffset OccurrenceDate { get; set; }
[JsonPropertyName("alinea")]
public long Alinea { get; set; }
[JsonPropertyName("bankId")]
public long BankId { get; set; }
[JsonPropertyName("bankName")]
public string BankName { get; set; }
[JsonPropertyName("bankAgencyId")]
public long BankAgencyId { get; set; }
[JsonPropertyName("checkNumber")]
public string CheckNumber { get; set; }
[JsonPropertyName("checkCount")]
public long CheckCount { get; set; }
[JsonPropertyName("city")]
public string City { get; set; }
[JsonPropertyName("federalUnit")]
public string FederalUnit { get; set; }
[JsonPropertyName("checkResponse")]
public List<CheckResponseDto> CheckResponse { get; set; }
[JsonPropertyName("summary")]
public SummaryDto Summary { get; set; }
public class CollectionRecordsDto
public class CollectionRecordsResponseDto : NegativeNotesResponse
[JsonPropertyName("federalUnit")]
public string FederalUnit { get; set; }
[JsonPropertyName("city")]
public string City { get; set; }
[JsonPropertyName("collectionRecordsResponse")]
public List<CollectionRecordsResponseDto> CollectionRecordsResponse { get; set; }
[JsonPropertyName("summary")]
public SummaryDto Summary { get; set; }
[JsonPropertyName("pefin")]
public PefinDto Pefin { get; set; }
[JsonPropertyName("refin")]
public RefinDto Refin { get; set; }
[JsonPropertyName("notary")]
public NotaryDto Notary { get; set; }
[JsonPropertyName("check")]
public CheckDto Check { get; set; }
[JsonPropertyName("collectionRecords")]
public CollectionRecordsDto CollectionRecords { get; set; }
public class StolenDocumentsDto
public class StolenDocumentsResponseDto : NegativeNotesResponse
[JsonPropertyName("stolenDocumentsResponse")]
public List<StolenDocumentsResponseDto> StolenDocumentsResponse { get; set; }
[JsonPropertyName("summary")]
public SummaryDto Summary { get; set; }
public class JudgementFilingsDto
public class JudgementFilingsResponseDto : NegativeNotesResponse
[JsonPropertyName("distributor")]
public string Distributor { get; set; }
[JsonPropertyName("civilCourt")]
public string CivilCourt { get; set; }
[JsonPropertyName("city")]
public string City { get; set; }
[JsonPropertyName("state")]
public string State { get; set; }
[JsonPropertyName("judgementFilingsResponse")]
public List<JudgementFilingsResponseDto> JudgementFilingsResponse { get; set; }
[JsonPropertyName("summary")]
public SummaryDto Summary { get; set; }
public class BankruptsDto
public class BankruptsResponseDto
[JsonPropertyName("occurrenceDate")]
public DateTimeOffset OccurrenceDate { get; set; }
[JsonPropertyName("companyDocumentId")]
public string CompanyDocumentId { get; set; }
[JsonPropertyName("companyName")]
public string CompanyName { get; set; }
[JsonPropertyName("companyLegalNatureID")]
public string CompanyLegalNatureId { get; set; }
[JsonPropertyName("companyLegalNature")]
public string CompanyLegalNature { get; set; }
[JsonPropertyName("bankruptsResponse")]
public List<BankruptsResponseDto> BankruptsResponse { get; set; }
[JsonPropertyName("summary")]
public SummaryDto Summary { get; set; }
[JsonPropertyName("stolenDocuments")]
public StolenDocumentsDto StolenDocuments { get; set; }
[JsonPropertyName("judgementFilings")]
public JudgementFilingsDto JudgementFilings { get; set; }
[JsonPropertyName("bankrupts")]
public BankruptsDto Bankrupts { get; set; }
[JsonPropertyName("firstOcurrence")]
public DateTimeOffset? FirstOcurrence { get; set; }
[JsonPropertyName("lastOcurrence")]
public DateTimeOffset? LastOcurrence { get; set; }
[JsonPropertyName("count")]
public long Count { get; set; }
[JsonPropertyName("balance")]
public double Balance { get; set; }
[JsonPropertyName("reportName")]
public string ReportName { get; set; }
[JsonPropertyName("registration")]
public RegistrationDto Registration { get; set; }
[JsonPropertyName("negativeData")]
public NegativeDataDto NegativeData { get; set; }
[JsonPropertyName("facts")]
public FactsDto Facts { get; set; }
[JsonPropertyName("negativeSummary")]
public SummaryDto Summary { get; set; }
[JsonPropertyName("reports")]
public List<Report> Reports { get; set; }