ETASCOM CRM V3 - Documentation API
    Preparing search index...
    • PUT /api/mobile/opportunities/[id]

      Modifie une affaire existante

      Body: Tous les champs optionnels (seuls les champs envoyés seront modifiés)

      Parameters

      • req: NextRequest
      • __namedParameters: { params: Promise<{ id: string }> }

      Returns Promise<
          | NextResponse<{ success: boolean; error: string; message: string }>
          | NextResponse<
              {
                  success: boolean;
                  opportunity: {
                      id: string;
                      number: string;
                      name: string;
                      codeVehicle: string
                      | null;
                      stage: BusinessOpportunityStage;
                      status: OpportunityStatus;
                      expectedRevenue: number | null;
                      actualRevenue: number | null;
                      probability: number | null;
                      client:
                          | {
                              email: string
                              | null;
                              id: string;
                              name: string;
                              phone: string | null;
                          }
                          | null;
                      lead: | {
                          companyName: string
                          | null;
                          email: string | null;
                          id: string;
                          name: string;
                          phone: string | null;
                      }
                      | null;
                      createdBy: { email: string; id: string; name: string | null }
                      | null;
                      technician: { id: string; name: string | null } | null;
                      adv: { id: string; name: string | null } | null;
                      keyAccountManager: { id: string; name: string | null } | null;
                      importanceType: string | null;
                      contextRevenue: boolean;
                      contextClient: boolean;
                      contextProduct: boolean;
                      majorClass: string | null;
                      notes: string | null;
                      rfqDate: string | undefined;
                      offerSentDate: string | undefined;
                      sopDate: string | undefined;
                      eopDate: string | undefined;
                      createdAt: string;
                      updatedAt: string;
                  };
                  message: string;
              },
          >,
      >