idpath · stringRequiredConstraints
{
"type": "string"
}Parameters, data structure and responses from the versioned contract.
/embarcador/solicitacoes-transporte/{id}/aceitar-oferta-motoristaTechnical descriptions are translated from the versioned contract. Original identifiers and JSON are preserved; data examples are omitted.
Records explicit acceptance of a real offer (ShipperDriverOffer dispatched and pending in the active round) by the authorized target driver (driver_user_id), delegating to central authority DriverOfferRoundDistributionService::acceptOfferByDriver.
offer_id (OFFER_ID_REQUIRED) referencing an existing real offer (OFFER_NOT_FOUND), already dispatched (OFFER_NOT_DISPATCHED), not withdrawn (OFFER_WITHDRAWN), within deadline (OFFER_EXPIRED) and addressed to the authenticated driver (OFFER_RECIPIENT_MISMATCH).conditions_version (OFFER_CONDITIONS_VERSION_REQUIRED) matching the offer's presented terms and current demand terms (OFFER_CONDITIONS_VERSION_MISMATCH).DriverProviderRepresentation / DriverRepresentationService), authorized vehicle (DriverVehicleAuthorization), daily check-in on the service date (DriverAvailability) and open slot availability (VACANCY_ALREADY_FILLED).operacao — Operations[
{
"oauth2": []
},
{
"chaveApi": []
}
]idpath · stringRequired{
"type": "string"
}Required
application/jsonoffer_idintegerRequiredMandatory ID of the real offer (shipper_driver_offers.id) issued and pending for the authenticated driver.
conditions_versionintegerRequiredMandatory version of the terms presented in the offer and active in the demand (OFFER_CONDITIONS_VERSION_REQUIRED).
driver_user_idinteger | nullOptionalAuthenticated driver ID (users.id). Must match the authenticated user and offer recipient (OFFER_RECIPIENT_MISMATCH).
aggregated_carrier_company_idintegerRequiredID of the provider company (companies.id / CNPJ) formally represented by the driver in driver_provider_representations.
driver_representation_idinteger | nullOptionalID of the active formal representation (driver_provider_representations.id).
vehicle_idinteger | nullOptionalID of the authorized vehicle for the driver in driver_vehicle_authorizations.
vacancy_slot_numberinteger | nullOptionalOperational vacancy number (shipper_operational_vacancies.slot_number).
work_unit_keystring | nullOptionalOperational day-rate/shift key.
200 HTTP ResponseDriver explicit acceptance recorded in shipper_driver_offers and shipper_operational_vacancies
application/jsonsuccessbooleanOptionaldataobjectOptionalcommercial_resolutionobject | nullOptional403 HTTP ResponseAuthenticated actor does not match the recipient driver (OFFER_RECIPIENT_MISMATCH) or lacks active formal representation (DRIVER_REPRESENTATION_REQUIRED)
422 HTTP ResponseMissing offer (OFFER_ID_REQUIRED), nonexistent (OFFER_NOT_FOUND), not dispatched (OFFER_NOT_DISPATCHED), withdrawn (OFFER_WITHDRAWN), expired (OFFER_EXPIRED), missing conditions version (OFFER_CONDITIONS_VERSION_REQUIRED) or mismatch (OFFER_CONDITIONS_VERSION_MISMATCH), slot already filled (VACANCY_ALREADY_FILLED) or missing/mismatched daily check-in (DAILY_CHECKIN_DATE_MISMATCH)
{
"tags": [
"Solicitações e Contratação de Transporte (Embarcador)"
],
"summary": "Registrar aceite explícito da oferta de transporte pelo motorista autorizado",
"description": "Registra o aceite explícito da oferta real (`ShipperDriverOffer` emitida e pendente na rodada ativa) pelo motorista destinatário autorizado (`driver_user_id`), delegando à autoridade central `DriverOfferRoundDistributionService::acceptOfferByDriver`.\n- Exige `offer_id` obrigatório (`OFFER_ID_REQUIRED`) referenciando uma oferta real existente (`OFFER_NOT_FOUND`), já enviada (`OFFER_NOT_DISPATCHED`), não retirada (`OFFER_WITHDRAWN`), dentro do prazo (`OFFER_EXPIRED`) e destinada ao motorista autenticado (`OFFER_RECIPIENT_MISMATCH`).\n- Exige `conditions_version` explícita (`OFFER_CONDITIONS_VERSION_REQUIRED`) idêntica aos termos apresentados na oferta e vigentes na demanda (`OFFER_CONDITIONS_VERSION_MISMATCH`).\n- Valida representação formal ativa (`DriverProviderRepresentation` / `DriverRepresentationService`), veículo autorizado (`DriverVehicleAuthorization`), check-in diário na data do serviço (`DriverAvailability`) e disponibilidade da vaga (`VACANCY_ALREADY_FILLED`).\n",
"operationId": "aceitarOfertaMotoristaSolicitacaoTransporte",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AceitarOfertaMotoristaRequest"
}
}
}
},
"responses": {
"200": {
"description": "Aceite explícito do motorista registrado em `shipper_driver_offers` e `shipper_operational_vacancies`",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SolicitacaoTransporteResponse"
}
}
}
},
"403": {
"description": "Ator autenticado não corresponde ao motorista destinatário (`OFFER_RECIPIENT_MISMATCH`) ou não possui representação formal ativa (`DRIVER_REPRESENTATION_REQUIRED`)",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Erro"
}
}
}
},
"404": {
"description": "Solicitação não encontrada",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Erro"
}
}
}
},
"422": {
"description": "Oferta ausente (`OFFER_ID_REQUIRED`), inexistente (`OFFER_NOT_FOUND`), não enviada (`OFFER_NOT_DISPATCHED`), retirada (`OFFER_WITHDRAWN`), expirada (`OFFER_EXPIRED`), versão de condições omitida (`OFFER_CONDITIONS_VERSION_REQUIRED`) ou divergente (`OFFER_CONDITIONS_VERSION_MISMATCH`), vaga já preenchida (`VACANCY_ALREADY_FILLED`) ou check-in diário ausente/de outra data (`DAILY_CHECKIN_DATE_MISMATCH`)",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Erro"
}
}
}
}
},
"x-fleetpay-scope": "operacao",
"x-fleetpay-module": "contratacao-direta",
"x-fleetpay-profiles": [
"embarcador",
"gestor",
"agregado_empresarial"
],
"method": "POST",
"path": "/embarcador/solicitacoes-transporte/{id}/aceitar-oferta-motorista"
}