ETASCOM CRM V3 - Documentation API
    Preparing search index...
    • POST(
          request: NextRequest,
      ): Promise<
          | NextResponse<{ error: string }>
          | NextResponse<
              {
                  success: boolean;
                  label: {
                      id: any;
                      code: any;
                      type: any;
                      quantity: any;
                      unit: any;
                      lotNumber: any;
                      position: any;
                      printedAt: any;
                      scannedAt: any;
                      createdAt: any;
                  };
                  stockLot: | {
                      id: any;
                      lotNumber: any;
                      batchNumber: any;
                      quantity: any;
                      unit: any;
                      expiryDate: any;
                      productionDate: any;
                      isActive: any;
                  }
                  | null;
                  product: | {
                      type: string
                      | null;
                      id: any;
                      name: any;
                      code: any;
                      description: any;
                      category: any;
                      unit: any;
                      weight: any;
                  }
                  | null;
                  reception: | {
                      id: any;
                      number: any;
                      receptionDate: any;
                      supplierName: any;
                      supplierCode: any;
                  }
                  | null;
                  location: | {
                      id: string;
                      code: string;
                      name: string;
                      rack: string;
                      level: string;
                      position: string;
                      warehouse: { code: string; id: string; name: string };
                  }
                  | {
                      id: null;
                      code: string;
                      name: string;
                      rack: string;
                      level: string;
                      position: string;
                      warehouse: null;
                  };
                  fifo: {
                      position: number;
                      totalLots: number;
                      isFirst: boolean;
                      message: string
                      | null;
                  };
                  status: {
                      isConsumed: boolean;
                      isPrinted: boolean;
                      canConsume: boolean;
                      canMove: boolean;
                  };
                  summary: {
                      productName: any;
                      productCode: any;
                      quantity: any;
                      unit: any;
                      lotNumber: any;
                      location: string;
                      currentRack: string;
                      warehouse: string;
                      fifoStatus: string;
                      status: string;
                  };
              },
          >,
      >

      POST /api/tablet/labels/scan

      Scanner une étiquette et récupérer toutes les informations :

      • Produit/matière première associé
      • Lot de stock (StockLot)
      • Position FIFO
      • Emplacement actuel
      • Statut de consommation

      Supporte les étiquettes de:

      • Matières premières (table Label)
      • Produits finis (table StockLabel)

      Parameters

      • request: NextRequest

      Returns Promise<
          | NextResponse<{ error: string }>
          | NextResponse<
              {
                  success: boolean;
                  label: {
                      id: any;
                      code: any;
                      type: any;
                      quantity: any;
                      unit: any;
                      lotNumber: any;
                      position: any;
                      printedAt: any;
                      scannedAt: any;
                      createdAt: any;
                  };
                  stockLot: | {
                      id: any;
                      lotNumber: any;
                      batchNumber: any;
                      quantity: any;
                      unit: any;
                      expiryDate: any;
                      productionDate: any;
                      isActive: any;
                  }
                  | null;
                  product: | {
                      type: string
                      | null;
                      id: any;
                      name: any;
                      code: any;
                      description: any;
                      category: any;
                      unit: any;
                      weight: any;
                  }
                  | null;
                  reception: | {
                      id: any;
                      number: any;
                      receptionDate: any;
                      supplierName: any;
                      supplierCode: any;
                  }
                  | null;
                  location: | {
                      id: string;
                      code: string;
                      name: string;
                      rack: string;
                      level: string;
                      position: string;
                      warehouse: { code: string; id: string; name: string };
                  }
                  | {
                      id: null;
                      code: string;
                      name: string;
                      rack: string;
                      level: string;
                      position: string;
                      warehouse: null;
                  };
                  fifo: {
                      position: number;
                      totalLots: number;
                      isFirst: boolean;
                      message: string
                      | null;
                  };
                  status: {
                      isConsumed: boolean;
                      isPrinted: boolean;
                      canConsume: boolean;
                      canMove: boolean;
                  };
                  summary: {
                      productName: any;
                      productCode: any;
                      quantity: any;
                      unit: any;
                      lotNumber: any;
                      location: string;
                      currentRack: string;
                      warehouse: string;
                      fifoStatus: string;
                      status: string;
                  };
              },
          >,
      >