ETASCOM CRM V3 - Documentation API
    Preparing search index...
    • GET /api/mobile/contacts/clients/[id]

      Récupère tous les détails d'un client spécifique

      Parameters

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

      Returns Promise<
          | NextResponse<{ success: boolean; error: string; message: string }>
          | NextResponse<
              {
                  success: boolean;
                  message: string;
                  data: {
                      id: string;
                      code: string;
                      name: string;
                      type: string;
                      email: string
                      | null;
                      phone: string | null;
                      website: string | null;
                      notes: string | null;
                      paymentTermsDays: number | null;
                      paymentMethod: PaymentMethod | null;
                      currency:
                          | { id: string; code: string; symbol: string; name: string }
                          | null;
                      stats: {
                          totalOffres: number;
                          totalCommandes: number;
                          totalLivraisons: number;
                          totalFactures: number;
                          chiffreAffaires: number;
                      };
                      addresses: {
                          id: string;
                          type: string;
                          name: string
                          | null;
                          street: string | null;
                          city: string | null;
                          postalCode: string | null;
                          state: string | null;
                          country: string | null;
                          isDefault: boolean;
                      }[];
                      contacts: {
                          id: string;
                          firstName: string;
                          lastName: string;
                          position: string
                          | null;
                          email: string | null;
                          phone: string | null;
                          mobile: string | null;
                          isDefault: boolean;
                          isActive: boolean;
                          notes: string | null;
                      }[];
                      legalIdentifiers: {
                          id: string;
                          type: string;
                          value: string;
                          country: string
                          | null;
                          isActive: boolean;
                      }[];
                      files: {
                          id: string;
                          filename: string;
                          url: string;
                          mimetype: string;
                          size: number;
                          category: string
                          | null;
                          createdAt: Date;
                      }[];
                      recentOffers: {
                          id: string;
                          number: string;
                          projectName: string
                          | null;
                          status: SalesOfferStatus;
                          amount: number | null;
                          validityDate: Date | null;
                          createdAt: Date;
                      }[];
                      recentOrders: {
                          id: string;
                          number: string;
                          orderDate: Date;
                          status: SalesOrderStatus;
                          totalAmount: number;
                          deliveryDate: Date
                          | null;
                      }[];
                      recentDeliveries: {
                          id: string;
                          number: string;
                          deliveryDate: Date;
                          status: string;
                      }[];
                      recentInvoices: {
                          id: string;
                          number: string;
                          invoiceDate: Date;
                          totalAmount: number;
                          status: InvoiceStatus;
                      }[];
                      isActive: boolean;
                      createdAt: Date;
                      updatedAt: Date;
                  };
                  timestamp: string;
              },
          >,
      >