Contracts - Protected

Create Contract

Create new contract.

Automatically creates commission record for the user.

post/api/contracts/

Headers

x-api-tokenstring nullable

Request body

Clienteinteger required

Client ID

Viaturainteger required

Vehicle ID

Datastring date-time nullable

Contract date

Oferta1string nullable
Oferta2string nullable
Oferta3string nullable
Oferta4string nullable
Oferta5string nullable
Oferta6string nullable
ValorVendanumber nullable

Sale value

financiadoboolean nullable

Is financed

temretomaboolean nullable

Has trade-in

kmretomainteger nullable

Trade-in km

fornecedorretomainteger nullable

Trade-in supplier ID

matricularetomastring nullable
marcaretomastring nullable
modeloretomastring nullable
garantiainteger nullable

Warranty ID

contratopropostainteger nullable

Proposal contract ID

transporteparastring nullable
Fechadoboolean nullable

Is closed

Comercialinteger nullable

Salesperson ID

Datafechostring date-time nullable

Closing date

Dataentregastring date-time nullable

Delivery date

Ivanumber nullable

VAT percentage

FaturaIDinteger nullable

Invoice ID

IDempresainteger nullable

Company ID (set server-side from auth)

IDpontodevendainteger nullable

Point of sale ID

IDestadointeger

State ID (1=open, 2=closed, 3=cancelled)

Reservaatestring date nullable

Reservation until date

idresponsavelinteger nullable

Responsible user ID

meses_garantiainteger nullable

Warranty months

business_saleboolean nullable

Is a business sale (venda empresarial)

retomasinteger[] nullable

List of vehicle IDs for trade-ins

Response

Successful Response

IDinteger required
Clienteinteger nullable required
ClienteNomestring nullable required
Viaturainteger nullable required
ViaturaMatriculastring nullable required
Datastring date-time nullable required
ValorReservastring nullable required
ValorVendanumber nullable required
Fechadoboolean nullable required
Datafechostring date-time nullable required
IDestadointeger required
IDempresainteger required
IDpontodevendainteger nullable required
Comercialinteger nullable required
idresponsavelinteger nullable
ResponsavelNomestring nullable
Oferta1string nullable
Oferta2string nullable
Oferta3string nullable
Oferta4string nullable
Oferta5string nullable
Oferta6string nullable
garantiainteger nullable

Warranty ID (Z_Warranties)

meses_garantiainteger nullable

Warranty duration in months

contratopropostainteger nullable

Financing proposal ID

Dataentregastring date-time nullable

Delivery date

Reservaatestring date nullable

Reservation until date

Ivanumber nullable

VAT value

FaturaIDinteger nullable

Linked invoice ID

comissao_calculadastring nullable

Calculated commission

business_saleboolean nullable

Is a business sale

Changes