ETASCOM CRM V3 - Documentation API
    Preparing search index...
    • POST(
          request: NextRequest,
      ): Promise<
          | NextResponse<{ error: string; message: string }>
          | NextResponse<
              {
                  success: boolean;
                  message: string;
                  data: {
                      workstation: {
                          id: string;
                          code: string;
                          name: string;
                          description: string
                          | null;
                          isActive: boolean;
                      };
                      isAvailable: boolean;
                      currentWorkOrder: | {
                          id: string;
                          number: string;
                          status: WorkOrderStatus;
                          product: { code: string; id: string; name: string }
                          | null;
                          client: { code: string; id: string; name: string } | null;
                      }
                      | null;
                      scanInfo: {
                          scannedAt: string;
                          scannedBy: { id: string; name: string
                          | null; email: string };
                      };
                  };
              },
          >,
      >

      API Tablette - Scanner un Poste de Travail

      POST /api/tablet/workstation/scan

      Body:

      • code: string (code-barre du poste de travail)
      • userId: string (ID de l'utilisateur connecté)
      • metadata?: object (données supplémentaires)

      Réponse:

      • workstation: object (détails du poste)
      • isAvailable: boolean (disponibilité)
      • currentWorkOrder: object | null (OF en cours)

      Parameters

      • request: NextRequest

      Returns Promise<
          | NextResponse<{ error: string; message: string }>
          | NextResponse<
              {
                  success: boolean;
                  message: string;
                  data: {
                      workstation: {
                          id: string;
                          code: string;
                          name: string;
                          description: string
                          | null;
                          isActive: boolean;
                      };
                      isAvailable: boolean;
                      currentWorkOrder: | {
                          id: string;
                          number: string;
                          status: WorkOrderStatus;
                          product: { code: string; id: string; name: string }
                          | null;
                          client: { code: string; id: string; name: string } | null;
                      }
                      | null;
                      scanInfo: {
                          scannedAt: string;
                          scannedBy: { id: string; name: string
                          | null; email: string };
                      };
                  };
              },
          >,
      >