---
title: "Criar uma nova transação"
method: POST
path: "/v1/transaction"
tags: ["Transactions"]
---

# Criar uma nova transação

`POST /v1/transaction`

## Request

- Base URL: `https://datatrustapihml.clearsale.com.br`
- URL: `https://datatrustapihml.clearsale.com.br/v1/transaction`
- Auth: HTTP bearer

Este método é utilizado para criar uma transação na API da Plataforma Data Trust.

## Request body

- CreateTransactionCommand
  - `documentType` string, required: Tipo do documento do cliente (CPF ou CNPJ)
  - `document` string, required: Documento do cliente (Sem pontuação)
  - `name` string, nullable: Nome completo do cliente (Sem abreviaturas)
  - `birthdate` string, nullable: Data de nascimento do cliente [YYYY-MM-DD]
  - `mothersName` string, nullable: Nome completo da mãe (Sem abreviaturas)
  - `email` string, nullable: Email do cliente
  - `verifiedEmail` boolean: Flag de Email verificado
  - `sessionId` string, nullable: Chave do device do cliente
  - `identifierId` string, nullable: ID da transação controlado pelo cliente (Identificador do cliente)
  - `channelId` integer, nullable: Chave da subentidade (canal)
  - `address` AddressCommand
    - `zipCode` string, required: Código Postal do endereço
    - `street` string, nullable: Logradouro no endereço
    - `number` string, nullable: Número do endereço
    - `complement` string, nullable: Complemento do endereço
    - `district` string, nullable: Distrito do endereço
    - `city` string, nullable: Cidade do endereço
    - `state` string, nullable: Sigla do estado do endereço
    - `country` string, nullable: País do endereço
  - `phone` PhoneCommand
    - `countryCode` integer, required: Código de país do número de telefone celular do cliente
    - `areaCode` integer, required: Código de área do número de telefone celular do cliente
    - `number` integer, required: Número de telefone do celular cliente
    - `verified` boolean, nullable: Flag de número de telefone celular verificado
  - `card` CardCommand
    - `bin` integer, required: bin
    - `last4` integer, required: Últimos 4 campos do número do cartão
    - `ownerName` string, nullable: Nome do titular do cartão
    - `ownerDocument` string, nullable: CPF do titular do cartão
  - `vehicle` VehicleCommand
    - `proposedDate` string, date-time, nullable: Data da Proposta
    - `vehicleLicensePlate` string, required: Placa do veículo
    - `storeState` string, int32, nullable: Estado da loja
    - `licensePlateState` string, nullable: Estado da placa do veículo
    - `vehicleRegistrationState` string, nullable: Estado de registro do veículo
    - `financingAmount` number, double, required: Valor do financiamento
    - `marketValue` number, double, nullable: Valor de mercado
    - `vehicleManufacturingYear` integer, nullable: Ano de fabricação do veículo [YYYY]
  - `type` integer: Tipo da transação (1- Presencial (Padrão); 2- Online)
  - `referenceDate` string, date-time, nullable: Data de referência da transação
  - `identifierDate` string, date-time, nullable: Data de identificação da transação
  - `SecondaryDocumentType` string, nullable: Tipo do documento do cliente (CPF ou CNPJ)
  - `SecondaryDocument` string, nullable: Documento do cliente (Sem pontuação)
  - `Criterion` integer, nullable: ID com o critério para geração do módulo de credit pro
  - `genericFields` object, nullable: Campos Genéricos previamente configurados
  - `gender` string: Gênero do cliente ("male", "female", "non-binary", "other")
  - `services` object
    - `bcheck` string[]: Lista de serviços bcheck
  - `partners` Partner[]: Dados de Parceiros
    - `Document` string, required: Documento do sócio (sem pontuação)
    - `DocumentType` string, required: Tipo do documento do sócio (CPF ou CNPJ)
    - `Name` string, required: Nome do sócio
  - `legalRepresentatives` LegalRepresentative[]: Representante legal
    - `Document` string, required: Documento do sócio (sem pontuação)
    - `DocumentType` string, required: Tipo do documento do sócio (CPF ou CNPJ)
    - `Name` string, required: Nome do sócio
  - `SocialName` string, nullable: Nome social completo do cliente (Sem abreviaturas)
  - `Phones` object
    - `Phone` PhoneDto
      - `countryCode` integer
      - `areaCode` integer
      - `number` integer
      - `verified` boolean, nullable

## Response `201`

Created

- TransactionDto
  - `id` string
  - `createdAt` string, date-time
  - `documentType` string
  - `document` string, nullable
  - `name` string, nullable
  - `birthdate` string, nullable
  - `mothersName` string, nullable
  - `email` string, nullable
  - `verifiedEmail` boolean
  - `sessionId` string, nullable
  - `identifierId` string, nullable
  - `channelId` integer, nullable
  - `address` AddressDto
    - `zipCode` string
    - `street` string, nullable
    - `number` string, nullable
    - `complement` string, nullable
    - `district` string, nullable
    - `city` string, nullable
    - `state` string, nullable
    - `country` string, nullable
  - `phone` PhoneDto
    - `countryCode` integer
    - `areaCode` integer
    - `number` integer
    - `verified` boolean, nullable
  - `referenceDate` string, date-time, nullable
  - `identifierDate` string, date-time, nullable
  - `type` integer
  - `genericFields` object, nullable
  - `criterion` integer
  - `card` CardDto
    - `bin` integer
    - `last4` integer
    - `ownerDocument` string, nullable
    - `ownerName` string, nullable
  - `vehicle` VehicleDto
    - `ProposedDate` string, date-time, nullable
    - `VehicleLicensePlate` string
    - `StoreState` string, nullable
    - `LicensePlateState` string, nullable
    - `VehicleRegistrationState` string, nullable
    - `FinancingAmount` number, double
    - `MarketValue` number, double, nullable
    - `VehicleManufacturingYear` integer, nullable
  - `secondaryDocumentType` string, nullable
  - `secondaryDocument` string, nullable

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `500`: Internal Server Error

---

[API](https://skmtc.dev/serasaexperian/apis/transa-o.md) - [All operations](https://skmtc.dev/serasaexperian/apis/transa-o/llms.txt) - [OpenAPI document](https://skmtc.dev/serasaexperian/apis/transa-o/revisions/4ce13d304c95?raw)
